|
Home > Archive > Macromedia Flash Server > April 2005 > SSAS Stream snapshot
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SSAS Stream snapshot
|
|
| Carl Sziebert 2005-04-07, 5:55 pm |
| Hello all:
Currently I am using a second NetStream on the broadcast client to take
snapshots of the the video broadcast and converting them to JPEG
through ffmpeg. I have made an attempt to move the snapshot code to
the server utilizing Stream.get, Stream.play and Stream.record, however
it seems that this results in a FLV file that has no data most of the
time. All I need is enough data for ffmpeg to get the JPEG out of the
FLV, so I assumed that playing the stream for 1 or 2 seconds would
suffice. Here is the code that I am using:
application.doSnapshot = function() {
//trace("--- application.doSnapshot");
var snapName = application.getStreamName();
var streamName = "archiveStreams/" + snapName;
if (!application.snap_stream) {
application.snap_stream = Stream.get(streamName);
}
application.snap_stream.onStatus = function(info) {
//trace("--- info.code: " + info.code);
if (info.code == "NetStream.Play.Start") {
application.snap_stream.record();
} else if (info.code == "NetStream.Record.Start") {
application.snap_stream.record(false);
} else if (info.code == "NetStream.Record.Stop") {
// Run the ffmpeg process
application.gatewayService.processImages(snapName);
}
}
// This should play the stream long enough to get 1 frame of video
application.snap_stream.play(application.getStreamName(), -1, 1);
}
Can anyone make recommendations for getting this to work and
consistently write data to the FLV? I am relatively new to FlashCom
and Flash in general and am at a loss on how to proceed.
Thanks in advance.
Carl
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Dario De Agostini 2005-04-07, 5:56 pm |
| >All I need is enough data for ffmpeg to get the JPEG out of the FLV, so I
>assumed that playing the stream for 1 or 2 seconds would suffice.
I'm not sure this may help but: try to set keyFrameInterval to 1 on
publishing client, this will force flash player to encode every frame as a
complete "jpg" keyframe.
Dario De Agostini
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|