Skip to main content
December 9, 2010
Question

How to get a snapshot of the first frame inside application.onPublish?

  • December 9, 2010
  • 1 reply
  • 1132 views

Hi there!

application.onPublish = function (client, p_stream)
{    

    //How to get a snapshot of the first frame and save it to a specified directory?

    //Or post the snapshot image to a specified URI for restoring?

}

Anyone knows how to do this ?

Regards!

    This topic has been closed for replies.

    1 reply

    calmchessplayer
    Inspiring
    December 9, 2010

    This can be accomplished 2 ways that i know of ffmpeg and PHP with the php way flash takes a snapshot of the videoframe and then sends it PHP to be saved as a jpeg....with the ffmpeg way you simply batch process the entire directory holding the flv wich is external to flash although this can also be automated using PHP........I can send you a package containing both methods but installation will be up to you.............unless you wanted to pay me to help. I'm busy and can't do probono work right now.

    December 11, 2010

    The main difficulty is how to extract byteArray from the Stream instance, can you provide some reference on this topic?

    Sorry I can't pay you for the moment...

    ,

    ,

    calmchessplayer
    Inspiring
    December 12, 2010

    well to get a snapshot you get the bytearray form the video object and send it to PHP for processing there is no  known way to extract it from the stream that i am aware of other than using ffmpeg to capture a frame........good luck on your quest....let me know if you ever solve this puzzle I'd love to use what you find.