[Bug 754226] speexenc: don't set lookahead

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Aug 29 13:52:56 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=754226

--- Comment #2 from Håvard Graff (hgr) <havard.graff at gmail.com> ---
(In reply to Olivier Crête from comment #1)

> Also, what does it do wrong? What did you expect different?

When giving the speexenc 20ms of 16000Hz (320 samples), and decoding the
resulting buffers with speexdec, it is clear that there is 11ms of silence
before the audio starts, which is the number set as "lookahead".

Now, running audiotestsrc samplesperbuffer=320 num-buffers=3 !
audio/x-raw,format=S16LE,rate=16000 ! speexenc ! fakesink -v you get:

80 bytes, dts: none, pts: none, duration: 0:00:00.000000000
70 bytes, dts: none, pts: none, duration: 0:00:00.000000000

70 bytes, dts: none, pts: none, duration: 0:00:00.011062501
70 bytes, dts: 0:00:00.011062500, pts: 0:00:00.011062500
70 bytes, dts: 0:00:00.031062500, pts: 0:00:00.031062500

I have several problems with this. First off, the pts is none on the first
buffers (and the 2 headers) because it calculates a negative timestamp.
Secondly, the duration of the first buffers is not 11ms, it is 20ms, when
decoded. The fact that there is some zeros at the start does not change that
fact. You could argue that there is only 11ms of *usable* audio in that buffer,
but that is not what duration is about.

Discussing this with slomo in #gstreamer, he seemed to think using segments
would be the proper way of doing this, but in the meantime it feels a lot
better to have speexenc outputting buffers starting from pts:0 with duration of
20ms per buffer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list