Hi, Pinging this patch from a couple weeks ago. To be clear, I am not sure how people typically use ffmpeg's ID3v2 support, so please let me know if the patch is missing something and I'm happy to iterate on it, but it does seem to me that trying to parse it from rawvideo inputs is wrong.
Thank you, Nil On Tue, Jul 8, 2025 at 6:07 PM Nil Fons Miret <n...@netflix.com> wrote: > > I have found a few instances of rawvideo files that coincidentally > start with a header matching the ID3v2 header format, and ffmpeg > consumes the header before demuxing, causing a decoding error. This > happens even if "-f rawvideo" is specified. > > This patch limits the formats for which this automatic consuming of > ID3v2 headers is done. Note: I am not an expert in ID3v2 by any means, > and I'm happy to accept suggestions, both on the scope and mechanism > of the solution. > > To reproduce, you can easily generate an example as follows: > > ``` > ( echo "49 44 33 2B 98 3A 49 44 33 2B 98 3A 6A 44 54 2B" | xxd -r -p > dd if=/dev/zero bs=1 count=115184 2>/dev/null > ) > id3v2_320x240_yuv420p.yuv > > > ffmpeg -f rawvideo -s 320x240 -pix_fmt yuv420p -i > id3v2_320x240_yuv420p.yuv -f null - > ``` > > This generates a 320x240 yuv420p file with a 16-byte header that > matches the ID3v2 header format (this was copied from a real case I > saw) and completed with zeroes for a total of 115200 bytes, the right > size for this resolution and pixel format. > > On the master branch, I see: > ``` > [...] > ID3v2.43 tag skipped, cannot handle version > [...] > [out#0/null @ 0x15700a6e0] Output file is empty, nothing was > encoded(check -ss / -t / -frames parameters if used) > frame= 0 fps=0.0 q=0.0 Lsize=N/A time=N/A bitrate=N/A speed=N/A > ``` > > After the changes: it decodes as expected. > ``` > [...] > frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A > speed=16.5x elapsed=0:00:00.00 > ``` > > Thanks in advance, > Nil _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".