[MPlayer-users] some question about libmpdemux

Zongyao QU zongyao.qu at gmail.com
Sat Mar 27 14:59:22 CET 2010


Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:

> That sounds like a possible bug. Could you elaborate?
> It works for me with a transport stream containing three programs.

I think I may figure out the what problem is ,
although still not sure about the solution for my personal goal,
it seams that different demuxer has different track counting mechanism.

as for lavf, lavf will count the audio and video tracks globally.

so the output will be like this.
=============
index    track_id
----------------
1:       aid:1
2:       aid:2
0:       vid:0
============
Here index means the index in the a_streams[]/v_streams[] of demuxer_t

but some other demuxer, such as demuxer_mkv, 
will first recognize the audio/video, then count them separately.

so the output is (the same file)
=============
index    track_id
----------------
2:      aid:0
3:      aid:1
1:      vid:0
============
here index is global but ids are separate.
although I don't know why index starts from 1.

For me, I can't tell which is better, 
but consistency between different demuxers will be better.



More information about the MPlayer-users mailing list