Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Opus
Opus
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • OpusOpus
  • Issues
  • #2319

Closed (moved)
Open
Opened Feb 03, 2019 by stevenlele@stevenlele

Opusenc produces broken samples (wrong quantization) with 24-bit source

Original Issue

I was encoding a specific sample of music (24 bits, 48 kHz) with opusenc in opus-tools 0.2 (Opus 1.3) and noticed a significant artifact in the beginning.

More description: You can hear the artifact within 00:01. It's a broken "boom"-like sound.

Check the image below. The waveform graph has significant changes.

comparison

This is how I encoded:

>opusenc sample.flac --bitrate 256 sample.opus
Encoding using libopus 1.3 (audio)
-----------------------------------------------------
   Input: 48 kHz, 2 channels
  Output: 2 channels (2 coupled)
          20ms packets, 256 kbit/s VBR
 Preskip: 312

Encoding complete
-----------------------------------------------------
       Encoded: 1 minute and 31.1 seconds
       Runtime: 1 second
                (91.1x realtime)
         Wrote: 2993392 bytes, 4555 packets, 94 pages
       Bitrate: 261.351 kbit/s (without overhead)
 Instant rates: 1.2 to 510.4 kbit/s
                (3 to 1276 bytes per packet)
      Overhead: 0.576% (container+metadata)

Update

I tried using FFmpeg to convert the original file into 16 bits (original is 24 bits).

>ffmpeg -i sample.wav -f wav -c pcm_s16le sample_16bit.wav

Then I encoded again with the same settings.

>opusenc sample_16bit.wav --bitrate 256 sample_16bit.opus
Skipping chunk of type "LIST", length 26
Encoding using libopus 1.3 (audio)
-----------------------------------------------------
   Input: 48 kHz, 2 channels
  Output: 2 channels (2 coupled)
          20ms packets, 256 kbit/s VBR
 Preskip: 312

Encoding complete
-----------------------------------------------------
       Encoded: 1 minute and 31.1 seconds
       Runtime: 1 second
                (91.1x realtime)
         Wrote: 2990541 bytes, 4555 packets, 94 pages
       Bitrate: 261.103 kbit/s (without overhead)
 Instant rates: 1.2 to 510.4 kbit/s
                (3 to 1276 bytes per packet)
      Overhead: 0.576% (container+metadata)

The result turned out to be good.

Check the image below. The waveform graph has no significant changes now.

comparison_2

So there may be issue in quantization of 24-bit (or high bit depth?) samples.

Sample Download

The updated sample files are here.

All source samples are converted to FLAC files for better compression.

The 16-bit sample is converted from the 24-bit one; the 24-bit one is the original, not padded.

Edited Feb 03, 2019 by stevenlele
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xiph/opus#2319