jave2 icon indicating copy to clipboard operation
jave2 copied to clipboard

how can jave merge two mp3 file into one mp3 file

Open hengren108 opened this issue 5 years ago • 6 comments

hengren108 avatar Jul 21 '20 07:07 hengren108

Please have a look at this test case

https://github.com/a-schild/jave2/blob/master/jave-core-test/src/test/java/ws/schild/jave/ConcatEncoderTest.java

Should also work with audio files

a-schild avatar Jul 21 '20 09:07 a-schild

Please have a look at this test case

https://github.com/a-schild/jave2/blob/master/jave-core-test/src/test/java/ws/schild/jave/ConcatEncoderTest.java

Should also work with audio files

i run testContactAudio01,but the result is "concat"(1+2=12) not “merge”(1+2=3)

hengren108 avatar Jul 21 '20 09:07 hengren108

What do you mean by merge?

a-schild avatar Jul 21 '20 09:07 a-schild

What do you mean by merge?

Merge two mono files into a stereo stream

hengren108 avatar Jul 21 '20 09:07 hengren108

This is currently not supported, but we would accept a merge request ;)

From https://trac.ffmpeg.org/wiki/AudioChannelManipulation

ffmpeg -i left.mp3 -i right.mp3 -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" output.mp3 or ffmpeg -i left.mp3 -i right.mp3 -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map "[a]" output.mka

a-schild avatar Jul 22 '20 06:07 a-schild

There are plenty of examples of adding Filters in JAVE 3.0 versions: https://github.com/a-schild/jave2/blob/dev-3.0-changes/jave-core-test/src/test/java/ws/schild/jave/filters/VideoFilterTest.java#L163

mressler avatar Aug 16 '20 16:08 mressler