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.86k stars 10k forks source link

youtube-dl failed to download new live stream format on Youtube #21734

Closed wuqifeng1988 closed 5 years ago

wuqifeng1988 commented 5 years ago

Checklist

Verbose log

youtube-dl -f 136+140 -v "https://www.youtube.com/watch?v=KTJXlMnA1c0
"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', '136+140', '-v', 'https://www.youtube.com/watc
h?v=KTJXlMnA1c0']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2019.07.02
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-91135-g2c2d689c56
[debug] Proxy map: {}
[youtube] KTJXlMnA1c0: Downloading webpage
[youtube] KTJXlMnA1c0: Downloading video info webpage
[youtube] KTJXlMnA1c0: Downloading MPD manifest
[debug] Invoking downloader on 'https://r4---sn-i3beln7r.googlevideo.com/videopl
ayback?expire=1562872681&ei=CTcnXcuLLKWRs8IPhYO9sAo&ip=42.200.173.57&id=KTJXlMnA
1c0.0&itag=136&aitags=133%2C134%2C135%2C136%2C160&source=yt_live_broadcast&requi
ressl=yes&mm=44%2C29&mn=sn-i3beln7r%2Csn-i3b7knse&ms=lva%2Crdu&mv=m&mvi=3&pl=19&
initcwndbps=1198750&live=1&hang=1&noclen=1&mime=video%2Fmp4&gir=yes&mt=156285099
4&fvip=4&keepalive=yes&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Cr
equiressl%2Clive%2Chang%2Cnoclen%2Cmime%2Cgir&sig=ALgxI2wwRQIgA56zJqdXKjEqGo9RwS
-3Gpz6t4UquaazBflZp90atr0CIQC0vKiZfFhk7CFAhFT_Mp5kjx_nTbByeTT-IVgYKwlAzg%3D%3D&l
sparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIhALv64CinKFSw
ZtUOFbxjwyxNnaUS94ISOCxSqbJWnO1yAiASuDs4DwBapo3yM24lfvlzZSEIFRKTmwqn1YGifXl0Yw%3
D%3D&ratebypass=yes'
[download] Destination: DW - Deutsche Welle Live TV  (Deutsch)-KTJXlMnA1c0.f13
6.mp4
[download] 250.96KiB at  8.33KiB/s (00:30)[download] Got server HTTP error: Down
loaded 256978 bytes, expected 10282982 bytes. Retrying (attempt 1 of 10)...
[download] Destination: DW - Deutsche Welle Live TV  (Deutsch)-KTJXlMnA1c0.f13
6.mp4
[download] 423.48KiB at  5.72KiB/s (01:00) [download] Got server HTTP error: Dow
nloaded 433646 bytes, expected 10595573 bytes. Retrying (attempt 2 of 10)...
[download] Destination: DW - Deutsche Welle Live TV  (Deutsch)-KTJXlMnA1c0.f13
6.mp4
[download] 508.85KiB at  2.83KiB/s (01:30)  [download] Got server HTTP error: Do
wnloaded 521065 bytes, expected 10565342 bytes. Retrying (attempt 3 of 10)...

ERROR: Did not get any data blocks
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\__init__.py", line 474, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\__init__.py", line 464, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 2008, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 807, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 861, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 1642, in process_video_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 1909, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 1854, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\downloader\common.py", line 366, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\downloader\http.py", line 342, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\downloader\http.py", line 312, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\downloader\common.py", line 165, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 624, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphnjfku
ku\build\youtube_dl\YoutubeDL.py", line 586, in trouble

Description

From 10/July/2019, some live streaming on youtube upgraded their format, for example: "https://www.youtube.com/watch?v=KTJXlMnA1c0", with separate video and audio.

When using: youtube-dl -f 136+140 "https://www.youtube.com/watch?v=KTJXlMnA1c0" or even youtube-dl -f 136 "https://www.youtube.com/watch?v=KTJXlMnA1c0"

It will only download a 500KB mp4 file with no sound. I have changed networks and checked with browser in the same network condition, and confirm it isn't caused by network fault.

catalan63 commented 5 years ago

its the same here, when we do youtube-dl -f 136 -g "youtunbe-link" it gives something strange. Youtube moved the live transmission from HLS to DASH and i dont find the way to get the MPD manifest to passthrough to ffmpeg yet. In the past i used youtube-dl to get the m3u8 links and download with ffmpeg hls demuxer. FFmpeg has a dash demuxer but you need to give him the MPD manifest.