This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

FFmpeg has stopped working  RSS feed

Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm trying to convert a .mov video file to a .flv format using FFMPEG. When I execute it on command line, it works. However, when I invoke it from my java code, a Windows Vista dialog window pops up saying "FFMpeg has Stopped working". I don't idea what the problem is.

Here's my code:

String destinationPath = "C:\\6268\\videos\\fullJavaExprt.flv";

String filePath = "C:\\6268\\videos\\fullJavaExprt.MOV";
String flags = " -ar 22050 -ab 32 -f flv -s 320x240 ";
String command="C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\ROOT\\ffmpeg.exe -i " + filePath + flags + destinationPath;

try {

Process process = Runtime.getRuntime().exec(command);
InputStreamHandler errorHandler = new InputStreamHandler(process.getErrorStream(), "Error Stream");
InputStreamHandler inputHandler = new InputStreamHandler(process.getInputStream(), "Output Stream");


if (process.exitValue() == 0) {
// do something;
System.out.println("exit code: " + process.exitValue());

}catch(Exception e){


when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!