[mythtv-users] Playing back IFO/VOB files from server.

Paul Robertson paulrobertson at swbell.net
Sat Jul 8 17:19:54 UTC 2006


> Dos anyone know of a way to play back a VOB file and have the player 
use
> the IFO file with it?
>

Yes.  Very easily done.  Just define a file type for file type .ifo, and
have it call a script to invoke xine passing it the directory to the .ifo
file (minus the filename).  File types can be specified in mythtv at menu:

/Utilities/Setup/MediaSetting/VideoSetting/FileTypes 

I call my script for filetype .ifo this way:

/home/mythtv/.mythtv/myth-xine.sh --playifo %s

Another option is to use the following for filetype .vob and my script will
play all vobs in a sequence.

/home/mythtv/.mythtv/myth-xine.sh --playvob %s

And then here is my myth-xine.sh script. (In fact, I use this for all xine
invocations from mythtv):

#!/bin/bash

# Change HDTV CRT resolution to match dvd (720x480)
export DISPLAY=:0
saved=`xrandr | grep \* | cut -c2-2`
new=`xrandr | grep 720\ x\ 480 | cut -c2-2`
xrandr -s $new

# parse dir and filename and chdir
pathname=`echo $2 | rev | cut -d'/' -f 2- | rev`
filename=`echo $2 | rev | cut -d'/' -f 1 | rev`

case $1 in
        --playdvd|-p)
                xine -pfhq --no-splash -V Xv dvd:/
                ;;
        --playvcd|-c)
                xine -pfhq --no-splash -V Xv vcd://
                ;;
        --playvideo|-v)
                xine -pfhq --no-splash "$2"
                ;;
        --preview|-r)
                # seems to insist on full path here
                xine -pfhq --no-splash -V Xv "dvd:/$2"
                ;;
        --playiso|-i)
                # seems to insist on full path here
                xine -pfhq --no-splash -V Xv "dvd:/$2"
                ;;
        --playvob|-b)
                cd "$pathname" 
                # play all vobs in a sequence
                voblist=`echo $filename | sed 's/..VOB/*.VOB/'`
                xine -pfhq --no-splash -V Xv $voblist
                cd -
                ;;
        --playifo|-f)
                # play directory as a dvd
                xine -pfhq --no-splash -V Xv "dvd:/$pathname"
                ;;
        --playts|-t)
                # seems to insist on full path here
                xine -pfhq --no-splash -V Xv "dvd:/$2"
                ;;
        *)
                exit
                ;;
esac

# Restore HDTV CRT resolution
xrandr -s $saved

exit 0





More information about the mythtv-users mailing list