Comments (5)
cc @dirkf
from yt-dlp.
I'm a little hazy as to why one would want to use --simulate
because all it basically tells you is that the extractor didn't (with luck) crash. If you want to know, say, what format(s) will be selected there is--get-format
or eqv. Since no video download is being run, it can't tell you anything about any external downloader.
Looking at upstream confirms the diagnosis in this issue.
-
The API param
simulate
is also forced to true when a "printing" option such as--get-format
is selected. This would give the wrong answer if the default format selection was changed bysimulate
. -
The default format is changed to
best/bestvideo+bestaudio
as below:
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 simulate
is set, or when no download is requested (normally not through the CLI). Arguably the first two tests should be moved after the tests that return True
.
from yt-dlp.
I'm a little hazy as to why one would want to use
--simulate
because all it basically tells you is that the extractor didn't (with luck) crash. If you want to know, say, what format(s) will be selected there is--get-format
or eqv.
Yeah, the issue is really about the simulate
param rather than just the --simulate
CLI flag
from yt-dlp.
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)
$
from yt-dlp.
In case users of the API rely on the historic behaviour when
download
is falsy, that can be left in place, as it's always truthy in the CLI (at least it is upstream).
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 extract_info(URL, download=False)
to get metadata and then download(URL)
in the wild.
from yt-dlp.
Related Issues (20)
- Get the output file name in lower case HOT 1
- Add support for site https://listeamed.net/ HOT 1
- The same link and command download much larger files on Linux than on Windows. HOT 4
- Ignoring duplicate input URLs, keeping deleted YouTube comments, checking video availability HOT 1
- [YouTube] Subtitles fail to download on age restricted video HOT 2
- nday.club HOT 4
- AdultSwim: 404 errors on all payload fragments for certain videos HOT 7
- Download thumbnails for playlist items when using `--flat-playlist` HOT 1
- [TikTok] Support for Collections HOT 1
- chatturbate
- tiktok dosnt work everytime it should HOT 2
- Unsupported URL error on Twitter.com / X.com: x.com does not work for yt-dlp HOT 3
- How to download part of video not whole video οΌFor example 10s - 20s HOT 3
- [TikTok] Support for Photos HOT 2
- [crunchyroll] Failed to download stream info: HTTP Error 403: Forbidden HOT 5
- homeloveporn.py in your directory HOT 5
- --download-sections "*10-20" how to add use python HOT 2
- Access Denied When Access Tiktok Download Video URL HOT 4
- not support x.com video HOT 3
- Falling back to generic extractor for voyo.nova.cz
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yt-dlp.