[REQUEST] CTV/TSN/Comedy Network Plugin?
#31
teefer22 Wrote:RTMPDUMP doesn't have to be used at all, and the streams don't need to be unencrypted to be played. Someone needs to build a plugin very similar to bluecop's plugins that finds the links on the CTV family of sites (watch.ctv.ca, watch.tsn.ca, etc) using this webpage:
http://esi.ctv.ca/datafeed/urlgenjs.aspx?vid=239615

I might see if I can tackle TSN.ca some day as it seems simpler than ctv.ca because everything is just clips. I see the biggest difficulty with ctv.ca is that each episode of a show is split into 4 or 5 clips. So to watch an entire episode of big bang theory on ctv.ca, you need to watch four 5 minute clips.

So... using a clip id of 419546. We plug that into
http://esi.ctv.ca/datafeed/urlgenjs.aspx?vid=419546 and we get:

Video.Load({url:'rtmpe://cp45924.edgefcs.net/ondemand/s_!ctv/shows/2011/02/17/BIGBANG-3x6666-EP-CLIP01.mp4?auth=dbEaxcHbRa7dycpaZbvascmbsc1a0cPa0aT-bny9xo-eS-iYG-rwH2qlMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/17/',err:'',stings:[],bumpers:[]});

transform that into:
rtmp://cp45924.edgefcs.net/ondemand?ovpfv=2.1.4&auth=dbEaxcHbRa7dycpaZbvascmbsc1a0cPa0aT-bny9xo-eS-iYG-rwH2qlMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/17/ playpath=mp4Confused_!ctv/shows/2011/02/17/BIGBANG-3x6666-EP-CLIP01

