File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ffmpeg and Java

 
Andrea Sidoti
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
137.

Hi,
I�m trying to use ffmpeg launching it from java. Though I�m able to use it from the command line, I receive the following error from Java

Executing c:\ffmpeg.exe -i c:\test.mov -b 40k -r 10 -s qcif -target pal-vcd c:\test.3gp
ERROR>FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
ERROR> configuration: �enable-memalign-hack �extra-cflags=-I/local/include �extra-ldflags=-L/local/lib
ExitValue: 1
ERROR> libavutil version: 49.3.0
ERROR> libavcodec version: 51.38.0
ERROR> libavformat version: 51.10.0
ERROR> built on Mar 6 2007 12:40:35, gcc: 3.2.3 (mingw special 20030504-1)
ERROR>c:\ffmpeg.exe: unrecognized option �-i c:\test.mov�

Please help me!!
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you open a command prompt and manually type this at the prompt:

c:\ffmpeg.exe -i c:\test.mov -b 40k -r 10 -s qcif -target pal-vcd c:\test.3gp

Do you get the same error message? If yes, then '-i ...' is probably not a valid option for ffmpeg. Do you have documentation for ffmpeg? Does it say something about the '-i' option?

Can you show us the Java code that you use to execute ffmpeg?
[ March 08, 2007: Message edited by: Jesper Young ]
 
Andrea Sidoti
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I launch this string from the command line it works

cmd.exe start /c c:\\ffmpeg.exe -i c:\\Surf\\text.mp4 -b 40k -r 10 -s qcif -target pal-vcd c:\\Surf\\mov.3gp & exit

If I launch it from a simple java class it works.

But if I launch it from a javaBean called from a jsp it doesn't work. It never exits from the execution of the command...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic