Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Katsomo does not work #76

Open
teemue opened this issue Jan 28, 2015 · 13 comments
Open

Katsomo does not work #76

teemue opened this issue Jan 28, 2015 · 13 comments

Comments

@teemue
Copy link

teemue commented Jan 28, 2015

None of the videos via Katsomo plugin work. Openelec 5.0.0.

21:03:53 T:2833716288 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.katsomo/katsomo.py", line 133, in
katsomo.handle()
File "/storage/.kodi/addons/plugin.video.katsomo/xbmcutil.py", line 54, in handle
self.playVideo(link)
File "/storage/.kodi/addons/plugin.video.katsomo/xbmcutil.py", line 72, in playVideo
resolvedVideoLink = self.handleVideo(link)
File "/storage/.kodi/addons/plugin.video.katsomo/katsomo.py", line 97, in handleVideo
vid = self.scrapper.scrapVideoLink(link)
File "/storage/.kodi/addons/plugin.video.katsomo/katsomoscraper.py", line 106, in scrapVideoLink
ret = str((common.parseDOM(response.read(), "source", {'type': 'video/mp4'}, ret="src"))[0]) + FFMPEG_PARAMETERS
IndexError: list index out of range
-->End of Python script error report<--
21:03:54 T:2833716288 WARNING: CPythonInvoker(30, /storage/.kodi/addons/plugin.video.katsomo/katsomo.py): the python script "/storage/.kodi/addons/plugin.video.katsomo/katsomo.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE
21:03:54 T:3043004416 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.katsomo/?view=video&link=http%3A%2F%2Fm.katsomo.fi%2F%3FprogId%3D438026]

@ghost
Copy link

ghost commented Jan 28, 2015

This might be related to the fact that Katsomo’s mobile site is being shut down.

Copied from the http://m.katsomo.fi/ (using Android user agent):

MTV Katsomon mobiilisivusto on poistumassa käytöstä, eivätkä Katsomon ohjelmat ole tämän vuoksi katsottavissa mobiilisivuston kautta. Ohjelmamme löytyvät nyt ilmaisesta MTV Katsomo -sovelluksesta, jonka voit ladata Google Playsta.

@GoodDragon
Copy link

MTV Katsomo application uses clear api which should be even easier to parse than current mobile site solution. I quicly checked that using Fiddler and here is some information about API.

Needed settings when calling api:
User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9506 Build/KOT49H)
Host: mobileapp.mtvkatsomo.fi
Connection: Keep-Alive
Accept-Encoding: gzip

API calls:
--- Catalog ---
GET http://mobileapp.mtvkatsomo.fi/mobile-catalog-nonretina.json.gz HTTP/1.1
--- Recommendations ---
GET http://mobileapp.mtvkatsomo.fi/recommendations-nonretina.json.gz HTTP/1.1

Per channel
--- MTV3 ---
GET http://mobileapp.mtvkatsomo.fi/mtv3-epg-retina.json.gz HTTP/1.1
--- SUB ---
GET http://mobileapp.mtvkatsomo.fi/sub-epg-retina.json.gz HTTP/1.1
--- AVA ---
GET http://mobileapp.mtvkatsomo.fi/ava-epg-retina.json.gz HTTP/1.1
--- MAX ---
GET http://mobileapp.mtvkatsomo.fi/max-epg-retina.json.gz HTTP/1.1
--- SPORT 1 ---
GET http://mobileapp.mtvkatsomo.fi/sport1-epg-retina.json.gz HTTP/1.1
--- SPORT 2 ---
GET http://mobileapp.mtvkatsomo.fi/sport2-epg-retina.json.gz HTTP/1.1
--- CMORE ---
GET http://mobileapp.mtvkatsomo.fi/cmore-extreme-epg-retina.json.gz HTTP/1.1

When you are found asset id you can find video link using this API call:
GET http://api.katsomo.fi/api/mobileapp/asset/427864/play.json HTTP/1.1

And video start call will be something like this:
GET http://mtvvod.katsomo.fi/playout/viihde/ismvol1/2014-12-30/Salatut_el_m_t_427864_WC(427864_T1-5ISM).ism/Manifest HTTP/1.1

@szymex
Copy link
Owner

szymex commented Feb 1, 2015

Hi, have you tried to play in Kodi that video? I've got errors:

ERROR: CDVDDemuxFFmpeg::Open - error probing input format, http://mtvvod.katsomo.fi/playout/viihde/ismvol1/2014-12-30/Salatut_el_m_t_427864_WC(427864_T1-5ISM).ism/Manifest
ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer

Also when playing with VLC, did not show any picture.

@GoodDragon
Copy link

I now tried to download that video using: http://md5decrypt.altervista.org/ismdownloader.zip
it says "ERROR: Encrypted content (DRM)!".

That will make this harder than I expected.

Btw. Good example how to parse that JSON based API you can find from here: https://github.com/eracknaphobia/plugin.video.nbcsnliveextra
but of course we need first find to way play these videos if there is any.

@GoodDragon
Copy link

It looks that they are decided to kick us out.

