Transmuxing a TS stream to a matroska mux not possible

Peter Maersk-Moller pmaersk at
Tue Jun 24 15:32:22 PDT 2014


Using GStreamer 1.3.3 it seems impossible to transmux a TS stream with
H264/AAC to a matroska stream. Can that really be true?

I think the problem is that the tsdemuxer reports the audio stream to be
MPEG-2 ADTS although it is muxed as
'mpeg/audio,mpegversion=4,streamformat=raw', but I believe the tsmuxer
might convert it to ADTS as I believe a TS muxed stream can only be ADTS
inside and not raw. That the demuxer finds ADTS stream-format might make
sense, but finding mpeg/audio mpegversion=2 does not make sense I think. Is
this an error?

The pipeline tried used for transmuxing is this

gst-launch-1.0 -v \
        udpsrc port=8000
do-timestamp=false do-timestamp=true !\
        queue                   !\
        rtpmp2tdepay            !\
        queue                   !\
        tsparse                 !\
        queue                   !\
        tsdemux name=demux      !\
        queue                   !\
        identity silent=false !\
        aacparse                !\
        queue                   !\
        mux. demux.         !\
        queue                   !\
        h264parse               !\
        queue                   !\
        matroskamux name=mux streamable=true !\
        queue                   !\
        tcpserversink host= port=5020 sync-method=2

But this pipeline hangs as the aacparse can not generate what matrooskamux
needs from what aacparse receives as input.

The pipeline used for generating the TS stream is this

        gst-launch-1.0 \
        aacparse                !\
        'audio/mpeg, mpegversion=4, stream-format=raw' !\
        queue                   !\
        mpegtsmux name=tsmux    !\
        queue                   !\
        tsparse ! chopmydata max-size=1316 ! rtpmp2tpay ! queue ! udpsink
port=8000 host= tv. !\
        queue ! h264parse ! tsmux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list