Skip to main content
Participating Frequently
January 8, 2010
Question

subfolders in the vod/media folder?

  • January 8, 2010
  • 3 replies
  • 3528 views

I have Flash Media Server (newbie). I've created subfolders within the applications vod/media folder but cannot view the flv files when browsed. The flv file is being seen (via DW detect size) but just gives me a blank player in the browser. Can subfolder be made or am I doing something wrong? The same flv displays correctly when accessed via the root of /media. ?

    This topic has been closed for replies.

    3 replies

    Participant
    March 24, 2011

    I'm used next media link

    rtmp://fms-site.com/vod/flv:subfolder1/subfolder2/file

    rtmp://fms-site.com/vod/mp4:subfolder1/subfolder2/file.f4v

    And it's work!

    Inspiring
    March 24, 2011

    I am trying to play one recorded FLV file thorugh FMS 2.0.5. I am getting below traces

    event.info.level: status
    event.info.code: NetConnection.Connect.Success
    event.info.level: status
    event.info.code: NetStream.Play.Reset
    event.info.level: status
    event.info.code: NetStream.Play.Start
    ** NetStream.Play.Start
    Object encoding: 0
    liveDelay: 0
    FPS: 0
    checkPolicyFile: false
    bytesLoaded: 0
    bytesTotal: 0
    bufferLnegth: 0
    bufferTime: 0
    event.info.level: status
    event.info.code: NetStream.Unpause.Notify
    event.info.level: status
    event.info.code: NetStream.Play.Start
    ** NetStream.Play.Start
    Object encoding: 0
    liveDelay: 0
    FPS: 0
    checkPolicyFile: false
    bytesLoaded: 0
    bytesTotal: 0
    bufferLnegth: 0
    bufferTime: 0

    This shows that my file is being played but i am not getting display in the video container. Here is the code :-

    package {
        import flash.display.Sprite;
        import flash.net.NetConnection;
        import flash.events.NetStatusEvent;
        import flash.net.NetStream;
        import flash.media.Video;
        import flash.net.ObjectEncoding;
        public class MediaPlayer extends Sprite
        {
            private var nc:NetConnection;
            private var ns:NetStream;
            private var video:Video;
            public function MediaPlayer()
            {
                NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                nc.connect("rtmp://localhost/vid2/");
                //nc.connect(null)
            }
            private function netStatusHandler(event:NetStatusEvent):void
            {
            trace("event.info.level: " + event.info.level + "\n", "event.info.code: " + event.info.code);
                switch (event.info.code){
                    case "NetConnection.Connect.Success":
                        // Call doPlaylist() or doVideo() here.
                        connectStream(nc);
                         break;
                    case "NetConnection.Connect.Failed":
                        // Handle this case here.
                        break;
                    case "NetConnection.Connect.Rejected":
                        // Handle this case here.
                        break;
                     case "NetStream.Play.Stop":
                        // Handle this case here.
                        break;
                     case "NetStream.Play.StreamNotFound":
                        // Handle this case here.
                        break;
                   
                     case "NetStream.Play.Reset":
                               ns.resume();
                        
                               break;
                    case "NetStream.Play.Start":
                               trace ("** NetStream.Play.Start");
                               trace ("Object encoding: " + ns.objectEncoding);
                               trace ("liveDelay: " + ns.liveDelay);
                               trace ("FPS: " + ns.currentFPS);
                               trace ("checkPolicyFile: " + ns.checkPolicyFile);
                               trace ("bytesLoaded: " + ns.bytesLoaded);
                               trace ("bytesTotal: " + ns.bytesTotal);                           
                               trace ("bufferLnegth: " + ns.bufferLength);
                               trace ("bufferTime: " + ns.bufferTime);
                               break;
                              
                     case "NetStream.Publish.BadName":
                         trace("The stream name is already used");
                        // Handle this case here.
                         break;
                 }
            }
            private function connectStream(nc:NetConnection):void
            {
                ns = new NetStream(nc);
                ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                //ns.client = new CustomClient();
                vid1.attachNetStream(ns);
                ns.play("test.flv");
            }

        }

    }

    Can any body suggest in which direction i have to try. Is their any need to put main.asc file on the server for this functionality.

    Please help us.

    Participant
    March 13, 2011

    I have the same problem!!!  Please help?

    I put some video files in f4v format in subdirectories in a vod folder. I can see the files playing fine localy (c:/program files/adobe/fms/vod/folder1-10/videofile.htm) but I can not  see them on the web: www.site.com/vod/folder1-10/videofile.htm, looks like the player trying to start and then I get an black screen "we are having problems with playback. sorry for the inconvenience"... The htm file refers to an f4m file where I have several streams.

    It used to play fine until I got some updates from ms and messed it up.

    Please help!

    Participating Frequently
    March 14, 2011

    Is it possible to paste the contents of your .f4m file ?

    Participant
    March 19, 2011

    Thank you for your reply,

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns="http://ns.adobe.com/f4m/1.0">
        <id>MBR</id>
        <mimeType>video/mp4</mimeType>
        <streamType>recorded</streamType>
        <media url="rtmp://fms-site.com/vod/mp4:subdirectory/2k.f4v"  bitrate="2000" />
    </manifest>


    Looks like the player tries to start, then it stops and I get the message "we are unable to connect to the network" or "we are having problems with playback"

    January 8, 2010

    Sure... you can use child folders within a streams directory.

    I suspect the problem is that you're not defining an application instance name in your RTMP url. Keep in mind that FMS supports dynamic application instances, so unless your player is set up to insert an application instance name, adding a folder path to your player might be telling FMS to create a named instance rather than playing a stream with a folder in the path.

    Try adding _definst_ as you app instance name in your url. For example, let's say your video file is located at media/myfolder/somefile.flv, and let's assume you're using the preinstalled vod application . Try using the following url format

    rtmp://myfmshost.com/vod/_definst_/myfolder/somefile

    If that doesn't work, we'll need to dig into your player to figure out where you're going wrong.

    FXIncAuthor
    Participating Frequently
    January 8, 2010

    Thank Jay,

    I'll give it a try.

    Jason