Kodi Community Forum
Broken Crunchyroll [DMCA Takedown] - 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: Broken Crunchyroll [DMCA Takedown] (/showthread.php?tid=129709)



RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2012-12-02

I don't know exaclty, because the video starts as soon the page loads.

But the time from the player load to the start of the video (I think) was just about 4s..




RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - v1n1c1uS - 2012-12-03

I counted about 7 seconds in the XBMC trying to load the video.

In the browser, its about 2 seconds


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - v1n1c1uS - 2012-12-03

My log: http://pastebin.com/uR9uJA0t


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - cyberwizzard - 2013-01-16

Is this addon still working for people? I have a subscription, logged in but videos play for a few seconds,then the player pauses and after 10 more seconds I get dropped back in XBMC.


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2013-01-18

For me, it's still the same, the video don't even start Sad

btw, I'm using XBMC on linux


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - mattrk - 2013-01-20

Yoshiofthewire,

Quick question: Does this plugin just stream the crunchyroll flash player or does it actually stream the RTMP video directly? I was under the impression that Crunchyroll used RTMPE now so it was impossible to stream the RTMP video. Just taking a quick look at the code makes me think the plugin is streaming the raw RTMP video.

Just curious. Thanks for the great plugin btw.


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2013-01-22

Ok, I guess I got something working again!

Today I tested in the same box, with wine running a windows version of xbmc, and got the video, without audio (due to wine misconfiguration) Big Grin

My box uses ubuntu 10.04, and I knew that curl was way too slow...

So I searched a little and found this out: http://www.webupd8.org/2010/05/how-to-disable-ipv6-in-ubuntu-1004.html

I made the changes, and I got one video running Big Grin

Still it's not fully working, because it takes 3 or 4 tries to get a video playing, and stop in the middle, but i'ts a start!

Tonight I'll test a little more.

Ok - after some more testing, I saw that some videos play fine, and other simply don't play!

By comparison of a working log and a failed one, there's an interesting error:

Not Working:

2:52:00 T:140090018612992 NOTICE: CRUNCHYROLL: --> Playlist is: http://www.crunchyroll.com/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id=612293&video_format=106&video_quality=62&auto_play=1&show_pop_out_controls=1
22:52:00 T:140090018612992 NOTICE: CRUNCHYROLL: --> page_url is: http://www.crunchyroll.com/ixion-saga-dt/episode-14-evidence-veiled-612293
22:52:00 T:140090018612992 NOTICE: CRUNCHYROLL: --> Cache valid: using stored player version...
22:52:00 T:140090018612992 NOTICE: CRUNCHYROLL: --> page_url is: 20121220193219.bd8118f7c58d1da788d88782497e30a4
22:52:06 T:140090018612992 NOTICE: Couldn't find App
22:52:06 T:140090018612992 NOTICE: CRUNCHYROLL: --> Attempting to find subtitles...
22:52:06 T:140090018612992 NOTICE: CRUNCHYROLL: --> Found subtitles. Continuing...
22:52:06 T:140090018612992 NOTICE: False
22:52:06 T:140090018612992 NOTICE: CRUNCHYROLL: --> Attempting to decrypt subtitles...
22:52:08 T:140090018612992 NOTICE: CRUNCHYROLL: --> Success! Subtitles decrypted.
22:52:08 T:140090018612992 DEBUG: unable to load /home/caimi/.xbmc/addons/plugin.video.crunchyroll-takeout/resources/language/English (US)/strings.xml: Failed to open file at line 0
22:52:08 T:140090018612992 INFO: Scriptresult: Success
22:52:08 T:140090018612992 INFO: Python script stopped
22:52:08 T:140090018612992 DEBUG: Thread XBPyThread 140090018612992 terminating
22:52:08 T:140090489694112 DEBUG: waiting for python thread 22 to stop
22:52:08 T:140090489694112 DEBUG: python thread 22 destructed
22:52:08 T:140090057221888 DEBUG: WaitOnScriptResult - plugin exited prematurely - terminating

