How to use prog-map property of mpegtsmux?

hilal ergun hilalergunn at gmail.com
Mon Mar 7 00:07:53 PST 2011


 Hi,

 I am trying to mux two or more mpeg4 videos into mpegts.

 My pipeline;

                  ------- filesrc location=test1.avi ! ffdemux_avi !
 gst-launch
            -----------> mpegtsmux ! filesink location=test.mpts
                  -------- filesrc location=test2.avi ! ffdemux_avi !

 This pipeline works fine, then "ffmpeg -i test.mpts" shows:

      Input #0, mpegts, from 'test.mpts':
             Duration: 00:03:00.00, start: 0.040000, bitrate: 3832 kb/s
             Program 1
                Stream #0.0[0x41]: Video: mpeg4, yuv420p, 592x238 [PAR
 147:148 DAR 42:17], 25 fps, 25 tbr, 90k tbn, 25 tbc
                Stream #0.1[0x40]: Video: mpeg4, yuv420p, 624x336 [PAR
 77:78 DAR 11:6], 1199 tbr, 90k tbn, 1199 tbc

 But i don't want this. I want these streams into 2 different
 programs.So I write a simple program and set 'prog-map' parameter.
 Then new ffmpeg output becomes:


        Input #0, mpegts, from 'test.mpts':
            Duration: 00:03:00.00, start: 0.040000, bitrate: 3832 kb/s
            Program 2
            Program 1
                    Stream #0.0[0x41]: Video: mpeg4, yuv420p, 592x238
 [PAR 147:148 DAR 42:17], 25 fps, 25 tbr, 90k tbn, 25 tbc
            No Program
                   Stream #0.1[0x40]: Video: mpeg4, yuv420p, 624x336
 [PAR 77:78 DAR 11:6], 1199 tbr, 90k tbn, 1199 tbc

 As you can see one of the streams is not associated with any program.
 Either I'm doing something or there is some
 problem with mpegtsmux. I'm using gst-plugins-bad is 0.10.19 and
 Gstreamer 0.10.30.

 I tried to debug mpegtsmux code and I can see that 'ts_data->prog_id'
 is properly set in the code. However, new streams
 don't seem correct. Does anybody have any idea about what may be wrong?

 Thanks.


More information about the gstreamer-devel mailing list