3

I've got a bunch of old DVDs I want to encode and put on my NAS as AVI.

I'd like to use my Raspberry Pi Model B for the encoding as I won't miss it if it's out of action for hours/ days/ weeks. In the past I would have used a (now defunct) old Linux box running Debian and Handbrake.

At the hardware end of things I have a USB external DVD reader/writer and a powered USB hub.

What is the best combination of operating system and software to achieve this on the Raspberry Pi? Are there any other considerations around hardware?

Or is the Pi CPU to low powered for practical video encoding?

3

First of all its not efficient to rip a DVD on Raspberry Pi. I doubt Raspberry CPU/GPU can handle this without hardware acceleration. But you can give a shot for Handbrake.

To use handbrake on Raspberry Pi (or any armv6-hf) do this;

Add apt repository

sudo echo "deb http://honeybadger-apt.zapto.org wheezy main contrib non-free"  >> /etc/apt/sources.list

Add the honeybadger GPG key to your apt keyring

wget -qO - "http://honeybadger-apt.zapto.org/index.php?dir=&file=matt.askthebadger%40gmail.com.gpg.key" | sudo apt-key add -

Update repository index

sudo apt-get update

Install handbrake-cli and libdvdread which will provide a library to remove the copy protection

sudo apt-get install handbrakecli libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh

To create a DVD ISO file from a VIDEO_TS directory on your hard drive, run the following:

mkisofs -dvd-video -udf -o dvd.iso /folder-with-VIDEO_TS-in-it/

then mount the DVD iso to /mnt

sudo mount -o loop dvd.iso /mnt

This command will copy DVD vob files into a large file without copy protection.

vobcopy -l -o outDir/

Then encode with handbrake-cli

handbrake-cli -i outDir -o movie.mp4 -e x264 -q 20 -B 160 -t 1

-q quality
-B audio compress rate in Kbps
-t title id to convert
-e encode format

If it handbrake-cli can not handle without hardware acceleration you can try this transcoder. I haven't test it, but maybe it can work. just compile it then run;

./omxtx [-b bitrate] input.foo output.m4v

Sources :
http://blog.teamleadnet.com/2012/03/decss-and-convert-dvd-into-h264-video.html
https://github.com/arjenv/omxtx

| improve this answer | |
3

Or is the Pi CPU to low powered for practical video encoding?

Yes. The GPU on the other hand is made just for that. It is technically possible to decode MPEG-2 and encode h264, all in hardware. You will need a license for MPEG codec from the raspberry fondation (2.79 €), and some software which is being written since december 2012. NOT READY FOR PRODUCTION YET.

You may want to check the raspberry forum thread here:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=70&t=25022

Note: the thread is hidden in the OPENMAX forum, which is dedicated to the language used to operate the GPU. Basically, there is no guide yet, you have to read the whole thread, and then you can try to compile one or another version from the different git repositories.

If you don't know what git is, don't even try. Your best bet is Handbrake indeed, or wait until some binary pops up, in a month or in a year. The guys aren't paid for this, you can't even be sure it will ever happen, although I'm quite confident.

| improve this answer | |
1

DVD Video is packed into MPEG-2 (aka H.222/H.262) as defined by the ITU and referenced at WikiPedia

You can buy a hardware MPEG-2 license at the Raspberry Pi shop

This will enable hardware encoding and decoding for any MPEG-2 formats, including your desired DVD containers.

The only problem is that there is no software that is capable of using the Broadcom API to fully use the hardware for MPEG-2.

The best format to encode to will be in MPEG-4 (aka h264) - The Pi is already licensed to encode and decode to this format using the dedicated hardware.

The only problem is getting the data from MPEG-2 directly into MPEG-4 encoders so that the CPU will be idle while the dedicated hardware does all the hard work.

Handbrake will only use the CPU so if you don't mind it churning away in the background then thats the best you will get for now.

| improve this answer | |
0

Handbrake would probably be an option with raspbian, but I wouldn't recommend it. The Pi really doesn't have the guts it needs to do any kind of major encoding.

| improve this answer | |
0

for the encoding step mencoder should work just fine, and you may install it from the repositories. still you need some DVD ripping software to copy DVD contents off the disks.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.