User Tools

Site Tools


tech:mp3_moving

Moving Files + Folders and MP3 Encoding (Using Terminal)

A tutorial and reminder for how to move files and directories around

Moving Files

$ cp -R "/volumes/documents/temp/temp torrent files/Crazy Example [FLAC]" "/Volumes/Macintosh HD/Users/MichaelKatsimbris/Desktop/"

This first bit of code lets you use move from the torrent directory to the desktop so the files can be worked on locally.

The next bit of code below renames the folder to something workable.

$ mv "/Volumes/Macintosh HD/Users/MichaelKatsimbris/Desktop/Crazy Example [FLAC]" "/Volumes/Macintosh HD/Users/MichaelKatsimbris/Desktop/input"

After the code is worked on (see next section), move it to the Plex library:

$ mv "/Volumes/Macintosh HD/Users/MichaelKatsimbris/Desktop/input" "/Volumes/172.16.0.136/music torrents/"

After the move, go in to the library folder and:

  1. use Finder to rename the folder from “Input” to the “original torrent folder name”
  2. go in to the folder that has been copied / you just renamed and delete the now extra FLAC files

Command to Encode FLAC to MP3 (by directory / folder)

 ffenmass -i "/volumes/macintosh hd/users/michaelkatsimbris/desktop/input" -acodec libmp3lame -ext mp3 "/volumes/macintosh hd/users/michaelkatsimbris/desktop/input"

That code will put the mp3 files back in the same folder, and that's really it.

Splitting files (MP3s here)

Split code - The command “-t hh:mm:ss is only for the amount of time you need! NOT an end time.

 ffmpeg -i input.mp3 -vcodec copy -acodec copy -ss 00:01:37 -t 00:15:27 output1.mp3 

Splitting files to TimeStamp (MP3s here)

ffmpeg -ss 00:01:00 -to 00:03:30 -i input.mp4 -c copy output.mp4

Merging files (MP3s here)

 ffmpeg -i "concat:audio1.mp3|audio2.mp3|audio3.mp3" -c copy merged_audio.mp3 

OR
1) Create a list file in the same directory as audio files.

file 'audio1.mp3'
file 'audio2.mp3'
file 'audio3.mp3'

2) Save the file as file_list.txt
3) Run the following command

 ffmpeg -f concat -safe 0 -i file_list.txt -c copy merged_audio.mp3 

Extracting Audio from Video

ffmpeg -i input_video.mp4 -q:a 0 -map a output_audio.mp3
tech/mp3_moving.txt · Last modified: by katsimbris