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 796508 - RTP OPUS payloader/depayloader introduce delay which is not compensated properly
RTP OPUS payloader/depayloader introduce delay which is not compensated properly
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.14.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-06 10:01 UTC by Daniel F
Modified: 2018-11-03 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel F 2018-06-06 10:01:44 UTC
Following pipeline creates testout.wav file with two channels. First one comes from audiotestsrc element, without extra processing. 2nd one is the same audio, passed via opusenc/rtpopuspay/rtpopusdepay/opusdec. When you check generated file, you will find that there is 6ms delay between 2nd and 1st channel:

gst-launch-1.0 audiointerleave name=int start-time-selection=first audiotestsrc wave=ticks is-live=true do-timestamp=true ! tee name=tee ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x1,rate=(int)48000" ! queue ! int.sink_0 tee. ! queue ! audioconvert ! audioresample ! opusenc ! rtpopuspay min-ptime=20000000 max-ptime=20000000 ! capsfilter caps="application/x-rtp,media=(string)audio,encoding-name=(string)OPUS,payload=(int)97" ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x2" ! queue ! int.sink_1 int.src ! audioconvert ! audioresample ! wavenc ! filesink location=testout.wav sync=true

When I removed rtpopuspay/rtpopusdepay from pipeline, this extra delay disappeared and both channels were properly synchronized:

gst-launch-1.0 audiointerleave name=int start-time-selection=first audiotestsrc wave=ticks is-live=true do-timestamp=true ! tee name=tee ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x1,rate=(int)48000" ! queue ! int.sink_0 tee. ! queue ! audioconvert ! audioresample ! opusenc ! opusdec ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x2" ! queue ! int.sink_1 int.src ! audioconvert ! audioresample ! wavenc ! filesink location=testout.wav sync=true

I also tried to create pipeline with PCMA codecs/payloaders, and this one also is properly synchronized:

gst-launch-1.0 audiointerleave name=int start-time-selection=first audiotestsrc wave=ticks is-live=true do-timestamp=true ! tee name=tee ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x1,rate=(int)8000" ! queue ! int.sink_0 tee. ! queue ! audioconvert ! audioresample ! alawenc ! rtppcmapay min-ptime=20000000 max-ptime=20000000 ! capsfilter caps="application/x-rtp,media=(string)audio,encoding-name=(string)PCMA,payload=(int)8" ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x2" ! queue ! int.sink_1 int.src ! audioconvert ! audioresample ! wavenc ! filesink location=testout.wav sync=true
Comment 1 GStreamer system administrator 2018-11-03 15:30:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/480.