derhuerst/play-on-apple-tv
View on GitHubdocument how to find out & play Youtube HLS URLs
Open
#3 opened on Jul 28, 2019
documentationhelp wanted
Repository metrics
- Stars
- (26 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Sending a YouTube video URL directly to an Apple TV (3rd gen) fails.
You can let the Apple TV play an .mp4 URL just fine (and get it via youtube-dl --get-url -f format-id-here url-here), but in order to let the Apple TV choose video quality, it needs an HLS URL; This works via a periodically re-fetched .m3u8 URL containing links to video chunks in several qualities.
The problem is finding out the HLS URL of a non-live-stream Youtube video. I've tried, but failed.
- Both
ytdlas well asyoutube-dldon't seem to support this out of the box, (except for live stream videos](https://github.com/ytdl-org/youtube-dl/blob/90634acfcf9b106c9f5ac12bae5d92307cd577b0/youtube_dl/extractor/youtube.py#L443-L451))