and that will play in XBMC (of course by the time someone reads this the auth will have changed, but you get the point.. The problem is finding the time to build a plugin for ctv.ca just like bluecop has done with his fantastic CBS plugin.

For those of us (me) who are trying to learn

Can you give a quick run down on what you did to get to this point? Basically how you discovered that link and what it does?
Reply
#32
andre_pl Wrote:I tried this today, in fact I have the entire plugin written, but XBMC Still doesn't want to play those streams, the url translations look like this:

from
Code:
rtmpe://cp45924.edgefcs.net/ondemand/s_!ctv/shows/2011/02/10/BIGBANG-3x6665-EP-CLIP02.mp4?auth=dbEaUcXa_cXd2bldJcTbeb0bZdJbEa1bxaT-bnzMry-eS-iYG-uwN1qnMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/10/

to:
Code:
rtmp://cp45924.edgefcs.net/ondemand?ovpfv=2.1.4&auth=dbEaUcXa_cXd2bldJcTbeb0bZdJbEa1bxaT-bnzMry-eS-iYG-uwN1qnMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/10/playpath=mp4:s_!ctv/shows/2011/02/10/BIGBANG-3x6665-EP-CLIP02

did I miss something or has ctv plugged the hole?


EDIT: Fixed it! I took out a space in your url, assuming it was a mistake, but it wasn't Smile watch for the plugin later today.

Hell yeah!!! Do you think this'll work in the USA? I know some of these plugins such as the BBC iPlayer won't work here...
Image
Reply
#33
Quote:EDIT: Fixed it! I took out a space in your url, assuming it was a mistake, but it wasn't Smile watch for the plugin later today.

Wow, that sure didn't take you long. Good work andre_pl. I was working on the TSN.ca one a little bit yesterday but definitely didn't finish.

Since you were so good at that, I'm going to post how to get the links for cbc.ca and globaltv.ca.. Just in case you feel like making any more plugins. Smile


Here is how to get the rtmp for globaltv.com:
First, we need the link from your browser:
http://www.globaltv.com/video/full+episo...1812768546

Inside the html of that page you will find this piece of code. What we want is the PID:
<script type="text/javascript">
var embed_vars = {
pid: "_X8TGqDQ62nnBowQOnYA5kcHIuS58lRv",
contentID: "1812768546",
show: "Survivor",
season: "22",
episode: "2",
se: "S22E2:",
cliptitle: "you+own+my+vote"
};
</script>


Put the pid into this link:
http://release.theplatform.com/content.s...cHIuS58lRv

and that will return a document with this in it:
<switch>
<video src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_lowest_16x9.mp4" system-bitrate="447277" width="400" height="224" type="video/mp4"/>
<video src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_low_16x9.mp4" system-bitrate="647304" width="400" height="224" type="video/mp4"/>
<video src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_medium_16x9.mp4" system-bitrate="850244" width="852" height="480" type="video/mp4"/>
<video src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_high_16x9.mp4" system-bitrate="1252684" width="852" height="480" type="video/mp4"/>
<video src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_highest_16x9.mp4" system-bitrate="2419958" width="1280" height="720" type="video/mp4"/>
<ref src="rtmp://cp90709.edgefcs.net/ondemand/video/Survivor2202_lowest_16x9.mp4" title="You Own My Vote" author="Global" abstract="On Ometepe, Phillip tries to repair the damage after his outburst at the last Tribal Council. So he tells Rob that he will do whatever and vote for whoever he says. Later, Rob sees Matt with Andrea and plans to break up the duo knowing how powerful a couple can go." copyright="© Canwest Broadcast Entertainment" dur="2579736ms" width="400" height="224" guid="h1OBBD79dDfp345_knDVPM5y4KT5ebY7" provider="Canwest Broadcast Entertainment" categories="GlobalTV,GLOBVC3,GLOBVC3/Shows/Survivor/Full Episodes,MOBGLOB/Survivor%3A Redemption Island,MOBGLOB/Survivor%3A Redemption Island/Full Episodes,z/Global Show - Survivor,z/Global Video Centre,z/Mobile GlobalTV" keywords="Entertainment;Programming" type="video/mp4" tp:ChapterEndTimes="00:07:36,00:12:39,00:21:49,00:31:17,00:42:12" tp:ChapterStartTimes="00:07:36,00:12:39,00:21:49,00:31:17,00:42:12" tp:Clip_Type="episode" tp:Episode="2" tp:MobileRotatorActionType="Show" tp:Network="Global" tp:Season="22" tp:Show="Survivor" tp:Subject="Entertainment" tp:Web_Exclusive="No" tp:dpcjobid="142304" tp:isHD="true" tp:mDialogIngestSuccess="true" tpConfusedyndRODO="true"/>
</switch>
<switch>

The rtmp links are right there for you, no auth codes or anything tricky. And those links will stay valid for months (even after globaltv.com removes the link from their website).


Here is how to get the rtmp for cbc.ca/video

we will use this link as an example:
http://www.cbc.ca/video/#/Shows/12212543...1817810978

first we need to get the "ID" (1817810978 in this example) from the original http browser location. Then we need to put that ID in the next link. This will give us the real PID.
NOTE: the PID below (_DyE_l....) is the same for every cbc.ca link, it does not identify the video
http://cbc.feeds.theplatform.com/ps/JSON...1817810978

that will return this line: (What we want is the PID (this is the real PID this time))
{"context":"","listInfo":{"itemCount":1,"totalCount":1},"items":[{"PID":"MBboAGCCmaL97NWHlbkucTYjEVwfC5Uz","title":"Episode 102"}],"removedIDs":[]}

#We now have the real PID, we can now enter that PID into the url below to get the rtmp and playpath locations
http://release.theplatform.com/content.s...YjEVwfC5Uz

That will give us this:
<meta base="rtmp://cp37429.edgefcs.net/ondemand/?auth=daFaEaBa6cXdxd2bKaHbwbvdFcPcvcrccaz-bnz8oN-b4-lks_Ksw1xmGpDAy&amp;aifp=v0001&amp;slist=netstorage" />
</head>
<body>
<ref src="netstorage/George_Strombo_Tonight_102_2155-2-24-2011.flv" title="Episode 102" author="George Stroumboulopoulos Tonight" abstract="Best of Show with Jim Parsons and John Leguizamo." copyright="© CBC Production" dur="1467104ms" width="640" height="360" guid="7I3gl5O1DHC9GcYIp3WGiLju3upag8NV" provider="CBC Production" categories="Shows/George Stroumboulopoulos Tonight,Shows/George Stroumboulopoulos Tonight/Guests,Shows/George Stroumboulopoulos Tonight/Season 7" keywords="George Stroumboulopoulos, George, George Tonight, Strombo, George Stroumboulopoulos Tonight, Jim Parsons, John Leguizamo," tp:Account="Entertainment" tp:AdCategory="george" tp:AdSite="cbc.george.ca" tp:Aired="true" tp:AudioVideo="Video" tp:AvailableInHD="(not specified)" tp:BylineCredit="CBC/Radio-Canada" tp:CBCPersonalities="George Stroumboulopoulos" tp:Camera="(not specified)" tp:ChapterStartTimes="10:01, 13:41" tp:ClipType="Full Program" tp:CommentsEnabled="Yes" tp:EpisodeNumber="102" tp:FeatureImage="http://thumbnails.cbc.ca/maven_legacy/thumbnails/George_Strombo_Tonight_102_2155-2-24-2011_444x250__559856.jpg" tp:Genre="Entertainment" tp:LiveOnDemand="On-Demand" tp:Region="(not specified)" tp:RelatedURL1="George Stroumboulopoulos Tonight website|http://cbc.ca/strombo/|_blank" tp:SeasonNumber="7" tp:Show="George Tonight" tp:Sport="(not specified)" tp:Subtitles="No" tp:adRules="2_2_0"/>
</body>
</smil>

what we want is:
rtmp://cp37429.edgefcs.net/ondemand/?auth=daFaEaBa6cXdxd2bKaHbwbvdFcPcvcrccaz-bnz8oN-b4-lks_Ksw1xmGpDAy&amp;aifp=v0001&amp;slist=netstorage

netstorage/George_Strombo_Tonight_102_2155-2-24-2011.flv

transform that into (notice i removed the ampWink:
rtmp://cp37429.edgefcs.net/ondemand/?auth=daFaEaBa6cXdxd2bKaHbwbvdFcPcvcrccaz-bnz8oN-b4-lks_Ksw1xmGpDAy&aifp=v0001&slist=netstorage playpath=netstorage/George_Strombo_Tonight_102_2155-2-24-2011
Reply
#34
Eldorado Wrote:For those of us (me) who are trying to learn

Can you give a quick run down on what you did to get to this point? Basically how you discovered that link and what it does?

I use 2 programs to try to "reverse engineer" the rtmp links. Wireshark is the most important one. Cooljah is another useful one.

Both programs capture your network activity so you can go back and look at it. So, you fire up wireshark and start capturing, go to watch.ctv.com, play a video, then go back to wireshark, stop capturing, and then read your capture.

That's how I figured out how to get the rtmp links for globaltv.com and cbc.ca/video. I was having trouble with watch.ctv.ca, but Voinage posted my missing piece of the puzzle for ctv..
Reply
#35
Excellent info, thanks!

This is the type of stuff that would be VERY handy to have written up in the wiki.. not just how to write an addon, but also common ways on how to find the video links on sites such as these
Reply
#36
This sounds great, where do I find the plugin andre_pl is talking about ?
Reply
#37
Oooohhhh very excited to see movement on this plugin!! Anxiously waiting for a download link!!
Reply
#38
teefer22 Wrote:...
So... using a clip id of 419546. We plug that into
http://esi.ctv.ca/datafeed/urlgenjs.aspx?vid=419546 and we get:

Video.Load({url:'rtmpe://cp45924.edgefcs.net/ondemand/s_!ctv/shows/2011/02/17/BIGBANG-3x6666-EP-CLIP01.mp4?auth=dbEaxcHbRa7dycpaZbvascmbsc1a0cPa0aT-bny9xo-eS-iYG-rwH2qlMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/17/',err:'',stings:[],bumpers:[]});

transform that into:
rtmp://cp45924.edgefcs.net/ondemand?ovpfv=2.1.4&auth=dbEaxcHbRa7dycpaZbvascmbsc1a0cPa0aT-bny9xo-eS-iYG-rwH2qlMDr&aifp=v001&slist=/s_!ctv/shows/2011/02/17/ playpath=mp4Confused_!ctv/shows/2011/02/17/BIGBANG-3x6666-EP-CLIP01
...

Hi

I'm trying to get CTV news clips to download with rtmpdump, but having trouble working out this transformation. For example:

http://esi.ctv.ca/datafeed/flv/urlgenjs.aspx?vid=424085

gives

rtmpe://cp45891.edgefcs.net/ondemand/s_!ctvnews/2011/02/25/PP0225_seemungal.mp4

but that won't download directly with rtmpdump, nor if I transform it, e.g...

Code:
rtmpdump -r "rtmp://cp45891.edgefcs.net/ondemand?playpath=mp4:s_\!ctvnews/2011/02/25/PP0225_seemungal" -o newsclip.flv

(it seems to be necessary to escapt the !)

Any clues as to where I'm going wrong? I took a look in wireshark, but I'm having a hard time finding any other versions of the stream url other than the one that's returned initially.

Thanks.
Reply
#39
Figured it out eventually. The exclamation mark was causing problems, but single-quote escaping it works. Here's how to grab those clips...

Code:
rtmpdump -r 'rtmp://cp45891.edgefcs.net/ondemand?ovpfv=2.1.4' -y 'mp4:s_!ctvnews/2011/02/25/PP0225_seemungal.mp4' -o newsclip.flv
Reply
#40
Hi new user to the forums. I'm sorry if this is not the place to ask, but it's one of the few threads with Canadian content. Is this the only plug-in in development for Canadian networks? Can anyone suggest any other plug-ins that are "Canadian Friendly". Thanks.
Reply
#41
Here is a test of my watch.tsn.ca plugin. Hopefully this works because i've been fighting with svn and googlecode for hours trying to get this working. It's working for me but I've messed around with my xbmc for so long I don't know if it will work for others or not.

This was my first experience with Python so I doubt this is very robust or optimized but it does work for me.

Here is where to get it:
http://code.google.com/p/teefer-xbmc-repo/downloads

Install it the same way as bluecop's repository.
Reply
#42
Teefer22... works perfect for me! Great job mate. How hard would it be to modify your code to point to CBC & CTV? (The sites are very similar to TSN).

Thanks again
Reply
#43
Wow what good luck, I just randomly decided to look today to see if there was some sort of TSN plugin for XBMC, and what do you know... It was just released today.

It works, except the FULL GAMES. All of the highlights sections work, but not "Championship Curling on demand" nor "Canada Games 2011 On demand", even though there is stuff in those sections on the TSN broadband website, on XBMC when you go into those particular menus they are empty.
Reply
#44
Thanks for doing a TSN plugin. Did Andre_pl end up uploading his script for CTV? I am most interested in CTV at the moment, with Global and CityTV next...
Reply
#45
lansing Wrote:Thanks for doing a TSN plugin. Did Andre_pl end up uploading his script for CTV? I am most interested in CTV at the moment, with Global and CityTV next...

I have it mostly working for CTV, the main issue is getting XBMC to properly queue up all of the clips for an episode into a single playlist. I have to manually queue each clip in the episode to watch them all seamlessly.

I'll be adding support for more channels today and doing some general cleanup, then I'll post the link later today. stay tuned.
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] CTV/TSN/Comedy Network Plugin?0