streamlink / streamlink

Streamlink is a CLI utility which pipes video streams from various services into a video player
https://streamlink.github.io/
BSD 2-Clause "Simplified" License
9.92k stars 1.1k forks source link

BBC iPlayer Live TV #1033

Closed h633537 closed 6 years ago

h633537 commented 7 years ago

When streaming live channels from iplayer e.g. http://www.bbc.co.uk/iplayer/live/bbcone (geoip restricted to UK) it defaults to 960x540 25fps video.

Streamlink:
[cli][info] Available streams: 544k_alt, 1700k_alt, 1700k_alt2, 544k_alt2, 352k_alt2, 942k_alt2, 540p_alt, 288p_alt, 942k_alt, 540p_alt2, 396p_alt2, 288p_alt2, 396p_alt, 352k_alt, 352k (worst), 544k, 288p, 942k, 396p, 540p, 1700k (best)
[cli][info] Opening stream: 1700k (hds)

get_iplayer had a streaming option which allows streaming up to 720p 50fps info. Unfortunately the developer removed the streaming feature from new versions.

get_iplayer:
INFO: hvfhd1,hvfhd2,hvfhd3,hvfhd4,hvfsd1,hvfsd2,hvfsd3,hvfsd4,hvfvhigh1,hvfvhigh2,hvfvhigh3,hvfvhigh4,hvfhigh1,hvfhigh2,hvfhigh3,hvfhigh4,hvfstd1,hvfstd2,hvfstd3,hvfstd4,hvflow1,hvflow2,hvflow3,hvflow4 modes will be tried for version default
INFO: Trying hvfhd1 mode to stream livetv: BBC One - live

 (+) Video --vid=1 (h264 1280x720 50.000fps)
 (+) Audio --aid=1 (aac 2ch 48000Hz)

Is it possible to force mpegdash/hls 720p 50fps stream with streamlink or would a new feature be needed to enable it?

beardypig commented 7 years ago

It would require some development work, how much work I don't know. Unless someone else does it, I'll take a look at it at some point in the next couple of weeks.

Vangelis66 commented 7 years ago

@h633537 wrote:

Is it possible to force mpegdash/hls 720p 50fps stream with streamlink

I'm not sure whether streamlink currently supports MPEG-DASH streams; youtube-dl does, but only for VOD, not live streams (dynamic manifests). If you are willing to do some manual labour, then you can grab yourself the AdobeHDS manifests and/or AppleHLS playlists and feed those to streamlink directly...

E.g. for BBC One (London), one can sniff the mediaselector URL to the streams: http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/pc/vpid/bbc_one_london/atk/78ca5063d64bb5b308d1d87f737b610aa2db0f3f/asn/1/ and the hds manifest for the Akamai CDN is http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hds/uk/pc/ak/bbc_one_london.f4m

If you substitute bbc_one_london.f4m with bbc_one_hd.f4m, then streamlink -o BBCOneLive.flv "hds://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hds/uk/pc/ak/bbc_one_hd.f4m" best =>

[cli][info] Found matching plugin stream for URL hds://a.files.bbci.co.uk/media/
live/manifesto/audio_video/simulcast/hds/uk/pc/ak/bbc_one_hd.f4m
[cli][info] Available streams: 352k (worst), 544k, 942k, 1700k, 2908k, 5166k (be
st)
[cli][info] Opening stream: 5166k (hds)
[download][BBCOneLive.flv] Written 312.3 KB (1s @ 213.9 KB/s)

If you prefer AppleHLS streams, then for http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/bbc_one_hd one gets (Akamai CDN): http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_hd.m3u8 so streamlink -o BBCOneLive.ts "hlsvariant://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_hd.m3u8" best =>

[cli][info] Found matching plugin stream for URL hlsvariant://a.files.bbci.co.uk
/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_hd.m3u8
[cli][info] Available streams: 396p (worst), 540p, 720p (best)
[cli][info] Opening stream: 720p (hls)
[download][BBCOneLive.ts] Written 372.6 KB (0s @ 402.4 KB/s)

NB: Both the mediaselector URLs and the HDS/HLS streams themselves are geo-filtered to the UK only (and the BBC have a nasty habit of blocking many commercial VPS/VPN/Proxy providers...).

If you can grab a previous get_iplayer version with live TV support, then you can extract the AppleHLS playlists via the --streaminfo switch: perl get_iplayer-297.pl --type=livetv --pid=bbc_one_hd -i --streaminfo Search under the hvfhd* livetvmodes for streamurl URLs... Alternatively, you can use an online service http://bbclive.herokuapp.com/ Select the Generated Playlists section for TV (it's hosted on an overseas server, so Mediaselector API won't work for TV...).

Vangelis66 commented 6 years ago

@MickelCL

Please take your spamming activities elsewhere; this issue (and whole tracker) IS NOT THE PLACE to promote commercial VPN solutions; be advised the iPlayer team are on a constant hunt for UK VPN services that advertise overseas access; of course they can't block every VPN out there, but once you "advertise" one the more likely it is to be blocked sooner or later...

