Open gsolana81 opened 3 years ago
don't work audio filter. example apply fade in and fade out
File src = new File("path"); `IVelvetVideoLib lib = VelvetVideoLib.getInstance(); IAudioDecoderStream audioStream = lib.demuxer(src).audioStreams().get(0); AudioFormat format = audioStream.properties().format(); File output = new File(src.getParent(),filename); IMuxerBuilder muxerBuilder = lib.muxer("mp3"); IAudioEncoderBuilder audioEncoderBuilder = lib.audioEncoder("libmp3lame", format).enableExperimental() .filter("afade=t=in:st=0:d=15,afade=t=out:st=63:d=15"); IMuxer muxer = muxerBuilder.audioEncoder(audioEncoderBuilder).build(output); IAudioEncoderStream audioEncoder = muxer.audioEncoder(0); for (IAudioFrame audioFrame : audioStream) { audioEncoder.encode(audioFrame.samples()); }`
don't work audio filter. example apply fade in and fade out