If I understand right MTV Katsomo application uses same DRM system than example Netflix (APK file contains folder named PlayReady: http://en.wikipedia.org/wiki/PlayReady)

Good picture how key change works on PlayReady you can found from here: http://vishalswami.blogspot.fi/2009/09/digital-rights-mgmt-remove-drm.html

To decrypt that DRM video content client needs get decryption key which changes time to time.
Here is something what I found from that:
.ism/Manifest reply contains ProtectionHeader which is base64 decrypted value (you can decrypt it example using: http://www5.rptea.com/base64/). Inside that information we need KID and CHECKSUM values.

Then we need generate Base64 encoded message with content like this and send it to http://services.wmdrm.windowsmedia.com/SecureClock/?Time using POST method.
http://go.microsoft.com/fwlink/?LinkId=25817\?? No Idea Where to Get ??

Reply message is also base64 encoded and contains some information what we probably would need later.

Then we need send XML message using POST method to:
http://api.katsomo.fi/api/mobileapp/asset/427864/license?timeStamp=2015-01-31T17%3A42%3A17%2B0200&contract=?Not sure is that same on all devices?&account=source
To XML we need values like these: KID, CHECKSUM, Clientinfo, ListID (no idea where to get), LicenseNonce (no idea where to get), two different CipterValues (no idea where to get), DigestValue (no idea where to get), SignatureValue (no idea where to get), PublicKey (no idea where to get)

Reply is XML also message which probably contains needed keys to decrypt video.

There is these projects which probably contains usefull information:
https://github.com/googlecast/CastMediaPlayerStreamingDRM
http://forum.kodi.tv/showthread.php?tid=178693

Anyway, looks that it will be very hard (if not impossible) to get this working anymore :(

@PetteriLah
Copy link

How about Katsomo Samsung Smart-TV app? Mayby there is not use DRM system?

Android apps Wire shark give this, not working link.
GET /playout/viihde/ismvol1/2014-12-31/Salatut_el_m_t_428196_WC(428196_T4ISM).ism/QualityLevels(1500000)/Fragments(video=280000000) HTTP/1.1

Host: mtvvod.katsomo.fi

Connection: keep-alive

User-Agent: VisualOn OSMP+ Player(Linux;Android)

http://mtvvod.katsomo.fi/playout/viihde/ismvol1/2014-12-31/Salatut_el_m_t_428196_WC(428196_T4ISM).ism/QualityLevels(1500000)/Fragments(video=280000000)

@GoodDragon
Copy link

Good idea. It might working. If someone can get access to Smart-TV and gather Fiddler dump like this it would help lot:

  • Install Fiddler to PC
  • Deselect "Capture Traffic" setting from Fiddler (F12)
  • Enable "Allow remote computers to connect" setting to Fiddler
  • Set proxy settings to Smart-TV => ComputerIP:8888
  • Start Katsomo application, select program, start playing some video, close.
  • Save Fiddler dump and upload it somewhere where us can get it.

@PetteriLah
Copy link

Did not get fidder work.... Wireshark give that info
GET /playout/viihde/ismvol1/2015-01-06/Salatut_el_m_t_429997_WC(429997_T1-4ISM).ism/Manifest HTTP/1.1
User-Agent: samsungsmooth-agent/1.1
Host: mtvvod.katsomo.fi
Accept: /
Accept-Encoding: deflate, gzip

@GoodDragon
Copy link

Yep so it is same DRM stuff than with other clients.

Unless someone got new ideas we are ready to say thanks to @szymex and good bye for Katsomo plugin. It was very good so long it worked but I think that this DRM we just can't crack (or at least it would need too much time).


Off topic:
I really hope that MTV will release official support for Chromecast. Yle Areena's iPad plugin already supports Chromecast and Netflix (which ever haven't worked with XBMC) is also supported on there.

I tried streaming Katsomo tab from Google Chrome browser to Chromecast but it only shows blank because of this same DRM issue. Full screen streaming (marked for experimental) works but there is too much lag so it is not usable.

Last but not least the these are only usable ways what I have found to watch Katsomo on TV screen are (after this plugin was broke):

  • Samsung SmartTV with official MTV Katsomo application.
  • Using TV on PC's secondary screen.
  • Using Chromecast application on Android phone to stream whole screen to TV and start MTV Katsomo application after that.
  • Using AirParrot 2 application on PC to stream whole screen to TV and open Katsomo to browser.

@PetteriLah
Copy link

http://spottiblogi.com/2014/01/24/mtv-katsomon-kevat-taynna-mobiililanseerauksia/
In future Katsomo change Silverlight to htlm5 player,

There is solution to play DRM stuff in Kodi using external html5 player.
https://www.youtube.com/watch?v=RUAbJTbymGk
https://github.com/AddonScriptorDE?tab=repositories

@timojuonoja
Copy link

HTML5 player is now used on Chrome browser.. Is there a hope for having Katsomo support again?

@PetteriLah
Copy link

@GoodDragon
Copy link

That new HTML5 based player works now with Chrome cast without any tricks so I'm currently using that method. Anyway, if there is working solution how Netflix HTML5 version works on XBMC that should works with Katsomo too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants