Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBC video from news page: youtube_dl.extractor.bbc.BBCCoUkIE.MediaSelectionError: notavailable #23232

Closed
5 tasks done
GreenReaper opened this issue Nov 27, 2019 · 9 comments
Closed
5 tasks done

Comments

@GreenReaper
Copy link

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.11.22
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl --print-traffic -v https://www.bbc.co.uk/news/election-2019-50561043
[debug] System config: []
[debug] User config: ['--ffmpeg-location', 'C:\\Program Files\\ffmpeg-20190823-b29c7bc-win64-shared\\bin', '-f', '137+bestaudio/298+bestaudio/136+bestaudio/135+bestaudio/134+bestaudio/DASH-VIDEO-1+bestaudio/best', '--write-sub', '--convert-subs', 'srt', '--embed-subs']
[debug] Custom config: []
[debug] Command-line args: ['--print-traffic', '-v', 'https://www.bbc.co.uk/news/election-2019-50561043']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2019.11.22
[debug] Python version 3.8.0 (CPython) - Windows-10-10.0.18362-SP0
[debug] exe versions: ffmpeg N-94619-gb29c7bcbf6, ffprobe N-94619-gb29c7bcbf6, rtmpdump 2.4-20151223-gfa8646d-GnuTLS_3.5.12-i686-static
[debug] Proxy map: {}
[bbc] election-2019-50561043: Downloading webpage
send: b'GET /news/election-2019-50561043 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.112 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: Apache
header: X-Cache-Action: MISS
header: Vary: X-BBC-Edge-Scheme,X-CDN,X-BBC-Edge-Cache,Accept-Encoding
header: Cache-Control: max-age=60, stale-while-revalidate
header: X-Cache-Age: 0
header: Content-Type: text/html; charset=utf-8
header: Content-Encoding: gzip
header: Date: Wed, 27 Nov 2019 07:11:42 GMT
header: X-News-Data-Centre: lbh
header: Content-Language: en-GB
header: X-LB-NoCache: true
header: X-PAL-Host: pal877.back.live.lbh.local:80
header: Connection: close
header: X-News-Cache-Id: 76331
header: Content-Length: 38576
[bbc] p07w4173: Downloading media selection XML
send: b'GET /mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/p07w4173 HTTP/1.1\r\nHost: open.live.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.112 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Server: nginx
header: cache-control: private, s-maxage=10 max-age=10
header: Content-Type: text/xml
header: Content-Encoding: gzip
header: X-MS-Disclaimer: This code and data form part of the BBC iPlayer content protection system. Tampering with, removal of, misuse of, or unauthorised use of this code or data constitutes circumvention of the BBC's content protection measures and may result in legal action. BBC (C) 2017.
header: Date: Wed, 27 Nov 2019 07:11:42 GMT
header: Transfer-Encoding: chunked
header: Connection: close
header: X-RequestId: 90f2d9ee-80f0-4bf9-8436-a29f1fd82300
[bbc] p07w4173: Downloading media selection XML
send: b'GET /mediaselector/4/mtis/stream/p07w4173 HTTP/1.1\r\nHost: open.live.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.112 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx
header: cache-control: private, proxy-revalidate, s-maxage=0, max-age=60
header: Content-Type: text/xml
header: Content-Encoding: gzip
header: X-MS-Disclaimer: This code and data form part of the BBC iPlayer content protection system. Tampering with, removal of, misuse of, or unauthorised use of this code or data constitutes circumvention of the BBC's content protection measures and may result in legal action. BBC (C) 2017.
header: Strict-Transport-Security: max-age=0
header: Date: Wed, 27 Nov 2019 07:11:42 GMT
header: Transfer-Encoding: chunked
header: Connection: close
header: X-RequestId: 1421ca85-c943-423a-ab7a-b172393205ec
ERROR: bbc returned error: notavailable
Traceback (most recent call last):
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 355, in _download_media_selector
    return self._download_media_selector_url(
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 368, in _download_media_selector_url
    return self._process_media_selector(media_selection, programme_id)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 375, in _process_media_selector
    for media in self._extract_medias(media_selection):
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 321, in _extract_medias
    raise BBCCoUkIE.MediaSelectionError(error.get('id'))
youtube_dl.extractor.bbc.BBCCoUkIE.MediaSelectionError: notavailable
Traceback (most recent call last):
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 355, in _download_media_selector
    return self._download_media_selector_url(
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 368, in _download_media_selector_url
    return self._process_media_selector(media_selection, programme_id)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 375, in _process_media_selector
    for media in self._extract_medias(media_selection):
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 321, in _extract_medias
    raise BBCCoUkIE.MediaSelectionError(error.get('id'))
youtube_dl.extractor.bbc.BBCCoUkIE.MediaSelectionError: notavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 936, in _real_extract
    formats, subtitles = self._download_media_selector(programme_id)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 361, in _download_media_selector
    self._raise_extractor_error(e)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 347, in _raise_extractor_error
    raise ExtractorError(
youtube_dl.utils.ExtractorError: bbc returned error: notavailable

Description

The image at the top of this news page turns into a video, which is not downloaded when accessing the page via youtube-dl. It works in the browser even if I open the window in a new private mode window.

I am in the UK using Virgin Media cable without a proxy. On right-clicking the video while playing I get:

2.29.4.68bb939.u.x
1700kbps | dash (mv_bidi_dash_https)
p07w4173 | 960x540

The issue also occurred when using Python 3.7.3 and I believe a slightly-earlier version of youtube-dl.

@GreenReaper
Copy link
Author

The same issue occurs with this URL. But this one is slightly different (I think I saw this earlier on one of their video-centric pages as well):

youtube-dl -v --print-traffic https://www.bbc.co.uk/news/uk-england-sussex-50559136
[debug] System config: []
[debug] User config: ['--ffmpeg-location', 'C:\\Program Files\\ffmpeg-20190823-b29c7bc-win64-shared\\bin', '-f', '137+bestaudio/298+bestaudio/136+bestaudio/135+bestaudio/134+bestaudio/DASH-VIDEO-1+bestaudio/best', '--write-sub', '--convert-subs', 'srt', '--embed-subs']
[debug] Custom config: []
[debug] Command-line args: ['-v', '--print-traffic', 'https://www.bbc.co.uk/news/uk-england-sussex-50559136']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2019.11.22
[debug] Python version 3.8.0 (CPython) - Windows-10-10.0.18362-SP0
[debug] exe versions: ffmpeg N-94619-gb29c7bcbf6, ffprobe N-94619-gb29c7bcbf6, rtmpdump 2.4-20151223-gfa8646d-GnuTLS_3.5.12-i686-static
[debug] Proxy map: {}
[bbc] uk-england-sussex-50559136: Downloading webpage
send: b'GET /news/uk-england-sussex-50559136 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.122 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: Apache
header: X-Cache-Action: HIT
header: X-Cache-Hits: 2
header: Vary: X-BBC-Edge-Scheme,X-CDN,X-BBC-Edge-Cache,Accept-Encoding
header: Cache-Control: max-age=60, stale-while-revalidate
header: X-Cache-Age: 11
header: Content-Type: text/html; charset=utf-8
header: Content-Encoding: gzip
header: Date: Wed, 27 Nov 2019 07:26:08 GMT
header: X-News-Data-Centre: telhc
header: Content-Language: en-GB
header: X-LB-NoCache: true
header: X-PAL-Host: pal1200.back.live.telhc.local:80
header: Connection: close
header: X-News-Cache-Id: 657
header: Content-Length: 38838
[bbc] p07w3xrq: Downloading media selection XML
send: b'GET /mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/p07w3xrq HTTP/1.1\r\nHost: open.live.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.122 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx
header: cache-control: private, s-maxage=300, max-age=900
header: Content-Type: text/xml
header: Content-Encoding: gzip
header: Strict-Transport-Security: max-age=0
header: Date: Wed, 27 Nov 2019 07:26:18 GMT
header: Transfer-Encoding: chunked
header: Connection: close
header: X-RequestId: 5d75e374-66f7-4c17-82e5-c691c77ce09f
[bbc] p07w3xrq: Downloading captions
send: b'GET /iplayer/subtitles/ng/galileo/p0/7w/3x/p07w3xrq-84ad7d4b-d4c8-4559-a264-8eb8a4f620e1.xml HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.122 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx
header: X-Cache-Action: MISS
header: Cache-Control: private, max-age=0, no-store
header: X-Cache-Age: 0
header: Content-Type: text/xml
header: access-control-max-age: 3000
header: Date: Wed, 27 Nov 2019 07:26:18 GMT
header: access-control-allow-origin: *
header: ETag: "d8c96bbdfa224b11a8cfad1b4bc2027c"
header: Connection: close
header: x-amz-id-2: 8/uGGGezS1y2ijTipeX/usQdgDUrTyavW9dvkToijEOZIsryySRXa3eUsifP0Rezdcx1un4nJfg=
header: Last-Modified: Tue, 26 Nov 2019 14:08:16 GMT
header: access-control-allow-methods: HEAD,GET,OPTIONS
header: x-amz-request-id: EB739D1E84950BF7
header: Content-Length: 4249
[bbc] p07w3xrq: Downloading captions
send: b'GET /iplayer/subtitles/ng/galileo/p0/7w/3x/p07w3xrq-84ad7d4b-d4c8-4559-a264-8eb8a4f620e1.xml?__gda__=1574861178_1eab66b779c7a82b4d2d23fb8112f77e HTTP/1.1\r\nHost: vod-sub-uk-live.akamaized.net\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.122 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml
header: Access-Control-Max-Age: 3000
header: Last-Modified: Tue, 26 Nov 2019 14:08:16 GMT
header: ETag: "d8c96bbdfa224b11a8cfad1b4bc2027c"
header: Server: c3
header: Accept-Ranges: bytes
header: Content-Encoding: gzip
header: Content-Length: 1297
header: Cache-Control: max-age=1136
header: Expires: Wed, 27 Nov 2019 07:45:14 GMT
header: Date: Wed, 27 Nov 2019 07:26:18 GMT
header: Connection: close
header: Vary: Accept-Encoding
header: Akamai-Mon-Iucid-Del: 546815
header: Access-Control-Expose-Headers: Server,Range,Content-Length,Content-Range,Akamai-Mon-Iucid-Ing,Akamai-Mon-Iucid-Del
header: Access-Control-Allow-Methods: GET,HEAD,OPTIONS
header: Access-Control-Allow-Headers: Origin,Range,Accept-Encoding,Referer
header: Access-Control-Allow-Origin: *
[bbc] p07w3xrq: Downloading captions
send: b'GET /iplayer/subtitles/ng/galileo/p0/7w/3x/p07w3xrq-84ad7d4b-d4c8-4559-a264-8eb8a4f620e1.xml?s=1574817978&e=1574861178&h=4b6ea72bdabca3cba444201b458882c0 HTTP/1.1\r\nHost: vod-sub-uk-live.bbcfmt.hs.llnwd.net\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.122 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 27 Nov 2019 07:26:18 GMT
header: Content-Type: text/xml
header: Content-Length: 1297
header: Connection: close
header: Access-Control-Max-Age: 3000
header: Server: c3
header: Accept-Ranges: bytes
header: Content-Encoding: gzip
header: Vary: Accept-Encoding
header: Age: 7802
header: Last-Modified: Tue, 26 Nov 2019 14:08:16 GMT
header: Access-Control-Allow-Headers: Origin, Range, Accept-Encoding, Referer
header: Access-Control-Allow-Origin: *
header: Access-Control-Expose-Headers: Server, Range, Content-Length, Content-Range
header: Access-Control-Allow-Methods: GET,HEAD,OPTIONS
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "c:\program files\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\bbc.py", line 937, in _real_extract
    self._sort_formats(formats)
  File "c:\program files\python38\lib\site-packages\youtube_dl\extractor\common.py", line 1327, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@hairycactus
Copy link

Similar error encountered for the below video (published: 28 Nov 2019) on BBC's Video page. This is one of the headlining "Video Top Stories" at the time of this report.

Video: Global .com URL | Alternate .co.uk URL

Summary of Error Messages:

  • bbc returned error: notavailable
  • youtube_dl.extractor.bbc.MediaSelectionError: notavailable
  • youtube_dl.utils.ExtractorError: bbc returned error: notavailable

Log:

youtube-dl --print-traffic -v https://www.bbc.com/news/av/science-environment-50578326/the-black-sea-can-europe-s-most-polluted-sea-be-saved
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--print-traffic', '-v', 'https://www.bbc.com/news/av/science-environment-50578326/the-black-sea-can-europe-s-most-polluted-sea-be-saved']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.11.22
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 4.2.1, ffprobe 4.2.1
[debug] Proxy map: {}
[bbc] the-black-sea-can-europe-s-most-polluted-sea-be-saved: Downloading webpage
[bbc] p07w83v3: Downloading media selection XML
[bbc] p07w83v3: Downloading media selection XML
ERROR: bbc returned error: notavailable
Traceback (most recent call last):
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 356, in _download_media_selector
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 368, in _download_media_selector_url
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 375, in _process_media_selector
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 321, in _extract_medias
youtube_dl.extractor.bbc.MediaSelectionError: notavailable
Traceback (most recent call last):
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 356, in _download_media_selector
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 368, in _download_media_selector_url
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 375, in _process_media_selector
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 321, in _extract_medias
youtube_dl.extractor.bbc.MediaSelectionError: notavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\common.py", line 530, in extract
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 936, in _real_extract
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 361, in _download_media_selector
    File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpwnp2jh33\build\youtube_dl\extractor\bbc.py", line 349, in _raise_extractor_error
youtube_dl.utils.ExtractorError: bbc returned error: notavailable

@ajj8
Copy link

ajj8 commented Nov 29, 2019

BBC have updated the mediaselector. For mediaselector 5, iptv-all is now legacy-iptv-all:
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/legacy-iptv-all/vpid/p07wd556

However, mediaselector 6 now offers 720p HLS/DASH streams on iptv-all:
https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/iptv-all/vpid/p07wd556/format/xml/

@GreenReaper
Copy link
Author

Looks to me like they specify a Full HD (1920x1080) stream in iptv-all as well.

@hairycactus
Copy link

Regarding the sample BBC.com/BBC.co.uk video URL mentioned in my initial comment above, the same video has also been published at the BBC Reel page.

Below is a comparison of how Youtube-dl v2019.11.28 is handling the said video at the 2 URLs:

BBC.com / BBC.co.uk:

ERROR: bbc returned error: notavailable

vs. BBC Reel (BBC.com/reel/video/...):

Youtube-dl is not able to automatically extract the video's PID ("no suitable InfoExtractor" error) for BBC Reel (as well as BBC Ideas/ BBC Earth etc.) videos. The BBC Reel video/playlist extraction issue was previously reported at #21870 & #18308.

Using the workaround of manually specifying the PID, there are no errors encountered, but Youtube-dl fetches "video only" & "audio only" formats, which require user selection for merging on-the-fly. The default "best" format consists of just video visuals without any audio. (This wasn't the case for BBC Reel videos published before 27/28 Nov 2019.)

Log:

youtube-dl -F -v https://www.bbc.co.uk/programmes/p07w83tq

[bbc.co.uk] p07w83tq: Downloading video page
[bbc.co.uk] p07wbbrx: Downloading media selection XML
[bbc.co.uk] p07wbbrx: Downloading media selection XML
[bbc.co.uk] p07wbbrx: Downloading MPD manifest
[bbc.co.uk] p07wbbrx: Downloading MPD manifest
[bbc.co.uk] p07wbbrx: Downloading MPD manifest
[bbc.co.uk] p07wbbrx: Downloading MPD manifest
[info] Available formats for p07wbbrx:
format code                                                                                   extension  resolution note
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-audio_eng=96000           m4a        audio only [en] DASH audio   96k , m4a_dash container, mp4a.40.5 (48000Hz)
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-audio_eng=96000     m4a        audio only [en] DASH audio   96k , m4a_dash container, mp4a.40.5 (48000Hz)
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-audio_eng=96000        m4a        audio only [en] DASH audio   96k , m4a_dash container, mp4a.40.5 (48000Hz)
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-audio_eng=96000  m4a        audio only [en] DASH audio   96k , m4a_dash container, mp4a.40.5 (48000Hz)
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=281000              mp4        384x216    DASH video  281k , mp4_dash container, avc3.42C015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=281000        mp4        384x216    DASH video  281k , mp4_dash container, avc3.42C015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=281000           mp4        384x216    DASH video  281k , mp4_dash container, avc3.42C015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=281000     mp4        384x216    DASH video  281k , mp4_dash container, avc3.42C015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=437000              mp4        512x288    DASH video  437k , mp4_dash container, avc3.4D4015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=437000        mp4        512x288    DASH video  437k , mp4_dash container, avc3.4D4015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=437000           mp4        512x288    DASH video  437k , mp4_dash container, avc3.4D4015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=437000     mp4        512x288    DASH video  437k , mp4_dash container, avc3.4D4015, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=827000              mp4        704x396    DASH video  827k , mp4_dash container, avc3.4D401F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=827000        mp4        704x396    DASH video  827k , mp4_dash container, avc3.4D401F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=827000           mp4        704x396    DASH video  827k , mp4_dash container, avc3.4D401F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=827000     mp4        704x396    DASH video  827k , mp4_dash container, avc3.4D401F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=1604000             mp4        960x540    DASH video 1604k , mp4_dash container, avc3.64001F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=1604000       mp4        960x540    DASH video 1604k , mp4_dash container, avc3.64001F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=1604000          mp4        960x540    DASH video 1604k , mp4_dash container, avc3.64001F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=1604000    mp4        960x540    DASH video 1604k , mp4_dash container, avc3.64001F, 25fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=2812000             mp4        960x540    DASH video 2812k , mp4_dash container, avc3.64001F, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=2812000       mp4        960x540    DASH video 2812k , mp4_dash container, avc3.64001F, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=2812000          mp4        960x540    DASH video 2812k , mp4_dash container, avc3.64001F, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=2812000    mp4        960x540    DASH video 2812k , mp4_dash container, avc3.64001F, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash-video=5070000             mp4        1280x720   DASH video 5070k , mp4_dash container, avc3.640020, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_akamai_world_dash_https-video=5070000       mp4        1280x720   DASH video 5070k , mp4_dash container, avc3.640020, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash-video=5070000          mp4        1280x720   DASH video 5070k , mp4_dash container, avc3.640020, 50fps, video only
stream-nonuk-pc_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=5070000    mp4        1280x720   DASH video 5070k , mp4_dash container, avc3.640020, 50fps, video only (best)

@frakman1
Copy link

I'm trying to do something similar to download the one-minute news page here: https://www.bbc.com/news/av/10462520
(Not sure if the URL changes or is static)

Anyway, it says the URL is unsupported. I also tried all the examples on this issue but they all return Unsupported URL

What am I doing wrong?

$ youtube-dl -F -v https://www.bbc.com/news/av/10462520
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-F', '-v', 'https://www.bbc.com/news/av/10462520']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.9 - Linux-4.9.24+-armv6l-with-debian-8.0
[debug] Proxy map: {}
[generic] 10462520: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 10462520: Downloading webpage
[generic] 10462520: Extracting information
ERROR: Unsupported URL: https://www.bbc.com/news/av/10462520; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 457, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/utils.py", line 1417, in parse_xml
    return xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 7, column 30
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 516, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 170, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 752, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: https://www.bbc.com/news/av/10462520; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

@GreenReaper
Copy link
Author

GreenReaper commented Apr 10, 2021

What am I doing wrong?
...
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.9 - Linux-4.9.24+-armv6l-with-debian-8.0

Current versions are from 2021, not 2014, and for Debian 10 Buster with Python 3, not Debian 8 Jessie with Python 2. You might try installing a new package (and maybe, a newer OS?), as youtube-dl was only updated to handle the newer BBC method of embedding video within the last year or so.

If you were on Debian 10 Buster, you could use the
buster-backports repository to access a build from this year. Assuming you have a compatible device. If it is e.g. a Raspberry Pi you might want to look to them or their user community for an up to date version, as it may be built with proper hardware support for your platform.

It might be possible to download that package and use it on your existing OS with dpkg -i, since Jessie does technically support a version of Python 3 (that it relies on now, rather than Python 2); however I am not sure this will work practically - and since LTS support for Jessie has ended, you are on thin ice - what if there is a bug in ffmpeg, and a file is crafted to exploit that? Unlikely, but possible. Extended LTS might help with the security side (though it uses "armel" rather than "armv6l" as it's architecture), but only until 2022.

@frakman1
Copy link

frakman1 commented Apr 10, 2021

@GreenReaper Thank you for the insight. I am indeed using a Pi-Zero on jessie/debian 8. I had just installed it via apt install youtube-dl that day so I thought I was on the latest but I guess not. I can't really update the OS so I will investigate the various options you presented.


UPDATE:

I decided to remove the apt installed one and install the new one via pip3 since Python 3 is available.

I did a sudo apt remove youtube-dl followed by a sudo pip3 install youtube-dl

Now everything works as expected. It even runs the most recent version:

[debug] youtube-dl version 2021.04.07
[debug] Python version 3.4.2 (CPython) - Linux-4.9.24+-armv6l-with-debian-8.0
[debug] exe versions: avconv 11.12-6, avprobe 11.12-6, rtmpdump 2.4

I was able to download the audio for the one-minute news segment using:

youtube-dl -f mf_akamai-audio_eng=96000-0 -v https://www.bbc.com/news/av/10462520

I picked format code (-f mf_akamai-audio_eng=96000-0) from the output of the previous command with the -F that lists available formats.

@frakman1
Copy link

I noticed that this stopped working recently. I upgraded youtube-dl to 2021.06.06 using sudo pip3 install --upgrade youtube-dl but the extractor still failed.

This is the output:

$ /usr/local/bin/youtube-dl -v -o /home/pi/git/motion/tmp/oneminute.m4a -f mf_akamai-audio_eng=96000-0  https://www.bbc.com/news/av/10462520
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-o', '/home/pi/git/motion/tmp/oneminute.m4a', '-f', 'mf_akamai-audio_eng=96000-0', 'https://www.bbc.com/news/av/10462520']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.2 (CPython) - Linux-4.9.24+-armv6l-with-debian-8.0
[debug] exe versions: avconv 11.12-6, avprobe 11.12-6, rtmpdump 2.4
[debug] Proxy map: {}
[bbc] 10462520: Downloading webpage
ERROR: Unable to extract playlist data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/extractor/bbc.py", line 1255, in _real_extract
    webpage, 'playlist data'),
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/extractor/common.py", line 1012, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract playlist data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants