ffmpeg-cli-wrapper icon indicating copy to clipboard operation
ffmpeg-cli-wrapper copied to clipboard

FFmpegOutputBuilder build the parameters position affects the command execute

Open Yogurt-lei opened this issue 6 years ago • 2 comments
trafficstars

Describe the bug some usage I use it below cause different results.

1.  FFmpegOutputBuilder outputBuilder = new FFmpegBuilder()
                .addInput(filePath)
                .overrideOutputFiles(true)
                .addOutput( output)
                .disableVideo()
                .disableSubtitle()
               .setAudioChannels(1)
               .setAudioSampleRate(16000)
               .setFormat("s16le");

fFmpegExecutor.createJob(outputBuilder.done()).run();

Then i find build execute comand is ffmpeg -y -v error -i test.pcm -f s16le -vn -ac 1 -ar 16000 -sn test.wav, unfortunately i got error `test.pcm: Invalid data found when processing input.

  2. ffmpeg.run("-y",  "-f", "s16le", "-ar", "16000", "-ac", "1", "-i", "test.pcm", "test.wav");

In the usage 2 i found the convert success file test.wav and i can play it. so I guess it's the position of the parameters affects the command execute.

Version (if applicable):

  • OS: Windows 1803 (17134.765)
  • Java Version 1.8.0_162-b12
  • ffmpeg version: N-90433-g5b31dd1c6b
  • ffmpeg-cli-wrapper version: 0.6.2

Looking forward to reply

Yogurt-lei avatar Jun 06 '19 06:06 Yogurt-lei

@Yogurt-lei you can use Jaffree. It separates parameters per each input/output

kokorin avatar Jun 08 '19 10:06 kokorin

@kokorin wow, thank you for your recommend, i will try it. : )

Yogurt-lei avatar Jun 10 '19 07:06 Yogurt-lei