Skip to main content
Participant
March 9, 2007
Question

virtual directory

  • March 9, 2007
  • 6 replies
  • 1253 views
Hello! I'm having a hard time getting the virtual directory to work.

Here's the setup:
On my FMS computer, I have flvs located in the folder: X:\flash
So, in the Macromedia/FMS/conf/_defaultroot_/defaultVHost_/vhost.xml, I made a virtual directory like this:
<Streams>lrc;X:\flash</Streams>
And then, in my flash, I set the contentpath to be: rtmp://myUrl/lrc/flvname
I'm using FMS 2.0.3
But its not working. Can anyone tell me what I'm doing wrong? Does there need to be a main.asc somewhere in there?

Thank you very much!

-Heather Larkin
    This topic has been closed for replies.

    6 replies

    Participating Frequently
    November 19, 2008
    That's great! Thanks for the update.
    Inspiring
    November 19, 2008
    just a weird note as well --

    when testing in the flash player (ctrl-enter) sometimes, i cant get the app to test correctly until i use File>Publish Preview>HTML.

    Not sure why this is happening, however someone else might have some issues that this could solve so i thought id note it here.

    thanks
    Participating Frequently
    April 2, 2007
    Thanks for the reply! I believe I've figured out what I was doing wrong.

    The virtual directory needs to be in the stream name itself, rather than the initial connection. So the .connect parameter would be "rtmp://ipaddy/appname/appinstance"
    and the stream name, when I reference it would just be:
    "videos/whatever.flv"

    I've found it also helps to have the FLVPlayback main.asc in the app folder, like usuhamlet says.

    Thanks again,
    Joe
    Inspiring
    November 19, 2008
    Hello,

    Im having some trouble setting up my virtual directory.

    Ive modified the vhost.xml <virtualdirectory> in conf\_defaultRoot_\_defaultVHost_ tag with:

    <Streams>music;D:\PATH\music</Streams>

    for my connection im using

    "rtmp://IPADDRESS:1935/music";

    i can connect successfully to the server, however im getting a stream not found.

    in my virtual directory, how do i structure the directories? I am planning on using the following:

    D:\PATH\music\1
    D:\PATH\music\2
    D:\PATH\music\3

    where the media files will be stored in each numbered directory.

    do all my media files need to be in

    D:\PATH\music

    or can i make subdirectories and target them using

    "rtmp://IPADDRESS:1935/music/1";
    "rtmp://IPADDRESS:1935/music/2";
    "rtmp://IPADDRESS:1935/music/3";

    do i need to follow the directory structure of the root application in each as follows?

    D:\PATH\music\1\streams\_definst_
    D:\PATH\music\2\streams\_definst_
    D:\PATH\music\3\streams\_definst_

    Any help would be appreciated.

    thanks!
    Participating Frequently
    November 19, 2008
    I've moved on to Flash Streaming Server v3, and I think the connection syntax has changed. Which version are you using?

    For example, if your server's IP is 192.168.1.32 your app name is Jukebox, and the file you're playing is sinatra.mp3 stored in the D:\PATH\Music\2 folder, and you've set the virtual directory to map D:\PATH\Music to Jukebox, then...

    For v2:
    netconnection:
    "rtmp://192.168.1.32/jukebox/instance"
    streamname:
    "jukebox/2/sinatra.mp3"


    For v3
    You can do everything in one string, like so:
    rtmp://192.168.1.32/jukebox/mp3:/jukebox/2/sinatra.mp3;
    rtmp://IPADDY/APPNAME/STREAMTYPE:/VDir/SubDir/STREAM

    I *believe* that will work. YMMV.
    Participant
    April 2, 2007
    This is what I found while trying to get the VirtualDirectory to work on FMS 2. I had to leave the application directory in tact. I had no FLV files in it but otherwise it was the same. I also found that if I left out the main.asc file from the application root (ie. fms\applications\video\main.asc) then the videos would not stream from the virtual directory. The main.asc file I am using is actually the one from FCS 1.5 samples folder. Not sure if there is one for FMS 2.0. I have only tried this with recorded video and not live streams.

    The rtmp address is rtmp://myserver/videos/virtualdirectory/video file name.
    Hope this helps someone. If more detail is needed I will post more.

    Robert
    Participating Frequently
    March 26, 2007
    I'm having pretty much the same problem. I'm mapping e:\Flash\ to the alias "videos" (creative, I know)
    so my <VirtualDirectory> tag in vhost.xml has this in it:
    <Streams>videos;e:\Flash</Streams>

    Now, in my cliet side program, I'm calling "rtmp://ipaddy/appname/videos" as my content path, and then appending the flv names later.
    Clearly the correct syntax eludes me. Should I not substitute the alias for the instance name?
    Could someone give me a full example of a new NetConnection line?

    Thanks,

    --Joe
    funkysoul
    Inspiring
    March 14, 2007
    exactly how's it noted on the vhosts.xml
    Participant
    March 15, 2007
    you mean, like this:
    <Streams key="virtual key"><virtual directory>;actual directory></Streams>

    But what if I don't want to use a key?
    funkysoul
    Inspiring
    March 14, 2007
    you shouldn't change the <streams> line instead you should do it on the <virtualdirectory> one
    Participant
    March 14, 2007
    I'm not sure I follow. Can you type an example?