update on undvd packages

October 9th, 2008

One of the benefits of coding in a scripting language is the ability to easily move the code around and it runs everywhere. undvd is easy to install, you just extract the source and it's ready to go. Or, if you want to install it globally on the system, just run make install and you're set.

But undvd depends on a bunch of other tools, so what you really want is to let your package manager deal with satisfying the dependencies, and let you upgrade easily when a new version comes out.

Where can I find undvd?

I package undvd in three flavors myself: Gentoo, Fedora and Ubuntu. I run Gentoo and Ubuntu on my boxen, so those are the most well tested. In addition, ripdvd's author wedge does the honors for Slackware.

But there are some unofficial packages out there as well, so when you add it all up undvd is pretty well supported at this point.

Making friends with posix

Recently, a user expressed an interest in running undvd on a Mac, which is a whole new angle. I guess it never occurred to me that someone would use undvd outside linux, but why not. The recent switch to perl has obsoleted the many external tools that undvd previously relied on, which is a big [if unplanned] step towards portability. I ran some tests that revealed there were still a couple linuxisms left, so I've gotten rid of them now.

undvd-0.7.1 should in principle run on a Posix system with perl-5.8.8. The big thing isn't undvd, it's getting mplayer and the other binaries, cause they have to be built specifically for that platform. And outside linux, there's sometimes no standard package manager, which doesn't help at all.

At the end of the day, there is no escaping the fact that undvd on Posix is a fish out of water (true not only of undvd but probably most free software) - the environment just isn't as well supported as it is in a linux distribution that ships all the tools. There are no packages for any of these, but you can just extract the tarball and run undvd from whatever location.

DesktopBSD 1.6 (FreeBSD Ubuntufied)

It runs (except mencoder can't find x264, so I used xvid). The dvd device is called /dev/cdrom or /dev/acd0. Cloning with dd fails, vobcopy works.

OpenSolaris 2008.05

It runs (except mencoder can't find x264, so I used xvid). I have no idea how the device naming works, but when you put in a cd/dvd it should automount and you can look up the dvd device in the mount table. Packages for mplayer are available from Blastwave. Playback with mplayer worked, encoding segfaulted mencoder.

Mac OS X Leopard

It runs. The dvd device is called something like /dev/rdisk1. Mac people seem to be obsessed with guis, so any builds I could find only had mplayer playback, no encoding. Your best bet is probably MacPorts, modeled loosely on FreeBSD's ports. You'll want to build mplayer with the codecs you want selected as variants (think Gentoo USE flags). Disc cloning doesn't seem to work at all.

To install globally you'll want something like DESTDIR=/opt/local sudo make install.

Cygwin

It runs, and you can get builds of mplayer from the official site. The dvd device is called d: (or some other drive letter). Set PATH=/cygdrive/c/mplayer:$PATH and make sure c:\mplayer doesn't contain both a directory mplayer/ and a binary mplayer.exe, this makes cygwin very confused. On the whole it seems to work quite well, the process even successfully sets the cpu priority (nice).

:: random entries in this category ::

10 Responses to "update on undvd packages"

  1. dbr says:

    mplayer is trivial to build from source on OS X (with the Developer Tools installed, at least)

    As far as I can remember, all I had to do was grab the mplayer tarball, extract it, and run: ./configure --prefix=/usr/local/mplayer; make; sudo make install

    I've been meaning to try undvd out for a while (I've just been using Handbrake's GUI, which is a bit tedious with episodic content, as you cannot seem to add every title on the disc with the same setting)..

    Just quickly played around with undvd on OS X, it seems to work, although I seemingly have compiled mplayer without libmp3lame, and am missing a few binaries (mkv-tools related things, mostly). I may end up writing a simple script that uses the Handbrake CLI to rip a specified DVD folder, using the same settings, but undvd seems slightly more.. elegant.. Does it have any system in place for queuing multiple rips? I guess I could just do undvd -q /my/dvd1/; undvd -q /my/dvd2/ etc..

    Anyway, good work! I'm glad you ported undvd to something-that-isn't-shell-script!
    - Ben

  2. numerodix says:

    In the linux world we frown on installing from source onto the bare metal. It's messy, it doesn't account for upgrades or dependencies. The other day I discovered MacPorts, which is easy enough to install and seems to work quite well, I'd recommend using that. (Basically all it is is someone's figured out how to compile it, what it depends on, where the files should go etc. You get a nice integrated solution.)

    Umh, no it doesn't. I guess I've never ripped dvds from a tree of directories like that, I think of it more like a disc at a time. But as you say, you could easily queue it up like that in the shell, and undvd's fairly economic use of output means you could scroll up and see the outcome of all the rips after the fact.

    I suppose I should have a look at Handbrake one of these days. The one thing that's painful about gui rippers is often they have this "one time job" mindset, only let you select one title, no way to batch execute (well, dvd::rip does it, but it's quite a complicated beast). undvd, in contrast, has a cli mindset, I use it over ssh, it's meant to require little setting up.

  3. llee says:

    I was using undvd successfully in recent weeks with the perl version and Mac OS X 10.5.5, but a subsequent svn update for mplayer and later versions of x264 seem to have broken undvd. I can successfully use mencoder for other tasks, but undvd logs just stop with the initialization of the mencoder step. When I run the command line for encoding included in the undvd logs in a Terminal window, the same results are shown as in the undvd logs, but the additional line "bus error" concludes the terminal output, and a crash report is generated, assigning the crash sometimes to mencoder and other times to perl. I hope that further updates for mplayer and/or x264 will remedy the problem, but I would be interested to know it anyone else is affected. The crash occurs whether or not the source DVD is copy protected. Scandvd and other processes such as crop detect seem to function normally. Thanks.

  4. numerodix says:

    Can you send me the logfile?

  5. llee says:

    They're on the way. Thanks.

  6. llee says:

    Thanks to numerodix' help, I've able to get undvd working again. In my case the problem appears to have been caused by some difference in x264 sources released since the last time I had compiled x264 and mencoder for successful use with undvd. Thanks again!

  7. astl says:

    My problem with undvd resembles the one posted by llee. Could you please give me a helpful hand? Thanks!

    the log file:
    /usr/bin/mencoder -v -ss 0 -alang en -slang off -vf scale=480:384,harddup -oac mp3lame -lameopts vbr=3:abr=160:q=3 -ovc x264 -x264encopts subq=5:frameref=2:partitions=all:weight_b:bitrate=877:threads=auto -of avi -dvd-device /dev/dvd -o 04.avi.partial dvd://04
    MEncoder SVN-r28461-4.3.2 (C) 2000-2009 MPlayer Team
    CPU: AMD Athlon(tm) 64 Processor 3500+ (Family: 15, Model: 47, Stepping: 2)
    MPlayer was compiled without libmp3lame support.
    -lameopts is not an MEncoder option

    Exiting... (error parsing command line)

  8. numerodix says:

    What platform are you on?

    It says mplayer doesn't have all the libraries it needs. I guess you have to recompile it with libmp3lame. Either that or use a different audio codec than mp3.

  9. astl says:

    thanks, i changed the audio codec, it was quicker.

  10. astl says:

    oh, about the platform, i have linux, fedora 10. thanks again!