Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't apply audio filter on mp3 file #32

Open
gsolana81 opened this issue Aug 25, 2021 · 0 comments
Open

don't apply audio filter on mp3 file #32

gsolana81 opened this issue Aug 25, 2021 · 0 comments

Comments

@gsolana81
Copy link

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());
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant