[MPlayer-users] Problem identifying subs
rvm3000 at ya.com
Wed Oct 3 02:06:26 CEST 2007
I'm developing a mplayer front-end (smplayer). I'm having a problem with the
subtitles, I'm not sure about the value I should pass to the slave command
It seems for audios I have to use the ID that mplayer prints in ID_AUDIO_ID:
[Ogg] stream 1: audio (Vorbis), -aid 0
[Ogg] stream 2: audio (Vorbis), -aid 1
That works ok. But for subtitles it doesn't seem to be the same case. It seems
I have to use the position in mplayer's internal list. The ID of the first
subtitle may be 4 but I have to send sub_select 0, the 2nd may be ID 5 but I
have to use sub_select 1.
One problem is that mplayer doesn't say in the output what's the position of
the subtitle in the list. I just figured out that it's the same order on
which they appear in the output.
That was the way I implemented and it worked well until now.
It seems that now, at least for mp4 files (I don't know others) it requires
[mov] Subtitle stream found, -sid 2
If the ID is 2 I have to use sub_select 2, instead of sub_select 0 as before.
Ok, I think this is better. The problem is when several different kind of
subtitles are used at the same time. Imagine a mp4 or mkv movie with some
embedded subtitles, plus a *.srt file with the same name which will be loaded
by mplayer, and the user uses -vobsub to load a idx/sub file, which provides
This is what mplayer would print:
// Vobsub subtitles:
// Subtitles embedded in mkv:
// Subtitles from srt file:
SUB: Detected subtitle file format: subviewer
SUB: Read 766 subtitles.
SUB: Adjusted 247 subtitle(s).
What subtitles would "sub_select 0" use? The one from vobsub? The one from
mkv? The srt?
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?
That would make things a lot easier.
More information about the MPlayer-users