Issues when using faac, tsmux and possibly tcpserversink
Peter Maersk-Moller
pmaersk at gmail.com
Thu Sep 26 02:21:12 PDT 2013
Hi
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.
To produce I use the follwoing pipeline:
$ 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
To verify the format, I spot in the output to the terminal the following:
/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
So faac outputs aac encoded audio using mpegversion 4 profile LC format
ADTS for 1 channel at the rate of 44100Hz.
Further more I see the muxer reporting this:
/GstPipeline:pipeline0/MpegTsMux:tsmuxer.GstPad:src: caps = video/mpegts,
systemstream=(boolean)true, packetsize=(int)188
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:
/GstPipeline:pipeline0/MpegTsMux:tsmuxer.GstPad:src: caps = video/mpegts,
systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)<
47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941,
474020309500ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b01e0001c10000e041f00c050448444d5688040ffffcfc0fe041f000fea4a3e1
>
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 ?
Furthermore I receive the following warning too:
WARNING: from element
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: Internal data flow
problem.
Additional debug info:
gstbasesink.c(3264): gst_base_sink_chain_unlocked ():
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0:
Received buffer without a new-segment. Assuming timestamps start from 0.
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?
Anyway lets move on to the consuming side. To decode the stream, I use the
following stream:
$ gst-launch-1.0 -v tcpclientsrc host=81.7.134.69 port=5012 ! decodebin !
autoaudiosink
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 ?
Next thing is to look at what decodebin tells us about the stream. Here is
what it says:
/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
/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
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.
Best regards
Peter Maersk-Moller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130926/0334d5eb/attachment.html>
More information about the gstreamer-devel
mailing list