Skip to main content
Participant
May 16, 2012
Question

When using RTMP, only the sample files will stream?

  • May 16, 2012
  • 1 reply
  • 1021 views

I am using the exact same code and placing the f4v file in the same directory that the sample files are in, but if I change the name on the file it will not stream, connection error! Only plays the sample files?

    This topic has been closed for replies.

    1 reply

    May 16, 2012

    Hi,

    Firstly I wanted to clarify if you're gertting a connection error, i.e you're not able to make a connection to the application itself, or if you're getting an error when you try to play your stream (like Stream Not Found)?

    Since you've mentioned that you're able to play sample files, I'm assuming that you're able to make connections to the application successfully.

    Coming to the problem with playback of custom media, are you using the sample vod application to playback your files or are you copying the code into a different application and then using that?

    If you have copied the files from vod into a custom application then the application specific virtual directory mapping for recorded streams still points to that under the vod application. So you're able to play the sample files as they are present under root_install/applications/vod/media (the default media location for vod app) but not your f4v files placed in custom_application/media directory, as it is not looking in that folder.

    To point the virtual directory to a custom location, in the Application.xml of your application either change/add the following tag with the folder path :

    <Application>

              <StreamManager>

                        <VirtualDirectory>

          <!-- Specifies application specific virtual directory mapping for recorded streams.   -->

          <Streams>/;${VOD_COMMON_DIR}</Streams>  //default. Can be removed

          <Streams>/;${VOD_DIR}</Streams>                   //default. Can be removed

          <Streams>/;path_to_your_media_folder</Streams>      //add this

         

                        </VirtualDirectory>

              </StreamManager>

    After this Resart FMS and retry. You should now be able to play your media.

    The same holds for the live application. The folder where the published streams are mapped points to the live application folder. If you have a custom application you can edit this path the same way.

    Hope this helps.

    Thanks,

    Apurva

    skirknycAuthor
    Participant
    May 16, 2012

    Yes I am gettin, "Connection Error. Please press playto try again"

    I am not setting up a Custom application. I am loading my f4v files into this directory . //localhost/applications/vod/media this is where the sample files live. Using this code:

    <object width="640" height="377" id="videoPlayer" name="videoPlayer" type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">

    <param name="movie" value="http://macmedia.sas-ga.org/swfs/videoPlayer.swf">

    <param name="quality" value="high">

    <param name="bgcolor" value="#000000">

    <param name="allowfullscreen" value="true">

    <param name="flashvars" value="&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=rtmp://macmedia.sas-ga.org/applications/vod/media/mp4:zebtest.f4v&DS_Status=true&streamType=vod&autoStart=true"><embed src="http://macmedia.sas-ga.org/swfs/videoPlayer.swf" width="640" height="377" id="videoPlayer" quality="high" bgcolor="#000000" name="videoPlayer" allowfullscreen="true" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&serverURL=rtmp://macmedia.sas-ga.org/applications/vod/media/mp4:zebtest.f4v&DS_Status=true&streamType=vod&autoStart=true" type="application/x-shockwave-flash"> </object>

    Using the same code with the sample videos work, however when I add my video files it does not?

    Thanks!

    May 17, 2012

    Hi,

    Firstly, I tired a simple placback of a sample file from your server as rtmp://macmedia.sas-ga.org/vod/sample and it was fine. I then tried playbcak of your custom file as rtmp://macmedia.sas-ga.org/vod/mp4:zebtest.f4v and I could play it back fine. So there doesn't seem to be any problem on the server side.

    Coming to the way the request url has been formed, is there a particular reaso that it's being used as rtmp://macmedia.sas-ga.org/applications/vod/media/mp4:zebtest.f4v ? Unless the player has some inbuilt logic to recognise the format, the general syntax for requesting a file is ;

    protocol://server-domain-or-IP/fms-app-name/[fms-app-instance-name/][codec-prefix:]file-path[filename-extension]

    You can find more information here :http://help.adobe.com/en_US/flashmediaserver/devguide/WS0432746db30523c21e63e3d12eea2a8fc0-8000.html

    Thanks,

    Apurva