Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Hartmann <hartan@7x.de>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Hartmann <hartan@7x.de>
Subject: [FFmpeg-devel] [PATCH 0/1] Fix option parsing in ffpreset files
Date: Sat, 19 Jul 2025 11:35:33 +0200
Message-ID: <cover.1752917734.git.hartan@7x.de> (raw)

I recently hit an issue when trying to use 'ffpreset' files and I think
it's a bug. I'm working on a set of options for transcoding videos for
personal use. The CLI has become pretty long by now so I wanted to
factor these options out into a ffpreset files along with comments that
explain what the options do and why I chose those particular values over
others.

The key-part of my preset file looked like this:

```text
vcodec=libsvtav1
pix_fmt=+yuv420p10le
```

When invoking it like this:

```bash
ffmpeg -i SAMPLE.mkv -fpre ./my.ffpreset OUTPUT.mkv
```

I consistently got the following error:

```
./default.ffpreset: Invalid option or argument: 'pix_fmt=+yuv420p10le
', parsed as 'pix_fmt' = '+yuv420p10le'
```

Which puzzled me quite a bit. I agree that `pix_fmt` is not a
codec-specific option but I was still expecting it to work since it has
an influence on the video after all. While searching for answers I found
[#1530][1] which confirmed my suspicion. In the end I decided to take a
look at the code and I discovered that `ffpreset` files, at the moment,
only parse `AVOption`s (at least to my understanding), next to bare
video/audio/subtitle/data codecs. So I've gone ahead and changed this.

I had a look at the man page and that doesn't state anything about
*what* kind of option is allowed to go into a `ffpreset` file. If there
is any documentation you'd like me to update, or if you'd like to see
tests for this, please let me know. I ran `make fate` locally and it
passed at least.


Kind regards
hartan


[1]: https://trac.ffmpeg.org/ticket/1530

Andreas Hartmann (1):
  ffmpeg_opt: Parse regular options in `ffpreset` files

 fftools/ffmpeg_opt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

_______________________________________________
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-19  9:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19  9:35 Andreas Hartmann [this message]
2025-07-19  9:35 ` [FFmpeg-devel] [PATCH 1/1] ffmpeg_opt: Parse regular options in `ffpreset` files Andreas Hartmann

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=cover.1752917734.git.hartan@7x.de \
    --to=hartan@7x.de \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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