HanBrakeCLI for Unraid 64-bit


Recommended Posts

yuuuuup.  Now what you could do is search the slackware package list for a 14.x x64 version of bwm-ng, install it manually, and then assuming the basic usage commands haven't changed UnMenu should be able to access it for bandwidth monitoring as desired.

 

Not as simple as UnMenu is supposed to be, but we are in the early stages here.

Link to comment
  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

you need bwm-ng for handbrake?  I'm confused.

 

But yeah I feel ya.  My unraid boxen has more transcoding capacity than my PC so getting HB up and running has been a big draw.  I know Plex can do on the fly transcode of my raw BD rips but given that a well defined handbrake transcode works much slower tells me I can get better quality, and direct play on my Roku, if I just do all the transcoding upfront.  And of course it saves space on my system.

Link to comment

yuuuuup.  Now what you could do is search the slackware package list for a 14.x x64 version of bwm-ng, install it manually, and then assuming the basic usage commands haven't changed UnMenu should be able to access it for bandwidth monitoring as desired.

 

Not as simple as UnMenu is supposed to be, but we are in the early stages here.

Or, you could edit the bwm-ng-unmenu-package.conf file in the /boot/packages folder, and substitute the url and filename for the 14.1 x64 that you searched out, update the md5 signature and version string, and post the x64 version of the unmenu package file here.

 

Once you find the download url for the new package, you are half of the way there to just updating the unmenu package file.

 

Of course, this all assumes that the x64 version puts its binary in the same path, /usr/bin/bwm-ng.

Link to comment

No I don't need bwm-ng it's just showing up in my syslog. I'm OCD about that sort of jazz. Yeah like I said that's been my biggest draw. On another note how do you setup you custom settings for HB? Do you copy the encode log from GUI version and paste it to command line?

Link to comment

yuuuuup.  Now what you could do is search the slackware package list for a 14.x x64 version of bwm-ng, install it manually, and then assuming the basic usage commands haven't changed UnMenu should be able to access it for bandwidth monitoring as desired.

 

Not as simple as UnMenu is supposed to be, but we are in the early stages here.

Or, you could edit the bwm-ng-unmenu-package.conf file in the /boot/packages folder, and substitute the url and filename for the 14.1 x64 that you searched out, update the md5 signature and version string, and post the x64 version of the unmenu package file here.

 

Once you find the download url for the new package, you are half of the way there to just updating the unmenu package file.

 

Of course, this all assumes that the x64 version puts its binary in the same path, /usr/bin/bwm-ng.

Oh god coach I think I'm over my head. 

Will this work. http://wwww.slackbuilds.org/repository/14.1/network/bwm-ng/

Link to comment

yuuuuup.  Now what you could do is search the slackware package list for a 14.x x64 version of bwm-ng, install it manually, and then assuming the basic usage commands haven't changed UnMenu should be able to access it for bandwidth monitoring as desired.

 

Not as simple as UnMenu is supposed to be, but we are in the early stages here.

Or, you could edit the bwm-ng-unmenu-package.conf file in the /boot/packages folder, and substitute the url and filename for the 14.1 x64 that you searched out, update the md5 signature and version string, and post the x64 version of the unmenu package file here.

 

Once you find the download url for the new package, you are half of the way there to just updating the unmenu package file.

 

Of course, this all assumes that the x64 version puts its binary in the same path, /usr/bin/bwm-ng.

Oh god coach I think I'm over my head.

Heh. I was kind of picking at jumperalex, not you HAVOC. For a techy, it's not hard to do, just takes a few minutes of time. He suggested you do the heavy lifting, when in fact, it wouldn't take a whole lot of effort to do it correctly and update unmenu. I don't have a 64 bit build running right now, or I'd do it.
Link to comment

HB Options: Yes I did start with using the windows GUI to get n idea of the commands.  But it won't direct copy since the file paths will likely be different.  Mine also quickly evolved as I referenced what it gave with what all the options were from the HB Help docs.  Handbrake GUI includes a lot of stuff even if it isn't unused / unchanged from default.  So my final set of commands was much shorter and simpler to understand.

 

Package Links: It would seem that should work.  Though I can't vouch for the "slackers.it" domain as an authoritative source.  I did some looking at the official slackware repository and it doesn't seem to have bwm for 14.x and other sources I found don't differentiate on i486 vs x86_64

 

