Skip to main content
Participating Frequently
November 25, 2011
Question

How to stream live and record the live stream at the same time?

  • November 25, 2011
  • 2 replies
  • 4103 views

Hi, I'm pretty new to flash media server (and adobe technologies in general).

I have an Air app that publishes a camera stream to the server, that can be played live by the same app on another computer/device.

I would like to record to disk all audio/video passing through the server (on the server side) while streaming it at the same time. How can I accomplish this?

Thanks for any help.

This topic has been closed for replies.

2 replies

Participating Frequently
November 29, 2011

Well I've gotten video to play as I'm streaming it, but when I seek to the live end of the video it plays at 1-2 fps and the bandwidth spikes and falls like crazy. Is it just not possible to stream the live feed out first and then record the file, rather than recording the file and reading from it to produce the feed?

Edit: Solution found here: http://forums.adobe.com/message/4052458

Participating Frequently
November 26, 2011

When publishing use 'record' instead of 'live'.  So:

ns.publish('{name_of_stream}', 'record');

It will name it whatever you put for 'name_of_stream' in the example above.  If you record a second time it'll overwrite your file on the server so you'll need to write a script to move or copy the recorded file to another folder with a different name or whatever.

Participating Frequently
November 28, 2011

I think you misunderstand what I'm trying to do. My live stream is being watched as it's being streamed, so I need to use the live instance (I don't want users being able to begin viewing from any point, or seek, they need to see the video as it's produced). But I also want to archive these streams in the background.

I've read that this sort of thing should be done with server-side code but I've been searching google and I can't figure out how to run server-side code.

Participating Frequently
November 28, 2011

So you want to send a stream for everyone to view in real-time and also have the server record the video correct?  (if so then that is what I was talking about...setting it to 'record' will send a live video stream and record as well)