my notes for playing DVDs on VIA C3 system (Freevo/MPlayer)

Kyler Laird Kyler at news.Lairds.org
Tue Feb 17 12:11:56 EST 2004


I've been collecting small, quiet computers for a few years now in
the hope that one would finally be able to (perform as advertised
and) allow me to watch DVDs.  Much to my wife's dismay, I've
refused to buy a consumer DVD player.

Recently I got MPlayer to play DVDs on my VIA C3 (933MHz) system.
I had to use the VESA video driver ("-vo vesa") and OSS audio
driver ("-ao oss") in order to get good frame rates.  This has been
working well and we've been happily watching DVDs for about a month.

I recently rigged a simple script to play a DVD as soon as it's
inserted and then eject it.  That was enough to let my wife watch
without waiting for me to log in to the machine to initiate
playback, but that failed when we got the "Sex and the City"
compilation.  Each episode is a separate track.  (Yes, I know there
is a DVD navigation plugin for MPlayer and I used it long ago.)

So...time to bite the bullet and look into the "home theater"
platforms again.  I'd tried MythTV and Freevo before but it had
been awhile.  I took another shot.

MythTV appears to be much more refined and feature-rich.  
	http://www.mythtv.org/
I fought through the MySQL installation and got all of my
television network program data, but I couldn't see how I'd get it
to use (something equivalent to) VESA output for movies using its
integrated viewer.  Without that I was stuck with a few frames per
second of video (and broken audio).

Next up, Freevo.
	http://freevo.sourceforge.net/about.html
I like Freevo because it's based on Python.  That means I might
have a chance of doing fun things with it.  Its other big
attraction is that it's not as monolithic as MythTV.  It's able
to use Xine and MPlayer.  

There's a version of Xine in the works that takes advantage of
the hardware MPEG decoder on this VIA miniITX system I'm using,
but for now MPlayer with VESA output is dandy.  I fired up Freevo
and was pleased to see it find the DVD in the "Watch movies"
section.  I selected it and got MPlayer with (slow) X11 output.

No problem, right?  Digging through some source, I decided to add
	MPLAYER_AO_DEV       = 'oss'
	MPLAYER_VO_DEV       = 'vesa'
to my configuration.  Now when I started DVD playback, I got a
fraction of a second of sound and then MPlayer died, returning me
to Freevo.

I spent quite a bit of effort debugging this.  I could run MPlayer
with the same arguments from the command line and it worked fine,
but if Freevo started it, it died (with a signal 11?).

Finally I tried the CVS version of MPlayer.  Success!  I'm not
sure what changed, but it worked.  Now I had a problem with
returning to the Freevo screen after MPlayer finished.  I knew it
was there (because if I hit "Enter" the movie would start again)
but I only saw a black screen.

My solution was to build a wrapper for mplayer.
	#!/bin/sh

	original_VT=`fgconsole`

	/usr/local/bin/mplayer.real $@
	python -c "print '%cc' % (27)"

	(
	chvt 1
	chvt ${original_VT}
	) &
Now, when the movie ends, the cursor is returned to the console
(That's been bothering me for a long time.) and the console is
switched enough to kick Freevo in the head so that it awakes and
refreshes the display.

This is great!

BTW, I'm using Freevo 1.4.1.  I tried using the CVS snapshot but
it always adds a "-pp" argument when calling MPlayer.  That
causes MPlayer to die.  There doesn't appear to be a way to turn
it off (although it's easy to find and disable in the script). 
I decided to stick with 1.4.1.

I just installed a PVR-250 so I hope to get the tuner working
and do some recording, etc. 

--kyler



More information about the Python-list mailing list