GNOME Bugzilla – Bug 616421
celtenc/dec produces silent output with live sources
Last modified: 2011-11-07 18:44:54 UTC
I'm trying to test celtenc/dec with jackaudiosrc/sink, so I have one pipeline as follows: GST_DEBUG=2 gst-launch -v jackaudiosrc ! audio/x-raw-float, channels=2 ! audioconvert ! celtenc ! celtdec ! audioconvert ! jackaudiosink I have another pipeline to produce a test sound: gst-launch -v audiotestsrc ! jackaudiosink I connect the testsrc pipeline to the celt pipeline in jack. The celt pipeline should have the testsrc at its output, but it is only producing silence. Here's the output from the celt pipeline: Setting pipeline to PAUSED ... /GstPipeline:pipeline0/GstJackAudioSrc:jackaudiosrc0: actual-buffer-time = 200000 /GstPipeline:pipeline0/GstJackAudioSrc:jackaudiosrc0: actual-latency-time = 1333 /GstPipeline:pipeline0/GstJackAudioSrc:jackaudiosrc0.GstPad:src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... 0:00:00.057060554 9221 0x804f070 WARN bin gstbin.c:2312:gst_bin_do_latency_func:<pipeline0> failed to query latency New clock: GstAudioSrcClock /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 /GstPipeline:pipeline0/GstCeltEnc:celtenc0.GstPad:sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16 /GstPipeline:pipeline0/GstCeltEnc:celtenc0.GstPad:src: caps = audio/x-celt, rate=(int)48000, channels=(int)2, frame-size=(int)480, streamheader=(buffer)< 43454c54202020206578706572696d656e74616c20202020202020200b0000803800000080bb000002000000e001000078000000ffffffff00000000dabf6fb760e21a08c0811408488ff6b6b0944cb7dc6c1b080cba44b7000000008c7a6fb701000000, 1e000000456e636f6465642077697468204753747265616d65722043656c74656e630000000001 > /GstPipeline:pipeline0/GstCeltDec:celtdec0.GstPad:sink: caps = audio/x-celt, rate=(int)48000, channels=(int)2, frame-size=(int)480, streamheader=(buffer)< 43454c54202020206578706572696d656e74616c20202020202020200b0000803800000080bb000002000000e001000078000000ffffffff00000000dabf6fb760e21a08c0811408488ff6b6b0944cb7dc6c1b080cba44b7000000008c7a6fb701000000, 1e000000456e636f6465642077697468204753747265616d65722043656c74656e630000000001 > /GstPipeline:pipeline0/GstCeltDec:celtdec0.GstPad:src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16 0:00:00.064837377 9221 0x81c2790 WARN celtenc gstceltenc.c:931:gst_celt_enc_chain:<celtenc0> Buffer is older than previous timestamp + duration (0:00:00.000000000< 0:00:00.001333333), cannot handle. Clipping buffer. /GstPipeline:pipeline0/GstAudioConvert:audioconvert1.GstPad:src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 /GstPipeline:pipeline0/GstAudioConvert:audioconvert1.GstPad:sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16 /GstPipeline:pipeline0/GstJackAudioSink:jackaudiosink0.GstPad:sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)48000, channels=(int)2 0:00:00.081118264 9221 0xb66033a8 WARN bin gstbin.c:2312:gst_bin_do_latency_func:<pipeline0> failed to query latency 0:00:00.180647387 9221 0x81c2790 WARN baseaudiosink gstbaseaudiosink.c:1028:gst_base_audio_sink_skew_slaving:<jackaudiosink0> correct clock skew -725392 < -666500 0:00:00.520628474 9221 0x81c2790 WARN baseaudiosink gstbaseaudiosink.c:1028:gst_base_audio_sink_skew_slaving:<jackaudiosink0> correct clock skew -674054 < -666500 I haven't had better luck with alsa. The line that struck me as suspicious in the output was: gstceltenc.c:931:gst_celt_enc_chain:<celtenc0> Buffer is older than previous timestamp + duration (0:00:00.000000000< 0:00:00.001333333), cannot handle. Clipping buffer. Note that i have celt 0.7 installed, and that i'm using gst-plugins-bad-0.10.17 Any thoughts?
this is also true for the git versions.
I assume this doesn't work with vorbisenc/vorbisdec either? IMHO this looks like a bug in baseaudiosrc, the first few buffers all have a timestamp of zero which is simply wrong. If you add audiorate before celtenc this pipeline should work.
Vorbisenc/dec are fine in this situation, I've only come across this issue with celt.
Also, this is NOT the case if you set sync=false on the audiosink being used, so it must be a timestamping issue.
using audiorate does get rid of that "Buffer is older than previous timestamp" message, but the pipeline is still silent (again unless sync=false).
Created attachment 198359 [details] [review] celtenc: fix latency query
The CELT codec is now deprecated, and "replaced" by the Opus codec (Opus is a "dual" codec, consisting of CELT and SILK). All development is now going to Opus, and not CELT. The same latency issue is fixed in opusenc (see https://bugzilla.gnome.org/show_bug.cgi?id=660999).
commit 826eb571837ef518845737f6fa325f81d9cd74cb Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Wed Oct 5 18:30:23 2011 +0100 celtenc: fix latency query https://bugzilla.gnome.org/show_bug.cgi?id=616421