Project

General

Profile

bbc-stations from https://www.bbc.co.uk/iplayer/live with streamlink

Added by niwi niwi almost 6 years ago

I would like to use the bbc-stations from BBC iPlayer. Here is a geo-restricted example-url: https://www.bbc.co.uk/iplayer/live/cbbc (only working in the UK or with VPN).

This should work as an "iptv automated network" together with Streamlink in the pipe. But it doesn't )-:

After forcing scan I got this in my log:

Loglevel debug: enabled
2018-12-26 13:04:18.648 mpegts: streamlink.m3u - CBBC in Streamlink - tuning on IPTV
2018-12-26 13:04:18.651 subscription: 0008: "scan" subscribing to mux "streamlink.m3u - CBBC", weight: 6, adapter: "IPTV", network: "Streamlink", service: "Raw PID Subscription" 
2018-12-26 13:04:18.652 spawn: Executing "/opt/streamlink.sh" 
2018-12-26 13:04:20.172 spawn: [cli][info] Found matching plugin bbciplayer for URL https://www.bbc.co.uk/iplayer/live/cbbc
2018-12-26 13:04:20.176 spawn: [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
2018-12-26 13:04:29.539 spawn: [cli][info] Available streams: 396p_dash, 540p_dash, 720p_dash, 396p_dash_alt, 540p_dash_alt, 720p_dash_alt, 396p_dash_alt2, 540p_dash_alt2, 720p_dash_alt2, 352k_alt (worst), 352k, 544k_alt, 544k, 216p_alt, 216p, 288p_alt, 288p, 942k_alt, 942k, 396p_alt2, 396p_alt, 396p, 540p_alt2, 540p_alt, 540p, 1700k_alt, 1700k, 720p_alt2, 720p_alt, 720p, 2908k_alt, 2908k, 5166k_alt, 5166k (best)
2018-12-26 13:04:29.542 spawn: [cli][info] Opening stream: 352k_alt (hds)
2018-12-26 13:04:33.648 mpegts: streamlink.m3u - CBBC in Streamlink - scan no data, failed
2018-12-26 13:04:33.648 subscription: 0008: "scan" unsubscribing

If I use Streamlink with the same settings but direct output to VLC the stream is working. I can also successfully pipe other streams from Streamlink to TVHeadend. This is why I am seeking help here and not at Streamlink.

Here are my settings:

Content of m3u-file:

#EXTM3U
#EXTINF:-1 tvg-name="CBBC" tvg-id="CBBC" group-title="BBC",CBBC
pipe:///opt/streamlink.sh https://www.bbc.co.uk/iplayer/live/cbbc

Content of /opt/streamlink.sh:
#!/bin/bash
/usr/bin/streamlink --bbciplayer-username "my email-adress" --bbciplayer-password "my password" --hds-segment-threads "3" --stdout "$1" worst

Versions:
  • Xubuntu 18.04, amd64bit
  • Tvheadend 4.2.7-38~g6beba6d95 from Doozer
  • Streamlink 0.14.2 from ppa:nilarimogard/webupd8

Replies (2)

RE: bbc-stations from https://www.bbc.co.uk/iplayer/live with streamlink - Added by niwi niwi almost 6 years ago

I think the reason for my problem is, that Streamlink leaves the original stream format unchanged. That's why some streams works well with TVHeadend and others not. Here is another example not working with TVHeadend:
pipe:///opt/streamlink.sh https://livestream.com/accounts/22300522/events/6680139.

It would be great if someone could offer a solution for ffmpeg to convert the output of Streamlink on the fly in order for TVHeadend to accept it.

RE: bbc-stations from https://www.bbc.co.uk/iplayer/live with streamlink - Added by niwi niwi almost 6 years ago

OK, here is a working solution:

Content of m3u-file:

#EXTM3U
#EXTINF:-1 tvg-name="BBC ONE" tvg-id="BBC1London.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/BBC_One_HD_Box.svg/640px-BBC_One_HD_Box.svg.png",BBC ONE
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbcone
#EXTINF:-1 tvg-name="BBC TWO" tvg-id="BBC2.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/BBC_Two_HD_flat.svg/640px-BBC_Two_HD_flat.svg.png",BBC TWO
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbctwo
#EXTINF:-1 tvg-name="BBC FOUR" tvg-id="BBC4.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/BBC_Four.svg/640px-BBC_Four.svg.png",BBC FOUR
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbcfour
#EXTINF:-1 tvg-name="CBBC" tvg-id="CBBC.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/en/thumb/3/37/CBBC_2016_logo.svg/600px-CBBC_2016_logo.svg.png",CBBC
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/cbbc
#EXTINF:-1 tvg-name="CBeebies" tvg-id="CBeebies.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/de/thumb/1/16/CBeebies.svg/640px-CBeebies.svg.png",CBeebies
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/cbeebies
#EXTINF:-1 tvg-name="BBC NEWS" tvg-id="BBCNews.nws" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/en/thumb/f/ff/BBC_News.svg/640px-BBC_News.svg.png",BBC NEWS
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbcnews
#EXTINF:-1 tvg-name="BBC PARLIAMENT" tvg-id="BBCParliament.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/BBC_Parliament_Logo.svg/640px-BBC_Parliament_Logo.svg.png",BBC PARLIAMENT
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbcparliament
#EXTINF:-1 tvg-name="BBC ALBA" tvg-id="BBCAlba.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/en/thumb/a/a5/BBC_Alba.svg/640px-BBC_Alba.svg.png",BBC ALBA
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/bbcalba
#EXTINF:-1 tvg-name="BBC S4C" tvg-id="S4C.uk" group-title="BBC-iPlayer" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/S4C_logo_2014.svg/569px-S4C_logo_2014.svg.png",BBC S4C
pipe:///opt/streamlink-bbc.sh https://www.bbc.co.uk/iplayer/live/s4c

Content of /opt/streamlink-bbc.sh:

#!/bin/bash
/usr/bin/streamlink --bbciplayer-username "my e-mail-address" --bbciplayer-password "my password" --hds-segment-threads "3" --stdout "$1" best  | ffmpeg -i pipe:0 -vcodec copy -acodec copy -mpegts_service_type advanced_codec_digital_hdtv -f mpegts pipe:1

Since the stream is geo-restricted one cannot use it out of Britain. But British citizens out of Britain could use Streamlinks HHTP-Proxy-Settings. In this case this would be the content of /opt/streamlink-bbc.sh:

#!/bin/bash
/usr/bin/streamlink --bbciplayer-username "my e-mail-address" --bbciplayer-password "my password" --http-proxy "settings of my proxy-service" --https-proxy "settings of my proxy-service" --hds-segment-threads "3" --stdout "$1" best  | ffmpeg -i pipe:0 -vcodec copy -acodec copy -mpegts_service_type advanced_codec_digital_hdtv -f mpegts pipe:1

    (1-2/2)