[mythtv-users] Autoloading subtitles with xine?

Simon Lundell simon.lundell at his.se
Mon Dec 26 17:03:17 EST 2005


Simon Lundell wrote:

> Paul Barker wrote:
>
>> Simon Lundell wrote:
>>
>> <SNIP>
>>
>>> Thanks!
>>>
>>> I do have subtitles with different extensions (such as .srt etc). I 
>>> modified your script to search for these too, and pass the first 
>>> subtitle file found to xine. Works like a charm!
>>> //Simon
>>>
>>> #!/bin/bash
>>> FILE=$1
>>> SUB=`echo $FILE | awk -F. '{print $1}'`
>>> SUBT=`find . -maxdepth 1 -type f -and \( -name $SUB.sub -or -name 
>>> $SUB.srt \) | head -n 1`
>>> /usr/bin/xine  -pfhq --no-logo --no-splash -V xv $FILE#subtitle:$SUBT
>>>
>>>
>>>
>> Hmm, looks like I may have to upgrade to version 2.0 ;-)
>> Glad it helped
>>
> I would have waited a couple of days if i were you. The script does 
> not handle filenames with spaces that well yet...


I can not get it to work! My guess is that the spaces (and other special 
chars) don't get escaped correctly when passed to xine. I have no idea 
how to do that, I must have tried every combination of qouting, bot no go...

//Simon


More information about the mythtv-users mailing list