It looks as though you subscribed into GitHub just two weeks ago; if your sole intention was to promote spam, then think again; I am really tempted to hit that "Report abuse" button; you've been warned!

gravyboat commented 6 years ago

I have edited the above comment by @MickelCL to remove a direct link to a VPN provider as it has been linked here as well as #1197

Vangelis66 commented 6 years ago

Yet another spamming intervention by github user @MickelCL here; @gravyboat, will you edit again, warn again or simply block?

gravyboat commented 6 years ago

@Vangelis66 Good catch, edited that out. In addition I have blocked them from the organization (so they can't spam any more), and reported them to GitHub. Thanks!

Vangelis66 commented 6 years ago

@gravyboat Look again here, in the same issue; probably the same person under a similar GitHub username... It's just that I am allergic to spam in general, nothing personal with them or their company/service... If anyone's in need of the service they provide, they're free to use the search engine of their choice...

... Come to think of it, this infringing GitHub user may not be directly related to that company, but such companies (especially the new ones in the field) have a nasty habit of promising free accounts to hopefuls that promote their product in prominent internet locations...

gravyboat commented 6 years ago

@Vangelis66 I totally agree with you, I'll modify the comment and ban them as well, thanks for looking out! I don't tolerate that spam either.

eeehhh commented 6 years ago

Some problems with live BBC:

BBC One C:\WINDOWS\system32>streamlink https://www.bbc.co.uk/iplayer/live/bbcone [cli][info] Found matching plugin bbciplayer for URL https://www.bbc.co.uk/iplayer/live/bbcone [plugin.bbciplayer][info] A TV License is required to watch BBC iPlayer streams, see the BBC website for more information: https://www.bbc.co.uk/iplayer/help/tvlicence error: Unable to open URL: http://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/bbc_one/format/json/atk/a3c61c990404b5a1dea9578af356ca3187cb3c2d/asn/1/ (404 Client Error: Not Found for url: http://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/bbc_one/format/json/atk/a3c61c990404b5a1dea9578af356ca3187cb3c2d/asn/1/)

the same error with BBC Two

C:\WINDOWS\system32>streamlink https://www.bbc.co.uk/iplayer/live/bbctwo

but working alright with

BBC News

C:\WINDOWS\system32>streamlink https://www.bbc.co.uk/iplayer/live/bbcnews [cli][info] Found matching plugin bbciplayer for URL https://www.bbc.co.uk/iplayer/live/bbcnews [plugin.bbciplayer][info] A TV License is required to watch BBC iPlayer streams, see the BBC website for more information: https://www.bbc.co.uk/iplayer/help/tvlicence [cli][info] Available streams: 352k_alt2 (worst), 352k_alt, 352k, 544k_alt2, 544k_alt, 544k, 942k_alt2, 942k_alt, 942k, 396p_alt2, 396p_alt, 396p, 540p_alt2, 540p_alt, 540p, 1700k_alt2, 1700k_alt, 1700k, 720p_alt2, 720p_alt, 720p, 2908k_alt2, 2908k_alt, 2908k, 5166k_alt2, 5166k_alt, 5166k (best) [cli][info] Opening stream: 5166k (hds) [cli][info] Starting player: "C:\mpv_64-20171225\mpv.exe" --cache=5000

and BBC Four and BBC Parliament streamlink https://www.bbc.co.uk/iplayer/live/bbcfour streamlink https://www.bbc.co.uk/iplayer/live/bbcparliament

EDIT: I can watch live BBC One and BBC Two with the following commands:

C:\WINDOWS\system32>streamlink http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_hd.m3u8

and

C:\WINDOWS\system32>streamlink http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_two_hd.m3u8

brunlid commented 6 years ago

Seeing the same issues

back-to commented 6 years ago

The original issue at the top is about dash it might work with #1637


about the other two issue above this comment

it's unclear which version is used and a debug log would help

https://streamlink.github.io/cli.html#cmdoption-l

beardypig commented 6 years ago

DASH support would be possible with #1637, I have a branch ready to go. The other two issues are likely fixed already, there were a couple of fixes merged but I can’t find the PRs right now.

vanComma commented 6 years ago

Vangelis66 commented on 24 Jun 2017:

http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hds/uk/pc/ak/bbc_one_london.f4m

You, sir, have been extremely helpful.

I can now also stream BBC2 using: streamlink http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hds/uk/pc/ak/bbc_two_hd.f4m --default-stream 1700k with the CPU on my 11 year-old Vista laptop stable at approx 25%.

I don't ask much from life! Now, how to get the ITV streams working in a similar manner?

Many thanks.

beardypig commented 6 years ago

Nearly a year late, but there you have native support for HD streams. Sorry for the delay.

pro4tlzz commented 5 years ago

not getting hd

beardypig commented 5 years ago

@pro4tlzz please create a new issue instead of posting on closed issues.

You need to use the --bbciplayer-hd option, if this does not resolve your problem then please create a new issue.