Timeline for How can I use ffmpeg to split MPEG video into 10 minute chunks?
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 18, 2020 at 18:03 | comment | added | aVeRTRAC |
Using this answer compared to the answer by @warren-young I ended up with a faster run, and for some reason smaller segment files, even though I used the -c copy on both versions.
|
|
| Sep 30, 2019 at 13:46 | comment | added | Wowfunhappy |
This is the first I've heard of a way to specifically get ffmpeg to split at keyframes! Usually it tries split cut the video at the exact time I specify, which if I'm using -codec copy results in a second-or-so of broken video.
|
|
| S Jan 18, 2019 at 18:52 | history | suggested | förschter | CC BY-SA 4.0 |
Clarified command
|
| Jan 18, 2019 at 18:50 | review | Suggested edits | |||
| S Jan 18, 2019 at 18:52 | |||||
| S Aug 28, 2018 at 17:22 | history | suggested | Alan W. Smith | CC BY-SA 4.0 |
Add second example with reset_timestamps that might be necessary on some machines
|
| Aug 28, 2018 at 14:29 | review | Suggested edits | |||
| S Aug 28, 2018 at 17:22 | |||||
| Dec 6, 2017 at 16:39 | comment | added | kRazzy R | Sir, this works well for me. splits .mp3 also into chunks of required lengths say 1 second each. what should I do , if I wanted to split chunks in successive series. i.e first iteration will be 0 -> 1, 1->2 , 2->3 etc. 2nd iteration will be 0.5->1.5, 1.5 to 2.5 and so on. | |
| S Nov 19, 2017 at 13:06 | history | suggested | Jonathan | CC BY-SA 3.0 |
I found that the answer didn't work without a fix mentioned in the comments, so I'm mentioning this fix in the answer.
|
| Nov 19, 2017 at 7:39 | comment | added | Jonathan |
I also found that -reset_timestamps 1 was needed for me on Ubuntu, so I'm guessing it has to do with the specific format or codec?
|
|
| Nov 19, 2017 at 7:37 | review | Suggested edits | |||
| S Nov 19, 2017 at 13:06 | |||||
| Oct 30, 2017 at 8:27 | comment | added | jlarsch |
found that adding -reset_timestamps 1 fixes the issue for me
|
|
| Oct 30, 2017 at 7:49 | comment | added | jlarsch | When I run this, I get the following error after the first segment is processed: [avi @ 05164500] Too large number of skipped frames 216000 > 60000A speed= 782x x av_interleaved_write_frame(): Invalid argument | |
| Sep 25, 2017 at 18:21 | comment | added | hoj201 |
Since the splits are not accurate (from the perspective of time), is it possible for ffmpeg to also output the frame number of each split?
|
|
| Jun 5, 2017 at 15:32 | comment | added | jarmod | On Mac, I found that this resulted in N output video chunks but only the 1st of them was a valid, viewable MP4. The other N-1 chunks were blank video (all black) with no audio. To make it work, I needed to add the reset_timestamps flag like so: ffmpeg -i input.mp4 -c copy -map 0 -segment_time 8 -f segment -reset_timestamps 1 output%03d.mp4. | |
| Apr 25, 2017 at 16:11 | comment | added | Mahmoud Mostafa |
@user1133275 you can use -segment_time 00:20:00 notation instead
|
|
| Mar 20, 2017 at 21:11 | comment | added | Jon | @user1133275 its second | |
| Mar 20, 2017 at 20:58 | comment | added | user1133275 | what are the units? 8s? 8min? 8h? | |
| Mar 20, 2017 at 10:04 | history | edited | CommunityBot |
replaced http://superuser.com/ with https://superuser.com/
|
|
| Feb 25, 2017 at 6:51 | comment | added | Malvineous | It actually gives you very accurate splits, if you value video quality. Rather than splitting based on a particular time, it splits on the nearest keyframe following the requested time, so each new segment always starts with a keyframe. | |
| Jun 27, 2015 at 3:41 | history | edited | jasonwryan | CC BY-SA 3.0 |
Formatting
|
| Jun 27, 2015 at 1:55 | review | Late answers | |||
| Jun 27, 2015 at 3:41 | |||||
| Jun 27, 2015 at 1:40 | review | First posts | |||
| Jun 27, 2015 at 3:10 | |||||
| Jun 27, 2015 at 1:39 | history | answered | Jon | CC BY-SA 3.0 |