Henrik_77
(Henrik Andersson)
October 12, 2018, 2:05pm
1
Hi,
I am trying to start playback of SVT Play channels and programs on my Chromecast from Home Assistant. The Chromecast is connected and I am able to send Text-to-speech to it but I cannot get it to start SVT Play. The reason for this, I believe, is that I am unable to find the URL to the media stream.
Have someone done this? Or can someone give me a hint how to find the URL.
/Henrik
Henrik_77
(Henrik Andersson)
October 17, 2018, 7:17am
2
I finally found the URL and got it to work with Home Assistant using this script:
play_svt1_on_chromecast:
alias: Play SVT1 on Chromecast
sequence:
- data:
entity_id: media_player.chromecast__kok
media_content_id: https://svt1-b.akamaized.net/se/svt1/master.m3u8
media_content_type: 'audio/mp4'
service: media_player.play_media
play_svt2_on_chromecast:
alias: Play SVT2 on Chromecast
sequence:
- data:
entity_id: media_player.chromecast__kok
media_content_id: https://svt1-b.akamaized.net/se/svt2/master.m3u8
media_content_type: 'audio/mp4'
service: media_player.play_media
3 Likes
bergstrom
(Andreas Bergström)
June 14, 2019, 5:35pm
3
Hi Henrik,
I’m hoping you’re still active here since the post is quite old.
How did you find the URL to the streaming sites? I would like to have the URL to ‘Barnkanalen’ but have no clue how to find it
Henrik_77
(Henrik Andersson)
June 19, 2019, 7:34pm
4
Hi!
Active might be exaggerating but I am still here. Actually I don’t remember exactly how I did it. I do, however, remember that it was a bit of a hassle… I you are a bit techy you can use the debug function in Crome and try to find the URL. If I have time tomorrow I’ll give it a try… Have you tried to guess and just edit the URL I am using for SVT2?
delabrava
(Delabrava)
June 19, 2019, 9:14pm
5
1 Like
Henrik_77
(Henrik Andersson)
June 20, 2019, 6:24am
6
Thank you!
Just for future record and for others to use this, would you please shortly describe how you found the URL?
delabrava
(Delabrava)
June 20, 2019, 6:54pm
7
I actually don’t remember how I found out, as it was a while ago.
bergstrom
(Andreas Bergström)
July 1, 2019, 10:24am
8
Hey, I actually forgot about asking this… I found the URL on some other forum and tried it out. Thanks though for your help
1 Like
bergstrom
(Andreas Bergström)
July 2, 2019, 8:03am
10
I actually don’t have google home paired to my home assistant but I guess you can ask google to run a script like above
bergstrom
(Andreas Bergström)
August 1, 2019, 8:58am
12
I haven’t paired Google home with hass yet so I can not help you. Tried this tho, seem implemented in Google assistant already. Ludde is my CCast
1 Like
MrBurvall
(Markus Burvall)
July 15, 2020, 11:16am
13
Hello,
This solution has worked fine for me until now, but now the chromecast only plays audio and shows the text “Default Media Receiver”. Same for svt1 and barnkanalen and on two different chromecasts.
Has anyone seen the same behavior?
MrBurvall
(Markus Burvall)
September 10, 2020, 9:48am
15
I have tried googling it, but didn’t find any solutions.
Good that I’m not alone…
Please let me know if you find a solution!
MrBurvall
(Markus Burvall)
September 18, 2020, 9:38pm
16
Finally had some time to look at it, and changing from audio/mp4 to video/mp4 solves the problem.
Weird that audio worked before…
Tseven
September 19, 2020, 9:48pm
17
I managed to work out how to get the urls for SVT Play.
Install svtplay-dl from https://svtplay-dl.se/
get the url from Svt play web page e.g.
https://www.svtplay.se/video/20259390/morran-och-tobias-som-en-skank-fran-ovan
The -g flag in svtplay-dl gets the url for the file, -P for setting preferred download method
Run
svtplay-dl -g -P DASH https://www.svtplay.se/video/20259390/morran-och-tobias-som-en-skank-fran-ovan
result:
https://svt-vod-5l.akamaized.net/d0/se/20200821/4eecd8dc-7190-4480-96eb-ae5ff10779d9/dash-avc.mpd?alt=https%3A%2F%2Fswitcher.cdn.svt.se%2F4eecd8dc-7190-4480-96eb-ae5ff10779d9%2Fdash-avc.mpd
use the result url to cast
media_content_id: 'https://svt-vod-5l.akamaized.net/d0/se/20200821/4eecd8dc-7190-4480-96eb-ae5ff10779d9/dash-avc.mpd?alt=https%3A%2F%2Fswitcher.cdn.svt.se%2F4eecd8dc-7190-4480-96eb-ae5ff10779d9%2Fdash-avc.mpd'
media_content_type: 'video/mp4'
If there is many episode in a series you can download the urls with the flag -A i.e.
svtplay-dl -g -A -P DASH https://www.svtplay.se/nyheter-direkt
INFO: Episode 1 of 16
INFO: Url: http://www.svtplay.se/video/28260639/nyheter-direkt/flera-skjutna-och-skadade-i-rochester
https://svt-vod-7l.akamaized.net/d0/world/20200919/54c76158-fa5f-4a42-b9f4-1a4a38db0f0d/dash-avc.mpd?alt=https%3A%2F%2Fswitcher.cdn.svt.se%2F54c76158-fa5f-4a42-b9f4-1a4a38db0f0d%2Fdash-avc.mpd
INFO: Episode 2 of 16
.
.
You could probably put this in a script to get the urls in i playlist…
1 Like
bergstrom
(Andreas Bergström)
September 16, 2021, 5:07pm
18
Anyone got the new URL to SVT Barn?
1 Like
SVT Barnkanalen working today 2021-10-16
https://svtb-c.akamaized.net/se/svtb/manifest.mpd?defaultSubLang=1
type: button
tap_action:
action: call-service
service: media_player.play_media
service_data:
media_content_type: video/mp4
media_content_id: https://svtb-c.akamaized.net/se/svtb/manifest.mpd?defaultSubLang=1
target:
entity_id: media_player.stora_teven
name: Play Svt Barnkanalen
show_state: false
show_icon: false
show_name: true
How to get streaming url’s using “svtplay-dl”.
Swedish;
Hur kan jag streama SVT kanaler (SVT1, SVT2, SVT Barnkanalen, SVT med flera andra kanaler) med hjälp av Home Assistant.
Get the program at;
Extract the zipped file into
Open CMD (windows users)
go to the extracted folder, i.e. c:\users[username]\appdata\roaming\svtplay-dl\
run
svtplay-dl -g https://www.svtplay.se/kanaler/svtbarn?start=auto
Peace
2 Likes