Working:
22:57:11 T:140090057221888 NOTICE: CRUNCHYROLL: --> Playlist is: http://www.crunchyroll.com/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id=612295&video_format=106&video_quality=62&auto_play=1&show_pop_out_controls=1
22:57:11 T:140090057221888 NOTICE: CRUNCHYROLL: --> page_url is: http://www.crunchyroll.com/ixion-saga-dt/episode-15-612295
22:57:11 T:140090057221888 NOTICE: CRUNCHYROLL: --> Cache valid: using stored player version...
22:57:11 T:140090057221888 NOTICE: CRUNCHYROLL: --> page_url is: 20121220193219.bd8118f7c58d1da788d88782497e30a4
22:57:18 T:140090057221888 NOTICE: CRUNCHYROLL: --> App - ondemand/?auth=daEcfcWcDadcFbVcdbVdVdAa4bybVbFdyb3-bq_ZvT-dHa-qCLyuqKCyvB&aifp=0009&slist=c7/s/ve984515/video.mp4
22:57:18 T:140090057221888 NOTICE: CRUNCHYROLL: --> Attempting to find subtitles...
22:57:18 T:140090057221888 NOTICE: CRUNCHYROLL: --> Found subtitles. Continuing...
22:57:18 T:140090057221888 NOTICE: False
22:57:18 T:140090057221888 NOTICE: CRUNCHYROLL: --> Attempting to decrypt subtitles...
22:57:19 T:140090057221888 NOTICE: CRUNCHYROLL: --> Success! Subtitles decrypted.
22:57:19 T:140090057221888 NOTICE: CRUNCHYROLL: --> Playing video and setting subtitles to special://temp/crunchy_612295.ass


I don't know which app the script couldn't find, maybe there's something different in these two pages




RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - yoshiofthewire - 2013-01-24

Not Working
Code:
<script type="text/javascript"><!--
swfobject.embedSWF("http:\/\/static.ak.crunchyroll.com\/flash\/20121220193219.bd8118f7c58d1da788d88782497e30a4\/StandardVideoPlayer.swf",'showmedia_video_player','960', '570', '9.0.115','http://static.ak.crunchyroll.com/common/static/flash/express_install.swf',{"config_url":"http%3A%2F%2Fwww.crunchyroll.com%2Fxml%2F%3Freq%3DRpcApiVideoPlayer_GetStandardConfig%26media_id%3D612293%26video_format%3D108%26video_quality%3D80%26auto_play%3D1%26aff%3Dcrunchyroll-website%26show_pop_out_controls%3D1%26pop_out_disable_message%3D"},{"wmode":"transparent","allowFullScreen":"true","allowscriptaccess":"always","allownetworking":"all"},{"id":"showmedia_video_player","style":"display:block;"},loadBrandedPlayerAd);
//--></script>

Working
Code:
<script type="text/javascript"><!--
swfobject.embedSWF("http:\/\/static.ak.crunchyroll.com\/flash\/20121220193219.bd8118f7c58d1da788d88782497e30a4\/StandardVideoPlayer.swf",'showmedia_video_player','960', '570', '9.0.115','http://static.ak.crunchyroll.com/common/static/flash/express_install.swf',{"config_url":"http%3A%2F%2Fwww.crunchyroll.com%2Fxml%2F%3Freq%3DRpcApiVideoPlayer_GetStandardConfig%26media_id%3D612295%26video_format%3D108%26video_quality%3D80%26auto_play%3D1%26aff%3Dcrunchyroll-website%26show_pop_out_controls%3D1%26pop_out_disable_message%3D"},{"wmode":"transparent","allowFullScreen":"true","allowscriptaccess":"always","allownetworking":"all"},{"id":"showmedia_video_player","style":"display:block;"},loadBrandedPlayerAd);
//--></script>




RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2013-01-24

Yoshi!

Yup, they are basically the same (just the id changes).

How do you grab these codes, I wanna try if in my box it is different.

I got it with curl, but it does not uses my login, so mine is a little different.

swfobject.embedSWF("http:\/\/static.ak.crunchyroll.com\/flash\/20121220193219.bd8118f7c58d1da788d88782497e30a4\/StandardVideoPlayer.swf",'showmedia_video_player','640', '389', '9.0.115','http://static.ak.crunchyroll.com/common/static/flash/express_install.swf',{"config_url":"http%3A%2F%2Fwww.crunchyroll.com%2Fxml%2F%3Freq%3DRpcApiVideoPlayer_GetStandardConfig%26media_id%3D612293%26video_format%3D0%26video_quality%3D0%26auto_play%3D1%26aff%3Dcrunchyroll-website%26show_pop_out_controls%3D1%26pop_out_disable_message%3DOnly%2BAll-Access%2BMembers%2Band%2BAnime%2BMembers%2Bcan%2Bpop%2Bout%2Bthis%2Bvideo.%2BGet%2Byour%2Bmembership%2Btoday%2521"},{"wmode":"transparent","allowFullScreen":"true","allowscriptaccess":"always","allownetworking":"all"},{"id":"showmedia_video_player","style":"display:block;"},loadBrandedPlayerAd);

