<div dir="ltr"><div>Hi<br><br></div>Trying to encode and stream audio using GStreamer 1.2, faac, tsmux and possibly tcpserversink, I have spotted a few issues. I'll try to explain them in the text below.<br><div><br>To produce I use the follwoing pipeline:<br>
<br> $ gst-launch-1.0 -v audiotestsrc is-live=true do-timestamp=true ! 'audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1' ! faac ! aacparse ! 'audio/mpeg,mpegversion=4, stream-format=adts, base-profile=lc, rate=(int)44100, channels=(int)1' ! queue ! mpegtsmux name=tsmuxer ! tsparse ! tcpserversink host=0.0.0.0 port=5012 sync-method=2<br>
<br></div><div>To verify the format, I spot in the output to the terminal the following:<br><br>/GstPipeline:pipeline0/GstFaac:faac0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)1, rate=(int)44100, stream-format=(string)adts, level=(string)2, base-profile=(string)lc, profile=(string)lc<br>
<br></div><div>So faac outputs aac encoded audio using mpegversion 4 profile LC format ADTS for 1 channel at the rate of 44100Hz.<br><br></div><div> Further more I see the muxer reporting this:<br><br>/GstPipeline:pipeline0/MpegTsMux:tsmuxer.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188<br>
<br></div><div>which seems reasonable. However I don't see a similar GstPad:sink line, which I believe is if not an error, then an inconsistency. Am I right. I do see however the following statement:<br><br>/GstPipeline:pipeline0/MpegTsMux:tsmuxer.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020309500ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b01e0001c10000e041f00c050448444d5688040ffffcfc0fe041f000fea4a3e1 ><br>
<br></div><div>Why do I see two GstPad:src-statements ? And why do I not see a sink statement for the muxer reporting what it 'sinks' from faac ?<br><br></div><div>Furthermore I receive the following warning too:<br>
<br>WARNING: from element /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: Internal data flow problem.<br>Additional debug info:<br>gstbasesink.c(3264): gst_base_sink_chain_unlocked (): /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0:<br>
Received buffer without a new-segment. Assuming timestamps start from 0.<br><br></div><div>I may be wrong, but I believe the warning about the internal flow problem may be linked to the statement that it assumes timestamps starting at 0. How does one go about eliminating the internal flow problem and the timestamp issue?<br>
</div><div><br></div><div>Anyway lets move on to the consuming side. To decode the stream, I use the following stream:<br><br>$ gst-launch-1.0 -v tcpclientsrc host=81.7.134.69 port=5012 ! decodebin ! autoaudiosink<br><br>
</div><div>First thing to notice is that I hear clear tone for a second, then a short interruption and then a clear tone again. The interruption sounds like a resyncing issue or a small loss of data. Why is the interruption there and how does one go about removing the interruption ?<br>
<br></div><div>Next thing is to look at what decodebin tells us about the stream. Here is what it says:<br><br>/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFaad:faad0.GstPad:sink: caps = audio/mpeg, framed=(boolean)true, mpegversion=(int)4, rate=(int)44100, channels=(int)1, stream-format=(string)adts<br>
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFaad:faad0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003<br>
<br></div><div>So in this case it does say the mpegversion=4, the format is ADTS and the channels is 1 and the rate is 44100. I have earlier reported it said mpegversion=2 and channels=2, but for now I can't reproduce it, I must have been mistaken somehow. Sorry for that.<br>
<br></div><div>Best regards<br></div><div>Peter Maersk-Moller<br></div><div><br><br><br><br><br></div></div>