This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes EXEC & FFMPEG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "EXEC & FFMPEG" Watch "EXEC & FFMPEG" New topic


Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
Hi all,

I'm using the Tomcat as Web Server. In my JSP file, I write as following

String command = "cmd.exe /C ffmpeg -i ....";
Process p = Runtime.getRuntime().exec(command);

Then it hangs (I have waited for 10 minutes but that process seems never stop). When I look at the converted file, it just about 200KB (actually it must be 800KB). Then I stop the Tomcat, that file is immediately 800KB???

Do you know this problem? Thanks
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
The usual reason for this sort of failure has to do with consuming the std out and std err output of the Process. See the Javadocs for java.lang.Process.

This problem comes up frequently and is not Tomcat specific - try searching in the Intermediate forum.

I agree. Here's the link:
subject: EXEC & FFMPEG
Similar Threads
Using Commands in java program
.sh file not found
Start and Stop tomcat from Java Program
FFmpeg has stopped working
struts video file upload