Skip to main content
January 8, 2012
Question

Grab one still picture from live stream?

  • January 8, 2012
  • 2 replies
  • 1215 views

Hi all

Does anyone know how to create a script of some kind to grab a still picture from a live stream and save it as a JPG file?

In this way a cron job can tricker the script and thereby grab a picture fx every 10'th minute and the picture can be shown on a website so people that are not attending can have a look into what is happening in the live stream.

Can anyone help?

This topic has been closed for replies.

2 replies

January 9, 2012

Thank you both :-)

Isn't there a more easy way? I just need to grab one screenshot from a stream and save it in my webspace (so it can be used at my website).

May 23, 2012

Anyone?

Adobe Employee
January 9, 2012

You would require to send the data as data message by calling ns.send from publishing client and the subscribing side will have to implement function to recieve it and process it..

Something like that

The sending client has the following script:

var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://myServer.myDomain.com/appName/appInstance");
var my_ns:NetStream = new NetStream(my_nc);
my_ns.publish("slav", "live");
my_ns.send("Fun", "this is a test");    //Fun is the handler name. 

The receiving client's script looks something like this:

var my_nc:NetConnection = new NetConnection(); 
my_nc.connect("rtmp://myServer.myDomain.com/appName");
my_ns = new NetStream(my_nc); my_ns.play("slav", -1, -1);
my_ns.Fun = function(str) { //Fun is the handler name. trace (str); }

In the example above, you can send jpeg data as parameter of function "Fun"

Or you may choose metadata to send such data.. More info @ http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000190.html

Nikhil_Kalyan
Participating Frequently
January 9, 2012

Bitmap is the way to do it as well. This code snippet might give some direction : http://www.walking-productions.com/notslop/2009/12/02/flash-media-server-sending-images/