From b54406530c7a29a6fb6e6904a20fbf5c26be9826 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Thu, 8 Dec 2022 17:08:37 +0000 Subject: [PATCH] [FAQ] Add `incorrect codec parameters` ffmpeg question (#9) --- FAQ.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/FAQ.md b/FAQ.md index f3c66b2..8787d9c 100644 --- a/FAQ.md +++ b/FAQ.md @@ -144,3 +144,18 @@ First of all, please do report the issue [at our issue tracker](https://github.c Please make sure to read the [bug reporting instructions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue). A lot of bug reports lack the necessary information. At the time of writing this, over 25% of all issues have been closed as invalid/duplicates. A lot of developer time is wasted triaging and answering such issues. You are always welcome to take matters into your own hands and submit a pull request (or pay somebody else to do so). Make sure to read the [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) when you do. + + +### Why am I getting an `incorrect codec parameters` error from ffmpeg when downloading or postprocessing? + +The error message may also include: + * `Could not write header for output file #0` + * `Error number -22 occurred` + * `Invalid argument` + +Older versions of ffmpeg only have experimental support for Opus audio in an mp4 or webm container, and will throw this error if `-strict -2` is not passed as an argument. + +The best solution to this problem is to [update ffmpeg](https://github.com/yt-dlp/FFmpeg-Builds). If you cannot or do not want to update, you can add this to your yt-dlp command: +``` +--postprocessor-args "ffmpeg:-strict -2" +```