Reputation: 666
Hi in How to provide both audio data and video data to MediaMux it says that in order to sync audio and video you have to "calculate the number of audio samples that should play for each frame of video", how would be the formula? could you give me some examples? What if I read audio data from AudioRecord on video drainEncoder function? thanks
Upvotes: 3
Views: 1465
Reputation: 666
I have found the answer.
It depends on the sample rate and the frame rate:
at 24fps and 48000Hz every frame is long (48000hz/24fps)= 2000 sample
at 25 fps and 48000Hz: (48000hz/25fps)= 1920 sample
hope it helps.
Upvotes: 4