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.31k stars 9.95k forks source link

LiveTV stream from rutube.ru issue #22325

Open SlazE888 opened 5 years ago

SlazE888 commented 5 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://rutube.ru/play/embed/11175917']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2019.09.01
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg N-94481-g5ac28e9cc1, ffprobe N-94481-g5ac28e9cc1
[debug] Proxy map: {}
[rutube:embed] 11175917: Downloading options JSON
ERROR: No video formats found
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpbzyg5d3a\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpbzyg5d3a\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpbzyg5d3a\build\youtube_dl\extractor\rutube.py", line 184, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpbzyg5d3a\build\youtube_dl\extractor\rutube.py", line 89, in _extract_formats
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpbzyg5d3a\build\youtube_dl\extractor\common.py", line 1327, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found

Description

LiveTV stream above plays fine in Google Chrome browser.

SlazE888 commented 4 years ago

One more LiveTV-stream from that site: https://rutube.ru/play/embed/10711575

dirkf commented 4 months ago

Live streams have media links in the options JSON like this:

  'live_streams': {
    'hls': [
      {
        'GeoIP_TZ': '+3',
        'is_audio': true,
        'is_video': true,
        'is_dvr': false,
        'url': 'https://bl.rutube.ru/livestream/c58f502c7bb34a8fcdd976b221fca292/index.m3u8?s=vWu6JmRePbIDtRVEc1h6EA&e=1713480461&scheme=https'
      }
    ]
  },
dirkf commented 4 months ago

And now from UK:

$ python -m youtube_dl --list-subs 'https://rutube.ru/video/056cb59f2836e6d0c1a137c1dbb370f8/'
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading video JSON
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading options JSON
[rutube] In addition to the below, consider --geo-verification-proxy.
ERROR: Options JSON is blocked (or may have expired)
This video is available in Russian Federation.
You might want to use a VPN or a proxy server (with --proxy) to workaround.
$ python -m youtube_dl --list-subs 'https://rutube.ru/video/056cb59f2836e6d0c1a137c1dbb370f8/' --geo-verification-proxy a.b.c:d
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading video JSON
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading options JSON
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading m3u8 information
[rutube] 056cb59f2836e6d0c1a137c1dbb370f8: Downloading m3u8 information
Available subtitles for 056cb59f2836e6d0c1a137c1dbb370f8:
Language formats
ru       srt
$ 
dirkf commented 4 months ago

And now (Первый канал. Прямой эфир):

$ python -m youtube_dl -vF 'https://rutube.ru/live/video/c58f502c7bb34a8fcdd976b221fca292/'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vF', u'https://rutube.ru/live/video/c58f502c7bb34a8fcdd976b221fca292/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: d763af1ce
[debug] Python 2.7.15 (CPython i686 32bit) - Linux-6.1.0-20-686-pae-i686-with-debian-12.5 - OpenSSL 1.1.1a  20 Nov 2018 - glibc 2.1.3
[debug] exe versions: ffmpeg 5.1.4-0, ffprobe 5.1.4-0
[debug] Proxy map: {}
[rutube] c58f502c7bb34a8fcdd976b221fca292: Downloading video JSON
[rutube] c58f502c7bb34a8fcdd976b221fca292: Downloading options JSON
[rutube] c58f502c7bb34a8fcdd976b221fca292: Downloading m3u8 information
[info] Available formats for c58f502c7bb34a8fcdd976b221fca292:
format code      extension  resolution note
hls_live-1000-0  mp4        640x360    1000k , avc1.64001f, mp4a.40.2
hls_live-1000-1  mp4        640x360    1000k , avc1.64001f, mp4a.40.2
hls_live-4000-0  mp4        1280x720   4000k , avc1.64001f, mp4a.40.2
hls_live-4000-1  mp4        1280x720   4000k , avc1.64001f, mp4a.40.2
hls_live-6800-0  mp4        1920x1080  6800k , avc1.64001f, mp4a.40.2
hls_live-6800-1  mp4        1920x1080  6800k , avc1.64001f, mp4a.40.2 (best)
$