Kodi Community Forum
[RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins (/showthread.php?tid=144457)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - BoxFreak - 2015-11-25

I'm willing to donate if someone continues to developing this addon and makes it working again.

Areena for Playstation just isn't good enough (sound problems, buffering and so on).


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - teepean - 2015-11-25

The problem is explained here:

https://github.com/aajanki/yle-dl/issues/71

I've tried enabling php and AdobeHDS.php but haven't been able to actually get it working.


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - JPXNET - 2015-11-25

"AdobeHDS.php or youtube-dl is required to download videos from Yle Areena. AdobeHDS.php additionally requires PHP and the following PHP extensions: bcmath, curl, mcrypt and SimpleXML."

With Windows...better solution is use python and HDS.
With AdobeHDS.php we have to install php?!


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - teemue - 2015-11-26

I have requested Yle API keys, I'll try to figure something out if I only find time...

E: The problem with the official API is that it excludes some of the media (e.g. news). It also requires a certain key for media to play and the key should be hidden according the license agreement. It's not easy with an open source plugin.


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - teepean - 2015-11-26

Php can be found from the unofficial repo but it is missing bcmath, mcrypt and SimpleXML so it would have to be recompiled.

EDIT: I'm talking about Openelec.


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - teepean - 2015-11-26

Flickfetch uses hdsdump to download from areena, maybe that can be used?

https://github.com/WendyH/hdsdump/releases

EDIT: Hdsdump compiles with mono so that might be a cross-platform solution.


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - mize - 2015-11-26

hdsdump is indeed promising. I just compiled it in my Visual Studio and moved to my osmc. then installed mono:
sudo apt-get install mono-complete

After that ran hdsdump :
osmc@osmc:~$ mono hdsdump.exe -h
You can use hdsdump with following switches:

-h |--help displays this help
-l |--debug out debug output to log file
-p |--play dump flv data to stderr for piping to another program
-st|--showtime show time remaining
-fp|--fproxy force proxy for downloading of fragments
--post use POST method for http request
-wk|--waitkey wait pressed any key at the end
-sl|--showmlink display manifest link at the start (deprecated)
-c |--continue continue if possible downloading with exists file
-a |--auth <param> authentication string for fragment requests (add '?' with parameter to end manifest url)
-s |--duration <param> stop live recording after specified number of seconds
-fs|--filesize <param> split output file in chunks of specified size (MB)
-m |--manifest <param> manifest or playlist file for downloading of fragments
-b |--urlbase <param> base url for relative path in playlist
-od|--outdir <param> destination folder for output file
-o |--outfile <param> filename to use for output file
-th|--threads <param> number of threads to download fragments
-q |--quality <param> selected quality level (low|medium|high) or exact bitrate
-f |--start <param> start from specified fragment
-t |--skip <param> skip time hh:mmConfuseds
-lf|--logfile <param> file for debug output
-ua|--useragent <param> User-Agent to use for emulation of browser requests
-re|--referer <param> Referer in the headers http requests
-ck|--cookies <param> Cookies in the headers http requests
-un|--username <param> username to use for access to http server
-ps|--password <param> password to use for access to http server
-px|--proxy <param> proxy for downloading of manifest (http://proxyAddress:proxyPort)
-pu|--proxyuser <param> username for proxy server
-pp|--proxypass <param> password for proxy server

osmc@osmc:~$

Has somebody any idea how to fetch example video with that?


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - JPXNET - 2015-11-27

My point was...
Plugin is python code
yle-dl is python code
- You can download newest and change it to yle-dl.py. And replace old one.
and if we don't download videos, we don't need AdobeHDS.php or youtube-dl
I believe main purpose is watch and secondary download?


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - teepean - 2015-11-27

(2015-11-27, 00:04)JPXNET Wrote: My point was...
Plugin is python code
yle-dl is python code
- You can download newest and change it to yle-dl.py. And replace old one.
and if we don't download videos, we don't need AdobeHDS.php or youtube-dl
I believe main purpose is watch and secondary download?

I did that after yle-dl 2.9.0 was released but it doesn't work anymore.


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - JPXNET - 2015-11-27

(2015-11-27, 06:28)teepean Wrote:
(2015-11-27, 00:04)JPXNET Wrote: My point was...
Plugin is python code
yle-dl is python code
- You can download newest and change it to yle-dl.py. And replace old one.
and if we don't download videos, we don't need AdobeHDS.php or youtube-dl
I believe main purpose is watch and secondary download?

I did that after yle-dl 2.9.0 was released but it doesn't work anymore.

Me too, but plugin must be changed.
I suppose we need calls to HDS part of dl.
I'm not a python coder, but ATM plugin use old site (V3) for program info and videos.
For new site, we need HD streams.
example: http://areena.yle.fi/1-3171644?autoplay=true


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - mize - 2015-11-27

(2015-11-27, 12:13)JPXNET Wrote: Me too, but plugin must be changed.
I suppose we need calls to HDS part of dl.
I'm not a python coder, but ATM plugin use old site (V3) for program info and videos.
For new site, we need HD streams.
example: http://areena.yle.fi/1-3171644?autoplay=true

yleareena.py is hardcoded to rtmp:
line 60:
dl = yledl.downloader_factory(url, None).wrapped_class("rtmp")

change it to hds:
dl = yledl.downloader_factory(url, None).wrapped_class("hds")

restart and play:
19:21:33 124.649605 T:2768565280 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'socket.error'>
Error Contents: [Errno 104] Connection reset by peer
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/plugin.video.yleareena/yleareena.py", line 458, in <module>
yleAreenaAddon.handle()
File "/home/osmc/.kodi/addons/plugin.video.yleareena/xbmcutil.py", line 54, in handle
self.playVideo(link)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/yleareena.py", line 385, in playVideo
resolvedVideoLink, subtitleFiles = scrapVideo(link)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/yleareena.py", line 69, in scrapVideo
streamurl = dl.stream_class_factory(clip, url, sfilt)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 364, in <lambda>
lambda a, b, c: AreenaHDSStreamUrl(a, b, c, streaming_protocol)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 878, in __init__
self.hds_url = self._initialize_hds_stream(clip, pageurl, filters)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 895, in _initialize_hds_stream
return self._parse_hds_url(media, pageurl, filters)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 908, in _parse_hds_url
stream = self.stream_from_papi(papiurl, self.HDS_AES_KEY, filters)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 608, in stream_from_papi
papi = download_page(papiurl)
File "/home/osmc/.kodi/addons/plugin.video.yleareena/lib/yle-dl.py", line 122, in download_page
urlreader = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1200, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 415, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
-->End of Python script error report<--

URL is incorrect. Any idea how to correct that one? Same result with yle-dl 2.7 and 2.9


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - mize - 2015-11-27

Finally some progress:
- install mono: sudo apt-get install mono-complete
- copy hdsdump.exe to your home
- download yle-dl 2.9
- Replace line 79: hds_binary = ['mono', '/home/osmc/hdsdump.exe']
- Copy yle-dl 2.9 to your rapberry pi
- test it: python yle-dl.py --protocol hds http://areena.yle.fi/1-2420309 -o isotkoneet.flv
- scan your library and play isot koneet with sub titles!


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - JPXNET - 2015-11-27

(2015-11-27, 20:15)mize Wrote: Finally some progress:
- install mono: sudo apt-get install mono-complete
- copy hdsdump.exe to your home
- download yle-dl 2.9
- Replace line 79: hds_binary = ['mono', '/home/osmc/hdsdump.exe']
- Copy yle-dl 2.9 to your rapberry pi
- test it: python yle-dl.py --protocol hds http://areena.yle.fi/1-2420309 -o isotkoneet.flv
- scan your library and play isot koneet with sub titles!

That's totally outside of Kodi/plugin? Progress?

We all can use 3rd part downloader


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - JPXNET - 2015-11-27

(2015-11-27, 19:30)mize Wrote: URL is incorrect. Any idea how to correct that one? Same result with yle-dl 2.7 and 2.9

Protocol change isn't enough, it wont work even if you change urls.
I believe you must fix yleareena.py and ybmxUtils.py


RE: [RELEASE] Finnish TV: YleAreena and Ruutu (Video) plugins - mize - 2015-11-27

(2015-11-27, 21:21)JPXNET Wrote: That's totally outside of Kodi/plugin? Progress?

We all can use 3rd part downloader
yle-dl is part of yle areena plugin:
https://github.com/szymex/xbmc-finnish-tv/tree/master/plugin.video.yleareena/lib

Working yle-dl is prerequisite for working areena plugin. Current plugin is hadcoded to rtmp and hds part of yle-dl 2.9 is not compatible with yleareena.py. I just tried to get live stream working with my modified version. Not luck yet.