Skip to main content
Participant
May 23, 2010
Question

dynamic subfolders in streams?

  • May 23, 2010
  • 3 replies
  • 496 views

We haven't had success in attempting to dynamically generate subfolders within the streams folder for our file storage. we expect lots of files over time and wanted a nice way to organize things. has anyone ever had trouble with this? we tried:

streams/

  subfolder/

        file...

        file...

also tried

streams/

  subfolder/

     subfolder/

        file...

        file...

but when passing a folder name to fms it gets ignored. without a technical solution i'm looking at a manual cleanup process.

    This topic has been closed for replies.

    3 replies

    Participating Frequently
    May 24, 2010

    It would be nice if you can elaborate what you want to achieve. Are you saying you have bunch of files (pre-recorded) and you are placing them in different sub-folders or are you saying you are recording on the fly and recording should go in particular sub-folder.

    If you are trying to achieve first case, i think there should not be any issue , also you need not do any configuration. Say if you have places "foo.flv" inside "folder1" under "streams/_definst_" folder , you can play it by giving stream name "folder1/foo".

    I think you might be doing one thing wrong in your set-up. You might be connecting using uri like "rtmp://<server-uri>/<app-name>" and trying to play stream by name "subfolder/file". So the problem here is its connecting to "_definst_" instance of <app-name> and trying to find "subfolder" inside "streams/_definst_" - it does not find any and gives stream not found.

    You can solve above by either creating "subfolder" inside "streams/_definst_" OR keep the folder structure same and connect to Uri like "rtmp://<server-uri>/<app-name>/subfolder"

    Try out what i said and let me know if that solves the issue. Also if does not , like i requested describe in detail what you want to achieve and also tell me what exactly you are trying out.

    Petro_O__Bochan
    Inspiring
    May 24, 2010

    I haven't seen your code but I ponder your app might be in the wrong namespace. U state 'streams->subfolder...', subfolder should be your app's instance name (_definst_ by default), u can name it whatever u want (event 'subfolder'). Once connected to that instance you can indicate to your NetStream.play() method whatever the path - in your case: ns.play('file') or ns.play('subfolder/file'). Also, make sure u know how u recorded files. Unlike the flvplayback component, the NetStream.play() method deos require file extension (or even the playback command prefix) in case that file was recorded with the extension e.g,. .flv / .mp4.

    calmchessplayer
    Inspiring
    May 23, 2010

    on server side you can create and delte folder/files usning the file object I think you will probably have to go into the flash configuration files to set virtual directories to be able to stream out of them but then again i've created what you need and i stream out of the folders just fine i wish i had my code snippets with me i'd give you code but i don't go back to the office untill wednesday