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