[mythtv-users] idx and sub subtitles
Joseph A. Caputo
jcaputo1 at comcast.net
Mon Sep 13 16:01:22 EDT 2004
On Monday 13 September 2004 09:20, MB wrote:
> Hi!
> I have a little problem with mythvideo. I want to watch a avi file
> that has subtitles in an .idx and .sub file.
> Now, I didn't find any options in the configuration to autoload those
> files if they are in the same folder than the avi file. I think the
> only way to play the subtitles in the current mythvideo is the
> command for the player software.
>
> In the Manpages of mplayer are the options -vobsub file.sub -vobsubid
> file.idx, so it should work, but how can I tell mplayer the name of
> the 2 files?
> Is there a variable for the filename WITHOUT the ending? ( The only
> variable in my current command for mplayer is %s, so I suppose this
> is the video filename)
Here's a Perl script I hacked together; I've been using it for quite a
while with some success. Note that I changed it to use SDL output
instead of Xv to work around a driver bug; feel free to change it back
to Xv if you prefer.
Assuming your mythvideo files are in $moviedir, the script will:
- look in $moviedir/.bookmarks for a edit list (if you use this script,
pressing 'i' should set one, IIRC). This allows you to do some
rudimentary bookmarking (no feedback that your keypress was taken,
though)
- look in $moviedir/.subtitles for <moviefilename>.sub ; if it exists,
it will launch mplayer with appropriate options. The idx files should
be in the .subtitles directory also.
- try to determine the resolution of the movie and switch to an
appropriate video mode. For 16:9 movies, instead of centering the
picture vertically (black bars top & bottom), it will attempt to shift
the picture closer to the top of the screen so that subtitles will
display in the bottom black band (mplayer's subtitle rendering
sometimes isn't readable over light scenes).
Use at your own risk!
HTH,
-JAC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythmplayer
Type: application/x-perl
Size: 2991 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20040913/630385f2/mythmplayer.bin
More information about the mythtv-users
mailing list