My Coaching: ;-) oh come on now all I was just saying you can manually install bwm-ng like any other package (just like handbrake).  After that the UnMenu Network Monitor page that shows the results of bwm-ng should just work.

 

Even worse, I didn't get "the joke" because I read jonathanm's post and thought to myself, "yup, that wouldn't be too hard to do either"  ;D ;D ;D

Link to comment

As to the slackbuild link ... just hard to say if it will work in 64-bit.  easy way to tell.

 

But I guess the question I have for your Havoc is why are you even getting that error (and trying to solve it)?  Do YOU have unmenu installed?  Not that I care too much about thread jacking this thread, but I know there is an UnMenu thread ;-)

Link to comment

Havoc: I released trolley 0.2.1 with 3rd party URL support last night. You may just need to update your install (run the installer again). You can check your version by running `trolley version`.

 

It won't let you install a package with mismatched architecture, which may be useful with what you're trying to do.

 

root@Tower:~# trolley install http://slackware.org.uk/people/alien/restricted_slackbuilds/handbrake/pkg64/14.0/handbrake-0.9.9-x86_64-1alien.txz
=> Downloading handbrake (0.9.9 x86_64)
=> Installing
=> Installed

Link to comment

FYI, here is the command I executed:

 

HandBrakeCLI -i "/mnt/user/Movies/Kingdom of Heaven 1080p (2005).mkv" -o "/mnt/user/Movies/Kingdom Of Heaven 1080p (2005)-1.mkv"  -f mkv  -w 1920 -l 816 -e x264 -q 20 --vfr -a 1,1,1 -E copy:dtshd,copy:dts,ffac3 -6 auto,auto,stereo -R Auto,Auto,Auto -B 0,0,256 -D 0,0,0 --gain 0,0,0 --audio-fallback ffac3 --subtitle scan --subtitle-forced=1 --subtitle-burned=1 --markers --x264-preset=slow  --x264-profile=high  --x264-tune="film"  --h264-level="4.0"  --verbose=2

 

The bit that I'm not sure yet how to deal with is the size and cropping.  I suppose I could just always use 1920x1080 and accept that I might have black bars being encoded and wasting space, but it isn't like they add that much since compression of those macroblocks should be pretty good.  In any case if you look at that, and paruse the HandBrakeCLI guide (https://trac.handbrake.fr/wiki/CLIGuide) it should set you up to run your encodes.  In the end it turned a 40GB movie into a 13GB movie.

 

Oh and those settings are based on suggestions for Roku compatibility discussed here: http://roku.yt1300.com/settings.html

Link to comment

Havoc: I released trolley 0.2.1 with 3rd party URL support last night. You may just need to update your install (run the installer again). You can check your version by running `trolley version`.

 

It won't let you install a package with mismatched architecture, which may be useful with what you're trying to do.

 

root@Tower:~# trolley install http://slackware.org.uk/people/alien/restricted_slackbuilds/handbrake/pkg64/14.0/handbrake-0.9.9-x86_64-1alien.txz
=> Downloading handbrake (0.9.9 x86_64)
=> Installing
=> Installed

Very good thanks for the help and updated code. I will one day master this coach. :o

Link to comment

FYI, here is the command I executed:

 

HandBrakeCLI -i "/mnt/user/Movies/Kingdom of Heaven 1080p (2005).mkv" -o "/mnt/user/Movies/Kingdom Of Heaven 1080p (2005)-1.mkv"  -f mkv  -w 1920 -l 816 -e x264 -q 20 --vfr -a 1,1,1 -E copy:dtshd,copy:dts,ffac3 -6 auto,auto,stereo -R Auto,Auto,Auto -B 0,0,256 -D 0,0,0 --gain 0,0,0 --audio-fallback ffac3 --subtitle scan --subtitle-forced=1 --subtitle-burned=1 --markers --x264-preset=slow  --x264-profile=high  --x264-tune="film"  --h264-level="4.0"  --verbose=2

 

The bit that I'm not sure yet how to deal with is the size and cropping.  I suppose I could just always use 1920x1080 and accept that I might have black bars being encoded and wasting space, but it isn't like they add that much since compression of those macroblocks should be pretty good.  In any case if you look at that, and paruse the HandBrakeCLI guide (https://trac.handbrake.fr/wiki/CLIGuide) it should set you up to run your encodes.  In the end it turned a 40GB movie into a 13GB movie.

 

Oh and those settings are based on suggestions for Roku compatibility discussed here: http://roku.yt1300.com/settings.html

Okay thanks for the guide. I'll report back.

Link to comment

Rereading now I realize my comments about size and cropping might not have been clear.  As you probably are aware HB GUI has an option to automatically choose cropping for you and also will do some auto calc or resolutions depending on your anamorphic, modulus, and keep-aspect settings.  The Roku guide generally says to leave anamorphic off, keep-aspect on and auto-crop on.  So that means you only need to be concerned with choosing the largest appropriate uncropped height or width and HB will choose the other based on the crop settings and aspec ratio.  So for a modern movie that would mean 1920 for uncropped width since this movie has black bars on the top and bottom.  For anything modern (2.35:1 being viewed on 1.33:1) you can almost assume that fact outright.  The problem is exactly what the vertical crop should be?  I don't know of any way to get that other than allowing HB GUI to do its own analysis, taking a safe guess, or leaving it full sized at 1920,1080.  The CLI has no such analysis.  Now of course for anything older that might not be in 2:35 you'll have to keep an eye out for, and anything 4:3 would then need some horizontal cropping

 

Sorry if that is all stuff you already know, I just wanted to save you some time if you hadn't gotten that far into thinking about it because it is an bit to deal with when using CLI.  And frankly I don't have a good answer, so I'm hoping someone else does :)  I haven't gotten around to trolling the HB forums yet either.

Link to comment

Rereading now I realize my comments about size and cropping might not have been clear.  As you probably are aware HB GUI has an option to automatically choose cropping for you and also will do some auto calc or resolutions depending on your anamorphic, modulus, and keep-aspect settings.  The Roku guide generally says to leave anamorphic off, keep-aspect on and auto-crop on.  So that means you only need to be concerned with choosing the largest appropriate uncropped height or width and HB will choose the other based on the crop settings and aspec ratio.  So for a modern movie that would mean 1920 for uncropped width since this movie has black bars on the top and bottom.  For anything modern (2.35:1 being viewed on 1.33:1) you can almost assume that fact outright.  The problem is exactly what the vertical crop should be?  I don't know of any way to get that other than allowing HB GUI to do its own analysis, taking a safe guess, or leaving it full sized at 1920,1080.  The CLI has no such analysis.  Now of course for anything older that might not be in 2:35 you'll have to keep an eye out for, and anything 4:3 would then need some horizontal cropping

 

Sorry if that is all stuff you already know, I just wanted to save you some time if you hadn't gotten that far into thinking about it because it is an bit to deal with when using CLI.  And frankly I don't have a good answer, so I'm hoping someone else does :)  I haven't gotten around to trolling the HB forums yet either.

Thanks for clearing the heights and cropping issues. This is the settings I was using with HB. Let me know I'm encoding a video with your recommend settings and see how I will fair out.

HandBrakeCLI -i /mnt/user/DVDs/Original/Monsters_University_t00.mkv -t 1 --angle 1 -c 1-32 -o /mnt/cache/.custom/Monsters.mkv -f mkv --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1,1 -E copy:ac3 -6 auto -R Auto -B 0 -D 0 --gain 0 --audio-fallback ac3 -x level=4.1:vbv-bufsize=78125:vbv-maxrate=62500:ref=6:bframes=12:b-adapt=2:analyse=all:trellis=2:no-dct-decimate=1:deblock=-2,-1 --verbose=1

Link to comment

Hmmm you know what.  The CLI does have autocrop as an option, and in fact it is default.  Now I'm wondering what would happen if I pushed just -w 1920 in the CLI, left -l blank and of course made sure autocrop was on.  hmmm I'll have to test that this weekend.  If that works I'll be able to easily batch all my BD rips and let the server churn for the next week unattended :D

Link to comment

Hmmm you know what.  The CLI does have autocrop as an option, and in fact it is default.  Now I'm wondering what would happen if I pushed just -w 1920 in the CLI, left -l blank and of course made sure autocrop was on.  hmmm I'll have to test that this weekend.  If that works I'll be able to easily batch all my BD rips and let the server churn for the next week unattended :D

That would make life a lot easier. Automation is the way to go.

Link to comment
  • 7 months later...

Nice work jumperplex!

 

If anyone is interested, I updated the script above to use trolley. It will:

 

* fetch the lib by version and match it to your arch

* save the package to /boot/extra

* install it

 

Notice there are no versions specified. Trolley will pick the correct version for your Slackware version. That means this script installs the same on unRAID 5.0.x AND 6.x. By future proofing your code, you can ensure that it will work months and years down the line with minimal effort. Everybody wins.

 

#!/bin/bash
[[ `command -v trolley` == "" ]] && curl -sk https://raw.github.com/nicinabox/trolley/master/install.sh | sh

trolley install freetype
trolley install fontconfig
trolley install libogg
trolley install libsamplerate
trolley install libtheora
trolley install libvorbis
trolley install libxml2
trolley install zlib
trolley install glibc
trolley install glib
trolley install gcc
trolley install libpng
trolley install xz

if [[ `uname -m` == 'x86_64' ]]; then
  trolley install http://slackware.org.uk/people/alien/restricted_slackbuilds/handbrake/pkg64/14.0/handbrake-0.9.9-x86_64-1alien.txz
else
  trolley install http://slackware.org.uk/people/alien/restricted_slackbuilds/handbrake/pkg/13.37/handbrake-0.9.9-i486-1alien.txz
fi

 

I'm new to unRAID and Linux, forgive me if I do something is wrong.

I copy your script and create file name as handbrake_trolley.sh in /boot/extra . Then in the command console, I run script as ./handbrake_trolley.sh  I got error message  -bash: ./handbrake_trolley.sh: /bin/bash^M: bad interpreter: No such file or directory

Could you please tell me what do I do wrong ?

thanks

Link to comment
  • 2 months later...

First off, many thanks to ClunkClunk for working out the details for 32-bit UnRaid: http://lime-technology.com/forum/index.php?topic=3714.msg285620#msg285620

 

I went through and updated the links to the 64-bit package locations, put it into a script just to make it simpler and added the installpkg lines.  I'm not a script expert so I didn't try to make it deal with directories on its own etc,  It just runs wget and installpkg in whatever directory you're sitting. 

 

So best bet is to run the script from /boot/packages

 

#!/bin/bash

wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/x/fontconfig-2.10.93-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/freetype-2.5.0.1-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libogg-1.3.0-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libsamplerate-0.1.8-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libtheora-1.1.1-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libvorbis-1.3.3-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libxml2-2.9.1-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/zlib-1.2.8-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/glibc-2.17-x86_64-7.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/glib-1.2.10-x86_64-3.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/d/gcc-g++-4.8.2-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/l/libpng-1.4.12-x86_64-1.txz
wget -nc http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware64-14.1/slackware64/a/xz-5.0.5-x86_64-1.tgz
wget -nc http://slackware.org.uk/people/alien/restricted_slackbuilds/handbrake/pkg64/14.0/handbrake-0.9.9-x86_64-1alien.txz
installpkg fontconfig-2.10.93-x86_64-1.txz
installpkg glibc-2.17-x86_64-7.txz
installpkg libsamplerate-0.1.8-x86_64-1.txz
installpkg xz-5.0.5-x86_64-1.tgz*
installpkg freetype-2.5.0.1-x86_64-1.txz
installpkg handbrake-0.9.9-x86_64-1alien.txz
installpkg libtheora-1.1.1-x86_64-1.txz
installpkg zlib-1.2.8-x86_64-1.txz*
installpkg gcc-g++-4.8.2-x86_64-1.txz
installpkg libogg-1.3.0-x86_64-1.txz
installpkg libvorbis-1.3.3-x86_64-1.txz*
installpkg glib-1.2.10-x86_64-3.txz
installpkg libpng-1.4.12-x86_64-1.txz
installpkg libxml2-2.9.1-x86_64-1.txz*

 

First encode is running right now!!!

 

UPDATE: see nicinabox's post here http://lime-technology.com/forum/index.php?topic=31528.msg286568#msg286568 if you would like to use Trolley for a quick, smooth install

 

jumperalex, my HandBrake on my server is working by following your guide. Now,I need to install libdvdcss for HandBrake 64-bit, where is good place to find this library and how to install it . Hope, you can help me out. Thanks

Link to comment

I'd look for stuff like that here: http://lmgtfy.com/?q=slackware+64+14.1+libdvdcss

 

;-)

 

Seriously though here is one I found: http://slackware.org.uk/slacky/slackware64-14.1/libraries/libdvdcss/1.2.13/ ... heck we could/should problem get the other files from this source as well [shrug]

 

Then you can use the pattern from the rest the script to use wget to pull libdvdcss-1.2.13-x86_64-1ponce.txz and then use similar syntax to install the package.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.