Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Incorrect parameters passed to ffmpeg for some youtube videos when extracting audio #23862
Comments
|
I think I have identified the problem to be this line: youtube-dl/youtube_dl/postprocessor/ffmpeg.py Line 277 in 8e4d3f8 If the codec of the downloaded file (filecodec) is the same as the preferred codec (self._preferredcodec) then it doesn't matter if a preferred quality is specified, ffmpeg will be told to just copy the stream. I don't think anyone expects this behaviour when passing a preferred quality, but in case someone currently relies on this behavior the best solution may be to add an option to always force re-encoding, and maybe an option to only convert if the downloaded file has a higher bitrate than preferred. Currently this behaviour is undocumented so I'm not sure if it is intended or not. Regardless, I suggest officially labeling the current behaviour a feature and adding it to the documentation, and then adding a --force-conversion option. Who will make that decision or how can I request a decision be made about that? |
|
This is expected behavior. Conversion only happens when source and target formats are different. |
Checklist
Verbose log
Description
When youtube-dl is given these options:
The parameters passed to ffmpeg are not the same for every youtube video when the same parameters are expected:
Expected ffmpeg parameters: (-acodec libopus "-b:a" 32k) (youtube-id "_yDZY5_u8FQ")
Unexpected ffmpeg parameters: (-acodec copy) (youtube-id "sZlzYzyREAI")