Latest handbrake on Ubuntu 14.04 LTS?

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
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
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

Sorry to post such a lame question. I could probably find the answer by googling for an hour, but I prefer to just ask and save myself the time.

I'm not very experienced with Ubuntu, but started using it recently. Not knowing any better, I just installed whichever version of it seemed to be on offer as the "latest" (on the web site). That turns out to have been 14.04 LTS, which I've now learned is actually rather stale. Oh well.

Anyway, I did "apt-get install handbrake-cli" and it now appears that the version of handbrake CLI that this ended up installing is also not terribly fresh. (When I do "HandBrakeCLI --update" it says "HandBrake rev5464 (2014032499)", which I guess is about a year stale now.) This is a problem for me because I wanted to output .mp4 files and this version of handbrake was apparently not able to do that yet. (It will only output .mkv files.)

So can anyone tell me how to install a reasonably fresh version of HandBrakeCLI onto Ubuntu 14.04 LTS? If so, I sure would appreciate it. (I guess that I could upgrade the whole OS to 14.10, but I prefer not to do that right now. And besides, I'm not sure that that would help me any to get a fresh version of HandBrakeCLI anyway.)

Also, one other question: What is the proper way to get HandBrakeCLI to transcode audio to AAC? I tried using the following options at the end of my HandBkareCLI command line, but it seems that despite my obious desire here, I am getting MP3 in the output audio track, rather than the AAC I had hoped for. (The input audio track is WMA.) Here are the audio options I've been using on my test transcodes:

HandBrakeCLI -i test.wmv -o test.mkv -e x264 --x264-profile high -q 19 -E av_aac -B 128

Like I say, despite the "-E av_aac" part, the audio track in the output files is stilling coming out as MP3. What am I doing wrong?
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

About installing the latest HandBrakeCLI... umm... NEVERMIND! I googled and found the answer easily.

I still do need an answer to my question about transcoding audio to AAC however. Any helpful guidance on that would be greatly appreciated.
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

Ummm... I have to say NEVERMIND again. I just now performed the process described on this web page:

https://launchpad.net/~stebbins/+archiv ... e-releases

Specifically, I did this command:

sudo add-apt-repository ppa:stebbins/handbrake-releases

Then I tried (as root) doing a fresh:

apt-get install handbrake-cli

Unfortunately, that command poked around a bit and then just declared "handbrake-cli is already the newest version."

So what's up with this? Is the only version of HandBrakeCLI that is available for Ubuntu really nearly a year old now???

How can I get a version of HandBrakeCLI (and also the HandBrake GUI version) on Ubuntu (14.04) that knows how to write .mp4 output files? The (GUI) version I was using on Windoze 7 had no problems writing .mp4 output files, so I kind-of think that there ought to be a version available for Linux that can do that also.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mduell »

rfg wrote:Is the only version of HandBrakeCLI that is available for Ubuntu really nearly a year old now???

How can I get a version of HandBrakeCLI (and also the HandBrake GUI version) on Ubuntu (14.04) that knows how to write .mp4 output files?
The year old one is the broken (no mp4 and various other problems) Ubuntu Software Center one.

There's fresh builds of the releases and nightlies in stebbin's PPAs with mp4 support.
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mod16 »

rfg wrote:Specifically, I did this command:

sudo add-apt-repository ppa:stebbins/handbrake-releases
Did you a

Code: Select all

apt-get update
after adding the repository?
Then I tried (as root) doing a fresh:

apt-get install handbrake-cli

Unfortunately, that command poked around a bit and then just declared "handbrake-cli is already the newest version."
Try

Code: Select all

apt-get update
apt-get remove handbrake-cli
apt-get install handbrake-cli handbrake-gtk
(as root or using sudo).
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

Thank you both {mduell,mod16}, for your assistance. as you can see, I didn't lie when i said I was new to Ubuntu! :-) I really didn't know about these other steps I needed to take when adding another repository source.

I have done these additional steps now and... YIPEE! At least now I seem to have a HandBrakeCLI command installed that is up-to-date (20150308). That's the good news. that bad news is that despite having done that "apt-get update" and then:

apt-get remove handbrake
apt-get install handbrake-gtk

I now no longer seem to have the GUI version of handbrake installed. Well, at least it isn't installed as "handbrake" along my $PATH, as the old one was. I tried typing both "handbrake" and "handbrake-gtk" at the command line, and both just gave me a rather strange error... not just the usual "Not found" shell error. The errors in both cases said:

The program 'handbrake' is not installed. You can install it by typing:
sudo apt-get install handbrake

or else:

The program 'handbrake-cli' is not installed. You can install it by typing:
sudo apt-get install handbrake

I'm sorry, but I don't understand what the issue is now, and I don't know what I need to do now in order to get a proper modern version of the GUI version of HandBrake install. So I ask (beg) for a bit more help again.

Also, I still desperately need an answer to the question I asked about AAC audio output. What is the current Right Way to get that from HandBrakeCLI ? (As I said earlier, the options I tried didn't work and gave me just MP3 audio output instead.)

Any additional help & guidance would be greatly appreciated.

P.S. As you possibly can tell, I am not a UNIX novice. I have a good deal of UNIX experience, but virtually zero experience with Ubuntu and its package distribution system.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mduell »

-a 1 -E faac -B 160

Gives you the first audio track encoded AAC at 160kbps.

If you're comfortable on the command line, I'd highly recommend the CLI over the GUI.
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

I am indeed using the CLI, in preference to the GUI, generally, but there are occasions where I find it... ummm... educational to use the GUI. (I have learned a lot just from scrutinizing the options available in the GUI.) So I do still want to have the GUI version installed. But how can I achieve that? I'm still baffled. Where exactly (path?) does it normally get installed on Ubuntu anyway? Maybe it is there, under a different name or something, and I just need to look for it.

Regarding AAC audio output, I just went back and looked again at the one single web page that describes the HandBrake CLI and I saw that if the output file is a .mp4 file... which mine are, now that I have an up-to-date version of the CLI installed... then the default output audio encoder is "av_aac"... which I gather is shorthand for the AAC encoder contained in libavcodec... correct? Anyway, I am running a test now where I just omitted the -E option entirely, and so far I do seem to be getting AAC output. So that's good. But you are suggesting using "faac" in preference to the default "av_aac", right? Why? Is the faac encoder better in some way? If so, how? I'd like to be enlightened about this.

Also, awhile ago, I thought that I saw someplace (perhaps here in these formus) someone else recommending "ffaac" over "faac". Does that sound right? Is there such a thing also as an "ffaac" encoder? If so, is that even better than "faac"? If so, how?

P.S. It's too bad that the one single web page that describes the HandBrake CLI apparently doesn't even list all of the possible encoder names that can be given as an argument for the -E option... you know... I mean like right where the set of possible arguments for the -E option are listed. :-( I'm looking at it, and there isn't even any "faac" listed there, even though the names "faac" and also "ffaac" do appear in the section titled "Multiple Audio Tracks" later on the same page.
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mod16 »

"handbrake" and "handbrake-dbg" are the packages provided by the Ubuntu repos. If not already done - remove them.

"handbrake-cli" and "handbrake-gtk" are the PPA packages you want (or maybe already have).

"ghb" is the binary you need to run from the terminal if you want the GUI (but there should also be an icon in the app menu after the handbrake-gtk package is installed).

BTW: At the beginning it's often easier to use a graphical front end for apt. I recommend using Synaptic:
https://help.ubuntu.com/community/SynapticHowto

I'm not familiar with the handbrake CLI, so I can't really help you there, sorry!
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mod16 »

I'm not sure, but i guess "faac" is just an alias for "fdk_aac" - which indeed should be preferred over av_aac (better quality).

EDIT: I guess I'm wrong (faac and fdk_aac are different codecs):
https://trac.ffmpeg.org/wiki/Encode/AAC ... estquality

But you're right, "faac" isn't listed in the --help as possible value for -E.
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

mod16,

Thanks again for your really helpful responses.

Regarding the GUI... ummm... yea. It does appear that I can invoke that from an xterm window via "ghb". Really glad you told me! I would never have figured that out on my own. It ain't exactly an intutive name for the thing. I guess that naming it "HandBrakeGUI" or some such thing was out of the question. Too intutive, I guess. :-)

Anyway, about the AAC audio output... yea. Neither "faac" nor "ffaac" are listed as possibilities... either in help or on the web page where the possible arguments for the -E option are listed. (A small oversight that i hope someone will fix for the sake of us novice end lusers.)

So anyway, I'm googling around to try to find where other people are saying that faac is better than av_aac and I'm not really finding anything that describes the differences or benefits of one versus the other. I believe you 100% that the faac is better, and I'm going to start using that exclusively, but I just wish I wasn't operating quite so much in the dark. And I'm also still wondering about this other thing... ffaac. I'm googling for that too, and not really finding any useful information, so I can't even say what it is at this point. :-(
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

Ummmm... so I added "-E faac" to my command line(s) and just started up a new transcode, and looking at the text output, both before and after, I'm seeing the exact same line in both:

+ encoder: AAC (libavcodec)

So it seems like my addition of "-E faac" to my command line(s) had no actual effect. What gives? Did I neglect to install something?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mduell »

AAC (libavcodec) is the default, so I'm not sure what you were expecting.

You were complaining about getting MP3 before, but that was with the Ubuntard builds.
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

>AAC (libavcodec) is the default, so I'm not sure what you were expecting.

I was expecting to see at least some sort of change/difference... something like "+ encoder: AAC (faac)"... you know... to let me know that I'm now using some different audio encoder... as I have requested via the "-E faac" option. But as it stands, I really don't know for sure if I am reaping the alleged benefits of the ``better'' faac encoder.

>You were complaining about getting MP3 before, but that was with the Ubuntard builds.

First, to be clear, "complaining" is kind of a stronger word than I would have used. I didn't intend to be "complaining" per se. Just expressing my confusion about the MP3 output where I didn't really expect it.

But anyway, yes, things are much better now that I have a recent vintage version of handbrake installed, and yes, I'm now getting AAC for audio in the output, which was my primary goal. So mostly, I'm very very happy. But that having been said, I can't help but wonder if I am doing everything I should in order to get the best quality AAC in the output. Thus, my questions about the text {stdout,stderr} output from HandBrakeCLI that I'm getting now. If I asked, explicitly for the faac encoder... which I did... then within that text output from HandBrakeCLI, shouldn't that fact be noted someplace? If so, where should I be looking for that?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by mduell »

The real better AAC encoder is fdk_aac, try that.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by s55 »

HandBrake no longer supports faac. It was replaced with libav aac and fdkaac.
Faac is just an alias now so Folks scripts don't break.

You still get aac output which is what matters.
RonJohn
Novice
Posts: 54
Joined: Thu Jul 08, 2010 12:27 pm

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by RonJohn »

rfg wrote:Regarding the GUI... ummm... yea. It does appear that I can invoke that from an xterm window via "ghb". Really glad you told me! I would never have figured that out on my own. It ain't exactly an intutive name for the thing. I guess that naming it "HandBrakeGUI" or some such thing was out of the question. Too intutive, I guess. :-)
From the CLI, "dpkg -L" shows you what's in a package. Combine that with "grep" (geek acronym for "search") and a "pipe" to get this:

Code: Select all

$ dpkg -L handbrake-gtk handbrake-cli | grep '/usr/bin/'
/usr/bin/ghb
/usr/bin/HandBrakeCLI
rfg
Posts: 22
Joined: Tue Jan 07, 2014 9:04 am

Re: Latest handbrake on Ubuntu 14.04 LTS?

Post by rfg »

Thank you, s55, for the info on faac. That certainly does clear up the mystery.

Thanks alo, RonJohn, for the info about getting a list of installed package contents. (I knew how to do this on FreeBSD, but not really on Linux... till now.)
Post Reply