Skip to main content
Participating Frequently
January 11, 2010
Question

Very strange SMIL problem

  • January 11, 2010
  • 2 replies
  • 2287 views

We have two servers - one stores the media files and runs FMS. The other creates dynamic webpages. I have edited the 'dynamic stream' SMIL example on the media server, to include a full URL:

<smil>
    <head>
        <meta base="rtmp://mymediaserver.com/vod" />
    </head>
    <body>
    <switch>
        <video src="mp4:sample1_150kbps.f4v" system-bitrate="150000"/>
        <video src="mp4:sample1_500kbps.f4v" system-bitrate="500000"/>
        <video src="mp4:sample1_700kbps.f4v" system-bitrate="700000"/>
        <video src="mp4:sample1_1000kbps.f4v" system-bitrate="1000000"/>
        <video src="mp4:sample1_1500kbps.f4v" system-bitrate="1500000"/>
        </switch>
    </body>
</smil>

If I open the standard FMS index page, the 'dynamic stream' example works fine. However, if I copy that code over to a page on my webpage server (linking back to the media server of course), I get a 'connection error'. The weird part though is that if I limit the 'switches' in the SMIL file to just one video, it works again, eg:

<smil>
     <head>
         <meta base="rtmp://mymediaserver.com/vod" />
     </head>
     <body>
     <switch>
         <video src="mp4:sample1_150kbps.f4v" system-bitrate="150000"/>
         </switch>
     </body>
</smil>

It makes no difference which file I choose, as long as there is just one.

I am using the same video player that all the examples use (FMS 3.5), so my thought is that something in that player is causing a cross domain security exception when it has more than one stream to choose from. I tried disabling the firewall, so it's not that, and I updated server.xml to point to a custom crossdomain.xml file:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*.mywebpageserver.com" />
</cross-domain-policy>

But that doesn't seem to have had any effect.

Any ideas?

Thanks,

Karl

    This topic has been closed for replies.

    2 replies

    Inspiring
    January 14, 2010

    Doh! Just noticed you left the "/media" in the rtmp url. Remove the /media and you should be up and running. FMS is configured by default to recognize the media folder as the default streams folder.

    Participating Frequently
    January 14, 2010

    Actually, I had tried that already.... without success. I've removed it again though. The weird thing is that the SMIL with the single video entry works. My thought is that it is a security issue inside the component, which only kicks in when it is presented with multiple streams.

    Thanks.

    Karl

    Inspiring
    January 14, 2010

    Ok, well you should still omit it from the path, because leaving /media in the path can cause problems with default installations (unless you changed the FMS.INI file). Did you try the FLVPlayback 2.0 component? That has documentation associated with it, and it's what i use for the streaming previews on videoRx.com, complete with SMIL implementation. SMIL wouldn't present a security issue with multiple <video> tags. We can conquer this--it's something simple I'm sure.

    -Robert

    Participating Frequently
    January 13, 2010

    I setup a page so you could see the actual problem. The first player is using the SMIL file with multiple videos, the second has just one:

    http://www.usw.salvationarmy.org/dropbox.nsf/test?readform

    Inspiring
    January 13, 2010

    This may or may not affect the outcome, but the SMIL video tags should be arranged from highest to lowest bitrate, not lowest to highest. Also, do not specify the system-bitrate attribute for the lowest bitrate (default) stream. I've seen the SMILManager class mess up on that one too. I'm a big fan of SMIL implementations with the FLVPlayback component, including the newer FLVPlayback 2.0 component that is available from the "bonus" downloads of Flash Media Server online at adobe.com. I use a slight variation of the FLVPlayback 2.0 component on my new encoding service site, videoRx.com (http://www.videoRx.com).

    -Robert

    --

    Robert Reinhardt

    Creator, videoRx.com

    Author, Flash Bible series and Video for Adobe Flash CS4 Professional Studio Techniques

    Adobe Community Expert

    http://blogs.flashsupport.com/robert

    Participating Frequently
    January 14, 2010

    Appreciate the reply. I tried reworking the SMIL files, without success. I've actually put a page up demonstrating the problem if you have a chance to take a look:

    http://www.usw.salvationarmy.org/dropbox.nsf/test?readform

    Thanks again,

    Karl