Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

27
  • 1
    On ubuntu 12:10, -c:v and -c:a didn't work. I had to use "-acodec copy and -vcodec copy" instead. Commented Apr 2, 2013 at 14:21
  • 1
    @Samuel Then you're using an outdated version, which isn't even real FFmpeg, but the Libav fork. See: stackoverflow.com/a/9477756/1109017
    – slhck
    Commented Apr 2, 2013 at 14:45
  • 1
    Thanks for this! if you don't specify a duration, will it go to the end?
    – Jeff
    Commented Mar 31, 2014 at 17:03
  • 7
    @Prateek When copying the video bitstream (instead of re-encoding), you can only cut at keyframes. If there are keyframes at seconds 1, 2, and 3, but you want to cut at second 1.5, then ffmpeg will wait until second 2 before it can start cutting. That makes it inaccurate.
    – slhck
    Commented Jul 3, 2015 at 12:36
  • 6
    -to does not always "start from" -ss even without -copyts, @Maggyero I use to move the -to option to configure the input instead of the output so it is just another solution. ffmpeg -ss [start] -to [stop] -i in.mp4 -c copy out.mp4 Like this my stop time is correct despite the start time. I wonder if it is also the reason why @lustig moved -ss to the output while they did not know why. The answer does not even mention -copyts ! It should, as it is the simplest solution here ! I prefer reordering the arguments, but i guess it is not simpler.
    – Link-akro
    Commented Aug 23, 2020 at 8:54