-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use FFMPEGExecutor but command not run correctly #169
Comments
it must be some thread run eariler or later question, in 2.7.3 it must be due to some bug in it , but 2.7.3 is very old one so it not worth sovling. my method is: String cmd = locator.getFFMPEGExecutablePath() +
" -f lavfi -i color=size=1280x720:rate=25:color=black -f lavfi -i anullsrc=channel_layout=mono:sample_rate=16000 -vcodec h264 -acodec aac -t 30 output.mp4 -hide_banner -loglevel quiet"
try {
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(cmd);
process.waitFor();
}catch (IOException ioe){
LOGGER.info("reason1:{}",ioe.getMessage());
throw ioe;
}catch (InterruptedException ie){
LOGGER.info("reason2:{}",ie.getMessage());
throw ie;
} |
I also encountered the same problem. |
Your code is indeed a solution,thanks a lot。 |
in 2.7.3
code below:
no file created. but after enable log, i can get command this:
About to execute /var/folders/2y/jqhn24qs34sb1699gcdrdr_h0000gn/T/jave/ffmpeg-x86_64-2.7.3-osx -f lavfi -i color=size=1280x720:rate=25:color=black -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -t 5 /var/folders/2y/jqhn24qs34sb1699gcdrdr_h0000gn/T/bk-tv-quality-processor/20210914/ANNULL/annullsrc_20210914_1631601152939_5.ts -hide_banner
i use this command in terminal. it can produce annull video.
i found that if i make a breakpoint at FFMPEGExecutor.java line 119: ffmpeg = runtime.exec(cmd); when runing code and stop at this breakpoint and step over, the annull video can be produced.
it is a little confuzing..
The text was updated successfully, but these errors were encountered: