Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-28-2012, 02:22 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 17

Rep: Reputation: 1
How to use HandBrakeCli to encode video in a certain time duration?


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

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.

Old 01-28-2012, 05:13 PM   #2
LQ Newbie
Registered: Jan 2012
Posts: 17

Original Poster
Rep: Reputation: 1

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

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

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

Last edited by Hak5fan; 01-28-2012 at 05:16 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Time duration from one command to another niharikaananth Linux - Newbie 3 08-08-2011 05:40 AM
computing time duration tmaxx Linux - General 1 04-29-2008 09:37 PM
How do you find video info (duration, width, height) for avi, mov, mpg, etc.? BrianK Linux - Software 2 04-17-2007 10:31 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 11:17 AM
Video encode joeslomp Linux - Software 0 05-18-2004 06:13 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration