4 ms·
Note that ffmpeg isn't super fast when you want to cut a file into several pieces, mostly because you'll have to start it over and over for each piece (unless y
by aasasd 7y ago
Note that ffmpeg isn't super fast when you want to cut a file into several pieces, mostly because you'll have to start it over and over for each piece (unless you delve into some black magic with its filter graph, which is beyond my patience).
For splitting an audiobook into pieces, so that you can use the seek bar sanely, `mp3splt` can be used in one run pretty much at the disk's speed. Its format language for metadata is atrocious, but thankfully putting the result into a script frees me from revisiting the horror.
Here's the command I use to cut into 10-minute pieces without a 1-minute piece hanging at the end, and to name and title the pieces sequentially—so you can be spared the ordeal:
mp3splt -t '10.00>2.00' -o '@f @n2' -d . -g 'r%[@o,@N=1,@t=#t @N]' "$1"
—where $1 is the source file, and `.` is the current directory as the destination.
IIRC it also comes with oggsplt and flacsplt—but no such luck for aac or ac3.
- cm2187 7y agoWith ffmpeg, if you use -ss in input mode (ie before the -i), it looks for the nearest keyframe before but it doesn’t scan the full video so running it multiple time for each segment shouldn’t take much more time than a one pass software (and gives you the opportunity to do the segments in parallel if you can afford the I/O).
- aasasd 7y agoAlas! I turned to mp3splt after having rather, erhm, prolonged experience with ffmpeg, and found the difference to be night and day. IIRC ffmpeg also utilized the CPU considerably.