Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Warn user when FFmpeg is missing #9805
[core] Warn user when FFmpeg is missing #9805
Changes from 3 commits
ad4fd27
1b57e3b
810f85f
6078a87
e9d01a9
9e305e7
80b7cd3
f230093
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could trigger an unnecessary and misleading warning if the user is passing
-o -
and doesn't have ffmpeg installed. Since the default format selection becomesbest/bestvideo+bestaudio
when piping to stdout, the warning would be incorrect: installing ffmpeg will not change the quality of what's piped. And I think it's fair to assume that a user who is piping to stdout knows what they're doing and does not need any warning here.Maybe we could do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we also check for is_live etc then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think we need to as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: I think having
simulate
result in a different default format spec should be considered a bug. A dry-run should be no different than the real thing, right?It looks like we can trace this logic back to ytdl-org/youtube-dl@0017d9a
Back then, upstream's default format spec was only
best
if ffmpeg was not available. So a simulated run would result in a "requested formats not available" error if ffmpeg was not available and there was no combined video+audio format available. Thissimulate
check seems to be added so that you could print json without having to manually pass-f bv+ba
or-f bv
etc in this scenario -- see the linked upstream PR(sepro and I started digging into this when I was questioning if
simulate
should result in a warning or not)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we don't change the default format spec behavior with
simulate
, then currently the warning is wrongly raised since we aren't preferring bestThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember anyone having complained, and I am hesitant to change long standing behavior without reason
Edited #9805 (comment) to address this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, consider this me complaining lol
As bash mentioned, I think a simulate/dry run option is only really useful if you actually simulate what will happen. If a user wants to see what formats will be selected when downloading, the result would be wrong without FFmpeg installed.
This behaviour is currently also not documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was bitten by this undocumented behavior the other day when I was troubleshooting for someone on discord. I also would like to see it fixed or at the very least documented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still, I don't want to make this change in this PR. Could you open a new issue/PR? We should discuss with dirkf as well.