Files

127 lines
9.7 KiB
Plaintext
Raw Permalink Normal View History

Episode: 108
Title: HPR0108: Handbrake - Howto
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0108/hpr0108.mp3
Transcribed: 2025-10-07 11:34:01
---
Music
Welcome to Hacker Public Radio.
This is Quatt 2 and I'm going to be talking about a program that I've been using quite
a bit lately called Handbrake.
Handbrake is one of the many video ripping software applications out there.
The cool thing about Handbrake is that not only is it GPL, so it is available for free
and you also get all the source code and everything like that.
You can change it and modify it and everything.
But it's also available for a multitude of platforms.
Well, at least three.
There's the Handbrake command line interface for Linux.
There's the Handbrake command line interface for OS 10.
And then there's a Handbrake GUI version for OS 10 and Windows.
So the command line interface nature of it shouldn't scare you away.
It's actually not that bad.
It's really quite easy on the command line.
In fact, I found that the command line is a lot easier than the GUI because the GUI,
which I've used in OS 10 at work, is actually a little bit more
and overly complex, so I think lots of options kind of confusing and overwhelming.
The cool thing about the command line interface, well, okay, so to get Handbrake,
you can get it at handbrake.fr, I believe.
That is Handbrake.fr as in France.
You can download a pre-built binary for that, yet as Fr as in France.
Handbrake.fr as in France.
You can download a pre-built binary for that for Linux.
And you can install that really anywhere you want.
I mean, I put it in USR slash bin and that way I have access to it from anywhere in the system.
But you could put it, I guess, into your home folders as well, and just dot slash handbrake to the CLI.
But you can also download the source code.
The current version is 0.9.2, so you can download that and compile it yourself,
either way you want to do it.
So once you've got it in your system and available to you,
the easiest way to start getting used to how they do things is to take a look at the presets.
And usually I don't like presets, but frankly, I've been ripping Sony movies lately,
off of DVDs onto my hard drive because I'm moving away and want to not have to carry all my DVDs with me.
I've been looking at it a lot and just been using the presets because they're just really fast that way.
So to see the presets, you can type in handbrake CLI space dash lowercase z.
And in handbrake, the H, the B, and the CLI are all capitalized.
So the lowercase z option will show you all the presets.
They have presets for animation, for Apple TV, for just what they consider,
sort of a classic, simple preset to give you a pretty good quality movie that you can watch on your computer.
They've got stuff for films, so it'll be a higher quality presets for iPhone iPods, iPod Touch, PS3, PSP, QuickTime,
just Television Xbox 360.
They've got some great presets, very all purpose.
And it also kind of gives you a sense for what options they use on a regular basis.
Now if you're not really sure what you should be looking for in terms of which options you should have on
and what they should be set to, you can listen to my in-depth series on Codex.
I believe in that series I do try to touch on some of the really important variables
involved when you're encoding video.
However, for a complete rundown on what options you can set yourself,
you can use Handbrake CLI--help.
And that will show you all the different options, really, really broken up into logical sections.
It's really quite nice. It's one of the better man-page-like things that I've read.
The basic syntax for it is Handbrake CLI-space-i for your input file, whatever options you want to set,
and then dash-o for your output file.
And there's some flexibility with that.
I think you can put all your options up front and then do the dash-i and the dash-o at the end.
But the point is that you've got your input, your options, and your out file.
So for the input file, more often than not, you'll be pointing it to wherever the DVD that you're ripping is mounted.
So I would be doing Handbrake CLI-space-i, space-slash, media-slash, mymovie-slash-video-underscore-ts,
because all of the DVD data is stored in the video-underscore-ts folder.
Now, if you've copied the video-ts folder to your hard drive, obviously you'll just point Handbrake to that file.
Lots of different options to do.
If you want to use one of their presets that you've seen, you can just do a dash-z.
That's a capital Z this time.
So it's dash capital Z and then space the name of the preset.
So if you're doing it to a PSP, it'll just be capital P, capital S, capital P.
Or if you're doing it normal, what they consider the normal preset, you can do capital in normal, capitalization count.
So you have to give the exact name of the preset.
And then you would just do your out file.
So that's dash O, space, home, you know, the tilde-slash-video-slash-nameoffile.orgm, or whatever file you want to write out to your hard drive.
Okay, so if you're not doing a preset, there's a lot of great options that you've got.
So you can define which title specifically you want to rip if you think that's necessary.
That would be a dash T and whatever number of the title is that you want to rip.
So far, I haven't really had a problem with that.
All the DVDs that I've been doing seem to have a clear enough title that I don't really have to define which title it is.
But if you've got something loaded with special features and things like that, you might have to play the DVD, find out what title the actual movie is contained in, and then define that for the handbrake.
You can define what format you'll want the output to be.
You've got AVI, MP4, OGM, or MKV.
The default will just auto-detect that from your dash O, switch at the end, whatever you name your file has.
So if you name it, you know, MyRipToMovie.AVI, then obviously that's going to be the file output format.
You can do a dash capital O to optimize it for HTTP streaming, so that's kind of neat.
If this is something you're going to be posting somewhere for other people to watch online.
You can obviously set your width and your height. That's dash lowercase W for width and dash L, strangely enough, for the height.
But you don't have to, again, that kind of information will be auto-detected.
You've got a lot of different options for subtitles as well, and chapter markers.
But the big ones that you're going to be using, if you're not using the presets, will be the dash lowercase E. That'll set your encoder.
And you've got a lot of different encoders to choose from.
You've got ffimpeg, xvid, x264, and some variations of x264s.
But the one I usually use is just xvid. That's the one I like because it seems like a lot of different programs can play that really, a lot of different applications can play that really, really well.
So it doesn't matter whether I have VLC or whatever, just whatever I happen to have on whatever Linux box I'm on will probably play the movie.
But you can use whatever you find best for yourself.
You can use dash lowercase R for your frame rate. Again, it'll auto-detect that as well and just do it the same as source by default.
But if you decide you want to cut that down to save yourself some file space, file size in the end, you can do that.
Dash lowercase B is your video bit rate, and that's kind of important.
So the default is 1000, which is kind of a nice middle ground.
But if this is a big screen movie that you want to have really looking really, really nice, you might want to up that to something a lot higher.
Or if you're doing it out to an iPod or a media player or some kind, you might want to cut that down a little bit.
A dash 2 will give you a 2 pass encoding. So that'll take a little bit longer, but generally the results are nicer.
And you've got audio encoder options that you probably will want to set as well.
So the dash capital E will give you your audio encoder.
And you can choose from F-A-A-C, LAME, for MPEG3, VORBUS, AC3, or an AAC3, which is basically an AAC mixed down paired with an AC3 pass-through.
So if you're going to be playing this on your home theater, that would probably be a pretty good option to go to.
Or you could just go straight AC3, I guess.
A dash capital B is your audio bit rate.
It defaults to 128, which, you know, that's kind of the standard, but I don't know if that's the best.
So I usually put it like 192 or something like that, depending on the movie that I'm ripping, how much I care about it.
And how old it is, you know, what the sound makes us really like anyway. You might not need it that high.
You've got, you can do the sample rate of the audio as well. So that's dash capital R. That will do the sample rate.
And your choices there would be the native 48 kilohertz from a DVD, or you could sample that down to 44.1, which would be CD quality.
And then you could go lower if you're doing it online or something like that. So, you know, 32, 24, whatever.
At that point, you would just set your out file, so dash O, and then, you know, till day slash videos slash my ripped movie dot OGM or dot AVI, whatever it is.
And hit return, and it starts ripping your movie.
So it's a pleasure to use Handbrake CLI. It's not at all painful.
Like I say, there are some really cool presets in there that make it simply a matter of typing in Handbrake CLI, dash I for the year in file, dash Z, the name of the preset, dash O, the name of the out file.
And it will start ripping. And the advantage is, for me, at least it seems to be a lot faster than some of the other ripping programs that I've been using previously.
And the quality is quite good. So if you haven't tried Handbrake, check it out, Handbrake.fr, and don't get into trouble.
Thank you for listening to Half the Public Radio. HPR is sponsored by tarot.net, so head on over to CARO.18 for all of us to meet.
Thank you.