From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id A2EE14B0A9 for ; Sat, 19 Jul 2025 09:46:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 10AC468BFC6; Sat, 19 Jul 2025 12:46:18 +0300 (EEST) Received: from nervous-mendel.212-34-160-121.plesk.page (plesk5.odn.de [212.34.167.38]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 225BE68BB4E for ; Sat, 19 Jul 2025 12:46:11 +0300 (EEST) Received: from toolbx.fritz.box (ip-176-199-210-156.um44.pools.vodafone-ip.de [176.199.210.156]) by nervous-mendel.212-34-160-121.plesk.page (Postfix) with ESMTPSA id 92AD58C5699; Sat, 19 Jul 2025 11:46:10 +0200 (CEST) From: Andreas Hartmann To: ffmpeg-devel@ffmpeg.org Date: Sat, 19 Jul 2025 11:35:33 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/1] Fix option parsing in ffpreset files X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Hartmann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".