Comedy network (1 Viewer)

corporate_gadfly

Portal Pro
May 17, 2011
396
136
Home Country
Canada Canada
Edit
Just to let everyone know, I've abandoned Comedy Network for now and concentrating on other CTV stations at the moment. Sites based on CTV platform are now working.

I have downloaded Visual Studio Express on my VMWare partition, so I'll see if I can make a fool of myself with my C# skills. I will try and use CBCUtil as a base and see what happens.

Cheers.
So, I have a Visual C# project set up. I can create OnlineVideos.dll and OnlineVideos.Sites.doskabouter.dll.

What do I need my class to do for it to appear in the Site Util drop-down? Any pointers?

Code looks like this, so far:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;

namespace OnlineVideos.Sites
{
    class ComedyNetworkUtil : SiteUtilBase
    {
        private string baseUrl = @"http://watch.thecomedynetwork.ca";
        private Regex categoryRegex = new Regex(@"<li[^>]*>\s*<a\sid=""(?<id>[^""]*)""\sonclick=""[^""]*""\shref=""(?<url>[^""]*)""\stitle=""[^""]*"">\s*(?<title>[^<]*)<span></span>\s*</a>\s*</li>",
            RegexOptions.Compiled);

        public override int DiscoverDynamicCategories()
        {
            Settings.Categories.Clear();

            string webData = GetWebData(baseUrl + @"/AJAX/VideoLibraryWithFrame.aspx");

            if (!string.IsNullOrEmpty(webData))
            {
                Match m = categoryRegex.Match(webData);

                while (m.Success)
                {
                    RssLink cat = new RssLink();

                    cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                    cat.Url = HttpUtility.HtmlDecode(m.Groups["url"].Value);
                    cat.Thumb = HttpUtility.HtmlDecode(m.Groups["id"].Value);

                    Settings.Categories.Add(cat);

                    m.NextMatch();
                }
            }

            Settings.DynamicCategoriesDiscovered = true;
            return Settings.Categories.Count;
        }

        public override int DiscoverSubCategories(Category parentCategory)
        {
            return base.DiscoverSubCategories(parentCategory);
        }


        public override List<VideoInfo> getVideoList(Category category)
        {
            return new List<VideoInfo>();
        }
    }
}
I have copied the 2 dlls to the plugins\Windows\OnlineVideos directory. However, OnlineVideos configuration is not showing ComedyNetwork in the drop-down.

