deepmedia / Transcoder

🎞 Hardware-accelerated video transcoding using Android MediaCodec APIs. Supports cropping, concatenation, clipping, audio processing, video speed and much more.
https://opensource.deepmedia.io/transcoder
Apache License 2.0
783 stars 166 forks source link

Feature Request : Overlay Audio over Video(already containing Audio) #152

Closed pawaom closed 2 months ago

pawaom commented 3 years ago

Currently this code allows only to replace or remove audio of video, there is no support for overlaying audio over video which already has audio.

According to this

https://developer.android.com/reference/android/media/MediaMuxer#History ,

now Muxing Multiple Video/Audio Tracks is allowed for Api 26 and higher for an mp4 container.

I have been looing for examples , about using this feature, but cannot find any code. Can you please provide sample code and include this feature in future releases.

natario1 commented 2 months ago

(Pasted to all my answers today: it's been a long time since my last issues review. I am sorry about the delay and I know you likely have moved on by now. Still, I'm going to answer where I can)

We don't plan to add this feature for now, sorry. "Muxing multiple audio tracks" as in your link, does not mean blending them together. They get two entries in the MP4 container, but only one of them is played. It may be used, for example, to add multiple languages to a movie.