Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nil Fons Miret via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Nil Fons Miret <nilf@netflix.com>, Kyle Swanson <kswanson@netflix.com>
Subject: Re: [FFmpeg-devel] [PATCH] avformat/demux: avoid unconditional ID3v2 tag consumption
Date: Wed, 23 Jul 2025 13:50:33 -0400
Message-ID: <CAPf3GF=b5Y0LGE9kxbxnJ_rtii6XSNed8UoWPo6V8CZshA=aGQ@mail.gmail.com> (raw)
In-Reply-To: <CAPf3GFnAqQrr2+O8j8iMmL5VThbGwOnyu4U+ARwXP-ODdM+gKg@mail.gmail.com>

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 <nilf@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-request@ffmpeg.org with subject "unsubscribe".

       reply	other threads:[~2025-07-23 17:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPf3GFnAqQrr2+O8j8iMmL5VThbGwOnyu4U+ARwXP-ODdM+gKg@mail.gmail.com>
2025-07-23 17:50 ` Nil Fons Miret via ffmpeg-devel [this message]
2025-07-08 22:07 Nil Fons Miret via ffmpeg-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPf3GF=b5Y0LGE9kxbxnJ_rtii6XSNed8UoWPo6V8CZshA=aGQ@mail.gmail.com' \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=kswanson@netflix.com \
    --cc=nilf@netflix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git