![]() ![]() The version of ffmpeg in most Linux repositories is going to be quite old, and in the case of Debian and Ubuntu et al the situation is even worse: they do not provide ffmpeg, but rather the fork, avconv, from the libav team (see also LordNeckbeard's answer here). force_key_frames 1500 -f segment -segment_times 1500 -segment_time_delta 0.05 output%02d.mp4 If you need accurate splitting, the documentation recommends re-encoding and using the -force_key_frames and -segment_time_delta options to ensure that there will be I-frames on the times that the segment muxer will attempt to split on (see also the libx264 and AAC encoding guides on the ffmpeg wiki): ffmpeg -i input.mp4 -c:v libx264 -crf 22 -preset veryfast -c:a libfdk_aac -vbr 3 \ ![]() However, it won't be 100% accurate, since ffmpeg needs to split on a key frame, which can't be guaranteed without re-encoding. This should be pretty quick, and lossless (so you'll get identical video with no extra video artefacts). There are a lot more options on the documentation page. You may find that you need to use -reset_timestamps 1 for the files to play correctly: ffmpeg -i input.mp4 -c copy -f segment -segment_times 1500 -reset_timestamps 1 output%02d.mp4 Note that -segment_time (without the 's') is a completely separate option - you'd use that if you wanted to split the file every five seconds (for example), without putting in a big list of every specific time. As you only want to split once, at 25 minutes, just use 1500 (=25*60). segment_times calls for a comma-separated list of split-points, measured in seconds. If you were to use output%03d.mp4, you would instead get 'output001.mp4' and 'output002.mp4'. This will produce two files, 'output01.mp4' and 'output02.mp4'. Basically: ffmpeg -i input.mp4 -c copy -f segment -segment_times 1500 output%02d.mp4 I would use ffmpeg's segment muxer (scroll down a bit on that link for some examples). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |