Tuesday, May 27, 2008

CPU-optimized Backend for gHandBrake

Edit: The original author of gHandBrake's site appears to be down and I haven't heard from him since I submitted code to add most of the advanced x264 options to the interface, so I decided to offer my updated version right here (64-bit binary plus source code) until further notice. If you need to compile it for a 32-bit system, I have a list of dependencies for HandBrake here, and precompiled binaries of Yasm Debian/Ubuntu systems here. If you have any problems with any of it, just let me know in the comments and I'll try to help.

You can also download the unmodified gHandBrake (fewer features, but more stable) here. This package includes both the source tarball and a precompiled 64-bit deb binary for Ubuntu/Debian users.

Original post: I've been trying out gHandBrake, the excellent new GTK frontend for HandBrake. It's very early in development, so it doesn't have many of the advanced options--such as advanced x264 options--implemented yet but it seems quite solid and will eventually be a great replacement for HandBrakeGTK/RippedWire, which is basically just an incomplete port of the Windows GUI (of note, HandBrakeGTK does not actually pass advanced x264 options to the commandline).

Unfortunately, the precompiled binaries offered by the author do not appear to utilize HandBrake's processor-specific optimizations, so I decided to offer an optimized 64-bit build of the backend that would:
Download link

To use it, just download and extract, then replace the old ghandbrake-backend with the newer version. In a console, you would type (assuming it was extracted to your desktop):
sudo mv -f ~/Desktop/ghandbrake-backend /usr/bin
Since switching to the updated backend, my average encoding speed went from ~40 fps to ~115 fps, but YMMV.

Of course, if you compiled gHandBrake yourself from source, you would already have the optimizations included as long as you had the yasm assembler installed when you compiled. If you want to go this route, I have a precompiled yasm binary that recognizes SSE3 instructions in my previous post.

Please leave me a comment if you have any questions or concerns.

4 comments:

Unknown said...

Hello,

I'm the author of gHandBrake. I was pretty surprised to see your comment on the site. You're the first person (other than my room mate and I) that I know of who has ever used it.

I haven't worked on it in a few months because no one has shown any interest in it, and I've been pretty busy with school and all. I'm a Junior in computer science at the University of Illinois, so I don't have much spare time.

It's nice to see that at least someone has found it useful. I guess I'd be interested in picking up the development again. I was trying to get gHandBrake included in the Ubuntu repositories, but I don't know much about packaging and HandBrake's source code is so poorly organized that I just gave up. I like it though, and I think it's much more user-friendly than alternatives like DVD::rip and AcidRip, but still more useful than Thoggen.

If you're interested in contributing at all, let me know. Sometime, I'll try to put your changes on the site, but I really don't know when that would be.

Anyway, feel free to send me an email at derrick81787 at gmail.com, and thanks for using gHandBrake.

- Derrick

db1911 said...

I just switched from OSX to Ubuntu and amso happy to find this. Thanks for all the Handbrake help.Is there a way to set up this frontend to launch from an icon rather than going to the terminal?

Unknown said...

Hey, it's me again.

Unfortunately, my site did go down. I hope to eventually get it back up, but it won't be any time soon. The person who was hosting the server for me decided that he didn't have time to deal with it (he is also a student) and then quit paying for it. I'm glad to hear that you have posted it on your site, though. If for any reason you need it, I do have the original code on my computer, so I can send it to anyone who wants it.

If you want to have gHandBrake appear in your menu, create a file called ghandbrake.desktop in /usr/share/applications and put the following in it:

===== Begin ghandbrake.desktop ======
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=gHandBrake
GenericName=DVD Ripper
Comment=Rip DVDs Using gHandBrake
Icon=
Type=Application
Exec=ghandbrake
Categories=AudioVideo;GTK;Player
StartupNotify=true
Terminal=false
======= End ghandbrake.desktop ========

That should probably actually be part of the compiling process so that it does it automatically, but I must have left that out. I'm kind of new to configure scripts and MakeFiles and such. Don't include by lines with the ===== signs in them. In the icon field, you can type the path to any icon you want and it should appear, but it seems to be kind of finicky about when it works and when it doesn't. It only likes certain image formats, I think.

If you're new to Ubuntu and want help with anything like that, you should check out the Ubuntu Forums, and you'll definitely get help there.

Anyway, thanks for using gHandBrake, and let me know if you have any other problems.

- Derrick

cheap computers said...

I think it's very early in development, so it doesn't have many of the advanced options.

Analytics Tracking Footer