Thank you ADAM,
Thank you very much For your kind Help.
This is more than Enough For me. I'll Try to implement this code... I'll let
you know if any difficulties.
I am also a newb to RED5 and JAVA, So this code will help me to solve my
problem.
Thank you once again
Adam Kubina wrote:
>
> Hi DeGa,
>
> thats the code iam using:
> <code>
> public void flv2jpg(String flv_filename,String jpg_filename, String
> position) {
> IConnection appConn = Red5.getConnectionLocal();
> String str_userId = appConn.getClient().getId();
> String str_path = "C:/Dokumente und Einstellungen/Admin/Eigene
> Dateien/developement/workspace/0.6rc1/red5_server/webapps/streamactor/st
> reams/";
> log.info("#[flv2jpg CId:"+str_userId+"] triggered: ");
>
> try {
> Runtime runtime = Runtime.getRuntime();
> Process proc = runtime.exec(new
> String[]{str_path+"ffmpeg.exe","-i",str_path+flv_filename,
> "-y","-f","singlejpeg","-ss",position,"-vframes","1","-an",
> str_path+jpg_filename} );
>
> // check for failure
> } catch (Exception e) {
> log.info(e);
> }
> }
> <code/>
>
> Its working for windows. Unfortunately you wont receive a return code
> for windows-shell execution.
> So, its a kind of blind executing.
> Under linux you can use proc.exitValue(). successful execution returns
> 0. (but i havnt test it)
> exitValue() with windows will wait eternaly.
>
> Iam new to red5 and java. may be there is a better approach.
>
> btw.: there are also java wrapper for the c libs of ffmpeg. Google "Java
> wrapper for ffmpeg". With this you can use ffmpeg directly out of java.
> but i havnt the muse to fight through.
>
> have fun
>
> -Adam-
>
> ------------------------------------------------------------------------
> -------------------------------------
> private
> <http://www.versicherungen-abc.info/private-krankenversicherung/private-
> krankenversicherung-middle.htm> Krankenversicherung
>
>
>
> DeGa wrote:
>
>>Thank y ou Very Much ADAM,
>>Where should i wrote the Code. How can i call this one. I have started
> RED5
>>Before a week only. So i don't know where should i use this and how to
> use
>>this.....
>>
>>
>>Adam Kubina wrote:
>>
>>> ffmpeg will capture at any position frames to e.g. jpg.
>>>
>>> ffmpeg -i flv_filename.flv -y -f singlejpeg -ss 00:00:02 -vframes 1
> -an
>>> jpg_filename.jpg
>>>
>>> will capture the 2nd second of the flv to jpg. depending on your flv
>>> capturing 00:00:00 leads to a black jpg.
>>>
>>> -Adam-
>>>
>>>
> ------------------------------------------------------------------------
>>> ----------------------------------------------------
>>> private
>>> <
> <http://www.versicherungen-abc.info/private-krankenversicherung/-private
>>
> http://www.versicherungen-abc.info/private-krankenversicherung/-private
>>> krankenversicherung-middle.htm> Krankenversicherung
>>>
>>>>Hi all, I have created One simple Video Recorder And Video Player
> Using
>>> RED5 server 1.0.5. Is there any possibilities to Capture First Frame
> or
>>> any Particular frame of the Recorded
>>>>FLV as JPG image file. This will be help full to show Thumbnail Image
>>> of the Recorded FLV before loading it in the Flash Part. Any Help
>>> Appriciated. Thank you.
>>>>
>>>>View this message in context: Image Capture From FLV file
>>>>Sent from the Red5 - English mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> [email protected]
>>> <http://osflash.org/mailman/listinfo/red5_osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>
>>>
>>--
>>View this message in context:
> <http://www.nabble.com/Image-Capture-From-FLV-file-tf2821627.html>
> http://www.nabble.com/Image-Capture-From-FLV-file-tf2821627.html#a792681
> 0
>>Sent from the Red5 - English mailing list archive at Nabble.com.
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
--
View this message in context:
http://www.nabble.com/Image-Capture-From-FLV-file-tf2821627.html#a7943828
Sent from the Red5 - English mailing list archive at Nabble.com.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org