#10711: Parsing dash/vp9 chunk fails with "error reading header"
-------------------------------------+-------------------------------------
             Reporter:  paul31415    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: ffprobe fails with "error reading header"

 How to reproduce:

 The data is small (800b), so I attached a base64 command line to generated
 the data (I also attache the binary if it's more convenient).

 {{{

 echo
 
AAAAGGZ0eXBkYXNoAAAAAGlzbzZtcDQxAAADEG1vb3YAAABsbXZoZAAAAADhjvKc4Y7ynAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAobXZleAAAACB0cmV4AAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAACdHRyYWsAAABcdGtoZAAAAAPhjvKc4Y7ynAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAPAAAACHAAAAAAAhBtZGlhAAAAIG1kaGQAAAAA4Y7ynOGO8pwAAAPoAAAAAFXEAAAAAABfaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAElTTyBNZWRpYSBmaWxlIHByb2R1Y2VkIGJ5IEdvb2dsZSBJbmMuIENyZWF0ZWQgb246IDExLzMwLzIwMjMuAAAAAYltaW5mAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABSXN0YmwAAADtc3RzZAAAAAAAAAABAAAA3XZwMDkAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAPAAhwAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAUdnBjQwEAAAACM6AJEAkAAAAAABNjb2xybmNseAAJABAACQAAAAAgbWRjdi/aiU4a9AoohGw+5D0TQEIAmJaAAAAAAQAAACRTbURtAAAAAD64s/cjUw1PrZFSblANVDkAA+gAAAAAAQAAAAxjbGxpBEwAtAAAABBDb0xMAAAAAARMALQAAAAQc3R0cwAAAAAAAAAAAAAAEHN0c2MAAAAAAAAAAAAAABBzdGNvAAAAA
 
AAAAAAAAAAUc3RzegAAAAAAAAAAAAAAAAAAABBzdHNzAAAAAAAAAAAAAAAUdm1oZAAAAAEAAAAAAAAAAA==
 | base64 -d -o data

 }}}

 Calling ffprobe (or ffmpeg) on the data seems to fail with a reading
 header issue:

 {{{
 ffprobe -v 9 -loglevel 99 data

 ffprobe version N-112876-ga30adf9f96 Copyright (c) 2007-2023 the FFmpeg
 developers
   built with Apple clang version 15.0.0 (clang-1500.0.40.1)
   configuration: --extra-libs= --extra-ldflags= --extra-ldexeflags= --pkg-
 config-flags=--static --disable-autodetect --prefix=/Users/paul/git
 /ffmpeg-static-builder/dist/mac/arm64//ffmpeg --enable-version3 --pkg-
 config=pkg-config --enable-runtime-cpudetect --enable-pthreads --disable-
 w32threads --enable-libtheora --enable-libvpx --enable-libvorbis
 --disable-indev=sndio --disable-outdev=sndio --enable-neon --enable-
 libopenjpeg --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-gpl --enable-openssl --enable-libvo-amrwbenc --enable-libopus
 --enable-libx264 --enable-libx265 --enable-libaom --enable-libwebp
 --enable-libxvid --enable-libmp3lame --enable-zlib --enable-ffprobe
 --enable-pic --disable-doc --enable-demuxer=dash --enable-libxml2
   libavutil      58. 32.100 / 58. 32.100
   libavcodec     60. 35.100 / 60. 35.100
   libavformat    60. 18.100 / 60. 18.100
   libavdevice    60.  4.100 / 60.  4.100
   libavfilter     9. 14.100 /  9. 14.100
   libswscale      7.  6.100 /  7.  6.100
   libswresample   4. 13.100 /  4. 13.100
   libpostproc    57.  4.100 / 57.  4.100
 [AVFormatContext @ 0x12a605930] Opening 'bin' for reading
 [file @ 0x600003990e00] Setting default whitelist 'file,crypto,data'
 Probing mov,mp4,m4a,3gp,3g2,mj2 score:100 size:808
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] Format mov,mp4,m4a,3gp,3g2,mj2
 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'ftyp' parent:'root' sz: 24 8
 808
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] ISO: File Type Major Brand: dash
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'moov' parent:'root' sz: 784
 32 808
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'mvhd' parent:'moov' sz: 108
 8 776
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] time scale = 1000
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'mvex' parent:'moov' sz: 40
 116 776
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'trex' parent:'mvex' sz: 32 8
 32
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'trak' parent:'moov' sz: 628
 156 776
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'tkhd' parent:'trak' sz: 92 8
 620
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'mdia' parent:'trak' sz: 528
 100 620
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'mdhd' parent:'mdia' sz: 32 8
 520
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'hdlr' parent:'mdia' sz: 95
 40 520
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] ctype=[0][0][0][0]
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] stype=vide
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'minf' parent:'mdia' sz: 393
 135 520
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'dinf' parent:'minf' sz: 36 8
 385
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'dref' parent:'dinf' sz: 28 8
 28
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] Unknown dref type 0x206c7275 size
 12
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'stbl' parent:'minf' sz: 329
 44 385
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'stsd' parent:'stbl' sz: 237
 8 321
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] size=221 4CC=vp09 codec_type=0
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'vpcC' parent:'stsd' sz: 20 8
 135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'colr' parent:'stsd' sz: 19
 28 135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] nclx: pri 9 trc 16 matrix 9 full 0
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'mdcv' parent:'stsd' sz: 32
 47 135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] type:'SmDm' parent:'stsd' sz: 36
 79 135
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a605930] error reading header
 [AVIOContext @ 0x12a605ba0] Statistics: 808 bytes read, 0 seeks
 bin: Invalid data found when processing input

 }}}


 Some context: this files comes from a HLS stream and is the first chunk of
 the stream.

 The data seems valid, as mediainfo seems to parse it properly:

 {{{
 mediainfo bin

 General
 Complete name                            : bin
 Format                                   : dash
 Codec ID                                 : dash (iso6/mp41)
 File size                                : 808 Bytes
 Encoded date                             : 2023-12-01 02:17:00 UTC
 Tagged date                              : 2023-12-01 02:17:00 UTC

 Video
 ID                                       : 1
 Format                                   : vp09
 HDR format                               : SMPTE ST 2086, HDR10 compatible
 Codec ID                                 : vp09
 Width                                    : 3 840 pixels
 Height                                   : 2 160 pixels
 Display aspect ratio                     : 16:9
 Color space                              : YUV
 Title                                    : ISO Media file produced by
 Google Inc. Created on: 11/30/2023.
 Encoded date                             : 2023-12-01 02:17:00 UTC
 Tagged date                              : 2023-12-01 02:17:00 UTC
 Color range                              : Limited
 Color primaries                          : BT.2020
 Transfer characteristics                 : PQ
 Matrix coefficients                      : BT.2020 non-constant
 Mastering display color primaries        : R: x=0.678000 y=0.322000, G:
 x=0.245000 y=0.703000, B: x=0.138000 y=0.052000, White point: x=0.312700
 y=0.329000
 Mastering display luminance              : min: 0.0001 cd/m2, max: 1000
 cd/m2
 Maximum Content Light Level              : 1100 cd/m2
 Maximum Frame-Average Light Level        : 180 cd/m2
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10711>
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".

Reply via email to