zen.org Communal Weblog

June 6, 2005

MythTV can now play both MPEGs and AVIs — and our DVDs, too

Filed under: — brendan @ 04:19 GMT

After a little effort, our box can now play MPEGs properly! Until now there was always a problem with them: audio was never in sync with video, making it unusable. AVIs were fine, but MPEGs divided up between the Hauppauge PVR-350 card for video and our normal audio out. After I’d seen others make mention of using xine for MythTV, I thought I’d finally give it a shot. (I’ve used xine and VideoLAN, aka VLC, for playing mpegs under Linux, but not yet like this.) In only a few steps, it worked!

I first had to download xine itself, and use

rpm -Uvh libxine1-1.0.1cvs-050527.i686.rpm xine-ui-0.99.3cvs-050603.i586.rpm

to install the packages; those copies are regular nightly builds. In the MythTV front-end, I went through Setup to Video to Player Settings, and changed it from running mplayer to instead do

xine -pfhq --no-splash --audio-driver oss %s

Next, I created the ~/.xine directory and put these lines into the file ~/.xine/config:

audio.volume.mixer_volume:60
audio.synchronization.force_rate:44100
audio.device.alsa_front_device:default

Those values came from a forum or blog post somewhere, but I never wrote down the origin and Google doesn’t appear to have it. I’ll certainly attribute them to the source once I find out who it was. :) The config file will be used by xine, and those values will get pulled in then included in the auto-generated version that xine saves back out to the file.

Finally, to make xine honor commands from the remote control I had to edit ~/.mythtv/lircrc and insert the xine entries from Peter Baumgartner’s blog. His are based on Jarod Wilson’s guide, with additions for xine. Continuing the trend, I adjusted mine to have the Stop button actually exit xine, not just stop it and show the xine banner:

begin
prog = xine
button = STOP
repeat = 3
# instead, make this quit
#config = Stop
config = Quit
end

I just had to restart the MythTV front-end (using the green button), and voila! I could use a .mpg file and it plays it all correctly; open up any part of a ripped DVD, and it looks right. Yahoo! Big step.

Now we can play Letter Factory™ for Patrick any time we want since we’ve got it ripped onto the box’s hard drive, instead of worrying about putting in the DVD all the time. :-) See? It just calls for the right motivation…

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)


Powered by WordPress