a-schild / jave2

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

PCM - Invalid data found when processing input #211

Closed mengoni closed 7 months ago

mengoni commented 2 years ago

Hi, I'm not able to convert a PCM audio. Regardless the output format, it does not recognize the input.

My working ffmpeg command line is:

ffmpeg-amd64.exe -f s16be -i in.pcm out.wav

What I've tried:

EncodingAttributes attrs = new EncodingAttributes();
attrs.setInputFormat("s16be");
EncodingAttributes attrs = new EncodingAttributes();
attrs.setInputFormat("-f s16be");
EncodingAttributes attrs = new EncodingAttributes();
Map<String,String> m = new HashMap<>();
m.put("-f", "s16be");
attrs.setExtraContext(m);

The output is always the same: Invalid data found when processing input

That output is the same if I do not use the -f via command line, so I guess I'm forcing the input in the wrong way.

Can you help me?

Attached there's the input file (PCM 16bit big-endian mono 24khz).

in.zip

a-schild commented 1 year ago

Please enable logging and look what command line is generated