I have a 2 hour video. I want to make 30 minute sections but avoid re-encoding. So 2 hours of video into four 30 minute videos. How can I do this using a single ffmpeg command?
I am using Ubuntu 16.04 64-bit.
I have a 2 hour video. I want to make 30 minute sections but avoid re-encoding. So 2 hours of video into four 30 minute videos. How can I do this using a single ffmpeg command?
I am using Ubuntu 16.04 64-bit.
You can use the segment muxer:
ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 1800 -reset_timestamps 1 output_%03d.mp4
In this example output files will be named output_000.mp4, output_001.mp4, etc.
Segments may not be exactly 30 minutes long because it must cut on keyframes only.
-segment_time in hours, minutes, and seconds (eg. 01:00:00)
– plunker
May 21 '23 at 03:44
-acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
– Hideki Nishimura Aug 21 '17 at 12:51