[MPlayer-users] Problem identifying subs

RVM rvm3000 at ya.com
Fri Oct 5 18:43:05 CEST 2007


El Miércoles, 3 de Octubre de 2007 02:06, RVM escribió:
> So the question is: how can I really know the value I should use for
> sub_select? Is there any option or something that makes mplayer to print
> the value I have to use?

Another example:

(using SVN-r24688)

Playing video.mp4, with 2 embedded subtitles. Another subtitle (video_es.srt) 
loaded by -sub (or automatically by -sub-fuzziness 1):

ID_SUBTITLE_ID=3
[mov] Subtitle stream found, -sid 3
ID_SUBTITLE_ID=4
[mov] Subtitle stream found, -sid 4

SUB: Detected subtitle file format: subviewer
SUB: Read 766 subtitles.
SUB: Adjusted 247 subtitle(s).
ID_FILE_SUB_ID=0
ID_FILE_SUB_FILENAME=video_es.srt
SUB: Added subtitle file (1): video_es.srt

sub_select 3 selects the first of the embedded subtitles in the video. 
sub_select 4 the 2nd one.

One might think that sub_select 0 will choose the subtitles in video_es.srt 
(ID_FILE_SUB_ID=0). It doesn't! To select that subtitles is necessary 
sub_select 5. Where does that 5 come from? The output doesn't mention a 5 
anywhere.

Now let's add an idx/sub file, which provides 4 more subtitles (en, fr, es, 
sr):

ID_VOBSUB_ID=0
ID_VSID_0_LANG=en
ID_VOBSUB_ID=1
ID_VSID_1_LANG=fr
ID_VOBSUB_ID=2
ID_VSID_2_LANG=es
ID_VOBSUB_ID=3
ID_VSID_3_LANG=sr

ID_SUBTITLE_ID=3
[mov] Subtitle stream found, -sid 3
ID_SUBTITLE_ID=4
[mov] Subtitle stream found, -sid 4

ID_FILE_SUB_ID=0
ID_FILE_SUB_FILENAME=video_es.srt

Now sub_select 0 selects the first subtitle from the idx/sub file (en). 
sub_select 1 chooses fr, sub_select 2 es and sub_select 3 sr.

sub_select 4 does nothing! 
sub_select 5 and 6 does nothing either

sub_select 7 selects the first subtitle embedded in the video and sub_select 8 
the 2nd.

And finally sub_select 9 selects the subtitles from the srt file.

Isn't this a chaos?

I know for MPlayer this is not very important, as it (b / j keys) just cycles 
through the subtitles, but for me, for my program, this is a very important 
problem which I don't know how to fix, as it's impossible to know for sure 
the value I have to pass to sub_select in order to select the subtitle that 
the user has chosen in the menu.

Wouldn't it be possible that MPlayer would print something like this?

ID_VOBSUB_ID=0
ID_VOBSUB_0_POS=0 *
ID_VSID_0_LANG=en

ID_VOBSUB_ID=1
ID_VOBSUB_1_POS=1 *
ID_VSID_1_LANG=fr

ID_VOBSUB_ID=2
ID_VOBSUB_2_POS=2 *
ID_VSID_2_LANG=es

ID_VOBSUB_ID=3
ID_VOBSUB_3_POS=3 *
ID_VSID_3_LANG=sr

ID_SUBTITLE_ID=3
ID_SUBTITLE_3_POS=7 *

ID_SUBTITLE_ID=4
ID_SUBTITLE_4_POS=8 *

ID_FILE_SUB_ID=0
ID_FILE_SUB_0_POS=9 *
ID_FILE_SUB_FILENAME=video_es.srt

-- 
RVM



More information about the MPlayer-users mailing list