samsung mobile - Android 6.0 how to solve mediarecorder audio video out of sync? -


as title. there sample code solve android 6.0 mediarecorder audio video recording out of sync problem? here code:

mmediarecorder.setaudiosource(mediarecorder.audiosource.mic); mmediarecorder.setvideosource(mediarecorder.videosource.surface); mmediarecorder.setoutputformat(mediarecorder.outputformat.mpeg_4); mmediarecorder.setaudioencoder(mediarecorder.audioencoder.he_aac); mmediarecorder.setvideoencoder(mediarecorder.videoencoder.h264); mmediarecorder.setoutputfile(environment.getexternalstoragepublicdirectory(environment.directory_pictures)+"/test.mp4"); mmediarecorder.setvideosize(mvideosize.getwidth(), mvideosize.getheight()); mmediarecorder.setvideoframerate(30); mmediarecorder.setvideoencodingbitrate(10000000);  windowmanager window = (windowmanager) getsystemservice(context.window_service); int rotation = window.getdefaultdisplay().getrotation(); int orientation = orientations.get(rotation); mmediarecorder.setorientationhint(orientation); mmediarecorder.prepare(); 


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -