Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

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

New Here ,
Nov 25, 2011 Nov 25, 2011

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.

4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 25, 2011 Nov 25, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2011 Nov 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 28, 2011 Nov 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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2011 Nov 28, 2011

Hmm. I did try publishing to record like you said, but when I tried to play the stream it would wait until the sender stopped recording, then would play back the entire stream. I wasn't able to watch as the video was being recorded.

Is there any configuration of the server I would have to do that I'm missing?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 28, 2011 Nov 28, 2011

Odd.  I'm working with something like this right now and as long as the viewer is using the same NetStream name as the publishers then you are good.  It should show up just fine.  Not sure what is wrong.  Just know it's possible.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2011 Nov 28, 2011

Okay, now I'm getting error NetStream.Record.NoAccess when I publish with "outgoingStream.publish("testname", "record");" Google tells me this error results from trying to record a read-only stream. Any idea why my stream would be read only? This is basically a clean install of flash media server, so I haven't touched anything.

By the way, I'm connecting to the live instance of my server (rtmp://url.ca/live/). Is this where I should be connecting?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 10, 2012 Jan 10, 2012

hi

when i using flash video h264 encode the record stream only audio ,not video ,can you tell my why?

3q

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 11, 2012 Jan 11, 2012
LATEST

You need to make sure you give the name of stream with correct prefix i.e. you stream name should "mp4:hello.f4v" and not just "hello". If its just "hello" then it will try to record h.264 data into FLV file and hence you will get only audio and no video. ( "hello" is just example stream name)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2011 Nov 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines