[MPlayer-dev-eng] [PATCH] DVD subpicture/audio stream mapping
Lehel Bernadt
lehel at pmc-services.hu
Fri Aug 26 11:56:42 CEST 2005
Hi all!
I had to realise that mplayer entirely ignores the logical mapping info
between the various dvd audio/subtitle tracks and the corresponding mpeg
streams, and does an identity mapping instead.
But I guess it's because libdvdread lacks the support for it :)
So here is the patch that fixes this shortcoming...
Some background info:
The audio and subtitle streams as specified in the IFO do not correspond
one-to-one to the streams in the mpeg-ps, but there is a mapping table which
specifies the assignments.
In case of audio this hasn't been a big problem unless the dvd has been really
screwed up, because there are the same number of logical streams as mpeg
streams. So maybe you have a 0->1, 1->0 mapping in which case selecting one
language in mplayer gets you the other soundtrack, but both tracks are
accessible.
Subtitles are not so simple however, because for one logical stream you can
have multiple mpeg subpicture streams. If you create a dvd for a 16:9 movie,
you have to specify a spu stream for 4:3 letterboxed display and also for
16:9 widescreen display. Up to this time I have run across only one dvd which
did not map the same stream to both modes. So not a frequent case, but until
now mplayer could not display the subtitles correctly for these dvds, because
it considered logical stream N to map to mpeg stream N. But in this case the
mapping is e.g. lang1->{0,1} lang2->{2,3}, so when selecting lang1 mplayer
would play lang1 stream for letterbox, and when selecting lang2, it would
play lang1 stream for widescreen. The lang2 sub would be totally
inaccessible, even with -sid, because the code ignores values higher than the
maximum number of subs.
So if you had problems like this, hopefully this will fix it. Patch is against
the last CVS snapshot accessible from the webpage (20050806).
Regards,
Lehel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream-mapping.patch.gz
Type: application/x-gzip
Size: 2323 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050826/370112f2/attachment.bin>
More information about the MPlayer-dev-eng
mailing list