I am trying to solve a A/V sync problem. The Video will got 1 sec delay than Audio. (See my note below please)
From Android Media Framework part, Could I just delay the audio timestamp to let it sync with video, where should i start? Is it AudioSource? MPEG4Writer? MediaCodecSource?
Please help!!
[The Case is]: If there is a 5 sec video. The current situation:
Video part on 0-1 sec will freeze, 1-5 sec stays normal. The video frame starts from 1.00s is actually frame from the 0.00s.
Audio part stays normal in whole scene. So Video part will be 1 sec delay with Audio part.
Video part on 1.00s actually match with Audio part on 0.00s.
[Failed Try]
I try if I just move the StartTimeUs on Video Part on MPEG4Writer, the A/V will sync, but in the end on file, there will be 1.00s with Video freeze, and normal audio.
[MyThought]
If I can pause Audio 1 sec, which will move Audio 0.00s to 1.00s, it will sync. But I don't know the code i can change for this method. Please help!