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

Silk cannot be converted #230

Closed bingluchen closed 1 year ago

bingluchen commented 1 year ago

An error occurred when I converted silk " Invalid data found when processing input". What shall I do?

a-schild commented 1 year ago

Is that only with a specific media file, or does it happen with all files? What are your conversion parameters?

bingluchen commented 1 year ago

A specific media file. File source = new File("input.silk"); File target = new File("out.mp3"); //Audio Attributes AudioAttributes audio = new AudioAttributes(); audio.setCodec("libmp3lame"); audio.setBitRate(128000); audio.setChannels(2); audio.setSamplingRate(44100); EncodingAttributes attrs = new EncodingAttributes(); attrs.setOutputFormat("mp3"); attrs.setAudioAttributes(audio); Encoder encoder = new Encoder(); encoder.encode(new MultimediaObject(source), target, attrs);