Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to input only part of the video file in ffmpeg

Tags:

ffmpeg

I'm using ffmpeg in order to process videos.

ffmpeg -i C:\test.mp4 [rest of the command]

When I use above command it process whole video. How can I select a paticular part of the video and process?

like image 838
Asanka sanjaya Avatar asked Aug 10 '15 08:08

Asanka sanjaya


People also ask

How do I set video duration in FFmpeg?

Use the -t option to specify a time limit: `-t duration' Restrict the transcoded/captured video sequence to the duration specified in seconds. hh:mm:ss[. xxx] syntax is also supported.


1 Answers

This can be done by using -ss and -t options.

-ss seeks for the start position

-t limits the duration

so the command is like this.

ffmpeg -ss 50 -t 10 -i C:\test.mp4 [rest of the command]

this processes 10 seconds of video, starting at 50 and going onto 60.

like image 135
Asanka sanjaya Avatar answered Sep 28 '22 10:09

Asanka sanjaya