Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/1] Fix option parsing in ffpreset files
@ 2025-07-19  9:35 Andreas Hartmann
  2025-07-19  9:35 ` [FFmpeg-devel] [PATCH 1/1] ffmpeg_opt: Parse regular options in `ffpreset` files Andreas Hartmann
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Hartmann @ 2025-07-19  9:35 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Hartmann

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".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-19  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-19  9:35 [FFmpeg-devel] [PATCH 0/1] Fix option parsing in ffpreset files Andreas Hartmann
2025-07-19  9:35 ` [FFmpeg-devel] [PATCH 1/1] ffmpeg_opt: Parse regular options in `ffpreset` files Andreas Hartmann

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