What Command Line Input Would I Use For These Settings?

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Ratboy
Posts: 28
Joined: Fri Apr 27, 2007 11:38 am

What Command Line Input Would I Use For These Settings?

Post by Ratboy »

I'm in the process of converting a large library of Video_TS files and am having too many problems with the sound dropping out in the process. I'd like to use the command line instead, but I'm not familiar enough with Terminal. I'd appreciate it if someone would translate my GUI settings for use with the CLI. Also, I've a question about the audio settings: What if I choose Dolby Pro Logic II in the CLI, but the original film only has a stereo track? Thanks.

Title: All
Chapters: all
Create Chapter Markers: ON
Framerate (fps): Same as Source
Encoder: x264 (Main profile)
Average bitrate (kbps): 2500
Grayscale encoding: OFF
2-pass encoding: ON
File format: MP4
Codecs: AVS/H.264 Video / AAC Audio
Subtitles Language: OFF
Audio Language 1: First
Audio Language 2: OFF
Track Mix: Dolby Pro Logic II
Sample rate (Hz): 44100
bitrate (kbps): 192
Width: Auto Selected
Height: Auto Selected
Keep aspect ratio: ON
Crop: Automatic
Deinterlace: OFF

Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Post by Cavalicious »


Ratboy
Posts: 28
Joined: Fri Apr 27, 2007 11:38 am

Post by Ratboy »

I've read the guide, but being new to this, I'm not sure I have the right settings. Here's what seems correct to me:

HandBrakeCLI -i Volumes/Media\ Hard\ Drive/Movie\ Name/VIDEO_TS/ -o HandBrakeCLI -i Volumes/Media\ Hard\ Drive/Movie\ Name.m4v -f .mp4 -m -e x264 -b 2500 -2 -B 192 -R 44.1

Is that correct? Thanks.

cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

Some good reading on the subject...
Turn a preset into a command string

jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

Ratboy wrote:HandBrakeCLI -i Volumes/Media\ Hard\ Drive/Movie\ Name/VIDEO_TS/ -o HandBrakeCLI -i Volumes/Media\ Hard\ Drive/Movie\ Name.m4v -f .mp4 -m -e x264 -b 2500 -2 -B 192 -R 44.1

Is that correct? Thanks.
...no...like the guide tells you, put the source location after -i and the destination location after -o. You have it outputting to the command name, and you're giving it two inputs?! Also, like the help says, for -f "Your choices are avi, mp4, and ogm." -- no period before it. You need "mp4" not ".mp4"...

With all the crazy spaces you have in your file system ("Media Hard Drive" and "Movie Name"), you might as well use quotation marks instead of escaping each space with a backslash.

HandBrakeCLI -i "Volumes/Media Hard Drive/Movie Name/VIDEO_TS/" -o "Volumes/Media Hard Drive/Movie Name.m4v" -f mp4 -m -e x264 -b 2500 -2 -B 192 -R 44.1

...and I do hope that you aren't actually using "Movie Name"....

DPL2 mixdown is only enabled when HandBrake sees that the source audio track has 5.1 channels. Otherwise it just copies the stereo.

Ratboy
Posts: 28
Joined: Fri Apr 27, 2007 11:38 am

Post by Ratboy »

Thanks. It's working with with these settings:

./HandBrakeCLI -i "/Volumes/Media Hard Drive/Movie Name/VIDEO_TS" -o "/Volumes/Media Hard Drive/Movie Name.m4v" -f mp4 -m -e x264 -E AAC -b 2500 -2 -B 192 -R 44.1

Thanks for the help. (And, yes, I'm replacing "Movie Name" with the actual name of the movie.)

Josh396
Posts: 5
Joined: Mon Jul 09, 2007 7:17 pm

Post by Josh396 »

I think I'm having a little trouble. It's my first time using the CLI and I came up with this ./HandBrakeCLI -i ~/Movies/Pirates_of_the_Carribean -o ~/Desktop/movies/Pirates_of_the_Carribean.mp4 -p -m -6 -e x264 -b 2000 -2 thinking I'd be okay. It's running in the terminal but I'm averaging 85 FPS which I know isn't right for an H264 movie. Does anyone see anything I'm doing wrong? Thanks in advance.

Post Reply