LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

Audio Overlay for a specific time

Open vikaspAlgoworks opened this issue 2 years ago • 1 comments

Hi @izzytwosheds ,

Is there an option to overlay audio or video for only a specific time duration? For example: if we have a video of length 40 seconds and we want to overlay audio from 5 seconds to 25 seconds only, how can it be achieved?

From looking at AudioOverlayFilter's apply method, it uses ByteBuffer but no presentationTime to make any such operation.

Any insight or guidance would be highly valuable to us.

vikaspAlgoworks avatar Nov 17 '23 04:11 vikaspAlgoworks

Hi. Apologies for late response. AudioOverlayFilter receives a Frame in apply method, which has bufferInfo field, which in turn will have a presentationTimeUs. You can use that field to control when audio filter is applied.

izzytwosheds avatar Jan 19 '24 18:01 izzytwosheds