Re:VP9: Faster, better, buffer-free YouTube videos
by roryokane on Tuesday April 07, 2015 @01:00AM
(#9332108)
I don’t think that audio-only version comes from Youtube. I think youtube-dl downloads the whole video, then uses ffmpeg to extract and possibly re-encode its audio channel.
Re:VP9: Faster, better, buffer-free YouTube videos
by yohui on Tuesday April 07, 2015 @04:41AM
(#9332640)
No, YouTube does have audio-only streams. You can use "youtube-dl -F [url]" to view the available formats and their codes.
They're meant to be paired with the video-only streams used for some resolutions (most notably 1080p). Even browser extensions such as YouTube Center can download the streams, and they certainly don't use ffmpeg.
(In fact, I do use ffmpeg to combine audio-only and video-only streams via youtube-dl, e.g. "youtube-dl -f 137+141 [url]" which takes 1080p video and 256k aac audio.)
That being said, YouTube does also encode audio-only versions of all their videos; they're not available from the web player though. You can use external software such as youtube-dl[1] to take advantage of it.
[1]: https://github.com/rg3/youtube-dl/ (using an invocation such as "youtube-dl -g -f bestaudio [url]" to retrieve the URL of an audio-only encode)