Problem playing GenericSite .asx streams (1 Viewer)

vaz

Portal Member
December 13, 2009
11
0
Home Country
Canada Canada
I have created a new Generic Site and added new channel with the following URL:
www.ontvtime.ru.

I was able to play it only once. After that error always pops up.
Here's the good log (first time):

Code:
2009-12-12 21:41:04.609375 [Info.][MPMain]: g_Player.Play(http://213.186.114.105:9665/stream/82ef308cd2ca8b417b401ca21776119d.asf?wmbitrate=400000 Video)
2009-12-12 21:41:04.625000 [Info.][MPMain]: VideoPlayer:play http://213.186.114.105:9665/stream/82ef308cd2ca8b417b401ca21776119d.asf?wmbitrate=400000
2009-12-12 21:41:04.640625 [Info.][MPMain]: VideoPlayerVMR9: Enabling DX9 exclusive mode
2009-12-12 21:41:04.640625 [Debug][MPMain]: Main: Received DX exclusive mode switch message. Fullscreen && maximized == True
2009-12-12 21:41:04.656250 [Debug][MPMain]: Main: Goto fullscreen: True
2009-12-12 21:41:04.656250 [Debug][MPMain]: D3D: Switch to exclusive mode - Playing media: False
2009-12-12 21:41:04.656250 [Info.][MPMain]: D3D: BuildPresentParamsFromSettings using 60Hz as RefreshRate
2009-12-12 21:41:04.703125 [Debug][MPMain]: D3D: Switched to exclusive mode successfully
2009-12-12 21:41:04.703125 [Info.][MPMain]:   fonts.SetDevice()
2009-12-12 21:41:06.062500 [Info.][MPMain]: VMR9: added Video Mixing Renderer 9 to graph
2009-12-12 21:41:06.078125 [Debug][MPMain]: VMR9: SetDeinterlacePrefs()
2009-12-12 21:41:06.078125 [Debug][MPMain]: VMR9: Enabled YUV mixing - No DX Error
2009-12-12 21:41:06.093750 [Debug][MPMain]: VRM9: Turning on nonsquare mixing - No DX Error
2009-12-12 21:41:06.093750 [Debug][MPMain]: VRM9: Set filter mode - Gaussian Quad Filtering No DX Error
2009-12-12 21:41:06.093750 [Debug][MPMain]: VMR9: Now active
2009-12-12 21:41:06.093750 [Debug][MPMain]: VMR9: Renderer successfully added
2009-12-12 21:41:06.265625 [Info.][MPMain]: added filter:WM ASF Reader to graph
2009-12-12 21:41:07.453125 [Info.][MPMain]: DirectShowUtils: First try to insert new audio renderer Default DirectSound Device 
2009-12-12 21:41:07.453125 [Info.][MPMain]: DirectShowUtils: Found audio renderer
2009-12-12 21:41:07.453125 [Debug][MPMain]: DirectShowUtils: added filter:Default DirectSound Device to graph
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.468750 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.484375 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.484375 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.562500 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:41:07.625000 [Debug][MPMain]: VMR9: SetDeinterlaceMode()
2009-12-12 21:41:07.625000 [Debug][MPMain]: VMR9: SetDeinterlaceMode - FormatType = VideoInfo2
2009-12-12 21:41:07.625000 [Info.][MPMain]: VMR9: progressive mode detected - no need to de-interlace
2009-12-12 21:41:13.578125 [Info.][MPMain]: VideoPlayer:Duration:0
2009-12-12 21:41:13.593750 [Info.][MPMain]: g_Player.OnStarted() http://213.186.114.105:9665/stream/82ef308cd2ca8b417b401ca21776119d.asf?wmbitrate=400000 media:Video
2009-12-12 21:41:13.625000 [Debug][MPMain]: Window: OnlineVideos.GUIOnlineVideos deinit
2009-12-12 21:41:13.656250 [Debug][MPMain]: TextureManager: CleanupThumbs()
2009-12-12 21:41:13.734375 [Debug][MPMain]: Window: MediaPortal.GUI.Video.GUIVideoFullscreen init
2009-12-12 21:41:13.765625 [Info.][MPMain]: xml:C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Skin\Blue3wide\videoOSD.xml image id:350 width:0 height:0 gfx:-
2009-12-12 21:41:13.968750 [Debug][MPMain]: Loading AR modes from "movies" section...
2009-12-12 21:41:13.984375 [Debug][MPMain]: VMR9Helper: Playing -> Repainting, Frames 57
2009-12-12 21:41:14.015625 [Info.][14]: planescene:PresentImage() frame:57 enabled:True allowed:False
2009-12-12 21:41:14.015625 [Debug][MPMain]: PlaneScene: crop T, B  : 0, 0
2009-12-12 21:41:14.015625 [Debug][MPMain]: PlaneScene: crop L, R  : 0, 0
2009-12-12 21:41:14.031250 [Info.][MPMain]: PlaneScene: video WxH  : 1920x1080
2009-12-12 21:41:14.031250 [Debug][MPMain]: PlaneScene: video AR   : 16:9
2009-12-12 21:41:14.031250 [Info.][MPMain]: PlaneScene: screen WxH : 1920x1080
2009-12-12 21:41:14.031250 [Debug][MPMain]: PlaneScene: AR type    : Normal
2009-12-12 21:41:14.031250 [Debug][MPMain]: PlaneScene: PixelRatio : 1
2009-12-12 21:41:14.046875 [Debug][MPMain]: PlaneScene: src        : (0,0)-(1920,1080)
2009-12-12 21:41:14.046875 [Debug][MPMain]: PlaneScene: dst        : (0,0)-(1920,1080)
2009-12-12 21:41:14.046875 [Info.][14]: planescene:PresentImage() frame:58 enabled:True allowed:False
2009-12-12 21:41:14.093750 [Info.][14]: planescene:PresentImage() frame:59 enabled:True allowed:False
2009-12-12 21:41:14.125000 [Info.][14]: planescene:PresentImage() frame:60 enabled:True allowed:False

Bad log:

Code:
2009-12-12 21:45:16.859375 [Info.][MPMain]: g_Player.Play(http://213.186.114.105:9665/stream/82ef308cd2ca8b417b401ca21776119d.asf?wmbitrate=400000 Video)
2009-12-12 21:45:16.875000 [Info.][MPMain]: VideoPlayer:play http://213.186.114.105:9665/stream/82ef308cd2ca8b417b401ca21776119d.asf?wmbitrate=400000
2009-12-12 21:45:16.890625 [Info.][MPMain]: VideoPlayerVMR9: Enabling DX9 exclusive mode
2009-12-12 21:45:16.890625 [Debug][MPMain]: Main: Received DX exclusive mode switch message. Fullscreen && maximized == True
2009-12-12 21:45:16.890625 [Debug][MPMain]: Main: Goto fullscreen: True
2009-12-12 21:45:16.906250 [Debug][MPMain]: D3D: Switch to exclusive mode - Playing media: False
2009-12-12 21:45:16.906250 [Info.][MPMain]: D3D: BuildPresentParamsFromSettings using 60Hz as RefreshRate
2009-12-12 21:45:16.937500 [Debug][MPMain]: D3D: Switched to exclusive mode successfully
2009-12-12 21:45:16.937500 [Info.][MPMain]:   fonts.SetDevice()
2009-12-12 21:45:18.296875 [Info.][MPMain]: VMR9: added Video Mixing Renderer 9 to graph
2009-12-12 21:45:18.328125 [Debug][MPMain]: VMR9: SetDeinterlacePrefs()
2009-12-12 21:45:18.328125 [Debug][MPMain]: VMR9: Enabled YUV mixing - No DX Error
2009-12-12 21:45:18.328125 [Debug][MPMain]: VRM9: Turning on nonsquare mixing - No DX Error
2009-12-12 21:45:18.328125 [Debug][MPMain]: VRM9: Set filter mode - Gaussian Quad Filtering No DX Error
2009-12-12 21:45:18.328125 [Debug][MPMain]: VMR9: Now active
2009-12-12 21:45:18.328125 [Debug][MPMain]: VMR9: Renderer successfully added
2009-12-12 21:45:18.484375 [Info.][MPMain]: added filter:WM ASF Reader to graph
2009-12-12 21:45:19.187500 [Info.][MPMain]: VideoPlayer9: Cleanup DShow graph
2009-12-12 21:45:19.203125 [Debug][MPMain]: Remove filter from graph: WM ASF Reader
2009-12-12 21:45:19.203125 [Debug][MPMain]: Remove filter from graph: Video Mixing Renderer 9
2009-12-12 21:45:19.203125 [Debug][MPMain]: PlaneScene: PresentImage() dispose surfaces
2009-12-12 21:45:19.203125 [Debug][MPMain]: VMR9: Dispose
2009-12-12 21:45:19.218750 [Debug][MPMain]: VMR9: Inactive
2009-12-12 21:45:19.218750 [Info.][MPMain]: VideoPlayerVMR9: Disabling DX9 exclusive mode
2009-12-12 21:45:19.218750 [Debug][MPMain]: Main: Received DX exclusive mode switch message. Fullscreen && maximized == False
2009-12-12 21:45:19.234375 [Debug][MPMain]: Main: Goto windowed mode: False
2009-12-12 21:45:19.234375 [Debug][MPMain]: D3D: Switch to windowed mode - Playing media: False
2009-12-12 21:45:19.921875 [Debug][MPMain]: D3D: Switched to windowed mode successfully
2009-12-12 21:45:19.921875 [Info.][MPMain]:   fonts.SetDevice()
2009-12-12 21:45:19.921875 [Info.][MPMain]: g_Player: ended
2009-12-12 21:45:19.937500 [Info.][MPMain]: Updating View State
2009-12-12 21:45:19.937500 [Debug][MPMain]: Hiding Search buttons
2009-12-12 21:45:19.937500 [Debug][MPMain]: Hiding Favorite buttons
2009-12-12 21:45:20.015625 [Debug][MPMain]: WindowManager: route OnlineVideos.GUIOnlineVideos:4755->MediaPortal.Dialogs.GUIDialogOK:2002
2009-12-12 21:45:20.015625 [Debug][MPMain]: DialogWindow: MediaPortal.Dialogs.GUIDialogOK init

reproduced on:
Windows XP Pro SP2/SP3

:D,
Victor
 

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    The WM ASF Reader filter has some troubles with Internet streams. You might want to use the WMP Player (Overlay). You can do so by changing the xml:
    Example:
    Code:
    <Site name="MusicTelevision" util="GenericSite" agecheck="false" enabled="true" [COLOR="Red"]player="WMP"[/COLOR]>
     

    vaz

    Portal Member
    December 13, 2009
    11
    0
    Home Country
    Canada Canada
    Still could not get it to work

    Thanks for your quick reply and for this great plug-in!

    I tried to use WMP, no effect.

    Looks like some kind of security from that website (ÍÒÂ (372 Êáèò/ñ) Îíëàéí ÒÂ | Ìèð îíëàéí òåëåâèäåíèÿ | Òåëåêàíàëû è âåáêàìåðû | Online TV)
    I cannot play if I try to run it directly from WMP, but it does work from their website when it's embedded with control.

    It uses this script on the page:

    Code:
    <script type="text/javascript">
    
    
       if(navigator.cookieEnabled == false)
           alert("For watching TV you need to enable cookies.");
    	   else
    	   {
    function setCookie (name, value, expires, path, domain, secure) {
          document.cookie = name + "=" + escape(value) +
            ((expires) ? "; expires=" + expires : "") +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            ((secure) ? "; secure" : "");
    }
    
    function getCookie(name) {
    	var cookie = " " + document.cookie;
    	var search = " " + name + "=";
    	var setStr = null;
    	var offset = 0;
    	var end = 0;
    	if (cookie.length > 0) {
    		offset = cookie.indexOf(search);
    		if (offset != -1) {
    			offset += search.length;
    			end = cookie.indexOf(";", offset)
    			if (end == -1) {
    				end = cookie.length;
    			}
    			setStr = unescape(cookie.substring(offset, end));
    		}
    	}
    	return(setStr);
    }
    var str = getCookie("tv_online_cookie");
    var sttr = '<object type="application/x-oleobject" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" TITLE="www.ontvtime.ru" width="480px" height="385px"><param name="FileName" value="'+str+'"><param name="AutoStart" value="true"><param name="stretchToFit" value="true"><param name="enableContextMenu" value="true"><param name="ShowStatusBar" value="1"><embed src="'+str+'" type="application/x-mplayer2" autostart="1" stretchtofit="1" enablecontextmenu="0" showstatusbar="1" width="480px" height="385px"></embed> </object>';
    document.write(sttr);
    setCookie("tv_online_cookie","");
    }
    </script>

    But I can't figure it out how to get that str value from the cookie.
    Would you be able to help me plz?
    I need it for my parents. They cannot live without this channel.

    thank you very much,
    Victor
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Then it needs the cookie for the video play request. You can look at the LiveVideoUtil class. This one needed a cookie set as well. There is some tricky things to do with the request:

    Code:
    // set all IE requests in one process
    InternetSetOption(0, 42, null, 0);
     

    vaz

    Portal Member
    December 13, 2009
    11
    0
    Home Country
    Canada Canada
    Thanks!

    It worked out fine. I'm able to play all WMP-based videos. Now, I'm facing another issue.

    How do I play a flash playlist (flash-based live tv), a number of continuous .flv files?

    Another words, how do I process the following embedded code.
    flashvar will return the .flv files.
    What videoUrl do I feed the player?

    Code:
       <embed height="360" width="480" pluginspage="http://get.adobe.com/flashplayer/" type="application/x-shockwave-flash"  allowfullscreen="true"
     allowscriptaccess="always" bgcolor="#ffffff" 
     flashvars="file=http://www.ontvtime.ru/stream2/tnt.ontvtime&config=http://www.ontvtime.ru/images/players/config.xml" 
     src="http://www.ontvtime.ru/images/players/ontvtime.swf"/>

    or this script:
    Code:
    <script type="text/javascript">
    var s1 = new SWFObject("http://tvali.ge/mediaplayerpl.swf","player","560","360","7");
        s1.addParam('allowscriptaccess','always');
        s1.addParam('allowfullscreen','true');
    	s1.addVariable("width","560");
    	s1.addVariable("height","360");
    	s1.addVariable("file",
    "tv/901_list.php?d=6085");
    	s1.addVariable("displayheight","220");
        s1.addVariable("backcolor","2868ae");
    	s1.addVariable("frontcolor","CCCCCC");
    	s1.addVariable("lightcolor","EEEEEE");
    	s1.addVariable("screencolor","000000");
    	s1.addVariable('autostart','true');
     	s1.addVariable('repeat','list');
    	s1.addVariable("overstretch","fit");
        s1.addVariable("controlbar","over");
        s1.addVariable("item","144");
        s1.addVariable('playlist', "right");
        s1.addVariable('playlistsize', "60");
    	s1.addVariable("shuffle","false");
    	s1.addVariable("autoscroll","false");
    	s1.addVariable("autostart","true");
    	s1.addVariable("thumbsinplaylist","true");
    	s1.addVariable("titlesinplaylist","false");
    	s1.addVariable("streamer","lighttpd");
    	s1.write("player");
    </script>

    Thanks for your help,
    Victor
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    You can check in the Southpark Util, there is also a playlist used.
    You need to implement the following:
    Code:
    public override bool MultipleFilePlay
    {
      get { return true; }
    }
    
    public override List<string> getMultipleVideoUrls(VideoInfo video)
    {
      ....
    }
    The second one should return your urls to play.

    But you cannt mix this with normal (non playlist) playback. If your util returns true the first property, the function getMultipleVideoUrls is always used instead of getUrl. So you would need to split in two utils. Do you need this functionality in one util? I'll have to check the code to make that possible.
     

    vaz

    Portal Member
    December 13, 2009
    11
    0
    Home Country
    Canada Canada
    Thanks!

    I think I can have another Util class, and later on merge all channels into favorites. But this would be a good feature for the generic websites that play kind of a proxy role to multiple servers.

    I like simplicity and so are my parents. Less clicks is always better.
    After this website is done I'm looking at another one.
    They have an archived TV for the past week. Need to add some UI controls to select date/time.
    But this is for the future work I guess. So, I may bug you again :)

    Appreciate your help again,
    Victor
     

    Users who are viewing this thread

    Top Bottom