LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to use HandBrakeCli to encode video in a certain time duration? (https://www.linuxquestions.org/questions/linux-general-1/how-to-use-handbrakecli-to-encode-video-in-a-certain-time-duration-926103/)

Hak5fan 01-28-2012 01:22 AM

How to use HandBrakeCli to encode video in a certain time duration?
 
Hi

I want to encode a section of video starting at 5 minutes with a duration of 3 minutes. I ran the command below

Code:

HandBrakeCLI -i video.mp4 --start-at 300 --stop-at 180 -o test.mp4
But it doesn't seem to work. It encodes the entire length of the video and I only want part of it.

Ffmpeg does this well with -ss and -t and mencoder does it too with with -ss and -endpos

Does anyone know how to use HandBrakeCli to encode part of a video. I am new to this command. I did a google search first, but couldn't find anything on topic.

Thanks

Hak5fan 01-28-2012 04:13 PM

UPDATE

After doing more google searches I finally got the answer and will share with you.

The Format for start-at and stop-at for HandBrakeCLI

For time in seconds ie start at 150 seconds and end at 300 seconds

Code:

--start-at duration:150 --stop-at duration:300
Or for frames ie start at frame 2000 and end at frame 5000

Code:

--start-at frame:2000 --stop-at frame:5000
I've tested it and it worked like a charm.


All times are GMT -5. The time now is 03:39 PM.