Page 6 of 6

Re: SvtPlay (Sweden only)

PostPosted: Fri Jul 06, 2012 7:37 am
by muszaj
Hej!

A guy called Jonas posted some self-made feeds in the SVT-forum,
these are working with Serviio! :)

http://snarl.zapto.org.nyud.net/news/rapport.xml.gz
http://snarl.zapto.org.nyud.net/news/aktuellt.xml.gz
http://snarl.zapto.org.nyud.net/news/abc.xml.gz

Please feel free to try em!

Re: SvtPlay (Sweden only)

PostPosted: Thu Sep 13, 2012 6:55 pm
by svensmat
I use the app on http://pirateplay.se/app.html to create the video stream for a program on SvtPlay.

Last episode of “Korrespondenterna” got the following stream:

http://svtplay10p-f.akamaihd.net/i/2012 ... 000000&id=

I can open this stream with vlc, but it does not work with Serviio.

Can anyone explain why?

Re: SvtPlay (Sweden only)

PostPosted: Thu Sep 13, 2012 8:04 pm
by muszaj
I guess because it consists of 10 second segments.
This link is rather a playlist than a single file.

Re: SvtPlay (Sweden only)

PostPosted: Fri Oct 12, 2012 5:42 pm
by Pen
magicus wrote:I researched the situation, and this is what I found out:

SVT Play switched to their new site (previously beta.svtplay.se) on June 4th. For Serviio, this means two problems:

1) The RSS-feeds does not work properly. SVT Play admits that there are problems with RSS feeds on the new system, and they have promised to fix them. No time schedule, though.. See http://kontakt.svtplay.se/org/svt-play/ ... -till-rss/
For this, we just have to wait.

2) The format on the page has changed, so it is not as trivial as it was before to extract the URL to the video. This means a) figure out the new way to get the data, and b) update the plugin.
It seems not impossible to fix, though, since pirateplay (http://pirateplay.se) can extract downloadable URLs just fine. The source code for pirateplay is available (https://github.com/jackuess/pirateplay) so it's probably just to have a look at how they do it. I could possibly fix it but I really don't have the time right now; I'm just suffering for the consequences that my kids can't watch their faviourite shows anytime. :-)


I don't think SVT has any intention to fix this. I heard today from a very trusted source that SVT is intentionally blocking content on specific device types due to requests from the media providers. For instance they block content on Anroid tablets for this reason. Officially they claim that they are not able to support all operating systems and platforms. On an Android table it's however as simple as to change the "user agent" string in the web browser to get it working. It has nothing to do with technology at all! So I think we are all here stucket until someone of us back engeneers their new approach and implements a new plugin. Sad but true!

Pen

Re: SvtPlay (Sweden only)

PostPosted: Mon Oct 22, 2012 2:08 pm
by muszaj
muszaj wrote:Hej!

A guy called Jonas posted some self-made feeds in the SVT-forum,
these are working with Serviio! :)

http://snarl.zapto.org.nyud.net/news/rapport.xml.gz
http://snarl.zapto.org.nyud.net/news/aktuellt.xml.gz
http://snarl.zapto.org.nyud.net/news/abc.xml.gz

Please feel free to try em!


These feeds don't work any longer, since the video files on SVT's site have been amended to the same segmented "playlists" as svensmat mentioned above. :(

Re: SvtPlay (Sweden only)

PostPosted: Fri Nov 09, 2012 2:15 pm
by ottomatic
Hi,

The SvtPlay plugin needs to be completely rewritten. It has to be implemented as a Web Resource plugin.

It will involve scraping a couple of url:s in succession.

For instance, the player widget for the latest episode of Homeland is loaded at:
[1] http://www.svt.se/wd?widgetId=55603&sec ... ionId=2636

In it, you find two intersesting attributes:

[2] a link to the JSON object which describes the video rtmp urls for different qualities.
This is located in a tag attribute named "data-json-href" The value for this episode is:
/wd?widgetId=55603&sectionId=2636&articleId=547626&p
osition=0&format=json&type=embed&contextSectionId=2636

As you can see, [2] is [1] with an extra "&format=json" request variable.

The contents of [2] is pasted here:
  Code:
{"context":{"title":"Del 5 av 12: Q&A","embedUrl":null,"popoutUrl":"http://www.svt.se/wd?widgetId=55603&sectionId=2636&articleId=547626&type=embed&contextSectionId=2636"},"statistics":{"context":"svtse","title":"del-5-av-12-q-och-a","category":"film-och-drama","broadcastTime":"2200","client":"svtse","broadcastDate":"20121105","folderStructure":"homeland.hela-program","programID":"1297329-05","statisticsUrl":"http://ld.svt.se/svt/svt/s?svt-play.film-och-drama.homeland.hela-program.del-5-av-12-q-och-a","mmsCategory":"1","mmsClientNr":"1001001"},"videoId":547626,"video":{"position":0,"live":false,"livestart":null,"availableOnMobile":false,"dvr":false,"livestartUTC":null,"subtitleReferences":[],"materialLength":3235,"videoReferences":[{"url":"rtmp://fl11.c90914.cdn.qbrick.com/90914/_definst_//20121101/FLAX3-HOMELAND2-mp4-b-v1-d9d3ecf0d2d33f36.mp4","bitrate":320,"playerType":"flash"},{"url":"rtmp://fl11.c90914.cdn.qbrick.com/90914/_definst_//20121101/FLAX3-HOMELAND2-mp4-c-v1-d9d3ecf0d2d33f36.mp4","bitrate":850,"playerType":"flash"},{"url":"rtmp://fl11.c90914.cdn.qbrick.com/90914/_definst_//20121101/FLAX3-HOMELAND2-mp4-d-v1-d9d3ecf0d2d33f36.mp4","bitrate":1400,"playerType":"flash"},{"url":"rtmp://fl11.c90914.cdn.qbrick.com/90914/_definst_//20121101/FLAX3-HOMELAND2-mp4-e-v1-d9d3ecf0d2d33f36.mp4","bitrate":2400,"playerType":"flash"}]}}


(this could probably be parsed from one of the flashvars-properties in [1], to avoid an extra http connection roundtrip.)

So, this has the url:s and different bitrates. The quality matching method in the current svtPlay plugin appears to work with these rmtp url:s.

[3] This node in [1] gives the url for the swfPlayer needed to decode the rtmp stream:

  Code:
<param name="movie" value="/statiskt/swf/video/svtplayer-2012.47.swf" />


I got [1] by sniffing my network traffic. Some forensics are needed among the many linked js-files to find out how this url was constructed. But clearly, the "id" of the episode appears to be 547626, and this is found in several tag attributes in the episode page at the svt web. The question is if the widgetid and sectionid need to be in accordance with how the article is categorized in order for the widget delivery to work correctly.

I'll be happy to make a go at implementing this in groovy. Anyone else care to join in? (I could create my first ever open source project!)

Re: SvtPlay (Sweden only)

PostPosted: Mon Nov 12, 2012 5:49 pm
by Swehawk
@ ottomatic: I dont understand much of what you wrote in your latest post, but it seems to me that you are on the track for a solution to a working SVT Play plugin :D
Although I can't offer any help myself, I CAN say that I, and surely many others, would greatly appreciate the work that you and any other contributer are willing put into this !
So, what can I say except: GO FOR IT and GOOD LUCK!

Re: SvtPlay (Sweden only)

PostPosted: Fri Nov 16, 2012 12:33 pm
by ottomatic
Hi again.

I have written a plugin which successfully delivers the information needed to dump the programs using ffmpeg.

The problem is that nearly all of the stream urls contain commas (,) and there appears to be a bug in serviio handling such urls. This is the case for shows whose streams are hosted by Akamai.

Some shows (such as Homeland) have streams hosted by Qbrick. Those shows work properly with my new plugin.

I will try over the weekend and see if I can find a smooth workaround for the akamai bug. After that I will release the new plugin.

Re: SvtPlay (Sweden only)

PostPosted: Sun Nov 18, 2012 5:39 pm
by Swehawk
ottomatic wrote:I will try over the weekend and see if I can find a smooth workaround for the akamai bug. After that I will release the new plugin.


Wow, sounds great :D
If you succeed, it would be like an early xmas gift ;)

Re: SvtPlay (Sweden only)

PostPosted: Mon Nov 19, 2012 2:59 pm
by ottomatic
The new plugin has been posted in a new forum thread with a subject identical to this thread.

viewtopic.php?f=20&t=8062

Enjoy!

/ Otto