Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-base gst-plugins-base
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 645
    • Issues 645
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-basegst-plugins-base
  • Issues
  • #324

Closed
Open
Created Jan 07, 2017 by Bugzilla Migration User@bugzilla-migration

opusenc does not discard silence if DTX enabled

Submitted by Nubosch

Link to original bug (#776983)

Description

if dtx is enabled and silence is detected opusenc should only encode 1 frame each 400ms, as stated in RFC 6716, 2.1.9.

in function gst_opus_enc_encode() 1 is returned from opus_multistream_encode(), signaling the frame should be discarded cause of detected silence.
Each 400ms a value != 1 is returned from opus_multistream_encode().

I use the attached patch to discard the frame.
can you tell me why this might be a bad idea?

I use this pipeline for testing
gst-launch-1.0 pulsesrc ! "audio/x-raw,channels=1,rate=48000" ! opusenc audio-type=2048 bandwidth=1103 bitrate=20000 bitrate-type=1 inband-fec=TRUE packet-loss-percentage=1 dtx=TRUE ! fakesink

I came across this while measuring network bandwidth using opusenc with dtx and rtpopuspay.
The packet rate was constant, one packet each 20ms.
There where packets containing only one single RTP payload byte.
With the attached patch the packet rate is irregular with a minimum of one packet each 400ms, always containing multiple bytes.

Version: 1.10.x

Assignee
Assign to
Time tracking