1

I want to cut video from long-video with ffmpeg, I use this command:

ffmpeg -i /home/nantembo/VideoPerl/1.mp4 -f avi -vcodec copy -acodec copy -ss 0:14:47 -t 0:58:55 /home/nantembo/VideoPerl/2.mp4

but I receive video duration 58:55 min with start position 0:14:47 + 0:44:08, but I need to receive video, which:

  • starting at 0:14:47
  • ending at 0:58:55

How I can do it?

1

According to the ffmpeg manual, the -t option is the duration, not the end time.

I think you're looking for the -to option:

 -to position (output)
           Stop writing the output at position.  position must be a time duration specification, see the Time
           duration section in the ffmpeg-utils(1) manual.

           -to and -t are mutually exclusive and -t has priority.

So in your case, the command will be:

ffmpeg -i /home/nantembo/VideoPerl/1.mp4 -f avi -vcodec copy -acodec copy -ss 0:14:47 -to 0:58:55 /home/nantembo/VideoPerl/2.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.