-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
--simulate
doesn't accurately simulate downloading under certain conditions
#9843
Comments
cc @dirkf |
--simulate
does not accurately simulate downloading if FFmpeg is missing--simulate
doesn't accurately simulate downloading under certain conditions
I'm a little hazy as to why one would want to use Looking at upstream confirms the diagnosis in this issue.
def prefer_best():
if self.params.get('simulate', False):
return False
if not download:
return False
if self.params.get('outtmpl', DEFAULT_OUTTMPL) == '-':
return True
if info_dict.get('is_live'):
return True
if not can_merge():
return True
return False So actually there are several cases where the default format should be changed, and isn't, when |
Yeah, the issue is really about the |
Well, I think the third result (without the simulate/download tests) is correct and the second not: $ python -m youtube_dl --get-format 'BaW_jenozKc'
248 - 1920x1080 (1080p)+140 - audio only (audio_quality_medium)
$ python -m youtube_dl --get-format -o - 'BaW_jenozKc'
248 - 1920x1080 (1080p)+140 - audio only (audio_quality_medium)
$ python -m youtube_dl --get-format -o - 'BaW_jenozKc'
22 - 1280x720 (720p)
$ |
Imo, since we are breaking compat anyway, it's more consistent to completely get rid of this behavior. Although not the recommended approach, I have often seen |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Provide a description that is worded well enough to be understood
When running a yt-dlp command with
--simulate
(and without an-f
arg), the default format selection differs from an unsimulated run under any of these conditions:-
--live-from-start
was not passed)A dry-run/simulate option should actually simulate the behaviour that will occur when downloading.
This behaviour is currently undocumented. Either the behaviour should be changed or at the very least be documented.
Copying initial discussion: #9805 (comment)
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 PRProvide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: