Skip to main content
August 27, 2012
Question

Streaming multiple avi files?

  • August 27, 2012
  • 1 reply
  • 886 views

I think the problem is I don't know how to ask my question to a search engine, so i have tried searching for the answer already.

I'm just trying to create a proof of concept and have freshly installed Dev Server 4.5.

Here is what I need to accomplish:

     1)     A user will access a URL like http://tempvideoserver.org/?ip=75.75.76.76&user=Admin&pass=Password1

     2)     This will start a backend process (vb.net through a much older COM object) that will start creating a series of AVI files of "live" video each being 15 seconds in length and creating an additional file every 15 seconds. All files will be in a dynamically created folder for that individual user.

     3)     FMS will take the sequential AVI files as they are dynamically created and create a stream capable of being watched on an Apple device via HLS (or anything really as long as an Apple device can view it).

     4)     If FMS says that the user has stopped streaming, then stop the backend process for that user.

That is it in a nutshell. If there are simliar posts that you can point me towards or a good starting point, I'll take any info you have. Or if what I need isn't possible, that is good info too. I'm just starting, so I don't know what puzzle pieces I have access to to build this thing.

Thanks in advance!

David Crawford

This topic has been closed for replies.

1 reply

August 29, 2012

Perhaps I can ask this in a simpler way, but keep in mind that I'm just dipping my toes in the FMS water.

Let's say that I have a folder with several avi files numbered sequentially. (001.avi, 002.avi, etc...) Each file is 15 seconds of video. An additional file is created every 15 seconds.

How can I tell FMS to on-demand stream avi files starting with the latest avi file and then look for new files to add to the stream?

Surely someone else has been in this situation before?

Thanks!

August 30, 2012

First, FMS will not stream AVI files. See the documentation for supported file formats and codecs (generally, you'll want H.264/aac mp4's or vp6/mp3 flv's).

As for setting up a stream as you suggested, there will be a few pieces to this (all of which you'll do in server side actionscript)

1. You'll use a series of File objects to read the contents of the directory (which must be local to FMS or on a mapped network drive), and inspect the properties of each file directory

2. You'll use the Stream class to set up a server side stream for each client, and you'll play your files over that server side stream as a playlist (your client application will subscribe to that stream, so you'll need to work out a method of setting up the stream name accordingly)

3. You'll devise a method of keeping track of the files (or the LMD of the last played file) for each stream. Could be done with properties on the client object, or could be a class that handles management of all of the clients.

4. You'll set up an interval to continually repeat the process of reading the directory to look for new files.

Obviously, this is a simplified description. There will be additional tasks involved in setting up the FMS application to handle user-specific tasks (i.e how will you determine which folder is associated with the client... could be via a webservice call from FMS to your backend app, or could be by virtue of application instance names)