After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616421 - celtenc/dec produces silent output with live sources
celtenc/dec produces silent output with live sources
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-21 18:39 UTC by Tristan Matthews
Modified: 2011-11-07 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
celtenc: fix latency query (900 bytes, patch)
2011-10-05 17:30 UTC, Vincent Penquerc'h
committed Details | Review

Description Tristan Matthews 2010-04-21 18:39:11 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?
Comment 1 Tristan Matthews 2010-05-04 19:35:12 UTC
this is also true for the git versions.
Comment 2 Sebastian Dröge (slomo) 2010-05-05 12:17:14 UTC
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.
Comment 3 Tristan Matthews 2010-05-05 16:36:49 UTC
Vorbisenc/dec are fine in this situation, I've only come across this issue with celt.
Comment 4 Tristan Matthews 2010-05-21 23:05:55 UTC
Also, this is NOT the case if you set sync=false on the audiosink being used, so it must be a timestamping issue.
Comment 5 Tristan Matthews 2010-05-21 23:15:16 UTC
using audiorate does get rid of that "Buffer is older than previous
timestamp" message, but the pipeline is still silent (again unless sync=false).
Comment 6 Vincent Penquerc'h 2011-10-05 17:30:46 UTC
Created attachment 198359 [details] [review]
celtenc: fix latency query
Comment 7 Vincent Penquerc'h 2011-10-05 17:33:35 UTC
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).
Comment 8 Vincent Penquerc'h 2011-11-07 11:24:21 UTC
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