a-schild / jave2

The JAVE (Java Audio Video Encoder) library is Java wrapper on the ffmpeg project
GNU General Public License v3.0
1.28k stars 249 forks source link

Unrecognized option 'f concat -safe 0 -i' and Error splitting the argument list: Option not found #240

Closed fendo8888 closed 1 year ago

fendo8888 commented 1 year ago

Report an error:

23:35:08.159 [main] DEBUG ws.schild.jave.ConversionOutputAnalyzer - Input Line (1): <Unrecognized option 'f concat -safe 0 -i'.>
23:35:08.160 [main] DEBUG ws.schild.jave.ConversionOutputAnalyzer - Input Line (2): <Error splitting the argument list: Option not found>

debug Indicates the printed execution command

23:35:08.072 [main] DEBUG ws.schild.jave.process.ProcessWrapper - About to execute C:\Users\xxx\AppData\Local\Temp\jave\ffmpeg-amd64-3.3.1.exe -f concat -safe 0 -i G:\pptx-2023924-1695544991761\20230921\temp.txt -vsync vfr -pix_fmt yuv420p G:\pptx-2023924-1695544991761\20230921\noVoice.mp4 -hide_banner

Copying the above command to cmd can be executed correctly

  ffmpeg.addArgument("-f concat -safe 0 -i");
  ffmpeg.addArgument(path + "temp.txt");
  ffmpeg.addArgument("-vsync");
  ffmpeg.addArgument("vfr");
  ffmpeg.addArgument("-pix_fmt");
  ffmpeg.addArgument("yuv420p");
  ffmpeg.addArgument(path + fileName);
a-schild commented 1 year ago

This probably needs to be added as 5 single arguments ffmpeg.addArgument("-f concat -safe 0 -i");

like:

ffmpeg.addArgument("-f");
ffmpeg.addArgument("concat");
ffmpeg.addArgument("-safe");
ffmpeg.addArgument("0");
ffmpeg.addArgument("-i");