Asanka Herath
Asanka Herath

Reputation: 1611

How to input only part of the video file in 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?

Upvotes: 5

Views: 4727

Answers (2)

Asanka Herath
Asanka Herath

Reputation: 1611

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.

Upvotes: 8

Murad Tagirov
Murad Tagirov

Reputation: 816

Please check following options:

This will stop writing output after duration reached:

-t duration (output). 

This will stop writing output at position reached:

-to position (output).

This will set input time offset in seconds

-itsoffset offset (input). 

Upvotes: 0

Related Questions