Re: [mythtv-users] Autoloading subtitles with xine?
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 ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Autoloading subtitles with xine?
Simon Lundell píše v Po 26. 12. 2005 v 23:03 +0100: 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... Try this. Tested. Works fine. #!/bin/bash FILE=$@ DIR=`dirname $FILE` SUB=`basename $FILE .${FILE##*.}` SUB1=$SUB*.sub SUB2=$SUB*.srt SUB3=$SUB*.txt SUBT=`find $DIR -maxdepth 1 -type f -and \( -name $SUB1 -or -name $SUB2 -or -name $SUB3 \) | head -n 1` if [ -n $SUBT ] then FILE=$FILE#subtitle:$SUBT fi xine -pfhq --no-logo --no-splash -V xv $FILE Petr ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Autoloading subtitles with xine?
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... Best wishes, Simon ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Autoloading subtitles with xine?
Hi! Mplayer is able to load subtitle files automatically, it loads subtitles with the same filename (without extension) as the movie file. Is it possible to make Xine do the same? //Simon ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Autoloading subtitles with xine?
Simon Lundell wrote: Hi! Mplayer is able to load subtitle files automatically, it loads subtitles with the same filename (without extension) as the movie file. Is it possible to make Xine do the same? //Simon ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users I have this scripted and put a custom player command in for movies with subs. Script is something like this: #!/bin/bash FILE=$1 SUB=`echo $FILE | awk -F. '{print $1}'` /usr/bin/xine $FILE#subtitle:$SUB.sub My subtitle files all have a .sub extention, are in the same directory as the movie file and have the same filename before the extentsion. For example the sub file for GhostInTheShell.avi is GhostInTheShell.sub. I set up a filter in the Video manager to make Myth ignore files called *.sub so the don't get listed in the movie lists. Paul ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Autoloading subtitles with xine?
Paul Barker wrote: Simon Lundell wrote: Hi! Mplayer is able to load subtitle files automatically, it loads subtitles with the same filename (without extension) as the movie file. Is it possible to make Xine do the same? //Simon ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users I have this scripted and put a custom player command in for movies with subs. Script is something like this: #!/bin/bash FILE=$1 SUB=`echo $FILE | awk -F. '{print $1}'` /usr/bin/xine $FILE#subtitle:$SUB.sub My subtitle files all have a .sub extention, are in the same directory as the movie file and have the same filename before the extentsion. For example the sub file for GhostInTheShell.avi is GhostInTheShell.sub. I set up a filter in the Video manager to make Myth ignore files called *.sub so the don't get listed in the movie lists. Paul ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users 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 ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Autoloading subtitles with xine?
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 Paul ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users