Comments (2)
I believe it can already be done with --match-filter
. Pls provide some examples I can test commands on
from yt-dlp.
Here's the long-awaited example URL: https://www.youtube.com/watch?v=nGIpdiQrFDU
yt-dlp does indeed fetch the sponsorblock data after --match-filter
is checked against, so it is not currently possible to do this in a single run of yt-dlp.
There is a workaround, however; you could do something like this (for a single video):
yt-dlp --write-info-json --skip-download --sponsorblock-mark all -o "sponsorblock_check.%(ext)s" "https://www.youtube.com/watch?v=nGIpdiQrFDU" && yt-dlp --load-info-json "sponsorblock_check.info.json" --match-filter sponsorblock_chapters
Any additional options for downloading could be passed to the second invocation of yt-dlp (so anywhere after --match-filter sponsorblock_chapters
), e.g. if you want to use --sponsorblock-mark all
or --sponsorblock-remove all
, you would add them there.
Note that you do not need to pass the URL to the second invocation; all data is being extracted from the info json written by the first yt-dlp call.
Here's a slightly more advanced example of a workaround that could be used with a playlist/channel or --batch-file
/-a
:
yt-dlp --write-info-json --skip-download --sponsorblock-mark all -o "sponsorblock_check.%(ext)s" --batch-file links.txt --exec "yt-dlp --load-info-json sponsorblock_check.info.json --match-filter sponsorblock_chapters --sponsorblock-remove sponsor"
Note that any output template args should be stashed in a config file since they will not be passed to the inner yt-dlp call correctly if done in the command line.
from yt-dlp.
Related Issues (20)
- Instagram extractor has hardcoded User-Agent HOT 1
- Facebook Ads extractor not working
- yt-dlp -j URL is not showing youtube video category anymore? HOT 2
- Piramide.tv
- Getting ERROR: [youtube] tJ51nR4-tLs: Sign in to confirm youβre not a bot. This helps protect our community. Learn more HOT 2
- [ListenNotes] Error downloading a podcast
- Can't download video from kinescope.io HOT 3
- sanitize_info command line option? HOT 3
- [Nitter] instances are not updated HOT 1
- yt-dlp doesnt works under openBSD HOT 3
- Vimeo: yt-dlp not finding source/original format on multiple non-standard URL types HOT 2
- Pick proxy from a file containing list of proxies. HOT 1
- Rename `_internal` to `yt-dlp_internal` in yt-dlp_win.zip HOT 1
- [Crunchyroll] JSON Metadata - 403 Forbidden HOT 2
- [Youtube] Abort download on missing formats warnings HOT 3
- [nicovideo.jp] Extracting the audio from nicovideos in the "aac" or "m4a" file format causes the length to be missing, but NOT "alac" HOT 6
- Precondition check failed. HOT 9
- format selector partially broken for vcodec HOT 2
- PBS -> WGBH/Channel 2 (WGBH) extractor doesn't seem to recognize URL HOT 4
- ERROR: [youtube] fiGZG8_8qyA: Failed to extract any player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U HOT 2
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.