Skip to main content
Participant
May 8, 2008
Question

Loading an FLV into FMS using a URL Var??

  • May 8, 2008
  • 1 reply
  • 284 views
I have a rather large inventory of user-supplied videos. Our visitors upload their videos to our server and an ASP script sends them to a com service and encodes them as FLVs. At the same time a database entry is made from the submission and a filename is generated and entered. A separate app serves up the videos based on search criteria - dynamically from the database via a Cold Fusion server (it pulls the filename out and inserts it dynamically into the URL, when the user clicks on the file, the SWF loads the file).

Here's a link to the app that's live right now;

Everything works great except it's progressively played and we wish to switch to streaming format.

I'd like to keep the coding to a minimum and maintain my Coldfusion application which works extremely well. Is there a way I can subsitute the addressing from the http:// address to the rtmp:// address? In other words, all I wish to do is to modify the url to use rtmp:// and stream rather than download progressively.

I am not versed in actionscript, but I imagine there is a way I can create the SWF FLV player with the netstream stuff in it, and pull the FLV name from a URL parameter. Correct? If so, how do I do this?

Thanks
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    May 10, 2008
    This should be pretty straight forward. Just take the ActionScript that is currently taking the HTTP URL, and have it parse the FLV filename from the URL. For example, if the HTTP URL looks like this:

    http://mycompany.com/flvs/video1.flv

    You should be able to parse the "video1.flv'' name from the string and create an rtmp URL that references your FMS server:

    rtmp://mycompany.com/vod/video1.flv

    The above URL will work with the FLVPlayback component. If you have written your own playback code, you will just pass "rtmp://mycompany.com/vod" to the NetConnection, and then use the name "flv:video1" in NetStream.play. Notice that you have to parse the file extension for this to work, since FMS does not expect a file extension in the stream name.

    Hope this helps