Thanks in advance.
 

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    Re: Support for a site request thread

    Do you see any other utils in the drop-down?

    If so, try making the ComedyNetworkUtil public.

    In general, I think it's easier to use GenericSiteUtil as base instead of SiteUtilBase, so that you don't have to program all the stuff yourself
     

    corporate_gadfly

    Portal Pro
    May 17, 2011
    396
    136
    Home Country
    Canada Canada
    Re: Support for a site request thread

    Do you see any other utils in the drop-down?

    If so, try making the ComedyNetworkUtil public.

    In general, I think it's easier to use GenericSiteUtil as base instead of SiteUtilBase, so that you don't have to program all the stuff yourself
    Thank you, to you and offbyone. Making it public makes it appear along with the other Utils in the drop-down. Now, I'm off on vacation today/tomorrow and will have limited time on the weekend. Perhaps I can actually do this on work time on Monday (don't tell anybody).

    Cheers,
     

    corporate_gadfly

    Portal Pro
    May 17, 2011
    396
    136
    Home Country
    Canada Canada
    Re: Support for a site request thread

    Thank you, to you and offbyone. Making it public makes it appear along with the other Utils in the drop-down. Now, I'm off on vacation today/tomorrow and will have limited time on the weekend. Perhaps I can actually do this on work time on Monday (don't tell anybody).

    Cheers,
    More progress on Comedy Network. Latest code is as follows:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Web;
    
    namespace OnlineVideos.Sites
    {
        public class ComedyNetworkUtil : SiteUtilBase
        {
            private string baseUrl = @"http://watch.thecomedynetwork.ca";
            private Regex levelOneRegex = new Regex(@"<li[^>]*>\s*<a\sid=""(?<id>[^""]*)""\sonclick=""[^""]*""\shref=""(?<url>[^""]*)""\stitle=""[^""]*"">\s*(?<title>[^<]*)<span></span>\s*</a>\s*</li>",
                RegexOptions.Compiled);
            private Regex levelTwoRegex = new Regex(@"<li[^>]*>\s*<a\sid=""(?<id>[^""]*)""\sonclick=""return\sInterface\.GetChildPanel\('Season'[^""]*""\shref=""(?<url>[^""]*)""\stitle=""[^""]*"">\s*(?<title>[^<]*)<span></span>\s*</a>\s*</li>",
                RegexOptions.Compiled);
            private Regex levelThreeRegex = new Regex(@"<dd\sclass=""Thumbnail""><a\shref=""javascript:Interface\.PlayEpisode\((?<clip>[^,]*),\strue\s\)""\stitle=""(?<title>[^""]*)""><img\ssrc=""(?<thumb>[^""]*)""\s/><span></span></a></dd>",
                RegexOptions.Compiled);
            private Regex videoListRegex = new Regex(@"<dt><a\shref=""[^#]*#clip(?<clip>[^""]*)""\sonclick=""return\sPlaylist\.GetInstance.*?>(?<title>[^<]*)<img.*?/></a></dt>",
                RegexOptions.Compiled);
            private Regex rtmpeUrlTegex = new Regex(@"Video\.Load\({url:'(?<url>[^']*)'.*?",
                RegexOptions.Compiled);
    
            public override int DiscoverDynamicCategories()
            {
                Settings.Categories.Clear();
    
                string webData = GetWebData(baseUrl + @"/AJAX/VideoLibraryWithFrame.aspx");
    
                if (!string.IsNullOrEmpty(webData))
                {
                    foreach (Match m in levelOneRegex.Matches(webData))
                    {
                        RssLink cat = new RssLink();
    
                        cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                        cat.Url = HttpUtility.HtmlDecode(m.Groups["url"].Value);
                        // store id and level in .Other property (separted by pipe)
                        cat.Other = HttpUtility.HtmlDecode(m.Groups["id"].Value) + @"|1";
                        cat.HasSubCategories = true;
    
                        Settings.Categories.Add(cat);
                    }
                }
    
                Settings.DynamicCategoriesDiscovered = true;
                return Settings.Categories.Count;
            }
    
            public override int DiscoverSubCategories(Category parentCategory)
            {
                parentCategory.SubCategories = new List<Category>();
    
                RssLink parentRssLink = (RssLink) parentCategory;
                string parentOther = (string) parentRssLink.Other;
                string level = parentOther.Substring(parentOther.IndexOf(@"|") + 1);
    
                switch (level)
                {
                    case "1":
                        string webData = GetWebData((parentRssLink).Url);
    
                        if (!string.IsNullOrEmpty(webData))
                        {
                            foreach (Match m in levelTwoRegex.Matches(webData))
                            {
                                RssLink cat = new RssLink();
    
                                cat.ParentCategory = parentCategory;
                                cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                                cat.Url = HttpUtility.HtmlDecode(m.Groups["url"].Value);
                                // store id and level in .Other property (separted by pipe)
                                cat.Other = HttpUtility.HtmlDecode(m.Groups["id"].Value) + @"|2";
                                cat.HasSubCategories = true;
    
                                parentCategory.SubCategories.Add(cat);
                            }
                        }
                        break;
    
                    case "2":
                        string parentId = parentOther.Substring(0, parentOther.IndexOf(@"|"));
    
                        webData = GetWebData(baseUrl
                            + @"/AJAX/VideoLibraryContents.aspx?GetChildOnly=true&PanelID=3&SeasonID="
                            + parentId);
    
                        if (!string.IsNullOrEmpty(webData))
                        {
                            foreach (Match m in levelThreeRegex.Matches(webData))
                            {
                                RssLink cat = new RssLink();
    
                                cat.ParentCategory = parentCategory;
                                cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                                cat.Thumb = HttpUtility.HtmlDecode(m.Groups["thumb"].Value);
                                cat.Other = HttpUtility.HtmlDecode(m.Groups["clip"].Value);
                                cat.HasSubCategories = false;
    
                                parentCategory.SubCategories.Add(cat);
                            }
                        }
                        break;
    
                    default:
                        Log.Debug(@"Fell through when looking for subcategories");
                        break;
                }
    
                parentCategory.SubCategoriesDiscovered = true;
                return parentCategory.SubCategories.Count;
            }
    
            public override List<VideoInfo> getVideoList(Category category)
            {
                List<VideoInfo> list = new List<VideoInfo>();
    
                RssLink rssLink = (RssLink) category;
    
                string webData = GetWebData(baseUrl
                    + @"/AJAX/VideoLibraryContents.aspx?GetChildOnly=true&PanelID=4&EpisodeID="
                    + rssLink.Other);
    
                if (!string.IsNullOrEmpty(webData))
                {
                    foreach (Match m in videoListRegex.Matches(webData))
                    {
                        VideoInfo video = new VideoInfo();
                        video.Title = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                        video.Other = HttpUtility.HtmlDecode(m.Groups["clip"].Value);
    
                        // must specify referer
                        string rtmpeData = GetWebData(@"http://cls.ctvdigital.net/cliplookup.aspx?id=" + video.Other, null, baseUrl);
                        if (!string.IsNullOrEmpty(rtmpeData))
                        {
                            Match urlMatch = rtmpeUrlTegex.Match(rtmpeData);
                            if (urlMatch.Success)
                            {
                                video.VideoUrl = HttpUtility.HtmlDecode(urlMatch.Groups["url"].Value);
                            }
                        }
    
                        list.Add(video);
                    }
                }
    
                return list;
            }
        }
    }
    This is what is working so far (mainly display of categories):
    Code:
    Comedy Network
     + The Daily Show with Jon Stewart
     | + Full Episodes
     | | + August 25, 2011
     | | + August 24, 2011
     | | + August 23, 2011
     | | + ...etc...
     | + Headlines
     | + Correspondents
     | + ...etc...
     + The Colbert Report
     + Conan
     + ...etc...
    When I click on August 25, 2011, I have a level 4 category showing clips, e.g., (08/11/11) Clip 1 of 4, (08/11/11) Clip 2 of 4, (08/11/11) Clip 3 of 4 and (08/11/11) Clip 4 of 4.

    For each of those clips, I have their rtmpe links (e.g.: rtmpe://ctvcomedy.fcod.llnwd.net/a4945/d1/2011/08/12/DAILY-J16106-EP-CLIP04.mp4?h=1fd9968746b46e0530077ff3ec7ee665).
    Here's what needs to work:
    • Change those rtmpe links to something usable by MePo
    • Combine the 4 clips into one "playlist"
    • Remove the last level category so the clips start playing as soon as you hit the date
    Any help is appreciated.

    Cheers.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,972
    Nuenen
    Home Country
    Netherlands Netherlands
    Thank you, to you and offbyone. Making it public makes it appear along with the other Utils in the drop-down. Now, I'm off on vacation today/tomorrow and will have limited time on the weekend. Perhaps I can actually do this on work time on Monday (don't tell anybody).

    Cheers,
    More progress on Comedy Network. Latest code is as follows:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Web;
    
    namespace OnlineVideos.Sites
    {
        public class ComedyNetworkUtil : SiteUtilBase
        {
            private string baseUrl = @"http://watch.thecomedynetwork.ca";
            private Regex levelOneRegex = new Regex(@"<li[^>]*>\s*<a\sid=""(?<id>[^""]*)""\sonclick=""[^""]*""\shref=""(?<url>[^""]*)""\stitle=""[^""]*"">\s*(?<title>[^<]*)<span></span>\s*</a>\s*</li>",
                RegexOptions.Compiled);
            private Regex levelTwoRegex = new Regex(@"<li[^>]*>\s*<a\sid=""(?<id>[^""]*)""\sonclick=""return\sInterface\.GetChildPanel\('Season'[^""]*""\shref=""(?<url>[^""]*)""\stitle=""[^""]*"">\s*(?<title>[^<]*)<span></span>\s*</a>\s*</li>",
                RegexOptions.Compiled);
            private Regex levelThreeRegex = new Regex(@"<dd\sclass=""Thumbnail""><a\shref=""javascript:Interface\.PlayEpisode\((?<clip>[^,]*),\strue\s\)""\stitle=""(?<title>[^""]*)""><img\ssrc=""(?<thumb>[^""]*)""\s/><span></span></a></dd>",
                RegexOptions.Compiled);
            private Regex videoListRegex = new Regex(@"<dt><a\shref=""[^#]*#clip(?<clip>[^""]*)""\sonclick=""return\sPlaylist\.GetInstance.*?>(?<title>[^<]*)<img.*?/></a></dt>",
                RegexOptions.Compiled);
            private Regex rtmpeUrlTegex = new Regex(@"Video\.Load\({url:'(?<url>[^']*)'.*?",
                RegexOptions.Compiled);
    
            public override int DiscoverDynamicCategories()
            {
                Settings.Categories.Clear();
    
                string webData = GetWebData(baseUrl + @"/AJAX/VideoLibraryWithFrame.aspx");
    
                if (!string.IsNullOrEmpty(webData))
                {
                    foreach (Match m in levelOneRegex.Matches(webData))
                    {
                        RssLink cat = new RssLink();
    
                        cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                        cat.Url = HttpUtility.HtmlDecode(m.Groups["url"].Value);
                        // store id and level in .Other property (separted by pipe)
                        cat.Other = HttpUtility.HtmlDecode(m.Groups["id"].Value) + @"|1";
                        cat.HasSubCategories = true;
    
                        Settings.Categories.Add(cat);
                    }
                }
    
                Settings.DynamicCategoriesDiscovered = true;
                return Settings.Categories.Count;
            }
    
            public override int DiscoverSubCategories(Category parentCategory)
            {
                parentCategory.SubCategories = new List<Category>();
    
                RssLink parentRssLink = (RssLink) parentCategory;
                string parentOther = (string) parentRssLink.Other;
                string level = parentOther.Substring(parentOther.IndexOf(@"|") + 1);
    
                switch (level)
                {
                    case "1":
                        string webData = GetWebData((parentRssLink).Url);
    
                        if (!string.IsNullOrEmpty(webData))
                        {
                            foreach (Match m in levelTwoRegex.Matches(webData))
                            {
                                RssLink cat = new RssLink();
    
                                cat.ParentCategory = parentCategory;
                                cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                                cat.Url = HttpUtility.HtmlDecode(m.Groups["url"].Value);
                                // store id and level in .Other property (separted by pipe)
                                cat.Other = HttpUtility.HtmlDecode(m.Groups["id"].Value) + @"|2";
                                cat.HasSubCategories = true;
    
                                parentCategory.SubCategories.Add(cat);
                            }
                        }
                        break;
    
                    case "2":
                        string parentId = parentOther.Substring(0, parentOther.IndexOf(@"|"));
    
                        webData = GetWebData(baseUrl
                            + @"/AJAX/VideoLibraryContents.aspx?GetChildOnly=true&PanelID=3&SeasonID="
                            + parentId);
    
                        if (!string.IsNullOrEmpty(webData))
                        {
                            foreach (Match m in levelThreeRegex.Matches(webData))
                            {
                                RssLink cat = new RssLink();
    
                                cat.ParentCategory = parentCategory;
                                cat.Name = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                                cat.Thumb = HttpUtility.HtmlDecode(m.Groups["thumb"].Value);
                                cat.Other = HttpUtility.HtmlDecode(m.Groups["clip"].Value);
                                cat.HasSubCategories = false;
    
                                parentCategory.SubCategories.Add(cat);
                            }
                        }
                        break;
    
                    default:
                        Log.Debug(@"Fell through when looking for subcategories");
                        break;
                }
    
                parentCategory.SubCategoriesDiscovered = true;
                return parentCategory.SubCategories.Count;
            }
    
            public override List<VideoInfo> getVideoList(Category category)
            {
                List<VideoInfo> list = new List<VideoInfo>();
    
                RssLink rssLink = (RssLink) category;
    
                string webData = GetWebData(baseUrl
                    + @"/AJAX/VideoLibraryContents.aspx?GetChildOnly=true&PanelID=4&EpisodeID="
                    + rssLink.Other);
    
                if (!string.IsNullOrEmpty(webData))
                {
                    foreach (Match m in videoListRegex.Matches(webData))
                    {
                        VideoInfo video = new VideoInfo();
                        video.Title = HttpUtility.HtmlDecode(m.Groups["title"].Value);
                        video.Other = HttpUtility.HtmlDecode(m.Groups["clip"].Value);
    
                        // must specify referer
                        string rtmpeData = GetWebData(@"http://cls.ctvdigital.net/cliplookup.aspx?id=" + video.Other, null, baseUrl);
                        if (!string.IsNullOrEmpty(rtmpeData))
                        {
                            Match urlMatch = rtmpeUrlTegex.Match(rtmpeData);
                            if (urlMatch.Success)
                            {
                                video.VideoUrl = HttpUtility.HtmlDecode(urlMatch.Groups["url"].Value);
                            }
                        }
    
                        list.Add(video);
                    }
                }
    
                return list;
            }
        }
    }
    This is what is working so far (mainly display of categories):
    Code:
    Comedy Network
     + The Daily Show with Jon Stewart
     | + Full Episodes
     | | + August 25, 2011
     | | + August 24, 2011
     | | + August 23, 2011
     | | + ...etc...
     | + Headlines
     | + Correspondents
     | + ...etc...
     + The Colbert Report
     + Conan
     + ...etc...
    When I click on August 25, 2011, I have a level 4 category showing clips, e.g., (08/11/11) Clip 1 of 4, (08/11/11) Clip 2 of 4, (08/11/11) Clip 3 of 4 and (08/11/11) Clip 4 of 4.

    For each of those clips, I have their rtmpe links (e.g.: rtmpe://ctvcomedy.fcod.llnwd.net/a4945/d1/2011/08/12/DAILY-J16106-EP-CLIP04.mp4?h=1fd9968746b46e0530077ff3ec7ee665).
    Here's what needs to work:
    • Change those rtmpe links to something usable by MePo
    • Combine the 4 clips into on "playlist"
    • Remove the last level category so the clips starts playing as soon as you hit the date
    Any help is appreciated.

    Cheers.

    For the last level leave the hassubcategories to false, and override getMultipleVideoUrls.

    Try to find what parameters are needed (probably swfvfy) with rtmpdump/google, and create urls with ReverseProxy.GetProxyUri (search in source for examples).

    That would do the trick...
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Re: Support for a site request thread

    That rtmpe link looks good, what does MP log say when sending it to be played? It might be that the playpath and app need special care and can't be easily guessed.

    Edit: Moved all related posts here ;)
     

    corporate_gadfly

    Portal Pro
    May 17, 2011
    396
    136
    Home Country
    Canada Canada
    For the last level leave the hassubcategories to false, and override getMultipleVideoUrls.

    Try to find what parameters are needed (probably swfvfy) with rtmpdump/google, and create urls with ReverseProxy.GetProxyUri (search in source for examples).

    That would do the trick...
    Thanks! Will try later tonight.

    That rtmpe link looks good, what does MP log say when sending it to be played? It might be that the playpath and app need special care and can't be easily guessed.

    Edit: Moved all related posts here ;)
    Thanks!

    Found CTV module from get-flash-videos. It should have some hints (as long as it is current and functional).
     

    corporate_gadfly

    Portal Pro
    May 17, 2011
    396
    136
    Home Country
    Canada Canada
    Re: Support for a site request thread

    That rtmpe link looks good, what does MP log say when sending it to be played? It might be that the playpath and app need special care and can't be easily guessed.

    Edit: Moved all related posts here ;)
    Tried it with CTV and got the following in the logs (rtmpe URL is different this time, e.g., has auth and has ondemand in the URL and there is an invalid application name rejected from server):
    2011-08-28 09:50:11.649973 [Info.][MPMain(1)]: [OnlineVideos]Preparing graph for playback of http://127.0.0.1:30006/0/127.0.0.1/...KCo&aifp=v001&slist=/s_!ctv/shows/2011/08/22/
    2011-08-28 09:50:11.666974 [Info.][MPMain(1)]: VMR9: added EVR Renderer to graph
    2011-08-28 09:50:11.908988 [Debug][MPMain(1)]: VMR9: Now active
    2011-08-28 09:50:11.910988 [Debug][MPMain(1)]: VMR9: Renderer successfully added
    2011-08-28 09:50:11.911988 [Debug][MPMain(1)]: VMR9: Inactive
    2011-08-28 09:50:11.918988 [Info.][MPMain(1)]: DirectShowUtils: First try to insert new audio renderer Default DirectSound Device
    2011-08-28 09:50:12.053996 [Info.][MPMain(1)]: DirectShowUtils: Found audio renderer
    2011-08-28 09:50:12.055996 [Debug][MPMain(1)]: DirectShowUtils: added filter:Default DirectSound Device to graph
    2011-08-28 09:50:12.059996 [Info.][MPMain(1)]: Added filter: File Source (URL) to graph
    2011-08-28 09:50:12.062996 [Info.][OnlineVideos(33)]: [OnlineVideos]Start prebuffering ...
    2011-08-28 09:50:12.262008 [Debug][(32)]: [OnlineVideos]RTMP Request Parameters:
    2011-08-28 09:50:12.263008 [Debug][(32)]: [OnlineVideos]rtmpurl=rtmpe://cp45924.edgefcs.net/ondemand/s_!ctv/shows/2011/08/22/CWD-308-EP-CLIP01.mp4?auth=dbEc7btdAa5cZbkcbc_aXdTdCcbcFbyccaB-bowKEu-eS-iYG-xvN4tlKCo&aifp=v001&slist=/s_!ctv/shows/2011/08/22/
    2011-08-28 09:50:12.330012 [Debug][(32)]: [OnlineVideos]Client type: 6
    2011-08-28 09:50:12.400016 [Debug][(32)]: [OnlineVideos]truncated public key length to 128
    2011-08-28 09:50:12.402016 [Debug][(32)]: [OnlineVideos]DH pubkey position: 251
    2011-08-28 09:50:12.404016 [Debug][(32)]: [OnlineVideos]Client digest offset: 911
    2011-08-28 09:50:12.407016 [Debug][(32)]: [OnlineVideos]Initial client digest:
    2011-08-28 09:50:12.408016 [Debug][(32)]: [OnlineVideos]E3 AA DA 41 99 3A 37 79 CD 23 43 1A 42 97 F8 7D 2B BF 15 77 CF 32 40 75 CC 91 F7 CA 70 03 45 43
    2011-08-28 09:50:12.485021 [Debug][(32)]: [OnlineVideos]Type Answer : 9
    2011-08-28 09:50:12.486021 [Debug][(32)]: [OnlineVideos]Type mismatch: client sent 6, server answered 9
    2011-08-28 09:50:12.488021 [Debug][(32)]: [OnlineVideos]Server Uptime : 1149452154
    2011-08-28 09:50:12.489021 [Debug][(32)]: [OnlineVideos]FMS Version : 3.5.6.1
    2011-08-28 09:50:12.491021 [Debug][(32)]: [OnlineVideos]Server DH public key offset: 448
    2011-08-28 09:50:12.517022 [Debug][(32)]: [OnlineVideos]DH SecretKey:
    2011-08-28 09:50:12.519022 [Debug][(32)]: [OnlineVideos]72 E5 86 DC E1 49 17 FB E5 D1 57 B8 6A E5 1A 8C 36 2A 76 B9 93 4F 72 EE 33 34 84 17 83 93 D3 3E 1F 5A E3 AB FA E0 89 8D 2E 45 AF 9A A5 DA 79 80 03 BB 00 93 39 70 E5 91 24 86 26 4F 78 76 97 82 24 0B 09 FF 72 24 50 63 3A 2B 5E B1 B7 84 3D 00 25 BA DE 79 B7 02 14 6F 8F B3 EF CF E8 62 13 6F 05 D9 70 8E 2A 2D 7A 9F 43 A9 C0 36 BF 72 6C C3 23 3F B0 37 9F 10 32 99 2E D7 50 7A 44 E6 76 53
    2011-08-28 09:50:12.521023 [Debug][(32)]: [OnlineVideos]RC4 Out Key:
    2011-08-28 09:50:12.523023 [Debug][(32)]: [OnlineVideos]13 54 83 7F A8 A4 75 A2 CD E2 86 6E 46 05 0F F4
    2011-08-28 09:50:12.524023 [Debug][(32)]: [OnlineVideos]RC4 In Key:
    2011-08-28 09:50:12.525023 [Debug][(32)]: [OnlineVideos]5D 82 02 99 E8 A4 4E CD D6 31 52 A2 1A 19 C3 1B
    2011-08-28 09:50:12.526023 [Debug][(32)]: [OnlineVideos]Calculated digest key from secure key and server digest:
    2011-08-28 09:50:12.528023 [Debug][(32)]: [OnlineVideos]C1 42 3F CB 36 9A FA 0E CA EE B2 B7 05 2A B4 8D B0 31 B0 DE 84 0A 02 46 D7 31 F2 4F 4E 45 E7 81
    2011-08-28 09:50:12.533023 [Debug][(32)]: [OnlineVideos]Client signature calculated:
    2011-08-28 09:50:12.534023 [Debug][(32)]: [OnlineVideos]60 E2 06 10 E4 AF FF 47 CB D2 2F 1D 68 E4 71 F1 C8 19 A7 5B C0 AD 30 72 01 47 1A 8C 2F 7F 4D 03
    2011-08-28 09:50:12.536023 [Debug][(32)]: [OnlineVideos]Client signature digest position: 911
    2011-08-28 09:50:12.537024 [Debug][(32)]: [OnlineVideos]Digest key:
    2011-08-28 09:50:12.539024 [Debug][(32)]: [OnlineVideos]16 C0 24 99 2E A3 C9 CE 99 8E 46 18 34 09 AE 04 08 91 12 2B 2F D8 FB DD F3 89 35 36 43 96 01 24
    2011-08-28 09:50:12.540024 [Debug][(32)]: [OnlineVideos]Signature calculated:
    2011-08-28 09:50:12.541024 [Debug][(32)]: [OnlineVideos]B5 F6 AB 5E 21 BD EC 5D 6F B1 19 E5 63 6E 75 8B FA 4E C6 79 9A 67 77 50 1D 66 E6 40 9B 54 A6 17
    2011-08-28 09:50:12.542024 [Debug][(32)]: [OnlineVideos]Server sent signature:
    2011-08-28 09:50:12.544024 [Debug][(32)]: [OnlineVideos]B5 F6 AB 5E 21 BD EC 5D 6F B1 19 E5 63 6E 75 8B FA 4E C6 79 9A 67 77 50 1D 66 E6 40 9B 54 A6 17
    2011-08-28 09:50:12.545024 [Debug][(32)]: [OnlineVideos]Genuine Adobe Flash Media Server
    2011-08-28 09:50:12.548024 [Debug][(32)]: [OnlineVideos]Handshaking finished....
    2011-08-28 09:50:12.552024 [Debug][(32)]: [OnlineVideos]Sending connect
    2011-08-28 09:50:12.556025 [Debug][(32)]: [OnlineVideos]app : ondemand/s_!ctv/shows/2011/08/22/CWD-308-EP-CLIP01.mp4?auth=dbEc7btdAa5cZbkcbc_aXdTdCcbcFbyccaB-bowKEu-eS-iYG-xvN4tlKCo&aifp=v001&slist=/s_!ctv/shows/2011/08/22/
    2011-08-28 09:50:12.557025 [Debug][(32)]: [OnlineVideos]tcUrl : rtmpe://cp45924.edgefcs.net:1935/ondemand/s_!ctv/shows/2011/08/22/CWD-308-EP-CLIP01.mp4?auth=dbEc7btdAa5cZbkcbc_aXdTdCcbcFbyccaB-bowKEu-eS-iYG-xvN4tlKCo&aifp=v001&slist=/s_!ctv/shows/2011/08/22/
    2011-08-28 09:50:12.625029 [Debug][(32)]: [OnlineVideos]First Packet after Connect received.
    2011-08-28 09:50:12.633029 [Debug][(32)]: [OnlineVideos]Property: no-name. STRING: _error
    2011-08-28 09:50:12.634029 [Debug][(32)]: [OnlineVideos]Property: no-name. NUMBER: 1
    2011-08-28 09:50:12.635029 [Debug][(32)]: [OnlineVideos]Property: NULL
    2011-08-28 09:50:12.636029 [Debug][(32)]: [OnlineVideos]Property: OBJECT ====>
    2011-08-28 09:50:12.638029 [Debug][(32)]: [OnlineVideos]Property: Name: level, STRING: error
    2011-08-28 09:50:12.639029 [Debug][(32)]: [OnlineVideos]Property: Name: code, STRING: NetConnection.Connect.Rejected
    2011-08-28 09:50:12.640029 [Debug][(32)]: [OnlineVideos]Property: Name: description, STRING: Connection failed.
    2011-08-28 09:50:12.642030 [Debug][(32)]: [OnlineVideos]Property: Name: description, STRING: [ Server.Reject ] : (_defaultRoot_, _defaultVHost_) : Invalid application name (CP45924.S142.0_ondemand/_definst_/s_!ctv/shows/2011/08/22/CWD-308-EP-CLIP01.mp4).
    2011-08-28 09:50:12.643030 [Debug][(32)]: [OnlineVideos]server invoking <_error>
    2011-08-28 09:50:12.645030 [Debug][(32)]: [OnlineVideos]rtmp server sent error
    2011-08-28 09:50:12.646030 [Debug][(32)]: [OnlineVideos]Property: no-name. STRING: close
    2011-08-28 09:50:12.647030 [Debug][(32)]: [OnlineVideos]Property: no-name. NUMBER: 0
    2011-08-28 09:50:12.649030 [Debug][(32)]: [OnlineVideos]server invoking <close>
    2011-08-28 09:50:12.650030 [Debug][(32)]: [OnlineVideos]rtmp server requested close
    2011-08-28 09:50:12.656030 [Debug][(32)]: [OnlineVideos]Request finished.
    2011-08-28 09:50:12.669031 [Warn.][OnlineVideos(33)]: [OnlineVideos]BufferFile : IFileSourceFilter.Load returned '-2146697208' ()
    2011-08-28 09:50:12.670031 [Info.][OnlineVideos(33)]: [OnlineVideos]Buffering was aborted.
    2011-08-28 09:50:12.671031 [Info.][OnlineVideos(33)]: [OnlineVideos]Prebuffering failed.
    Tried it with Comedy Network and got the following in the logs (this one has a null pointer):
    2011-08-28 09:50:30.228035 [Info.][MPMain(1)]: [OnlineVideos]Preparing graph for playback of http://127.0.0.1:30006/0/127.0.0.1/...CLIP01.mp4?h=8523c8e918c191c86fea740524f33a6a
    2011-08-28 09:50:30.231036 [Info.][MPMain(1)]: VMR9: added EVR Renderer to graph
    2011-08-28 09:50:30.405046 [Debug][MPMain(1)]: VMR9: Now active
    2011-08-28 09:50:30.406046 [Debug][MPMain(1)]: VMR9: Renderer successfully added
    2011-08-28 09:50:30.407046 [Debug][MPMain(1)]: VMR9: Inactive
    2011-08-28 09:50:30.408046 [Info.][MPMain(1)]: DirectShowUtils: First try to insert new audio renderer Default DirectSound Device
    2011-08-28 09:50:30.410046 [Info.][MPMain(1)]: DirectShowUtils: Found audio renderer
    2011-08-28 09:50:30.411046 [Debug][MPMain(1)]: DirectShowUtils: added filter:Default DirectSound Device to graph
    2011-08-28 09:50:30.413046 [Info.][MPMain(1)]: Added filter: File Source (URL) to graph
    2011-08-28 09:50:30.415046 [Info.][OnlineVideos(53)]: [OnlineVideos]Start prebuffering ...
    2011-08-28 09:50:30.420046 [Debug][(47)]: [OnlineVideos]RTMP Request Parameters:
    2011-08-28 09:50:30.421046 [Debug][(47)]: [OnlineVideos]rtmpurl=rtmpe://ctvcomedy.fcod.llnwd.net/a4945/d1/2011/08/12/DAILY-J16106-EP-CLIP01.mp4?h=8523c8e918c191c86fea740524f33a6a
    2011-08-28 09:50:30.447048 [Debug][(47)]: [OnlineVideos]Client type: 6
    2011-08-28 09:50:30.474049 [Debug][(47)]: [OnlineVideos]DH pubkey position: 251
    2011-08-28 09:50:30.476050 [Debug][(47)]: [OnlineVideos]Client digest offset: 911
    2011-08-28 09:50:30.477050 [Debug][(47)]: [OnlineVideos]Initial client digest:
    2011-08-28 09:50:30.478050 [Debug][(47)]: [OnlineVideos]74 17 B3 1B 96 79 C2 69 D3 34 5C 91 6A D5 B9 07 CC 89 E3 AE 1A 38 59 AA A7 20 D2 2A E0 3F 77 DC
    2011-08-28 09:50:30.513052 [Debug][(47)]: [OnlineVideos]Type Answer : 9
    2011-08-28 09:50:30.515052 [Debug][(47)]: [OnlineVideos]Type mismatch: client sent 6, server answered 9
    2011-08-28 09:50:30.516052 [Debug][(47)]: [OnlineVideos]Server Uptime : 1906312651
    2011-08-28 09:50:30.517052 [Debug][(47)]: [OnlineVideos]FMS Version : 4.0.2.1
    2011-08-28 09:50:30.518052 [Debug][(47)]: [OnlineVideos]Server DH public key offset: 217
    2011-08-28 09:50:30.545054 [Debug][(47)]: [OnlineVideos]DH SecretKey:
    2011-08-28 09:50:30.546054 [Debug][(47)]: [OnlineVideos]65 2F 70 EA A8 50 CA E8 D2 0F 97 65 73 99 2E 86 59 D2 D2 F0 C3 CF 11 A1 30 B9 20 A9 AC FF DD 37 2E 48 69 3C 0C 3C A8 50 11 D9 B6 13 50 D9 D4 47 B1 4B A3 A7 D3 FE 36 67 5D CD C1 9A A5 F9 A4 66 1C B6 DF DE FC 24 56 50 8B DD 31 6B 6D 18 6A 30 B3 64 66 70 3F 07 0A B9 A3 C5 82 E7 37 F5 7B 06 F2 41 E3 87 0C FA 0E C0 4F 91 CC 84 59 CC 74 BC 90 BD 5A 26 CE F6 7F 3E 4E 05 41 8E EB C5 08 06
    2011-08-28 09:50:30.548054 [Debug][(47)]: [OnlineVideos]RC4 Out Key:
    2011-08-28 09:50:30.549054 [Debug][(47)]: [OnlineVideos]6A 35 16 06 91 08 E1 E3 46 48 0A B7 65 82 53 05
    2011-08-28 09:50:30.550054 [Debug][(47)]: [OnlineVideos]RC4 In Key:
    2011-08-28 09:50:30.552054 [Debug][(47)]: [OnlineVideos]8C 4B 79 7E CA E8 7A CD 7E 87 27 F4 15 7D 34 E3
    2011-08-28 09:50:30.553054 [Debug][(47)]: [OnlineVideos]Calculated digest key from secure key and server digest:
    2011-08-28 09:50:30.554054 [Debug][(47)]: [OnlineVideos]A1 6E EE 9D 13 31 EB A1 D7 86 EF 6D B3 6C C3 54 29 51 EB C3 03 11 07 33 B7 07 AA D5 68 79 2C 98
    2011-08-28 09:50:30.556054 [Debug][(47)]: [OnlineVideos]Client signature calculated:
    2011-08-28 09:50:30.557054 [Debug][(47)]: [OnlineVideos]CB AB 28 82 9B 0D F2 5B E1 7C BE 01 88 A7 03 8A 16 F1 94 F3 1E BD E6 AA 45 31 FC 31 FE 4E 78 D6
    2011-08-28 09:50:30.558054 [Debug][(47)]: [OnlineVideos]Client signature digest position: 911
    2011-08-28 09:50:30.560054 [Debug][(47)]: [OnlineVideos]Digest key:
    2011-08-28 09:50:30.561054 [Debug][(47)]: [OnlineVideos]FE 9B 39 75 B4 8A 2F AA 43 D0 96 81 96 5B A2 FE 27 15 5E 95 C4 DD 76 08 07 98 A7 70 38 13 02 92
    2011-08-28 09:50:30.562054 [Debug][(47)]: [OnlineVideos]Signature calculated:
    2011-08-28 09:50:30.565055 [Debug][(47)]: [OnlineVideos]EC 46 64 5A 16 AA 8E 1F 5D 25 2D C4 89 52 C0 5A EB 1B E8 B7 2C 0A F2 23 22 BC 81 14 F4 BF 12 C9
    2011-08-28 09:50:30.567055 [Debug][(47)]: [OnlineVideos]Server sent signature:
    2011-08-28 09:50:30.568055 [Debug][(47)]: [OnlineVideos]EC 46 64 5A 16 AA 8E 1F 5D 25 2D C4 89 52 C0 5A EB 1B E8 B7 2C 0A F2 23 22 BC 81 14 F4 BF 12 C9
    2011-08-28 09:50:30.569055 [Debug][(47)]: [OnlineVideos]Genuine Adobe Flash Media Server
    2011-08-28 09:50:30.571055 [Debug][(47)]: [OnlineVideos]Handshaking finished....
    2011-08-28 09:50:30.572055 [Debug][(47)]: [OnlineVideos]Sending connect
    2011-08-28 09:50:30.573055 [Debug][(47)]: [OnlineVideos]app : a4945/d1
    2011-08-28 09:50:30.575055 [Debug][(47)]: [OnlineVideos]tcUrl : rtmpe://ctvcomedy.fcod.llnwd.net:1935/a4945/d1
    2011-08-28 09:50:30.594056 [Debug][(47)]: [OnlineVideos]System.NullReferenceException: Object reference not set to an instance of an object.
    at RTMP_LIB.RTMP.ReadPacket(RTMPPacket& packet)
    at RTMP_LIB.RTMP.ConnectStream()
    at RTMP_LIB.RTMP.Connect()
    at RTMP_LIB.RTMPRequestHandler.ConnectAndGetStream(RTMP rtmp, HTTPServerRequest request, HTTPServerResponse response, Boolean& invalidHeader)
    2011-08-28 09:50:30.597057 [Warn.][OnlineVideos(53)]: [OnlineVideos]BufferFile : IFileSourceFilter.Load returned '-2146697208' ()
    2011-08-28 09:50:30.598057 [Debug][(47)]: [OnlineVideos]Request finished.
    2011-08-28 09:50:30.600057 [Info.][OnlineVideos(53)]: [OnlineVideos]Buffering was aborted.
    2011-08-28 09:50:30.601057 [Info.][OnlineVideos(53)]: [OnlineVideos]Prebuffering failed.
    So, even though CTV and Comedy Network are the same kind of animal, their rtmpe mechanisms look different.

    Cheers.
     

    Users who are viewing this thread

    Top Bottom