MasayukiSuda / GPUVideo-android

This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
MIT License
658 stars 178 forks source link

onVideoFileReady was invoked twice #69

Closed jianinz closed 4 years ago

jianinz commented 4 years ago

If you were to save the video and extract the length of video in onVideoFileReady callback, it would sometimes cause doubling the length error, as this callback would be called twice in some cases, it really depends on how fast or slow your phone is as there was two MediaEncoder implementation going on, one for video(MediaVideoEncoder), another for audio(MediaAudioEncoder), their encoding runnable are finishing at the different rate.