#11324: Corrupted HEVC bitstream generated by extracting it from MP4 file -------------------------------------+------------------------------------- Reporter: Diego de | Owner: (none) Souza | Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: invalid Keywords: mp4 atom | Blocked By: dtsd sps pps hevc | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Diego de Souza):
* resolution: => invalid * status: new => closed Old description: > Summary of the bug: > > When FFmepg is demuxing MP4 where the STSD information does not match the > bitstream PPS/SPS information a corrupted bitstream is generated when > trying to extract the video bitstream. > > I assume the demuxer is passing the PPS/SPS from the MP4 container > instead of the HEVC bitstream. Perhaps it is passing the PPS/SPS of the > HEVC before the one from the STSD. > > Setup: > > Ubuntu 24.04 > FFmpeg 6.1.1 > > Video file: https://streams.videolan.org/ffmpeg/incoming/11158/h265.mp4 > > How to reproduce: > {{{ > % ffmpeg -i h265.mp4 -c:v copy h265.hevc > (CRASH) % ffmpeg -i h265.hevc -f null - > > ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg > developers > built with gcc 13 (Ubuntu 13.2.0-23ubuntu3) > configuration: --prefix=/usr --extra-version=3ubuntu5 > --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu > --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl > --disable-stripping --disable-omx --enable-gnutls --enable-libaom > --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio > --enable-libcodec2 --enable-libdav1d --enable-libflite --enable- > libfontconfig --enable-libfreetype --enable-libfribidi --enable- > libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable- > libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt > --enable-libopus --enable-librubberband --enable-libshine --enable- > libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable- > libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx > --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid > --enable-libzimg --enable-openal --enable-opencl --enable-opengl > --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 > --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r > --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse > --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh > --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi > --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e > --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared > libavutil 58. 29.100 / 58. 29.100 > libavcodec 60. 31.102 / 60. 31.102 > libavformat 60. 16.100 / 60. 16.100 > libavdevice 60. 3.100 / 60. 3.100 > libavfilter 9. 12.100 / 9. 12.100 > libswscale 7. 5.100 / 7. 5.100 > libswresample 4. 12.100 / 4. 12.100 > libpostproc 57. 3.100 / 57. 3.100 > }}} New description: Summary of the bug: When FFmepg is demuxing MP4 where the STSD information does not match the bitstream PPS/SPS information a corrupted bitstream is generated when trying to extract the video bitstream. I assume the demuxer is passing the PPS/SPS from the MP4 container instead of the HEVC bitstream. Perhaps it is passing the PPS/SPS of the HEVC before the one from the STSD. Setup: Ubuntu 24.04 FFmpeg 6.1.1 How to reproduce: {{{ % ffmpeg -i h265.mp4 -c:v copy h265.hevc (CRASH) % ffmpeg -i h265.hevc -f null - ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13 (Ubuntu 13.2.0-23ubuntu3) configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable- libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable- libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable- libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable- libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable- libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable- sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable- librsvg --enable-libjxl --enable-shared libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 }}} -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/11324#comment:5> 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".