ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.24k stars 9.93k forks source link

New formats request for Live Streaming Support #30853

Open theassyrian opened 2 years ago

theassyrian commented 2 years ago

Checklist

Description

WRITE DESCRIPTION HERE It looks like some video sites are starting to use HLS or DART the webstreaming dump has this inside [ x264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=4 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 p sy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 de cimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=4 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=96 keyint_min=48 scenecut=0 intra_refre sh=0 rc_lookahead=40 rc=crf mbtree=1 crf=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1800 vbv_bufsize=1440 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.41 aq=1:1.00 ]

It would be great if youtube-dy could support this

From what I can tell they are using: https://github.com/shaka-project/shaka-packager there is also a player https://github.com/shaka-project/shaka-player (which chrome has integrated)

see debug example below: https://tubitv.com/movies/578173/harold-kumar-go-to-white-castle

youtube-dl -vvv https://tubitv.com/movies/578173/harold-kumar-go-to-white-castle [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-vvv', u'https://tubitv.com/movies/578173/harold-kumar-go-to-white-castle'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2021.12.17 [debug] Python version 2.7.18 (CPython) - Linux-5.16.0-6-amd64-x86_64-with-debian-bookworm-sid [debug] exe versions: avconv 4.4.1-3, avprobe 4.4.1-3, ffmpeg N-104644-g1a5930b554, ffprobe N-104644-g1a5930b554 [debug] Proxy map: {} [debug] Using fake IP 6.127.157.55 (US) as X-Forwarded-For. [TubiTv] 578173: Downloading JSON metadata [TubiTv] 578173: Downloading m3u8 information Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/youtube-dl/main.py", line 19, in File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 475, in main File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 465, in _real_main File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2069, in download File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 808, in extract_info File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/tubitv.py", line 80, in _real_extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1643, in _extract_m3u8_formats File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 667, in _download_webpage_handle File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 634, in _request_webpage File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2288, in urlopen File "/usr/lib/python2.7/urllib2.py", line 421, in open protocol = req.get_type() File "/usr/lib/python2.7/urllib2.py", line 283, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type:

theassyrian commented 2 years ago

Thank you for review

theassyrian commented 2 years ago

DRM

I dont think its always encrypted or under digital rights? I found some good apple links on HLS: https://developer.apple.com/streaming/ If your sure its DRM then I guess there will be no support for a feature request :-(

theassyrian commented 2 years ago

89z thanks for the help. Looks like you know a lot about streaming. I will try to find something. But youtube-dl works flawless on other sites. Will reply if I can locate anything.

dirkf commented 2 years ago

HLS shouldn't be the problem, since it's already supported. From the log the manifest has some unexpected URL format that needs more investigation.