Skip to content
GitLab
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 642
    • Issues 642
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 80
    • Merge requests 80
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-basegst-plugins-base
  • Issues
  • #770
Closed
Open
Issue created Jun 10, 2020 by Ignazio@ignazp

opus: Multichannel audio not correctly reordered

When we try to encode and then decode a 7.1 multichannel audio stream with opus the order of the decoded channels is not the original one.

The issue can be reproduced on both Windows and Linux by comparing the audio reproduced on a 7.1 audio device using the subsequent pipelines and this sample wav file: https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader%20v2.wav

gst-launch-1.0 -vv -m filesrc location=sample_7_1.wav ! decodebin ! audioconvert ! autoaudiosink

gst-launch-1.0 -vv -m filesrc location=sample_7_1.wav ! decodebin ! audioconvert ! opusenc bitrate=128000 ! queue ! opusdec ! audioconvert ! autoaudiosink

When opusenc + opusdec are used the source channels are played in this order:

  • Front-Left: OK
  • Front-Right: OK
  • Front-Central -> Sise-Left Speaker
  • LFE -> Side-Right Speaker
  • Rear-Left -> Front-Central Speaker
  • Rear-Right -> Subwoofer
  • Side-Left -> Rear-Left Speaker
  • Side-Right -> Rear-Right Speaker

According the encoder's caps the 8 channel mapping is <0, 6, 1, 4, 5, 2, 3, 7> which corresponds to map the {FL, FR, RL, RR, SL, SR, FC, LFE} encoded channels to the vorbis order {FL, FC, FR, SL, SR, RL, RR, LFE}.

The issue seem not raised with 6 channels

However during some tests we were able to play the channels in the correct speakers by using the <0, 4, 1, 2, 3, 6, 7, 5> mapping. Our suspect is that opusenc is encoding the channels in an unexpected order like {FL, FR, SL, SR, FC, LFE, RL, RR}.

Edited Jun 20, 2020 by Tim-Philipp Müller
Assignee
Assign to
Time tracking