Open shengtu0328 opened 2 years ago
This are 3 arguments
String s = "-i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4";
You have to pass them a separate arguments, not one big argument
This are 3 arguments
String s = "-i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4";
- -i
- /Users/videopls/develop/ffmpeg/input.avi
- /Users/videopls/develop/ffmpeg/output/output.mp4
You have to pass them a separate arguments, not one big argument
It seems still not worked.
DefaultFFMPEGLocator locator = new DefaultFFMPEGLocator(); ProcessWrapper localFFMPEG = locator.createExecutor(); localFFMPEG.addArgument("-i"); localFFMPEG.addArgument("/Users/videopls/develop/ffmpeg/input.avi"); localFFMPEG.addArgument("/Users/videopls/develop/ffmpeg/output/output.mp4"); try { localFFMPEG.execute(); }catch (Exception e){ e.printStackTrace(); }
i will try it on my windows os later。
This are 3 arguments
String s = "-i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4";
- -i
- /Users/videopls/develop/ffmpeg/input.avi
- /Users/videopls/develop/ffmpeg/output/output.mp4
You have to pass them a separate arguments, not one big argument
I really appreciate your answer, but I still failed,there is no output file。It feels like the command is ready, but it is not executed successfully。 https://github.com/shengtu0328/jave2-demo/blob/main/src/main/java/com/example/jave2demo/TestDefaultFFMPEGLocator.java
encoder.encode(new MultimediaObject is succees。 https://github.com/shengtu0328/jave2-demo/blob/main/src/main/java/com/example/jave2demo/TestEncoder.java
https://github.com/a-schild/jave2/issues/169 This issues solves the problem
` String s = "-i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4";
the log is
18:19:28.900 [main] DEBUG ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator - Os name is <mac os x> isWindows: false isMac: true 18:19:28.907 [main] DEBUG ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator - Jave temp folder exists in </var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave> 18:19:28.908 [main] DEBUG ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator - Executable path: /var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave/ffmpeg-x86_64-3.2.0-osx 18:19:28.908 [main] DEBUG ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator - Executable exists in </var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave/ffmpeg-x86_64-3.2.0-osx> 18:19:28.993 [main] DEBUG ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator - ffmpeg executable found: /var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave/ffmpeg-x86_64-3.2.0-osx 18:19:29.010 [main] DEBUG ws.schild.jave.process.ProcessWrapper - About to execute /var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave/ffmpeg-x86_64-3.2.0-osx -i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4 -hide_banner
if i put " /var/folders/fp/fg__cpln099g08625c1vf0xm0000gn/T/jave/ffmpeg-x86_64-3.2.0-osx -i /Users/videopls/develop/ffmpeg/input.avi /Users/videopls/develop/ffmpeg/output/output.mp4 -hide_banner " in terminal ,it worked