is there a way to make the script dump this in the xbmc.log?

I'll try to look at the script and how it behaves in my PC





RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2013-01-24

Ok

I printed xmlSource

and my stream_info in (the fail situation) is this:

<stream_info>
<host></host>
<file>http://v6.lln.crunchyroll.com/s/ve979213/video.mp4?e=1359049312&amp;h=4dff259c71f5f86991bece6a22f36292</file>
<media_id>612293</media_id>
<media_type>1</media_type>
<video_encode_id>979213</video_encode_id>
<video_format>106</video_format>
<video_encode_quality>62</video_encode_quality>
<metadata>
<width>1280</width>
<height>720</height>
<duration>1474.682</duration>
</metadata>
<token>hEBxqOXCSDTHcUu7K92wvtd18oA=</token>
<exclusive>Transmissão exclusiva para rcaimi</exclusive>
<pingback>
<hash>763AOOsPVmViC0V6x1KDcB-H304</hash>
<time>1359034912</time>
</pingback>
<seekParameter>ms</seekParameter>
</stream_info>

and this is the one when it works

<stream_info>
<host>rtmpe://cp150757.edgefcs.net/ondemand/?auth=daEbDaEaVcEbyaqckcNdIa8czd.d9dxb0dk-bratTw-dHa-uADwssHBBuA&amp;aifp=0009&amp;slist=c6/s/ve984515/video.mp4</host>
<file>mp4:c6/s/ve984515/video.mp4</file>
<media_id>612295</media_id>
<media_type>1</media_type>
<video_encode_id>984515</video_encode_id>
<video_format>106</video_format>
<video_encode_quality>62</video_encode_quality>
<metadata>
<width>1280</width>
<height>720</height>
<duration>1474.765</duration>
</metadata>
<token>9uWQRClJ2ScBNFDhAYfZXas/LQ0=</token>
<exclusive>Transmissão exclusiva para rcaimi</exclusive>
<pingback>
<hash>iKCIZUUnexQnQXIzhzRLI0Zp1uU</hash>
<time>1359035222</time>
</pingback>
<seekParameter></seekParameter>
</stream_info>

Now I got lost Sad


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - yoshiofthewire - 2013-01-28

The file that is not playing back is giving you a web page instead of the video.
The part that bugs me more than anything is that the playback issue isn't even consistent.
I was able to play back the earlier episode without issue.

I hate to say this but the only real fix for this is going to be someone adding html5 plugin support to XBMC.



RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - aarstar - 2013-01-30

Thanks for the great addon, but I'm having a slight issue with XBMC 12. The subtitles go out of sync if I pause or skip through a video. Downgrading to XBMC 11 solves this issue. If it matters, I'm currently using Arch Linux (x86_64), but this also happened on Ubuntu 12.10.


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - le__ - 2013-01-31

On rcaimi problem, as the "Transmissão exclusiva para" in portuguese suggests, I believe this happens because the brazillian version of Crunchyroll only use rtmpe streams on the premium/starred episodes, for the rest they use normal http streams (due to some problems regarding users not getting full speed on the brazillians ISP).

So, this work-around may help:

\\plugin.video.crunchyroll-takeout\\resources\\lib\\crunchy_video.py
Code:
@@ -181,6 +181,8 @@ class CrunchyPlayback:
        if stream_info:
            try:
                stream['url'] = stream_info.host.string
+                if stream_info.host.string is None:
+                    stream['url'] = "null.net/dummy"
                stream['token'] = stream_info.token.string
                stream['file'] = stream_info.file.string
                stream['page_url'] = page_url
*This part is to bypass the stream['app'] validation, because when on the http stream, the stream_info.host.string is always blank.


Code:
@@ -231,7 +233,10 @@ class CrunchyPlayback:
            print "Playback Failed!"
        
    def playvideo(self, stream, mediaid, useSubs):
