4 ms·
Wow, that's magic! (It depends on youtube-dl -g producing a video URL that ffmpeg understands, which unfortunately is not always the case.) Related: https://g
by tuukkah 5y ago
Wow, that's magic!
(It depends on youtube-dl -g producing a video URL that ffmpeg understands, which unfortunately is not always the case.)
Related: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#i-extracted-a-video-url-with--g-but-it-does-not-play-on-another-machine--in-my-web-browser https://github.com/ytdl-org/youtube-dl/blob/master/README.md...
- tuukkah 5y agoActually, the site seems to be based on doing basically the same by forking yt-dlp -J with one API request and then ffmpeg with another. The ffmpeg options: https://github.com/davidguttman/video-download-tool/blob/main/client/ffmpeg.js#L21 https://github.com/davidguttman/video-download-tool/blob/mai...
- thrdbndndn 5y agoThat's why he uses `-f best`, which in 99% cases will give the best single-file output from YouTube that ffmpeg definitely can understand (the exception being live streaming or VOD of a just finished live streaming, which may not have a non-DASH variant.) The caveat is this will only give you up to 720p video, since higher quality have separate audio and video (likely in DASH format), which ffmpeg can understand, but you need to modify the command accordingly. (The default for youtube-dl is `-f bestvideo+bestaudio`; with `-g` it gives you exactly that: two urls for audio and video respectively).