Handbrake --stop-at parameter not working as intended

Solution 1:

The answer can be found in Handbrake's help:

handbrakeCLI.exe --help

The correct syntax is as follows:

--stop-at     <unit:#>  Stop encoding at a given frame, duration (in seconds),
                        or pts (on a 90kHz clock)

Example:

handbrakeCLI.exe -i SourceFile.mkv -o OutputFile.mkv --stop-at duration:120

This will give you the first 120 seconds of the video

Solution 2:

Ok, so I decided to solve my problem with ffmpeg as such:

ffmpeg -i SourceFile.mkv -ss 00:00:05 -t 00:02:30 -ac 2 -sn OutputFile.mkv

Explanation:

  • ss : seek start, or "Begin my encoding at this point in time" (hh:mm:ss)
  • t : duration (hh:mm:ss)
  • ac : audio channels, since this particular movie was having a problem disseminating the audio tracks during encoding
  • sn : suppress subtitles, as ffmpeg was complaining about the subtitle track

This worked perfectly for what I was looking for.

Solution 3:

As of April 2015, this is what I found, and I wonder if it would change in the future:

--start-at duration:120 --stop-at duration:60

The start-at duration is really "start at" some point. The stop-at duration is really a length (a true duration). So the word duration means different things. The line above means: start at 00:02:00, and for 60 seconds. So a quick way to remember it is: start-at is at a point, and stop-at is for a length.