-        rtmp_url = stream['url']+stream['file'].replace('&amp;','&') + " swfurl=" +stream['swf_url'] + " swfvfy=1 token=" +stream['token']+ " playpath=" +stream['file'].replace('&amp;','&')+ " pageurl=" +stream['page_url']+ " tcUrl=" +stream['url']
+        if stream['url'] == "null.net/dummy":
+            rtmp_url = stream['file'].replace('&amp;','&')
+        else:
+            rtmp_url = stream['url']+stream['file'].replace('&amp;','&') + " swfurl=" +stream['swf_url'] + " swfvfy=1 token=" +stream['token']+ " playpath=" +stream['file'].replace('&amp;','&')+ " pageurl=" +stream['page_url']+ " tcUrl=" +stream['url']
        item = xbmcgui.ListItem(stream['episode_display'])
        item.setInfo( type="Video", infoLabels={ "Title": stream['episode_display'] })
        item.setProperty('IsPlayable', 'true')
*And this will change the url to use the http stream when necessary, while keeping the rtmpe for the premium/starred episodes.
It got a little messed up, because the line was too long and the forum did a linebreak instead of putting a horizontal scrollbar, but I hope it could got the point...


Btw, thanks for the upgrades on the addon. Big Grin


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - rcaimi - 2013-01-31

Thanks le__

I'll try it later, and post the results

(edit) I just made a remote connection test, and it seems to be working, at night I'll try to watch a full episode!

Thanks again


RE: [Release] Crunchyroll Takeout v0.6 (9/8/12) - le__ - 2013-02-04

UPDATE:
Please ignore this post, the problem was actually related to the hardsubbed streams, because those have a link to an English external subs, but don't have the actual data in the in the playlist/xml itself, making the playback to fail (because the check is made in the part that lists the external subs, while the subs itself is get from another part, that contains the actual data from the subs).

More info: Post: #93



-----------------------------------------------



Discovered another problem related to the international versions of Crunchyroll.

If I set my preferences on Crunchyroll's website to use the Brazilian Portuguese as the default language for the subs and then, using Takeout plugin, choose to play a video that don't have pt-BR subs, the playback will fail.

*This only happens when the video has any subs, but not in the language selected on the preferences.
For example, if I try to play a trailer (crunchy don't add any subs to them), for example, it will work.



Work-around to do a fallback to the English subs, fixing these cases:

\\plugin.video.crunchyroll-takeout\\resources\\lib\\crunchyDec.py
Code:
@@ -39,7 +39,30 @@ class crunchyDec:
            _data = subtitle.data.string
            return _id, _iv, _data
        else:
-            print "CRUNCHYROLL: --> Couldn't parse XML file."
+        
+            import re
+            import urllib2
+            
+            subtitleALT = soup.find('subtitles').find('subtitle', { "title" : re.compile("English") })
+            if subtitleALT:
+                print 'CRUNCHYROLL: --> The preferred language for your subs where not found, using English subs instead.'
+                playlistALT = subtitleALT.get('link')
+
+                openerALT = urllib2.build_opener()
+                openerALT.addheaders = [('Referer', 'http://www.crunchyroll.com'),('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]
+                responseALT = openerALT.open(playlistALT)
+                xmlALT = responseALT.read()
+                soupALT = BeautifulSoup(xmlALT)
+                subtitleALTsoup = soupALT.find('subtitle')
+
+                if subtitleALTsoup:
+                    _id = int(subtitleALTsoup['id'])
+                    _iv = subtitleALTsoup.find('iv').contents[0]
+                    _data = subtitleALTsoup.data.string
+                    return _id, _iv, _data
+                else:
+                    print "CRUNCHYROLL: --> Couldn't parse subtitle XML file."
+                    
            
    def convertToASS(self, script):
        soup = BeautifulSoup(script, convertEntities=BeautifulSoup.HTML_ENTITIES)

Apparently this is working ok but, rcaimi, can you please test it too?
If you are from Brazil, you can try Usagi Drop, Ano Natsu or any other show that is not listed on the Brazilian version of the website but is available on Takeout (because the website only lists the titles that already have pt-BR subs).


Sometimes it gave me a black screen with only the audio playing, but I believe that's because the tests where made when my connection was really unstable, since later, for no reason, the same video worked as normal...