3 Replies - 6076 Views - Last Post: 18 December 2008 - 02:38 PM Rate Topic: -----

#1 swethak  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-December 08

javacode for image from video using FFMPEG

Posted 17 December 2008 - 01:24 AM

Hi,

I used the below code to convert the video file into an image.When i run that below code it didn't shows any errors and returns blank page and also didn't convert the video into an image.When i use the command "ffmpeg -i sample.wmv -f image2 -t 0.001 -ss 3 sssssss.jpg in command prompt it works fine and it convert the video into image.But it didn't work in java program.Please tell the solution what changes i have to made in my program




<% 
String command="C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/test/ffmpeg.exe -i C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/test/sample.wmv -f image2 -t 0.001 -ss 3 C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/test/aaa.jpg";
out.println(command);
try{
 	Process p = Runtime.getRuntime().exec(command);
 	p.waitFor();
	if (p.exitValue() == 0) {
		// do something;
	}
	out.println(p.exitValue());

	
				}catch(Exception e){
				out.println(e);
				}
	
 %>



Is This A Good Question/Topic? 0
  • +

Replies To: javacode for image from video using FFMPEG

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,880
  • Joined: 06-March 08

Re: javacode for image from video using FFMPEG

Posted 17 December 2008 - 06:47 PM

Move to Javascript forum
Was This Post Helpful? 0
  • +
  • -

#3 level1  Icon User is offline

  • D.I.C Head

Reputation: 14
  • View blog
  • Posts: 65
  • Joined: 12-June 08

Re: javacode for image from video using FFMPEG

Posted 18 December 2008 - 02:23 PM

View Postpbl, on 17 Dec, 2008 - 05:47 PM, said:

Move to Javascript forum


This is most definitely not Javascript. How about moving it to the Java forum?
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: javacode for image from video using FFMPEG

Posted 18 December 2008 - 02:38 PM

Moved to Java :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1