googlearchive/android-Camera2Video

the recorded video has a problem, it shows a screenshot that takes a time equal to whole of the video

Closed this issue · 5 comments

The recorded video has a problem. It shows a screenshot that takes a time equal to whole of the video. after that time video playing starts.
I haven't changed anything in the demo app, just see the recorded video that saved.

Are you on Galaxy S7? There is a power issue. Try this:
[Docs: https://developer.android.com/training/scheduling/wakelock]
Wake up the cpu with PowerManager (PARTIAL flag) before starting the capture. Don't forget to release the lock after done recording.

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"MyApp::MyWakelockTag");
wakeLock.acquire();

other solutions/work arounds: #24

Are you on Galaxy S7? There is a power issue. Try this:
[Docs: https://developer.android.com/training/scheduling/wakelock]
Wake up the cpu with PowerManager (PARTIAL flag) before starting the capture. Don't forget to release the lock after done recording.

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"MyApp::MyWakelockTag");
wakeLock.acquire();

other solutions/work arounds: #24

I call it in main activity but no luck, my device: Samsung J7 Pro

I have the exact same issue.

Same issue using GalaxyS7

This sample has been migrated to a new location (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!