I have a Java program that is supposed to make copies of segments of a video and then stitch them back together, using ffmpeg. My “snip” method, the one that makes the segment files, has a problem, it gets stuck when I call “process.waitfor()”. When I take it out, the videos load partly, but cannot be accessed until I close
Tag: processbuilder
Unable to create a folder by executing a shell script using java
I was trying to execute shell scripts using java code. The following is a sample code to demonstrate the issue : The shell script file test1.sh that I am trying to execute : I am getting echo message and was able to print in the java console indicating that the shell script is executed successfully. But no directory is being
How to redirect ProcessBuilder’s output to a string?
I am using the following code to start a process builder.I want to know how can I redirect its output to a String. I tried using ByteArrayOutputStream but it didn’t seem to work. Answer Read from the InputStream. You can append the output to a StringBuilder:
ProcessBuilder gives a “No such file or directory” on Mac while Runtime().exec() works fine
I have an application, running on the Playframework, which needs to encode some video files. I used for this (and it works perfectly), but as I need both, the output stream and the error stream, I am trying to use ProcessBuilder (as is also recommended). But I cannot get it to work (testing on a MacBook). Is there a fundamental