Opened 17 months ago

Closed 6 months ago

#11433 closed defect (fixed)

Innocuous "Error parsing Opus packet header" on YouTube sources?

Reported by: idest Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: opus
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

If I try executing this command:

ffmpeg.exe -hide_banner -i sample.mkv -vn -c:a copy audio.opus

I get the following output:

Input #0, matroska,webm, from 'sample.mkv':
  Metadata:
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: iso6avc1mp41
    MAJOR_BRAND     : dash
    ENCODER         : Lavf61.9.106
  Duration: 00:00:02.04, start: 0.000000, bitrate: 4006 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:02.035000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:00:02.008000000
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Output #0, opus, to 'audio.opus':
  Metadata:
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: iso6avc1mp41
    MAJOR_BRAND     : dash
    encoder         : Lavf61.9.106
  Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:00:02.008000000
      MINOR_VERSION   : 0
      COMPATIBLE_BRANDS: iso6avc1mp41
      MAJOR_BRAND     : dash
      encoder         : Lavf61.9.106
Press [q] to stop, [?] for help
[opus @ 0000025d6ae586c0] Error parsing Opus packet header.
[out#0/opus @ 0000025d6ae17e40] video:0KiB audio:33KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.503042%
size=      33KiB time=00:00:02.00 bitrate= 136.1kbits/s speed= 571x    
                                                      

Notice the line "[opus @ 0000025d6ae586c0] Error parsing Opus packet header".

While the resulting file, audio.opus, doesn't seem to have any errors, I thought I should report this anyway.

Reported FFMpeg version: N-118325-gea381285e7-20250119.
OS: Windows 10 Home.

Attachments (1)

sample.mkv (995.3 KB ) - added by idest 17 months ago.

Download all attachments as: .zip

Change History (5)

by idest, 17 months ago

Attachment: sample.mkv added

comment:1 by idest, 17 months ago

Summary: "Error parsing Opus packet header" when extracting an Opus audio stream from an MKV container"Error parsing Opus packet header" when extracting Opus audio stream

comment:2 by idest, 17 months ago

FWIW, I've been experimenting and ffmpeg.exe seems to emit the "Error parsing Opus packet header" error for any YouTube video I download with yt-dlp. Since the latter uses ffmpeg.exe to mux video and audio streams (files) downloaded from YouTube, this is perhaps an ffmpeg's issue.

comment:3 by MasterQuestionable, 17 months ago

Analyzed by developer: set
Cc: MasterQuestionable added
Component: undeterminedavcodec
Keywords: opus added
Summary: "Error parsing Opus packet header" when extracting Opus audio streamInnocuous "Error parsing Opus packet header" on YouTube sources?
Version: unspecifiedgit-master

͏    `yt-dlp` typically won't re-encode the media.
͏    The media would be typically that created by Google/YouTube, unchanged.

͏    "Error parsing Opus packet header"
͏    https://github.com/FFmpeg/FFmpeg/blob/2f4ec1683651e597dcdb13d1a4e679f3c1da0b16/libavcodec/opus/parser.c#L87
͏    https://github.com/FFmpeg/FFmpeg/blob/3f9ca51015020d6d60a48923c55d66cc3ea04e9b/libavcodec/opus/parse.c#L92-L284

comment:4 by Balling, 6 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.