0

I am trying to build a video system. Now I've finished capture the data from camera, encode the data using MediaCodec. I also find that I could use the MediaMux to do the Mux job. But I don't know how to record the audio and how to keep the audio and video time synchronization. Does anyone have any ideas?

Thanks

Brendon Tsai
  • 1,267
  • 1
  • 17
  • 31
  • 2
    The `BufferInfo` passed to `writeSampleData()` includes the presentation time stamp. So you need to ensure that all audio and video data has the correct time stamps in the same timeline. – fadden Dec 30 '13 at 16:50
  • Did you ever find out a solution to this? – 0xSina Jan 04 '14 at 13:27

1 Answers1

0

Probably you wish to use MediaRecorder. And do not mess with muxing. You'll get ready video file.

user2399321
  • 605
  • 7
  • 13
  • Thank you for that. But I want to have the access to the data captured by the device. So I won't use MediaRecorder. – Brendon Tsai Jan 04 '14 at 13:18
  • @BrendonTsai did you ever find out a solution? – 0xSina Jan 04 '14 at 13:26
  • @OxSina fadden provides a solution, here: http://stackoverflow.com/questions/20835655/does-mediacodec-in-android-support-audio-encodec/20843791?noredirect=1#20843791. – Brendon Tsai Jan 04 '14 at 14:18