VideoSampleAccess

Adobe Air 1.0 application displays an rtmp mp4 stream from
FMS3. I'm trying to capture a frame of video with BitmapData.draw
and get a security sandbox violoation. I have added
<VideoSampleAccess enabled=true>/</VideoSampleAccess>
to my Application.xml and I've also tried setting the client
property in the main.asc. Neither seem to work. (I'm able to stream
the video w/o issue - just the BitmapData.draw throws and
exception.)
What do I need to do to make this work?

the same problem

Similar Messages

  • !!Still unresolved error #2123: BitmapData.draw(), videosampleaccess, No policy files granted access

    Hello,
    I have looked all over the forums, google etc. and not found any reliable and working solution to be able to retrieve the stream bitmapdata from RTMP  or HTTPDynamicStreaming source. Please find the details below.
    I have tried everything:
    NetStream.checkPolicyFile = true
    Security.loadPolicyFile(...);
    /applications/live/main.asc has the code below:
    application.onConnect = function( client )
        client.videoSampleAccess = "/";
        this.acceptConnection(client) ;
    The Application.xml has the tag:
    <Client>
         <access>
              <VideoSampleAccess enabled="true">/</VideoSampleAccess>
         </access>
    </Client>
    But constantly, I receive this error ( both on FMS3.5 and FMS4.0 RTMP & HttpLiveDynamicStreaming):
    securityerror:Error #2123: Security sandbox violation: BitmapData.draw: http://localhost/xxyy.swf cannot access rtmpt://localhost:1935/live. No policy files granted access.
    The problem persists wherever the player.swf is placed.
    Since I'm using OSMF the video display object had to be retrieved in the way like this:
    var mediaDisplayObjectTrait:DisplayObjectTrait;
    mediaDisplayObjectTrait = media.getTrait(MediaTraitType.DISPLAY_OBJECT) as DisplayObjectTrait;
    v = new Video(mediaDisplayObjectTrait.mediaWidth,mediaDisplayObjectTrait.mediaHeight);
    loadable.netStream.checkPolicyFile = true;
    v.attachNetStream(loadable.netStream);
    The new Video part is a must because when using ( the only working http - vod setup ) the BitmapData of the DisplayObject defaults to 320x240 even though the mediaWidth and mediaHeight properties are set fine and the video itself has much higher resolution. I must note at this point its far weird and worths another post.
    Seems like the player simply doesn't know anything about where and how to obtain any kind of policy information from the stream.
    I think this issue must be resolved once and for all, it's simply not acceptable to have this poor documentation floating around an essential feature without any professional help involved.

    You don't need crossdomain policy files, you need to do the following;
    1)      Edit the Application.xml file in the host folder, within install directory/conf/... , edit the client tag, adding the attribute override=”yes”
    <Client override=”yes”>
    In a default install of Flash Media Server, the Client class is set to prevent overriding values in the application folder. This was why the settings we were trying were not holding.
    We do not need to alter anything else of the conf Application.xml
    2)      Add the client/access nodes to the root Application.xml within the content folder  ( we have already done this as far as I am aware ).
    <Application>
      <Client>
       <Access>
        <VideoSampleAccess enabled="true">/</VideoSampleAccess>
        <AudioSampleAccess enabled="true">/</AudioSampleAccess>
       </Access>
      </Client>
    </Application>
    3)      Restart the Media Server by using the administration console. This will enable the client>access values to be overridden to true.

  • VideoSampleAccess unusable

    videoSampleAccess set in the Application.xml or on the client
    object works randomly for me with Flash CS4 and FMS 3.0.1 Sometimes
    I can call BitmapData.draw a few times before I get Error #2123,
    sometimes the first call throws that error and stops the video.
    Does anybody know how to make it work consistently?

    Here we exchange some processing in spite of performance, direct path load bypass much of the steps compared with regular insert/update.
    Basically, data going in is passed to the direct path API engine, gives some format, builds blocks and index keys. Those blocks are directly writen to the DB.
    Recommend SQL*Loader concepts (pages 6-9 and 11-4), from the Oracle Database Utilities manual.
    Regards
    Ignacio
    http://oracledisect.blogspot.com

  • FMS Policy and VideoSampleAccess

    Hello! I'm trying to access the raw audio and video samples
    from an RTMP stream and I've done my research but can't overcome
    the last step. I have FMS 3.0 installed locally and authoring in
    Flash CS3 with the latest patches and updates. In the
    Application.xml file I added the two lines:
    <AudioSampleAccess
    enabled="true">/</AudioSampleAccess>
    <VideoSampleAccess
    enabled="true">/</VideoSampleAccess>
    inside the <Application> element to allow access from
    the client, and rebooted the server to make sure it took hold. (and
    the XML is in the standard VOD application folder). Then I fire up
    CS3 that is trying to use SoundMixer.computerSpectrum to read the
    audio samples, but I keep getting the following sandbox issue.
    SecurityError: Error #2123: Security sandbox violation:
    SoundMixer.computeSpectrum:
    file:///C|/Users/me/Documents/flashstuff/monitor.swf cannot access
    rtmp://localhost/vod. No policy files granted access.
    at flash.media::SoundMixer$/computeSpectrum()
    at monitor_fla::MainTimeline/onEnterFrame()
    I'm sure its something simple thats missing. Also, the video
    plays in my client without any problems. Any ideas? Thank you very
    much for your help!

    As described in default live/vod apps that comes with FMS3.0;
    you need to explicitly write these to lines in the server-side
    script.
    // Inside Function :application.onConnect = function(
    p_client, p_autoSenseBW ){
    p_client.audioSampleAccess = "/";
    p_client.videoSampleAccess = "/";
    }

  • Pre-Sales: AMS Standard and 'videoSampleAccess'

    I am about to purchase Adobe Media Server 5 Standard.
    However, I need to know that the following will be possible:
    In my Flash client swf, I need to use BitmapData.draw() on an RTMP stream. (I am projecting the video onto a 3D model)
    If I attempt this with a stock version of AMS 5 Starter, I recieve the following error:
    "No policy files granted access"
    The solution appears to be altering main.asc with the following code:
    client.videoSampleAccess = "\";
    This solution works for me in AMS 5 Starter.
    However, will I still be able to do this once I buy AMS 5 Standard?
    The sales documentation states that AMS Standard does NOT support custom server side scripting.
    Will I be able to project an RTMP video stream onto a 3D model if I buy AMS Standard?

    Hi,
    With AMS Standard version, you can not have server side scripting. If you want to you server side scripting then you can go for AMS 5 Professional. Also, check the following link for more details:
    http://www.adobe.com/in/products/adobe-media-server-professional/buying-guide-comparison.h tml

  • Issue with allowedHTMLdomains.txt in Live App

    Hi,
    My Purpose is to record live streams on server side and play recorded files later.
    What i have done is -
    1. Copied All files of applications/live in some safe location.
    2. Copied all files from samples/applications/live to applications/live folder. (Deleted main.far from live folder)
    3. Restricted SWF and HTML to mydomain in these files - allowedHTMLdomains.txt and allowedSWFdomains.txt
    4. In main.asc i added these line in the end
    var mystream;
    var intervalID;
    application.onConnect = function(clientobj)
      return true;
    application.onPublish = function(clientObj,streamObj){
    trace("In app pub:");
    mystream = Stream.get(streamObj.name);
    mystream.onStatus = function(info)
         trace("mystream onstatus:"+ info.code);
    mystream.record();
    trace("Got it via FMLE = " + streamObj.name);
    application.onUnpublish = function(clientObj,streamObj){
    mystream.record(false);
    5. Then i restarted FMS and tried streaming using FLash Media Encoder. I was able to live stream and then i stopped it.
    6. A FLV File was recorded in application/live folder with the stream name that i used in encoder.
    Now the issues i have, i am able to view live video on my domain as well as some other domain, that means allowedHTMLdomains.txt and allowedSWFdomains.txt did not worked. Another issue is that i am not able to view recorded video after i stopped encoder but i was able see live video before stopping. i am using jwplayer to view the video and using flashvars streamer(rtmp://xx.xx.xx.xxx/live) and file(abc) to view the live and recorded video.

    I am getting another issue now.
    i was able to record with this app when i changed fms.ini
    i added this line in fms.ini
    LIVE2_DIR = /opt/adobe/fms/applications/webroot/live_recorded
    also changed Application.xml in new app and changed this line <Streams>/;${LIVE2_DIR}</Streams>
    After this i was able to record files using my previously mentioned code. But i want to record live videos in same app in streams/intancename/ folder or streams/_definst_ folder 
    i also created streams/_definst_ folder in inside myapp folder with 777 permissions
    after this i changed fms.ini again and changed LIVE2_DIR = /opt/adobe/fms/applications/webroot/live_recorded to LIVE2_DIR = /opt/adobe/fms/applications/myapp
    But now there is no recording. Please help me what i am doing wrong.
    Again i am pasting my code of main.asc here with was a copy of samples/appplications/live folder-
    * application.onAppStart:
    *                    is called when application load. It contains Live (out of the box)
    * application specific initializations.
    application.onAppStart = function()
        // Logging
        trace("Starting Live Service...");
        //  Turning on the Authentication by default
        this.HTMLDomainsAuth =    true;
        this.SWFDomainsAuth =    true;
        // Populating the list of domains which are allowed to host HTML file
        // which in turn may embed a SWF that connects to this application
        this.allowedHTMLDomains = this.readValidDomains("allowedHTMLdomains.txt","HTMLDomains");
        // Populating the list of domains which are allowed to host a SWF file
        // which may connect to this application
        this.allowedSWFDomains = this.readValidDomains("allowedSWFdomains.txt","SWFDomains");
        // Logging
        if(this.HTMLDomainsAuth){
            trace("Authentication of HTML page URL domains is enabled");
        if(this.SWFDomainsAuth){
            trace("Authentication of SWF URL domains is enabled");
        trace("...loading completed.");
    *  application.validate:
    *                 function to validate a given URL by matching through a list of
    * allowed patterns.
    * Parameters:
    *     url:        contains the input url string.
    *     patterns:    Array; an array of permmited url patterns.
    * return value:
    *             true; when 'url domain" contains a listed domains as a suffix.
    *              false; otherwise.
    application.validate = function( url, patterns )
        // Convert to lower case
        url = url.toLowerCase();
        var domainStartPos = 0; // domain start position in the URL
        var domainEndPos = 0; // domain end position in the URL
        switch (url.indexOf( "://" ))
            case 4:
                if(url.indexOf( "http://" ) ==0)
                    domainStartPos = 7;
                break;
            case 5:
                if(url.indexOf( "https://" ) ==0)
                    domainStartPos = 8;
                break;
        if(domainStartPos == 0)
            // URL must be HTTP or HTTPS protocol based
            return false;
        domainEndPos = url.indexOf("/", domainStartPos);
        if(domainEndPos>0)
            colonPos = url.indexOf(":", domainStartPos);
            if( (colonPos>0) && (domainEndPos > colonPos))
                // probably URL contains a port number
                domainEndPos = colonPos; // truncate the port number in the URL
        for ( var i = 0; i < patterns.length; i++ )
            var pos = url.lastIndexOf( patterns[i]);
            if ( (pos > 0) && (pos  < domainEndPos) && (domainEndPos == (pos + patterns[i].length)) )
                return true;
        return false;
    *     application.onConnect:
    *                 Implementation of the onConnect interface function (optional).
    *  it is invoked whenever a client connection request connection. Live app uses this
    *  function to authenticate the domain of connection and authorizes only
    *  for a subscriber request.
    application.onConnect = function( p_client, p_autoSenseBW )
        // Check if pageUrl is from a domain we know.   
        // Check pageurl
        // A request from Flash Media Encoder is not checked for authentication
        if( (p_client.agent.indexOf("FME")==-1) && (p_client.agent.indexOf("FMLE")==-1))
            // Authenticating HTML file's domain for the request :
            // Don't call validate() when the request is from localhost
            // or HTML Domains Authentication is off.
            if ((p_client.ip != "127.0.0.1") && application.HTMLDomainsAuth
                    &&  !this.validate( p_client.pageUrl, this.allowedHTMLDomains ) )
                trace("Authentication failed for pageurl: " + p_client.pageUrl + ", rejecting connection from "+p_client.ip);
                return false;
            // Authenticating the SWF file's domain for the request :
            // Don't call validate() when the request is from localhost
            // or SWF Domains Authentication is off.
            if ((p_client.ip != "127.0.0.1") && application.SWFDomainsAuth
                    &&  !this.validate( p_client.referrer, this.allowedSWFDomains ) )
                trace("Authentication failed for referrer: " + p_client.referrer + ", rejecting connection from "+p_client.ip);
                return false;
                // Logging
            trace("Accepted a connection from IP:"+ p_client.ip
                            + ", referrer: "+ p_client.referrer
                            + ", pageurl: "+ p_client.pageUrl);
        }else{
            // Logging
            trace("Adobe Flash Media Encoder connected from "+p_client.ip);
        // As default, all clients are disabled to access raw audio and video and data bytes in a stream
        // through the use of BitmapData.draw() and SoundMixer.computeSpectrum()., Please refer
        // Stream Data Access doccumentations to know flash player version requirement to support this restriction
        // Access permissions can be allowed for all by uncommenting the following statements
        //p_client.audioSampleAccess = "/";
         //p_client.videoSampleAccess = "/";  
        this.acceptConnection(p_client);
        // A connection from Flash 8 & 9 FLV Playback component based client
        // requires the following code.
        if (p_autoSenseBW)
            p_client.checkBandwidth();
        else
            p_client.call("onBWDone");
        p_client.setBandwidthLimit(74000, 74000);
            application.acceptConnection(p_client);
    * Client.prototype.getPageUrl
    *                 Public API to return URL of the HTML page.               
    Client.prototype.getPageUrl = function() {
        return this.pageUrl;
    * Client.prototype.getReferrer
    *                 Public API to return Domain URL of the client SWF file.               
    Client.prototype.getReferrer = function() {
        return this.referrer;
    * FCPublish :
    * FME calls FCPublish with the name of the stream whenever a new stream
    * is published. This notification can be used by server-side action script
    * to maintain list of all streams or also to force FME to stop publishing.
    * To stop publishing, call "onFCPublish" with an info object with status
    * code set to "NetStream.Publish.BadName".
    Client.prototype.FCPublish = function( streamname )
        // setup your stream and check if you want to allow this stream to be published
        if ( true) // do some validation here
        {      // this is optional.
            this.call("onFCPublish", null, {code:"NetStream.Publish.Start", description:streamname});
        else
            this.call("onFCPublish", null, {code:"NetStream.Publish.BadName", description:streamname});
    * FCUnpublish :
    * FME notifies server script when a stream is unpublished.
    Client.prototype.FCUnpublish = function( streamname )
        // perform your clean  up
        this.call("onFCUnpublish", null, {code:"NetStream.Unpublish.Success", description:streamname});
    * releaseStream :
    * When FME connection to FMS drops during a publishing session it will
    * try and republish the stream when connection is restored. On certain
    * occasions FMS will reject the new stream because server is still
    * unaware of the connection drop, sometimes this can take a few minutes.
    * FME calls "releaseStream" method with the stream name and this can be
    * used to forcibly clear the stream.
    Client.prototype.releaseStream = function(streamname)
         s = Stream.get(streamname);
         s.play(false);
    * application.readValidDomains
    *             Function to read Allowed domain file
    * Parameters:
    *         fileName:
    *             name of the file in the application directory
    * which contains one valid domain name per line. This file can contain
    * comments followed by a '#' as the very first charector in that line.
    * a non-comment entry with a space is considered as an error case.
    * returns
    *         an array in which each entry contains a domain name
    * listed in the file.
    application.readValidDomains = function( fileName , domainsType )
        var domainFile = new File(fileName);
        var domainsArray = new Array();
        var index = 0;
        var lineCount = 0;
        var tempLine;
        domainFile.open("text", "read");
        // Read the file line-by-line and fill the domainsArray
        // with valid entries
        while (domainFile.isOpen && ! domainFile.eof() )
            tempLine = domainFile.readln();
            lineCount++;
            if( !tempLine  || tempLine.indexOf("#") == 0)
                continue;
            tempLine = tempLine.trim();
            if(tempLine.indexOf(" ")!=-1)
                trace("undesired <space>, domain entry ignored. "+fileName+":"+(lineCount+1));
            else
                domainsArray[index] =  tempLine.toLowerCase();
                index++;
                if(tempLine == "*")
                    switch (domainsType){
                        case "HTMLDomains":
                            trace ("Found wildcard (*) entry: disabling authentication for HTML file domains ")    ;
                            application.HTMLDomainsAuth =    false;       
                            break;
                        case "SWFDomains":
                            trace ("Found wildcard (*) entry: disabling authentication for SWF file domains ")    ;
                            this.SWFDomainsAuth =    false;       
                            break;
                        default:
                            // Do nothing
                            break;   
        } // End while
        // Something is wrong! the domains file must be accessible.
        if( !domainFile.isOpen){
            trace("Error: could not open '"+fileName+"', rejecting all clients except localhost. ");
        else
            domainFile.close();
        return domainsArray;
    * String.prototype.trim:
    *             Function to trim spaces in start an end of an input string.
    * returns:
    *         a trimmed string without any leading & ending spaces.
    String.prototype.trim = function () {
        return this.replace(/^\s*/, "").replace(/\s*$/, "");
    var mystream;
    application.onPublish = function(clientObj,streamObj){
    mystream = Stream.get("mp4:"+streamObj.name+".f4v");
        if (mystream)
                    mystream.record("record",600);
                    mystream.play(streamObj.name,-2,-1);
    application.onUnpublish = function(clientObj,streamObj){
    mystream.record(false);

  • Streaming Video and Bitmap Draw issues.

    Hello all,
    In the current application I'm developing, I have a custom
    video console. While watching a video, certain points in the
    timeline will pop up a dialog box that gives the user the ability
    to switch to a related video. If the user clicks the button to view
    the related video, a 3D effect flips the current "main" console to
    a secondary "branching" console - much like the flip effect the
    iPhone uses. The videos are streaming from FMS 3, the client
    application was developed in Flex, and we are using Alex Uhlmann's
    Distortion Effects to achieve the 3D flip effect.
    When I first started developing the application, I ran in to
    the infamous "Security sandbox violation: BitmapData.draw" error
    whenever I would try the flip. After some investigation on the web,
    I found that I needed to set the Client.videoSampleAccess property
    in my FMS application's main.asc to allow bitmap snapshot access. I
    did so, and that seemed to do the trick. After playing with the
    application a bit more, however, I found that the error would still
    come about if I did the following:
    1. Pause the video (stream)
    2. Perform a seek while paused.
    3. Attempt the flip effect.
    When I did the above, the error came back. If I paused,
    performed a seek, and then unpaused the video, everything worked
    fine. If I pause and then immediately do the flip without a seek,
    everything works fine.
    It seems as though when you pause and then perform a seek,
    the player forgets that it has permission to do a frame grab until
    you restart playback.
    Has anyone else had this issue, or anything similar? If so,
    how did you solve it?
    Thanks,
    --G
    (For reference, here is the actual Error that is getting
    thrown)
    SecurityError: Error #2123: Security sandbox violation:
    BitmapData.draw:
    http://localhost/Bison/trunk/BisonClient/bin/BisonClient-debug.swf
    cannot access rtmp://localhost/digitaltutors. No policy files
    granted access.
    at flash.display::BitmapData/draw()
    at
    sandy.util::DistortImage/renderVector()[C:\workspaces\flex2.0.1\AlexFlexLibrary\sandy\uti l\DistortImage.as:190]
    at
    sandy.util::DistortImage/initialize()[C:\workspaces\flex2.0.1\AlexFlexLibrary\sandy\util\ DistortImage.as:107]
    at
    com.adobe.ac.mxeffects::SimpleDistortion/initDistortImage()[C:\workspaces\flex2.0.1\AlexF lexLibrary\com\adobe\ac\mxeffects\SimpleDistortion.as:501]
    at
    com.adobe.ac.mxeffects::SimpleDistortion/renderSides()[C:\workspaces\flex2.0.1\AlexFlexLi brary\com\adobe\ac\mxeffects\SimpleDistortion.as:357]
    at
    com.adobe.ac.mxeffects::SimpleDistortion/flipFront()[C:\workspaces\flex2.0.1\AlexFlexLibr ary\com\adobe\ac\mxeffects\SimpleDistortion.as:98]
    at
    com.adobe.ac.mxeffects.effectClasses::FlipInstance/updateFront()[C:\workspaces\flex2.0.1\ AlexFlexLibrary\com\adobe\ac\mxeffects\effectClasses\FlipInstance.as:46]
    at mx.effects::Tween/
    http://www.adobe.com/2006/flex/mx/internal::doInterval()[C:\dev\flex_201_gmc\sdk\framework s\mx\effects\Tween.as:567
    at
    mx.effects::Tween$/timerHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\Tween.as: 177]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    Hi,
    I've been searching all over for someone having the same
    problem that I am.
    I'm seeing nearly the same thing that you are. I have
    SWFVerification turned on and the swf copied over to the correct
    directory. If I stream an FLV and attempt to capture grab the
    bitmap data it works fine. Always.
    If I try the same thing with a .mov or .mp4 file it mostly
    works, but sometimes (after doing basically the same thing you've
    described in your message), I get the SecurityError. If I try again
    after a delay of a few seconds, sometimes it works. When that
    doesn't work, if I seek a 1/10th of a second ahead in the video
    then try again, it almost always works. But sometimes that, too,
    fails.
    Have you found a reliable solution to your problem? Has
    anyone else seen this issue? I would file a bug for FMS, but it
    looks like the bug-tracking system for FMS is not public. It would
    be nice for it to be public.
    regards,
    david

  • Not overwriting server files still unresolved

    Reposted from a 2009 post in a 2007 thread:
    DW CS2 was overwriting server files on PUT all the time, and now sometimes doesn't. GoDaddy.COM tech support suggests it is likely a DW issue. I agree.
    I upload an update to a file already existing on the server such as HTML, PHP, JPG, etc. At times, the file simply will not update on the server. When this occurs, I've gone to dual (remote/local) view to watch the activity. I use the PUT button, and no update. I drag-drop the file directly to the correct folder, and no update. But...if I manually delete the server side file, then use the PUT button or drag-drop, the new file is then the correct file. Simply refusing to update on the server...but only sometimes. Whether using PUT or drag-drop, the file appears correctly in the desired folder, so it wasn't being sent to an incorrect server location.
    Doug - [email protected]
    Added information:
    When these things have occurred, at times out of necessity and to check whether it is a server-related issue, I have used a couple other freebie FTP software to upload the same files. In every case, with each other software, the files uploaded which has just refused to properly update when uploaded using DW, would update on the server properly.
    If people on this forum, watching these problems do not have an answer, that is something I can accept easily. But if some of those people are Adobe staffers, and it is not thoroughly investigated toward an end of resolving these issues, I find that highly objectionable. The 2009 post above was with reference to using DW in CS2 in Windows XP. I am now on a new machine, using Windows 7. At least most of the time, this particular anomaly is not occurring...but then I haven't been doing as much web work lately, so might not have run into it as it is a now and then style anomaly.
    Only time will tell if the anomaly is still present. I can't really remember if it has surfaced in Windows 7. If it has not and does not, this "may" be an indicator that the problems lie in the relationship between DW and Windows XP...rather than only being about DW. I do not think it is the server in any case, as other tests indicate it is DW-specific. GoDaddy has checked and has found nothing which would prevent the files from updating correctly.
    Someone in the other thread mentioned the case where a file inadvertently gets uploaded to the wrong folder. While that is not typical, it IS possible and I have to admit having been guilty in that area before...very "egg on face." So for anyone having such difficulties, DO scout around and make sure the correct updated file is not actually sitting somewhere else on the server wondering why no one accesses it. But I still hate dealing with Adobe...maybe because they've become rich producing good software, and I'm just a lowly tag-along.
    Doug - [email protected]

    You don't need crossdomain policy files, you need to do the following;
    1)      Edit the Application.xml file in the host folder, within install directory/conf/... , edit the client tag, adding the attribute override=”yes”
    <Client override=”yes”>
    In a default install of Flash Media Server, the Client class is set to prevent overriding values in the application folder. This was why the settings we were trying were not holding.
    We do not need to alter anything else of the conf Application.xml
    2)      Add the client/access nodes to the root Application.xml within the content folder  ( we have already done this as far as I am aware ).
    <Application>
      <Client>
       <Access>
        <VideoSampleAccess enabled="true">/</VideoSampleAccess>
        <AudioSampleAccess enabled="true">/</AudioSampleAccess>
       </Access>
      </Client>
    </Application>
    3)      Restart the Media Server by using the administration console. This will enable the client>access values to be overridden to true.

  • HTTP Streaming and BitmapData.draw

    Hi OSMF Experts,
    I've tried to duplicate segments of a Video with BitmapData.draw.
    It's working with RTMP (set videoSampleAccess server side).
    Progressive is also working (crossdomain.xml is ok).
    BitmapData.draw doesn't work with HTTP Streaming! (Using *.f4m). What's the way to get this working? Following Error is thrown:
    SecurityError: Error #2123: Verletzung der Sicherheits-Sandbox: BitmapData.draw: file:///C|/players/myVideoTestHTTP.swf kann nicht auf null zugreifen. Es haben keine Richtliniendateien Zugriff gewährt.
    I've used OSMF 2.0 for the Tests. And I've testet with the sample.mp4/manifest.f4m example.
    Thanks for your answers.
    Greets
    Martin

    Have you seen bug CSCdx31582- Macintosh wont play WMT from CE (ecdn). Guess this is similar to the issue that you have.

  • Playing published streams through an administrator connection? (:1111)

    Hi all,
    I am building a custom administration application which has to review streams published to our FMS application. This is to ban clients publishing inappropriate content. I am wondering if I have to make a connection to the application, as normal users do, in order to play the published streams? I am getting the list of streams using another connection, to rtmp://domain:1111/admin, like outlined in Administration API, and issuing the 'getLiveStreams' call.
    The reason I am asking is because firstly, I remember that the Administration Console can play streams published to the server, but I don't recall it incrementing the connection count which shows amount of user clients connected to an application. Maybe I have missed however, but if I am right and it indeed can play streams without connecting to the application (which actually DOES sound a bit unlikely, given how the stream names are local to an app.), then maybe I can do it too? Secondly, I presently have to differentiate users and administrators in my 'onConnect' script, because are perform completely different roles. If I could relieve my admin. app from connecting to the application, I could also dump the role switching.
    I am not sure what is the best thing to do here, frankly...

    I am not sure how your linked post should help me. I have no problem connecting as an administrator to our own service.
    My question is can I play streams through this administrator connection on port 1111, or like now, I have to keep a separate connection to the application in order to play application's streams?
    I do NOT want to connect to the application, because I then am forced to become one of its "users", even though I am not - I am an admin. Even though I have implemented roles with my application server side script, whereas users connect with a bunch of parameters, I can connect with another role - as an admin, without parameters (because they do not apply to me since I only use the service for playing streams). Another reason is actually pretty annoying - even though I explicitly specify video sample access permission for both myself and any user that connects (in order to be able to take snapshots of the videos) using the "videoSampleAccess = '/'" expression, occasionally I STILL get security errors. I imagine if I somehow can bypass the security altogether. After all it is our server, and our users know that we need to monitor for unsuitable content. FMS makes it pretty hard to do so with the error listed above. The error is sporadic.
    So I will ask again - can I play any stream I want of any application on my server, without connecting to the application instance as a regular user bound to security rules? I need some form of video administration, and I am NOT using Administration console, but a custom admin. application which does more than Admin console does, in particular kick out bad people.

  • VOD - application goes down after a while (only some instances)

    Hello Guys,
    I have a simple VOD application running on FMS 3.5.5 which I need to stream continuously but I'm unable to identify the correct configuration to do so. I removed as much limit details as I could from those XML file: Server.xml, Application.xml and VHost.xml.
    Basically I have arround 15 different streams but all of sudden some of them, NOT ALL, goes down with no explanation (as I could see).
    As per logs, there is no much details but "application unloaded".
    Can someone pls help me to identify what else needs to be changed in order to have those stream playing continuously? Usually they went down after some hours in idle state. But I'm not sure whether it's related to CPU/Memory usage. My server has 8GB of memory, and when I start playing all those stream the memory goes down till 52mb free (50mb to 53mb usually). "All" memory is allocated to cache, and it seems there is no problem with that.
    Server.xml
    <Root>
            <Server>
                    <NetworkingIPv6 enable="false" />
                    <CrossDomainPath></CrossDomainPath>
                    <Plugins>
                            <UserDefined>
                                    <UserKey1>
                                            This data can be retrieved by FMS plug-in.
                                            Please look at Auth Adaptor sample for details.
                                    </UserKey1>
                                    <UserKey2>
                                            This data can be retrieved by FMS plug-in.
                                            Please look at Auth Adaptor sample for details.
                                    </UserKey2>
                            </UserDefined>
                            <FilePlugin enabled="true">
                                    <MaxNumberOfRequests>0</MaxNumberOfRequests>
                                    <Content type="Streams">true</Content>
                                    <Content type="SWF">false</Content>
                            </FilePlugin>
                    </Plugins>
                    <SSL>
                            <SSLRandomSeed>16</SSLRandomSeed>
                            <SSLSessionCacheGC>5</SSLSessionCacheGC>
                            <SSLClientCtx>
                                    <SSLVerifyCertificate>true</SSLVerifyCertificate>
                                    <SSLCACertificatePath></SSLCACertificatePath>
                                    <SSLCACertificateFile></SSLCACertificateFile>
                                    <SSLVerifyDepth>9</SSLVerifyDepth>
                                    <SSLCipherSuite>ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH</SSLCipherSuite>
                            </SSLClientCtx>
                    </SSL>
                    <Process>
                            <UID>${SERVER.PROCESS_UID}</UID>
                            <GID>${SERVER.PROCESS_GID}</GID>
                    </Process>
                    <Mask>017</Mask>
                    <LicenseInfo>${SERVER.LICENSEINFO}</LicenseInfo>
                    <LicenseInfoEx></LicenseInfoEx>
        <ReadBufferSize>4096</ReadBufferSize>
                    <AdminServer>
                            <CrossDomainPath></CrossDomainPath>
                            <RTMP>
                                    <RTMPE enabled="true"></RTMPE>
                            </RTMP>
                            <HostPort>${SERVER.ADMINSERVER_HOSTPORT}</HostPort>
                            <IpcHostPort>localhost:11110</IpcHostPort>
                            <SocketGC>60</SocketGC>
                            <Process>
                                    <UID>${SERVER.PROCESS_UID}</UID>
                                    <GID>${SERVER.PROCESS_GID}</GID>
                            </Process>
                            <AdminElem>false</AdminElem>
                            <Allow>all</Allow>
                            <Deny></Deny>
                            <Order>Allow,Deny</Order>
                    </AdminServer>
                    <AutoCloseIdleClients enable="false">
                            <CheckInterval>-1</CheckInterval>
                            <MaxIdleTime>-1</MaxIdleTime>
                    </AutoCloseIdleClients>
                    <ResourceLimits>
                            <FLVCachePurge>60</FLVCachePurge>
                            <FLVCache>
                                    <FileCheckInterval>120</FileCheckInterval>
                                    <MaxSize>${SERVER.FLVCACHE_MAXSIZE}</MaxSize>
                                    <MaxKeyframeCacheSize>0</MaxKeyframeCacheSize>
                            </FLVCache>
                            <RecBuffer>
                                    <MaxFlushTime>5</MaxFlushTime>
                                    <MaxFlushSize>256</MaxFlushSize>
                                    <AllowedVideoLag></AllowedVideoLag>
                                    <MaxSize>512000</MaxSize>
                                    <MaxTimestampSkew>-1</MaxTimestampSkew>
                            </RecBuffer>
                            <CPUMonitor>1</CPUMonitor>
                            <ThreadPoolGC>20</ThreadPoolGC>
                            <MsgPoolGC>60</MsgPoolGC>
                            <ApplicationGC>-1</ApplicationGC>
                            <FLVCacheSize>10</FLVCacheSize>
                            <SocketGC>60</SocketGC>
                            <ProcVMSizeMonitorInterval>60</ProcVMSizeMonitorInterval>
                            <ProcVMSizeWarn>1800</ProcVMSizeWarn>
                            <ProcVMSizeNominal>1600</ProcVMSizeNominal>
                            <SSLSessionCacheGC>5</SSLSessionCacheGC>
                            <Connector>
                                    <HTTP>
                                            <MinConnectionThreads>0</MinConnectionThreads>
                                            <MaxConnectionThreads>0</MaxConnectionThreads>
                                            <MaxConnectionQueueSize>-1</MaxConnectionQueueSize>
                                            <HandleCache>
                                                    <MaxSize>100</MaxSize>
                                                    <IdleTime>30</IdleTime>
                                                    <TrimSize>0.2</TrimSize>
                                                    <GCInterval>60</GCInterval>
                                            </HandleCache>
                                    </HTTP>
                                    <RTMP>
                                            <MinIOThreads>0</MinIOThreads>
                                            <MaxIOThreads>32</MaxIOThreads>
                                            <NumCRThreads>0</NumCRThreads>
                                            <MinConnectionThreads>0</MinConnectionThreads>
                                            <MaxConnectionThreads>0</MaxConnectionThreads>
                                            <MaxConnectionQueueSize>-1</MaxConnectionQueueSize>
                                    </RTMP>
                            </Connector>
                            <Protocol>
                                    <RTMP>
                                            <Edge>
                                                    <MinIOThreads>0</MinIOThreads>
                                                    <MaxIOThreads>0</MaxIOThreads>
                                                    <SocketTableSize>-1</SocketTableSize>
                                                    <SocketOverflowBuckets>-1</SocketOverflowBuckets>
                                                    <MaxConnectionRate>-1</MaxConnectionRate>
                                            </Edge>
                                            <Core>
                                                    <MinIOThreads>0</MinIOThreads>
                                                    <MaxIOThreads>0</MaxIOThreads>
                                                    <SocketTableSize>-1</SocketTableSize>
                                                    <SocketOverflowBuckets>-1</SocketOverflowBuckets>
                                            </Core>
                                            <Admin>
                                                    <MinIOThreads>0</MinIOThreads>
                                                    <MaxIOThreads>0</MaxIOThreads>
                                                    <SocketTableSize>-1</SocketTableSize>
                                                    <SocketOverflowBuckets>-1</SocketOverflowBuckets>
                                            </Admin>
                                            <SocketSndBuf>0</SocketSndBuf>
                                            <SocketRcvBuf>0</SocketRcvBuf>
                                            <DiffServ>0</DiffServ>
                                            <DiffServMask>0</DiffServMask>
                                    </RTMP>
                                    <ECCP>
                                            <MinIOThreads>0</MinIOThreads>
                                            <MaxIOThreads>0</MaxIOThreads>
                                            <SocketTableSize>-1</SocketTableSize>
                                            <SocketOverflowBuckets>-1</SocketOverflowBuckets>
                                            <CoreTimeout>30</CoreTimeout>
                                    </ECCP>
                                    <ACCP>
                                            <MinIOThreads>0</MinIOThreads>
                                            <MaxIOThreads>0</MaxIOThreads>
                                            <SocketTableSize>-1</SocketTableSize>
                                            <SocketOverflowBuckets>-1</SocketOverflowBuckets>
                                    </ACCP>
                            </Protocol>
                            <IPCQueues>
                                    <GlobalQueue>
                                            <HeapSize>2048</HeapSize>
                                            <MaxQueueSize>10</MaxQueueSize>
                                    </GlobalQueue>
                                    <EdgeCore>
                                            <HeapSize>1024</HeapSize>
                                            <MaxQueueSize>10</MaxQueueSize>
                                    </EdgeCore>
                                    <Services>
                                            <HeapSize>2048</HeapSize>
                                            <MaxQueueSize>10</MaxQueueSize>
                                    </Services>
                            </IPCQueues>
                            <MessageCache enable="false">
                                    <MaxCacheUnits>4096</MaxCacheUnits>
                                    <MaxCacheSize>100</MaxCacheSize>
                                    <MaxUnitSize>16</MaxUnitSize>
                                    <FreeRatio>0.125</FreeRatio>
                                    <GlobalRatio>0.4</GlobalRatio>
                                    <MaxAge>1000000</MaxAge>
                                    <UpdateInterval>1024</UpdateInterval>
                                    <FreeMemRatio>0.5</FreeMemRatio>
                            </MessageCache>
                            <SmallMemPool enable="false">
                                    <MaxCacheUnits>4096</MaxCacheUnits>
                                    <MaxCacheSize>100</MaxCacheSize>
                                    <MaxUnitSize>16</MaxUnitSize>
                                    <FreeRatio>0.125</FreeRatio>
                                    <GlobalRatio>0.4</GlobalRatio>
                                    <MaxAge>1000000</MaxAge>
                                    <UpdateInterval>1024</UpdateInterval>
                                    <FreeMemRatio>0.5</FreeMemRatio>
                            </SmallMemPool>
                            <LargeMemPool enable="false">
                                    <MaxCacheUnits>4096</MaxCacheUnits>
                                    <MaxCacheSize>100</MaxCacheSize>
                                    <MaxUnitSize>16</MaxUnitSize>
                                    <FreeRatio>0.125</FreeRatio>
                                    <GlobalRatio>0.4</GlobalRatio>
                                    <MaxAge>1000000</MaxAge>
                                    <UpdateInterval>1024</UpdateInterval>
                                    <FreeMemRatio>0.5</FreeMemRatio>
                            </LargeMemPool>
                            <SegmentsPool enable="false">
                                    <MaxCacheUnits>4096</MaxCacheUnits>
                                    <MaxCacheSize>100</MaxCacheSize>
                                    <MaxUnitSize>16</MaxUnitSize>
                                    <FreeRatio>0.125</FreeRatio>
                                    <GlobalRatio>0.4</GlobalRatio>
                                    <MaxAge>1000000</MaxAge>
                                    <UpdateInterval>1024</UpdateInterval>
                                    <FreeMemRatio>0.5</FreeMemRatio>
                            </SegmentsPool>
                            <Master>
                                    <CoreGC>-1</CoreGC>
                                    <CoreExitDelay>20</CoreExitDelay>
                            </Master>
                            <Edge>
                                    <MinEventQueueThreads>2</MinEventQueueThreads>
                                    <MaxEventQueueThreads>-2</MaxEventQueueThreads>
                                    <NumSchedQueues>1</NumSchedQueues>
                            </Edge>
                    </ResourceLimits>
                    <Logging>
                            <Time>local</Time>
                            <RetryNumber>0</RetryNumber>
                            <RetrySleep>100</RetrySleep>
                            <RecordsNumber>-1</RecordsNumber>
                            <TerminatingCharacters>CRLF</TerminatingCharacters>
                            <Access>
                                    <Enable>true</Enable>
                                    <Scope>server</Scope>
                                    <Checkpoints enable="false">
                                            <CheckInterval>60</CheckInterval>
                                            <LogInterval>3600</LogInterval>
                                    </Checkpoints>
                            </Access>
                            <Diagnostic>
                                    <Enable>true</Enable>
                            </Diagnostic>
                            <Application>
                                    <Enable>true</Enable>
                            </Application>
                            <AuthEvent>
                                    <Enable>true</Enable>
                            </AuthEvent>
                            <AuthMessage>
                                    <Enable>true</Enable>
                            </AuthMessage>
                            <FileIO>
                                    <Enable>true</Enable>
                            </FileIO>
                    </Logging>
                    <Localhost>localhost</Localhost>
                    <PublicIP></PublicIP>
                    <SWFVerification>
                            <SWFFolder></SWFFolder>
                            <DirLevelSWFScan>1</DirLevelSWFScan>
                            <MaxInitDelay>5</MaxInitDelay>
                            <MinGoodVersion></MinGoodVersion>
                            <Cache>
                                    <TTL>1440</TTL>
                                    <UpdateInterval>5</UpdateInterval>
                            </Cache>
                    </SWFVerification>
                    <Streams>
                            <StreamLogLevel>warning</StreamLogLevel>
                            <Mp4>
                                    <Playback>
                                            <VideoAutoBufferReadSize>153600</VideoAutoBufferReadSize>
                                            <AudioAutoBufferReadSize>51200</AudioAutoBufferReadSize>
                                            <OtherAutoBufferReadSize>1024</OtherAutoBufferReadSize>
                                            <EnableAggMsgs>true</EnableAggMsgs>
                                            <MaxAggMsgSize>65536</MaxAggMsgSize>
                                            <MaxTracks>64</MaxTracks>
                                            <MaxSampleSize>16777216</MaxSampleSize>
                                            <AllowAnyAVCProfile>false</AllowAnyAVCProfile>
                                            <AllowAnyAACProfile>false</AllowAnyAACProfile>
                                    </Playback>
                                    <Recording>
                                            <MaxELSTEntries>100</MaxELSTEntries>
                                            <MaxDataSampleDescriptions>10</MaxDataSampleDescriptions>
                                            <MaxAudioSampleDescriptions>10</MaxAudioSampleDescriptions>
                                            <MaxVideoSampleDescriptions>10</MaxVideoSampleDescriptions>
                                    </Recording>
                            </Mp4>
                            <Raw>
                                    <EnableAggMsgs>true</EnableAggMsgs>
                                    <MaxAggMsgSize>65536</MaxAggMsgSize>
                            </Raw>
                    </Streams>
                    <Httpd enabled="${SERVER.HTTPD_ENABLED}">
                            <Directory>Apache2.2</Directory>
                            <Program>bin/httpd</Program>
                            <Options>-f ./conf/httpd.conf</Options>
                            <Service>FMSHttpd</Service>
                    </Httpd>
            </Server>
            <ServerDomain></ServerDomain>
    </Root>
    Application.xml
    <Application>
            <Process>
        <Scope></Scope>
        <Distribute numprocs="3">Instances</Distribute>
        <LifeTime>
          <RollOver></RollOver>
          <MaxCores></MaxCores>
        </LifeTime>
                    <MaxFailures>2</MaxFailures>
                    <RecoveryTime>0</RecoveryTime>
            </Process>
            <LoadOnStartup>false</LoadOnStartup>
            <MaxAppIdleTime>-1</MaxAppIdleTime>
            <JSEngine>
                    <RuntimeSize>1024</RuntimeSize>
                    <MaxGCSkipCount>-1</MaxGCSkipCount>
                    <MaxTimeOut>0</MaxTimeOut>
                    <ScriptLibPath>${APP.JS_SCRIPTLIBPATH}</ScriptLibPath>
                    <XMLSocket>
                            <MaxUnprocessedChars>4096</MaxUnprocessedChars>
                    </XMLSocket>
                    <NetConnection>
                            <ObjectEncoding>AMF3</ObjectEncoding>
                    </NetConnection>
        <Security>
          <RPC enable="false">
            <Client>
              <Method>
                <Allow></Allow>
              </Method>
            </Client>
            <NetConnection>
              <Method>
                <Allow>onStatus</Allow>
              </Method>
            </NetConnection>
            <SharedObject>
              <Method>
                <Allow></Allow>
              </Method>
            </SharedObject>
            <Stream>
              <Method>
                <Allow>onStatus</Allow>
              </Method>
            </Stream>
          </RPC>
        </Security>
            </JSEngine>
            <StreamManager>
                    <StorageDir></StorageDir>
                    <QualifiedStreamsMapping enable="false" />
                    <DuplicateDir appName="true"></DuplicateDir>
                    <CachePrefix type="path">?IP?</CachePrefix>
                    <CacheUpdateInterval></CacheUpdateInterval>
                    <MaxBufferRetries>128</MaxBufferRetries>
                    <ThrottleBoundaryRequest enable="false">8</ThrottleBoundaryRequest>
                    <ThrottleLoads enable="true">8</ThrottleLoads>
                    <ThrottleDisplayInterval>64</ThrottleDisplayInterval>
                    <EnhancedSeek zone="client">true</EnhancedSeek>
                    <KeyFrameInterval>60000</KeyFrameInterval>
                    <MaxStreamsBeforeGC>-1</MaxStreamsBeforeGC>
                    <Audio>
                            <CombineSamples>
                                    <Subscribers>8</Subscribers>
                                    <LoCPU>60</LoCPU>
                                    <HiCPU>80</HiCPU>
                                    <MaxSamples>0</MaxSamples>
                            </CombineSamples>
                            <SendSilence>
                                    <Interval></Interval>
                            </SendSilence>
                            <NotifyAudioStop enabled="false">
                                    <Duration></Duration>
                            </NotifyAudioStop>
                    </Audio>
                    <Live>
                            <AccumulatedIFrames>
                                    <MaxTime>-1</MaxTime>
                                    <MaxSize>-1</MaxSize>
                            </AccumulatedIFrames>
                            <Queue enabled="true">
                                    <MaxQueueSize>4096</MaxQueueSize>
                                    <MaxQueueDelay>500</MaxQueueDelay>
                                    <FlushOnData>true</FlushOnData>
                                    <AggregateMessages enabled="true">
                                            <MaxAggMsgSize>-1</MaxAggMsgSize>
                                    </AggregateMessages>
                            </Queue>
                            <PublishTimeout>2000</PublishTimeout>
                            <MaxLatency>500</MaxLatency>
                            <StartClockOnPublish>false</StartClockOnPublish>
                            <EraseOnPublish>true</EraseOnPublish>
                    </Live>
                    <SendDuplicateStart>true</SendDuplicateStart>
                    <SendDuplicateOnMetaData>true</SendDuplicateOnMetaData>
                    <Recording>
                            <MaxSize>-1</MaxSize>
                            <MaxSizeCap>-1</MaxSizeCap>
                            <MaxDuration>-1</MaxDuration>
          <MaxDurationCap>-1</MaxDurationCap>
      </Recording>
            </StreamManager>
            <SharedObjManager>
                    <StorageDir></StorageDir>
                    <DuplicateDir appName="true"></DuplicateDir>
                    <ResyncDepth>-1</ResyncDepth>
                    <LockTimeOut>-1</LockTimeOut>
                    <AutoCommit>true</AutoCommit>
                    <MaxProperties>-1</MaxProperties>
                    <MaxPropertySize>-1</MaxPropertySize>
            </SharedObjManager>
            <AllowHTTPTunnel>true</AllowHTTPTunnel>
            <Client>
                    <WindowsPerAck>2</WindowsPerAck>
                    <Bandwidth override="yes">
                            <ServerToClient>2500000</ServerToClient>
                            <ClientToServer>2500000</ClientToServer>
                    </Bandwidth>
                    <BandwidthCap override="no">
                            <ServerToClient>5000000</ServerToClient>
                            <ClientToServer>5000000</ClientToServer>
                    </BandwidthCap>
        <BandwidthDetection enabled="true">
          <MaxRate>-1</MaxRate>
          <DataSize>16384</DataSize>
          <MaxWait>2</MaxWait>
        </BandwidthDetection>
                    <MsgQueue>
                            <Live>
                                    <MaxAudioLatency>2000</MaxAudioLatency>
                                    <MinBufferTime>8000</MinBufferTime>
                            </Live>
                            <Recorded>
                                    <MinBufferTime>2000</MinBufferTime>
                            </Recorded>
                            <Server>
                                    <BufferRatio>0.5</BufferRatio>
                                    <Prioritization>false</Prioritization>
                                    <MinQueuedVideo>64</MinQueuedVideo>
                            </Server>
                            <Diagnostic>
                                    <Enable>false</Enable>
                            </Diagnostic>
                    </MsgQueue>
                    <HTTPTunnel>
                            <IdlePostInterval>512</IdlePostInterval>
                            <IdleAckInterval>512</IdleAckInterval>
                            <MimeType>application/x-fcs</MimeType>
                            <WriteBufferSize>16</WriteBufferSize>
                    </HTTPTunnel>
                    <MaxMessageSizeLosslessVideo>0</MaxMessageSizeLosslessVideo>
                    <OutChunkSize>4096</OutChunkSize>
                    <AggregateMessages enabled="true"></AggregateMessages>
                    <Access>
                            <FolderAccess>false</FolderAccess>
                            <AudioSampleAccess enabled="false"></AudioSampleAccess>
                            <VideoSampleAccess enabled="false"></VideoSampleAccess>
                    </Access>
                    <UserAgent override="yes">
                            <Bits from="WIN 6,0,0,0" to="WIN 7,0,55,0">0x01</Bits>
                            <Bits from="MAC 6,0,0,0" to="MAC 7,0,55,0">0x01</Bits>
                    </UserAgent>
            </Client>
            <Debug>
                    <MaxPendingDebugConnections>50</MaxPendingDebugConnections>
                    <AllowDebugDefault>false</AllowDebugDefault>
            </Debug>
            <HTTP>
                    <HTTP_1_0>false</HTTP_1_0>
                    <Verbose>false</Verbose>
                    <Connections>
                            <MaxTimeout>60</MaxTimeout>
                            <Reuse>true</Reuse>
                            <Interface></Interface>
                    </Connections>
                    <Proxy>
                            <Host></Host>
                            <Port></Port>
                            <Type>HTTP</Type>
                            <Tunnel>false</Tunnel>
                            <Username></Username>
                            <Password></Password>
                    </Proxy>
                    <Redirect>
                            <Allow>true</Allow>
                            <Max>10</Max>
                            <UnrestrictedAuth>true</UnrestrictedAuth>
                    </Redirect>
            </HTTP>
            <SWFVerification enabled="false">
                    <SWFFolder></SWFFolder>
                    <MinGoodVersion></MinGoodVersion>
                    <DirLevelSWFScan>1</DirLevelSWFScan>
                    <MaxInitDelay>5</MaxInitDelay>
                    <FirstHashTimeout>5</FirstHashTimeout>
                    <FinalHashTimeout>60</FinalHashTimeout>
                    <UserAgentExceptions>
                            <Exception from="" to=""/>
                    </UserAgentExceptions>
                    <Cache>
                            <TTL>1440</TTL>
                            <UpdateInterval>5</UpdateInterval>
                    </Cache>
                    <ConnectionBlocking enabled="false"/>
            </SWFVerification>
            <Logging>
                    <Access>
                            <Checkpoints enable="false">
                                    <LogInterval>3600</LogInterval>
                            </Checkpoints>
                            -->
                    </Access>
            </Logging>
            <DisallowedProtocols></DisallowedProtocols>
    </Application>
    Vhost.xml
    <VirtualHost>
            <AliasList>
                    <Alias name="alias1"></Alias>
            </AliasList>
            <AppsDir>${VHOST.APPSDIR}</AppsDir>
            <ResourceLimits>
                    <MaxConnections>-1</MaxConnections>
                    <MaxEdgeConnections>-1</MaxEdgeConnections>
                    <MaxAppInstances>15000</MaxAppInstances>
                    <MaxStreams>250000</MaxStreams>
                    <MaxSharedObjects>50000</MaxSharedObjects>
                    <AppInstanceGC>-1</AppInstanceGC>
            </ResourceLimits>
            <VirtualKeys>
            </VirtualKeys>
            <VirtualDirectory>
                    <Streams></Streams>
            </VirtualDirectory>
            <DNSSuffix></DNSSuffix>
            <Allow>all</Allow>
            <Proxy>
                    <Mode>local</Mode>
                    <RequestTimeout>2</RequestTimeout>
                    <Anonymous>false</Anonymous>
                    <CacheDir enabled="false" useAppName="true">
                            <Path></Path>
                            <MaxSize>32</MaxSize>
                    </CacheDir>
                    <LocalAddress></LocalAddress>
                    <RouteTable protocol="">
                            <RouteEntry></RouteEntry>
                    </RouteTable>
                    <EdgeAutoDiscovery>
                            <Enabled>false</Enabled>
                            <AllowOverride>true</AllowOverride>
                            <WaitTime>1000</WaitTime>
                    </EdgeAutoDiscovery>
                    <SSL>
                            <SSLVerifyCertificate>true</SSLVerifyCertificate>
                            <SSLCACertificatePath></SSLCACertificatePath>
                            <SSLCACertificateFile></SSLCACertificateFile>
                            <SSLVerifyDepth>9</SSLVerifyDepth>
                            <SSLCipherSuite>ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH</SSLCipherSuite>
                    </SSL>
                    -->
                    <AggregateMessages enabled="true">
                    </AggregateMessages>
            </Proxy>
            <Logging>
                    <Access>
                            <Checkpoints enable="false">
                                    <LogInterval>3600</LogInterval>
                            </Checkpoints>
                            -->
                    </Access>
            </Logging>
    </VirtualHost>

    Hello guys,
    thanks for replying.
    All intances spent 24h playing/streaming as expected but today some of them went down.
    Any idea why this core is being deactivated?
    master.log
    2011-04-20      16:30:54        16109   (i)2581172      System memory load (90) is now below the maximum threshold.     -
    2011-04-20      16:30:55        16109   (w)2581171      System memory load (91) is high.        -
    2011-04-20      18:36:18        16109   (i)2581226      Edge (16129) is no longer active.       -
    2011-04-20      18:36:18        16109   (w)2581255      Edge (16129) _defaultRoot__edge1 experienced 1 failure[s]!      -
    2011-04-20      18:36:18        16109   (i)2581224      Edge (28483) started, arguments : -edgeports ":1935,80" -coreports "localhost:19350" -conf "/opt/adobe/fms/conf/Server.xml" -adaptor "_defaultRoot_" -name "_defaultRoot__edge1".        -
    2011-04-20      18:53:25        16109   (i)2581223      Core (16132) is no longer active.       -
    2011-04-20      18:53:25        16109   (i)2581221      Core (28621) started, arguments : -adaptor "_defaultRoot_" -vhost "_defaultVHost_" -app "registry" -inst "registry" -tag  -conf "/opt/adobe/fms/conf/Server.xml" -name "_defaultRoot_:_defaultVHost_:registry:registry:".-
    2011-04-20      18:57:25        16109   (i)2581223      Core (28621) is no longer active.       -
    2011-04-20      18:57:25        16109   (i)2581221      Core (28814) started, arguments : -adaptor "_defaultRoot_" -vhost "_defaultVHost_" -app "registry" -inst "registry" -tag  -conf "/opt/adobe/fms/conf/Server.xml" -name "_defaultRoot_:_defaultVHost_:registry:registry:".-
    2011-04-20      19:00:15        16109   (i)2581172      System memory load (61) is now below the maximum threshold.     -
    2011-04-20      19:00:28        16109   (i)2581223      Core (16752) is no longer active.       -
    2011-04-20      19:00:28        16109   (w)2581256      Core (16752) _defaultRoot_:_defaultVHost_:::_1 experienced 1 failure[s]!        -
    2011-04-20      19:00:28        16109   (i)2581221      Core (29004) started, arguments : -adaptor "_defaultRoot_" -vhost "_defaultVHost_" -app  -inst  -tag "_1" -conf "/opt/adobe/fms/conf/Server.xml" -name "_defaultRoot_:_defaultVHost_:::_1".     
    core.log
    2011-04-20      16:30:56        16132   (w)2581171      System memory load (91) is high.        -
    2011-04-20      18:36:16        16752   (i)2581247      Core (16752) disconnected from edge.    -
    2011-04-20      18:36:16        16548   (i)2581247      Core (16548) disconnected from edge.    -
    2011-04-20      18:36:16        16962   (i)2581247      Core (16962) disconnected from edge.    -
    2011-04-20      18:36:16        16132   (i)2581247      Core (16132) disconnected from edge.    -
    2011-04-20      18:36:21        16962   (i)2581246      Core (16962) sending register cmd to edge.      -
    2011-04-20      18:36:21        16752   (i)2581246      Core (16752) sending register cmd to edge.      -
    2011-04-20      18:36:21        16548   (i)2581246      Core (16548) sending register cmd to edge.      -
    2011-04-20      18:36:22        16132   (i)2581246      Core (16132) sending register cmd to edge.      -
    #Date: 2011-04-20
    #Fields: date   time    x-pid   x-status        x-ctx   x-comment
    2011-04-20      18:53:27        28621   (i)2581246      Core (28621) sending register cmd to edge.      -
    2011-04-20      18:53:30        28621   (w)2581171      System memory load (99) is high.        -
    #Date: 2011-04-20
    #Fields: date   time    x-pid   x-status        x-ctx   x-comment
    2011-04-20      18:57:27        28814   (i)2581246      Core (28814) sending register cmd to edge.      -
    2011-04-20      18:57:29        28814   (w)2581171      System memory load (99) is high.        -
    2011-04-20      19:00:16        16962   (i)2581172      System memory load (61) is now below the maximum threshold.     -
    2011-04-20      19:00:15        28814   (i)2581172      System memory load (66) is now below the maximum threshold.     -
    2011-04-20      19:00:16        16548   (i)2581172      System memory load (61) is now below the maximum threshold.     -
    #Date: 2011-04-20
    #Fields: date   time    x-pid   x-status        x-ctx   x-comment
    2011-04-20      19:00:29        29004   (i)2581237      Starting admin app on core (29004).     -
    2011-04-20      19:00:29        29004   (i)2581238      Core (29004) connecting to admin.       -
    2011-04-20      19:00:29        29004   (i)2581231      Core (29004) connected to admin.        -
    2011-04-20      19:00:29        29004   (i)2581234      Core (29004) connection to admin accepted.      -
    2011-04-20      19:00:29        29004   (i)2581246      Core (29004) sending register cmd to edge.      -
    # free -m
                 total       used       free     shared    buffers     cached
    Mem:          7993       6076       1917          0          4         34
    -/+ buffers/cache:       6037       1956
    Swap:         3147       1558       1589
    thank you!

  • Security sandbox violation: BitmapData.draw on CloudFront/S3.

    I'm using Cloudfront/AS3 to stream some video in RTMP.
    When I try to do a Bitmap.draw, I get this error:
    [Fault] exception, information=SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: [my_url] cannot access unknown URL. No policy files granted access.
    Since there is no Application.xml, I can't change the <VideoSampleAccess />.
    My crossdomain.xml is available.
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/> 
    <allow-access-from domain="*"/>
    <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
             </cross-domain-policy>
    My bucket policy is:
      "Version": "2008-10-17",
      "Statement": [
          "Sid": "AddPerm",
          "Effect": "Allow",
          "Principal": {
            "AWS": "*"
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::[my url]/*",
          "Condition": {}
    And this is my CORS configuration:
    <CORSConfiguration>
        <CORSRule>
            <AllowedOrigin>*</AllowedOrigin>
            <AllowedMethod>GET</AllowedMethod>
            <MaxAgeSeconds>3000</MaxAgeSeconds>
            <AllowedHeader>Authorization</AllowedHeader>
        </CORSRule>
    </CORSConfiguration>
    Not sure what I must change to give myself access.
    Thanks
    Martin

    If you don't have access to the server - you will not be able to accomplish BitmapData.draw() on the video or any of its parents. The policy error refers to streaming server side policy. If you look into RTMP traffic - you will see at what point security request goes.
    I don't know what range of services Amazon cloud offers but I could imagine that, since they do offer pretty granular access to application instances, at some level it is possible to gain access to the server or engage their support to help you. I may be wrong though.

  • Admin api - getLiveStreams showing duplicate streams.

    I'm calling the FMS 4.5.2 admin api method getLiveStreams for an application instance but it seems to return a duplicate entry for each stream.
    Is this normal behavior or a bug? My results from the call are below. I'm encoding and pushing 4 streams to the server but it shows 8 streams.
    <?xml version="1.0" encoding="utf-8" ?>
    - <result>
    <level>status</level>
    <code>NetConnection.Call.Success</code>
    <timestamp>8/8/2013 10:39:12 AM</timestamp>
    <name>_defaultRoot_:_defaultVHost_:::_0</name>
    - <data>
    <_0>mbhsstream1</_0>
    <_1>mbhsstream2</_1>
    <_2>mbhsstream3</_2>
    <_3>mbhsstream4</_3>
    <_4>mbhsstream1</_4>
    <_5>mbhsstream2</_5>
    <_6>mbhsstream3</_6>
    <_7>mbhsstream4</_7>
    </data>
    </result>

    I am not sure how your linked post should help me. I have no problem connecting as an administrator to our own service.
    My question is can I play streams through this administrator connection on port 1111, or like now, I have to keep a separate connection to the application in order to play application's streams?
    I do NOT want to connect to the application, because I then am forced to become one of its "users", even though I am not - I am an admin. Even though I have implemented roles with my application server side script, whereas users connect with a bunch of parameters, I can connect with another role - as an admin, without parameters (because they do not apply to me since I only use the service for playing streams). Another reason is actually pretty annoying - even though I explicitly specify video sample access permission for both myself and any user that connects (in order to be able to take snapshots of the videos) using the "videoSampleAccess = '/'" expression, occasionally I STILL get security errors. I imagine if I somehow can bypass the security altogether. After all it is our server, and our users know that we need to monitor for unsuitable content. FMS makes it pretty hard to do so with the error listed above. The error is sporadic.
    So I will ask again - can I play any stream I want of any application on my server, without connecting to the application instance as a regular user bound to security rules? I need some form of video administration, and I am NOT using Administration console, but a custom admin. application which does more than Admin console does, in particular kick out bad people.

  • Live streaming stops automatically after 15 minutes

    I am using flash media server 3 and flash media encoder 2.5.
    From media encoder I am sending data to media server and then in
    browser I am running flex application (version 3) to view the live
    stream. I am not saving it in flv file. After 15 mintues live
    streaming stops automatically. I have tested all events related to
    it..but none of them executes..Flex3 application is just working as
    a client.
    Portion of code:
    nc.connect ("rtmp://localhost/myLiveApp/instance1/");
    vid.attachNetStream (ns);
    ns.play("flv:mylivestream");
    case "NetStream.Play.StreamNotFound" :
    /*The FLV passed to the play() method can't be found. */
    mx.controls.Alert.show("stream not found");
    break;
    code in main.asc file :
    application.onAppStart = function()
    // generate random payload used in bw detection
    this.payload = new Array();
    for (var i=0; i<1200; i++){
    this.payload
    = Math.random(); //16K approx
    application.onConnect = function(p_client, p_autoSenseBW)
    //Add security here
    //p_client.writeAccess = ""; // prevents creating shared
    object or live streams.
    this.acceptConnection(p_client);
    p_client.audioSampleAccess = "/";
    p_client.videoSampleAccess = "/";
    if (p_autoSenseBW)
    this.calculateClientBw(p_client);
    else
    p_client.call("onBWDone");
    Client.prototype.getStreamLength = function(p_streamName) {
    return Stream.length(p_streamName);
    Client.prototype.checkBandwidth = function() {
    application.calculateClientBw(this);
    application.calculateClientBw = function(p_client)
    var res = new Object();
    res.latency = 0;
    res.cumLatency = 1;
    res.bwTime = 0;
    res.count = 0;
    res.sent = 0;
    res.client = p_client;
    var stats = p_client.getStats();
    var now = (new Date()).getTime()/1;
    res.pakSent = new Array();
    res.pakRecv = new Array();
    res.beginningValues = {b_down:stats.bytes_out,
    b_up:stats.bytes_in, time:now};
    res.onResult = function(p_val) {
    var now = (new Date()).getTime()/1;
    this.pakRecv[this.count] = now;
    trace("** onResult this.count = " + this.count + " :
    this.sent " + this.sent);
    //trace( "Packet interval = " + (this.pakRecv[this.count] -
    this.pakSent[this.count])*1 );
    this.count++;
    var timePassed = (now - this.beginningValues.time);
    if (this.count == 1) {
    this.latency = Math.min(timePassed, 800);
    this.latency = Math.max(this.latency, 10);
    //trace("count = " + this.count + ", sent = " + this.sent +
    ", timePassed = " + timePassed);
    // If we have a hi-speed network with low latency send more
    to determine
    // better bandwidth numbers, send no more than 6 packets
    if ( this.count == 2 && (timePassed<2000))
    this.pakSent[res.sent++] = now;
    this.cumLatency++;
    this.client.call("onBWCheck", res, application.payload);
    else if ( this.sent == this.count )
    // See if we need to normalize latency
    if ( this.latency >= 100 )
    { // make sure we detect sattelite and modem correctly
    if ( this.pakRecv[1] - this.pakRecv[0] > 1000 )
    this.latency = 100;
    // Got back responses for all the packets compute the
    bandwidth.
    var stats = this.client.getStats();
    var deltaDown = (stats.bytes_out -
    this.beginningValues.b_down)*8/1000;
    var deltaTime = ((now - this.beginningValues.time) -
    (this.latency * this.cumLatency) )/1000;
    if ( deltaTime <= 0 )
    deltaTime = (now - this.beginningValues.time)/1000;
    var kbitDown = Math.round(deltaDown/deltaTime);
    trace("onBWDone: kbitDown = " + kbitDown + ", deltaDown= " +
    deltaDown + ", deltaTime = " + deltaTime + ", latency = " +
    this.latency + "KBytes " + (stats.bytes_out -
    this.beginningValues.b_down)/1024) ;
    this.client.call("onBWDone", null, kbitDown, deltaDown,
    deltaTime, this.latency );
    res.pakSent[res.sent++] = now;
    p_client.call("onBWCheck", res, "");
    res.pakSent[res.sent++] = now;
    p_client.call("onBWCheck", res, application.payload);
    What is the problem? From media server console I can see 2
    connection for 15 minutes and after that it drops to 1.
    I have tested it with medium and low bandwith.
    Any help is appreciated.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Maybe you are looking for