Skip to main content
Jan 8, 2012 8:13 PM UTC
Question

Grab one still picture from live stream?

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

Jan 9, 2012 10:04 AM UTC

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).

Translate
May 23, 2012 6:25 AM UTC

Anyone?

Translate
Adobe Employee
Jan 9, 2012 5:16 AM UTC

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

Translate
Nikhil_Kalyan
Participating Frequently
Jan 9, 2012 9:26 AM UTC

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/

Translate