lisamelton / video_transcoding

Tools to transcode, inspect and convert videos.
MIT License
2.39k stars 160 forks source link

How to install Don Melton's Video Transcode Scripts on FreeNAS or other BSD based distros #171

Closed fahadshery closed 7 years ago

fahadshery commented 7 years ago

Hi Don,

I have been studying your amazing work and would love to use it but I am struggling to install it on my FreeNas box. I have a jail (which is like a container in FreeNas) that is called Handbrake. Within that jail I have manually installed pkg install ruby handbrake libass ffmpeg x265 libaacs libbdplus mkvtoolnix mp4v2 mpv When I do gem install video_transcoding it says gem command not found. Then I created a new folder called transcode at /transcode' then did a git clone https://github.com/donmelton/video_transcoding.git then goto thebinfolder and dotranscode-video --helpand it saystranscode-video: Command not found.`

what am I missing?

samhutchins commented 7 years ago

Is there a package named something along the lines of ruby-gems you need to install as well? It looks like the version of Ruby that's packaged for FreeNAS doesn't include the gem package manager

(I have absolutely no experience with FreeNAS)

fahadshery commented 7 years ago

This is what I am getting:

root@handbrake_encoding:/ # pkg install ruby-gems Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. pkg: No packages available to install matching 'ruby-gems' have been found in the repositories

lisamelton commented 7 years ago

@fahadshery Sorry I took so long to respond. I've been in the car traveling across state all morning. Thank god for, as usual, good questions from @samhutchins!

Unfortunately, like Sam, I have no experience with FreeNAS. But someone on the Web probably does. So, is it OK if tweet about this bug and ask for help?

fahadshery commented 7 years ago

@donmelton I have raised the issue here: https://forums.freenas.org/index.php?threads/how-to-use-dons-video-transcode-script-on-handbrake-jail.58416/#post-412429

I would love to be able to use your scripts and hopefully we will find a solution soon.

fahadshery commented 7 years ago

It worked by:

ruby ./transcode/video_transcoding/bin/transcode-video -h

Probably change the title to "How to install it on FreeNAS or other BSD based distros" and add instructions to the installation section

Many thanks and keep up the good work...

lisamelton commented 7 years ago

@fahadshery Hmmmm, it sounds like there's a problem with the path to your Ruby Gems on FreeNAS/BSDs if you have to resort to that.

gschwepp commented 7 years ago

Hi, I just installed video_transcoding in a jail on FreeNAS myself and it works fine. @fahadshery you just cloned the repository and did not install it properly.

First you should remove the cloned repository, to avoid any confusions between the scripts you run.

FreeBSD/FreeNAS does not install gems with ruby, you need to install it separately:

pkg install ruby23-gems

Then run: gem install video_transcoding

Now you can use all scripts as intended from your command line.

Lastly I wanted to give you some hints:

pkg install handbrake

Does install the commandline and GUI version of handbrake. You won't need any GUI software. It does install a bunch of unnecessary dependncies and requires about 700 MB disk space. You can install the handbrake-cli version using the ports. First you need to update your ports-tree, in a new jail run:

portsnap fetch portsnap extract

(For more information: https://www.freebsd.org/doc/handbook/ports-using.html)

Now you can compile handbrake:

cd /usr/ports/multimedia/handbrake make config

Uncheck X11 support.

make install clean

The compilation should run without errors you just installed only the commandline version of handbrake. This is not necessary, but it decreases the footprint of the jail in your system.

I am not sure if you need mpv. You don't have a GUI and I assume you won't use the detect-crop preview. Removing mpv with all dependencies will make your jail more leightweight.

I hope this does help and clarify the issue.

lisamelton commented 7 years ago

@fahadshery OK, based the incredibly detailed and useful information from @gschwepp, can we close this issue now?

fahadshery commented 7 years ago

@donmelton yes please. @gschwepp awesome! thank you.. I will give it a try and will get back to you if have any issues. Cheers