Skip to main content
January 28, 2010
Question

FMS streaming from a mounted folder and its subfolders

  • January 28, 2010
  • 2 replies
  • 1196 views

FMS Question about streaming from a mounted folder which has sub-folders:

I have an FMS running with the following configuration:
1. App named video ( duplicated as per instructions here: http://bit.ly/bgGRUI)
2. VirtualDirectory set as follows

<VirtualDirectory>
    <Streams>/;C:\media</Streams>
</VirtualDirectory

3. The folder media has the following structure

media\movie\genre\1
media\tv\genre\2
media\web\genre\3

example: c:\media\movie\genre\1\sample.flv

where the path is known to the client, and I just wanted to map the root folder.

( this is not yet on the network, just testing locally)

4. Here is how I plan to stream the video from the FlVPlayer on the client side.

rtmp://localhost/<appname>/<instancename>/<file-path>/file

example

rtmp://localhost/video/mystream/movie/genre/1/sample.flv

note that the suggestion for using instance name for mapped folders came from fmsguru here ()

When I try to the play the video, this is what I see:

1. Player unable to play the video
2. Server sees a hit but nothing streams ( see 0 bytes sreamed from log file)

Since it is local, I am right now focusing on FMS, and avoiding
- firewall issues ( I will have to open ports 1935, 1111 and 8134 eventually)
- folder access issues ( same host: although I need to be able to mount remote folders eventually)

3. server sees a request, thinks it is playing the video.

What I am doing wrong here? Can someone explain please? I have spent a lot of time trying to debug this to no avail. This is very frustrating. Appreciate feedback and help troubleshooting this.

Thanks in advance

    This topic has been closed for replies.

    2 replies

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    January 29, 2010

    Hi,

    The problem is with the 'VirtualDirectory > Streams' settings in your configuration xml file. We have to correct two things over there.

    1. You have mapped "/" to "C:\media". But your stream sits in the subfolder of "C:\media" and not directly within it.

    2. Also you have the stream path in the connection directory which does not have any mapping in the VirtualDirectory settings. From your URL "rtmp://localhost/video/mystream/movie/genre/1/sample.flv", i assume 'video' - appname and 'mystream' - instance name. so the file path is "movie/genre/1/sample.flv". To get this url working you should have the following settings in VirtualDirectory.

    <VirtualDirectory>
        <Streams>movie/genre/1/;C:\media\movie\genre\1\</Streams>
    </VirtualDirectory

    It can even be like "rtmp://localhost/video/mystream/movie_genre_1/sample.flv", with corresponding VirtualDirectory settings as "<Streams>movie_genre_1/;C:\media\movie\genre\1\</Streams>
    "... to have simpler connection url.

    I hope this helps.

    Regards,

    Janaki L

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    January 29, 2010

    For more details about the VirtualDirectory settings, refer "CONFIGURATION AND ADMINISTRATION GUIDE " of FMS.

    Regards,

    Janaki L

    Participating Frequently
    January 29, 2010

    How are you trying to play the video? Are you using your own swf or sample

    video player ?  I have seen people having problems with sample

    player with this large url rtmp://localhost/<appname>/<instancename>/<file-path>/file.

    To identify the issue you can try this:

    1) Have  a virtual directory mapping

    <VirtualDirectory>
        <Streams>/;C:\media</Streams>
    </VirtualDirectory

    2) place a video in the C:\media. For example C:\media\myvideo.flv

    3) now play with this url rtmp://localhost/<appname>/myvideo  (  instancename would be automatically _definst _ ).

    This will give hint that your virtual directory mapping are working.

    4) Go for adding folder inside C:\media . See if it works. If it don't then the player is not parsing the media name and the app/instance name.

    Another option is to build your own swf. Use nc.connect(" rtmp://localhost/<appname>/<instancename>")

    and play file by using netstream

    ns.play("file-path");

    February 2, 2010

    You are right, virtual directory is working fine, and long filenames are a problem for any flv player I could download. Is there a desktop flv player that can play long urls? ( rtmp://... .f4v etc). That would be really helpful to debug this issue.

    It seems that Adobe Media Player seems to be able to play only local files. Is there a trick I am missing here?

    Thanks in advance!

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    February 3, 2010

    Your virtual directory works! Hurray!

    Player for long url? which player are you using that limits the size of the url? can you pls give me more details on this? what is the max length that it allows?

    Are you missing something in the connection url. For f4v/mp4 files, you should prefix the stream name with "mp4:"., i.e., "rtmp://servername/app/mp4:stream1.f4v" or "rtmp://servername/app/mp4:stream1.mp4". For flv streams this can be omitted. Similarly for 'raw' format, you should prefix the stream name with "raw:".

    Adobe Media Player requires little more settings/setup to make a connection ot FMS. You can use VideoPlayer that comes with FMS. It is located at "\$Root\Flash Media server(Installed Dir)\samples\videoPlayer\videoplayer.html".

    I hope this helps,

    Regards,

    Janaki L