#11402: opus file generated by ffmpeg cannot be decoded with opus-tools --------------------------------+---------------------------------------- Reporter: Saafo | Owner: (none) Type: defect | Status: new Priority: normal | Component: undetermined Version: 7.1 | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | --------------------------------+---------------------------------------- Description changed by Saafo:
Old description: > Summary of the bug: > How to reproduce: > {{{ > % ffmpeg -i audio.mp4 audio.opus > opusinfo audio.opus > }}} > > The generated `audio.opus` cannot be decoded with `opusdec` provided by > `opus-tools`(version: 0.2) > {{{ > % opusdec audio.opus > Failed to open 'audio.opus'. > }}} > > Debugging with `opusfile`(underlying `opusdec`), the error is > `OP_EBADTIMESTAMP`(The first or last granule position of a link failed > basic validity checks.) > > And with `opusinfo` provided by `opus-tools`, there are many warnings: > > {{{ > % opusinfo audio.opus > Processing file "audio.opus"... > > New logical stream (#1, serial: 445700f2): type opus > Encoded with Lavf61.7.100 > User comments section follows... > language=und > handler_name=SoundHandler > vendor_id=[0][0][0][0] > encoder=Lavc61.19.100 libopus > major_brand=isom > minor_version=512 > compatible_brands=isomiso2mp41 > WARNING: Samples with negative granpos in stream 1 > WARNING: Sample count ahead of granule (96960>96955) in stream 1 > WARNING: Sample count ahead of granule (145920>145907) in stream 1 > WARNING: Sample count ahead of granule (194880>194857) in stream 1 > WARNING: Sample count ahead of granule (243840>243807) in stream 1 > WARNING: Sample count behind granule (291840<291843) in stream 1 > WARNING: Sample count ahead of granule (340800>340796) in stream 1 > (SKIP MANY WARNINGS) > WARNING: Sample count behind granule (14234880<14234888) in stream 1 > WARNING: Sample count behind granule (14282880<14282903) in stream 1 > WARNING: Sample count behind granule (14331840<14331861) in stream 1 > WARNING: Sample count behind granule (14380800<14380814) in stream 1 > Opus stream 1: > Pre-skip: 312 > Playback gain: 0 dB > Channels: 1 > Original sample rate: 48000 Hz > Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min) > Page duration: 1020.0ms (max), 1015.3ms (avg), 920.0ms (min) > Total data length: 2022632 bytes (overhead: 1.15%) > Playback length: 5m:00.501s > Average bitrate: 53.85 kbit/s, w/o overhead: 53.23 kbit/s > Logical stream 1 ended > }}} > > ffmpeg info: > > {{{ > % ffmpeg version > ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers > built with Apple clang version 16.0.0 (clang-1600.0.26.4) > configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable- > shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= > --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls > --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray > --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable- > libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable- > librubberband --enable-libsnappy --enable-libsrt --enable-libssh > --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable- > libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable- > libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable- > libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype > --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable- > libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr > --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack > --enable-videotoolbox --enable-audiotoolbox --enable-neon > libavutil 59. 39.100 / 59. 39.100 > libavcodec 61. 19.100 / 61. 19.100 > libavformat 61. 7.100 / 61. 7.100 > libavdevice 61. 3.100 / 61. 3.100 > libavfilter 10. 4.100 / 10. 4.100 > libswscale 8. 3.100 / 8. 3.100 > libswresample 5. 3.100 / 5. 3.100 > libpostproc 58. 3.100 / 58. 3.100 > [AVFormatContext @ 0x145e068d0] Unable to choose an output format for > 'version'; use a standard extension for the filename or specify the > format manually. > [out#0 @ 0x6000017a03c0] Error initializing the muxer for version: > Invalid argument > Error opening output file version. > Error opening output files: Invalid argument > > Patches should be submitted to the ffmpeg-devel mailing list and not this > bug tracker. New description: Summary of the bug: How to reproduce: {{{ % ffmpeg -i audio.mp4 audio.opus opusinfo audio.opus }}} The generated `audio.opus` cannot be decoded with `opusdec` provided by `opus-tools`(version: 0.2) {{{ % opusdec audio.opus audio.wav Failed to open 'audio.opus'. }}} Debugging with `opusfile`(underlying `opusdec`), the error is `OP_EBADTIMESTAMP`(The first or last granule position of a link failed basic validity checks.) And with `opusinfo` provided by `opus-tools`, there are many warnings: {{{ % opusinfo audio.opus Processing file "audio.opus"... New logical stream (#1, serial: 610d6c9d): type opus Encoded with Lavf61.7.100 User comments section follows... language=und handler_name=SoundHandler vendor_id=[0][0][0][0] encoder=Lavc61.19.100 libopus major_brand=isom minor_version=512 compatible_brands=isomiso2mp41 WARNING: Samples with negative granpos in stream 1 WARNING: Sample count behind granule (96000<96001) in stream 1 WARNING: Sample count ahead of granule (144960>144958) in stream 1 WARNING: Sample count ahead of granule (193920>193915) in stream 1 Opus stream 1: Pre-skip: 312 Playback gain: 0 dB Channels: 1 Original sample rate: 48000 Hz Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min) Page duration: 1020.0ms (max), 836.0ms (avg), 140.0ms (min) Total data length: 30465 bytes (overhead: 2.08%) Playback length: 0m:04.159s Average bitrate: 58.59 kbit/s, w/o overhead: 57.37 kbit/s Logical stream 1 ended }}} ffmpeg info: {{{ % ffmpeg version ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers built with Apple clang version 16.0.0 (clang-1600.0.26.4) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable- shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable- gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable- libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable- libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable- libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable- libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable- libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable- libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.100 / 61. 19.100 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [AVFormatContext @ 0x145e068d0] Unable to choose an output format for 'version'; use a standard extension for the filename or specify the format manually. [out#0 @ 0x6000017a03c0] Error initializing the muxer for version: Invalid argument Error opening output file version. Error opening output files: Invalid argument Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker. -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/11402#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
_______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".