Cameraview: Taking video snapshot not recording proper video

Created on 4 Jan 2019  路  20Comments  路  Source: natario1/CameraView

Describe the bug

  • When I am recording a video using takeVideoSnapshot method. It's getting recorded but somehow it's not storing properly. It's showing very high total duration like 117:22:25 and also not working properly on QuickTime player as well.

FYI: I have a requirement like processing the frame while recording the video, To achieve this, I had copied camera module to my demo project (somehow v2-beta release is not working via gradle).

  • CameraView version: v2-beta (v2 branch)
  • Reproducible in official demo app: not tried, but I have created one demo here.
  • Device / Android version: Nokia 6.1 Plus, API 28

Expected behavior

App should record video in properly, show proper duration and able to play by any video player.

Screenshots

I have created one video with the steps in my demo app, Please find here.

Logs

01-04 16:13:26.954 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598606952 processors: 1 01-04 16:13:26.985 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598606985 processors: 1 01-04 16:13:27.018 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607018 processors: 1 01-04 16:13:27.049 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607048 processors: 1 01-04 16:13:27.081 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607080 processors: 1 01-04 16:13:27.119 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607118 processors: 1 01-04 16:13:27.152 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607151 processors: 1 01-04 16:13:27.183 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607182 processors: 1 01-04 16:13:27.220 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607218 processors: 1 01-04 16:13:27.256 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607255 processors: 1 01-04 16:13:27.286 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607285 processors: 1 01-04 16:13:27.318 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607316 processors: 1 01-04 16:13:27.358 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607357 processors: 1 01-04 16:13:27.388 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607387 processors: 1 01-04 16:13:27.420 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607419 processors: 1 01-04 16:13:27.460 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607459 processors: 1 01-04 16:13:27.489 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607488 processors: 1 01-04 16:13:27.521 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607519 processors: 1 01-04 16:13:27.566 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607563 processors: 1 01-04 16:13:27.597 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607596 processors: 1 01-04 16:13:27.626 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607623 processors: 1 01-04 16:13:27.655 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607654 processors: 1 01-04 16:13:27.688 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607687 processors: 1 01-04 16:13:27.721 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607720 processors: 1 01-04 16:13:27.753 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607752 processors: 1 01-04 16:13:27.787 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607786 processors: 1 01-04 16:13:27.826 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607824 processors: 1 01-04 16:13:27.866 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607865 processors: 1 01-04 16:13:27.900 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607900 processors: 1 01-04 16:13:27.935 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607935 processors: 1 01-04 16:13:27.950 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607949 processors: 1 01-04 16:13:27.977 28740-28786/test.example.frametracker D/SnapshotVideoRecorder: CameraLogger - Creating frame encoder. Rotation: 0 01-04 16:13:27.983 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598607982 processors: 1 01-04 16:13:27.995 28740-28786/test.example.frametracker D/WorkerHandler: CameraLogger - get: Creating new handler. EncoderEngine 01-04 16:13:28.016 28740-28874/test.example.frametracker D/MediaEncoder: CameraLogger - Computed a max duration of 9.2233725E15 01-04 16:13:28.030 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608029 processors: 1 01-04 16:13:28.061 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608060 processors: 1 01-04 16:13:28.085 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608084 processors: 1 01-04 16:13:28.120 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608119 processors: 1 01-04 16:13:28.155 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608154 processors: 1 01-04 16:13:28.186 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608185 processors: 1 01-04 16:13:28.206 28740-28874/test.example.frametracker D/EglBaseSurface: CameraLogger - ROTBUG eglSurfaceWidth: 1080 eglSurfaceHeight: 1874 01-04 16:13:28.216 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608216 processors: 1 01-04 16:13:28.257 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608256 processors: 1 01-04 16:13:28.286 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608286 processors: 1 01-04 16:13:28.325 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608324 processors: 1 01-04 16:13:28.353 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608352 processors: 1 01-04 16:13:28.410 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608410 processors: 1 01-04 16:13:28.438 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608437 processors: 1 01-04 16:13:28.472 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608470 processors: 1 01-04 16:13:28.488 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608487 processors: 1 01-04 16:13:28.544 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608540 processors: 1 01-04 16:13:28.582 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608580 processors: 1 01-04 16:13:28.592 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608592 processors: 1 01-04 16:13:28.622 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608621 processors: 1 01-04 16:13:28.664 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608663 processors: 1 01-04 16:13:28.695 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608695 processors: 1 01-04 16:13:28.722 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608721 processors: 1 01-04 16:13:28.752 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608751 processors: 1 01-04 16:13:28.785 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608785 processors: 1 01-04 16:13:28.822 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608821 processors: 1 01-04 16:13:28.852 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608852 processors: 1 01-04 16:13:28.888 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608886 processors: 1 01-04 16:13:28.926 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608925 processors: 1 01-04 16:13:28.956 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608955 processors: 1 01-04 16:13:28.984 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598608983 processors: 1 01-04 16:13:29.018 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609018 processors: 1 01-04 16:13:29.055 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609053 processors: 1 01-04 16:13:29.084 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609083 processors: 1 01-04 16:13:29.122 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609120 processors: 1 01-04 16:13:29.158 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609153 processors: 1 01-04 16:13:29.189 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609188 processors: 1 01-04 16:13:29.216 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609215 processors: 1 01-04 16:13:29.250 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609249 processors: 1 01-04 16:13:29.285 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609285 processors: 1 01-04 16:13:29.320 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609319 processors: 1 01-04 16:13:29.350 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609349 processors: 1 01-04 16:13:29.382 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609382 processors: 1 01-04 16:13:29.419 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609418 processors: 1 01-04 16:13:29.453 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609452 processors: 1 01-04 16:13:29.481 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609481 processors: 1 01-04 16:13:29.521 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609520 processors: 1 01-04 16:13:29.552 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609552 processors: 1 01-04 16:13:29.586 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609585 processors: 1 01-04 16:13:29.617 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609616 processors: 1 01-04 16:13:29.650 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609649 processors: 1 01-04 16:13:29.684 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609683 processors: 1 01-04 16:13:29.723 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609722 processors: 1 01-04 16:13:29.750 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609750 processors: 1 01-04 16:13:29.783 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609783 processors: 1 01-04 16:13:29.824 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609823 processors: 1 01-04 16:13:29.853 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609852 processors: 1 01-04 16:13:29.881 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609880 processors: 1 01-04 16:13:29.916 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609914 processors: 1 01-04 16:13:29.956 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609955 processors: 1 01-04 16:13:29.982 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598609981 processors: 1 01-04 16:13:30.025 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610024 processors: 1 01-04 16:13:30.051 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610051 processors: 1 01-04 16:13:30.083 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610083 processors: 1 01-04 16:13:30.118 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610117 processors: 1 01-04 16:13:30.151 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610150 processors: 1 01-04 16:13:30.181 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610181 processors: 1 01-04 16:13:30.218 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610217 processors: 1 01-04 16:13:30.249 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610248 processors: 1 01-04 16:13:30.282 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610282 processors: 1 01-04 16:13:30.316 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610315 processors: 1 01-04 16:13:30.349 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610348 processors: 1 01-04 16:13:30.384 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610384 processors: 1 01-04 16:13:30.416 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610416 processors: 1 01-04 16:13:30.449 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610448 processors: 1 01-04 16:13:30.484 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610484 processors: 1 01-04 16:13:30.517 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610516 processors: 1 01-04 16:13:30.547 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610546 processors: 1 01-04 16:13:30.580 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610579 processors: 1 01-04 16:13:30.620 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610618 processors: 1 01-04 16:13:30.660 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610659 processors: 1 01-04 16:13:30.680 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610679 processors: 1 01-04 16:13:30.716 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610715 processors: 1 01-04 16:13:30.750 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610750 processors: 1 01-04 16:13:30.779 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610778 processors: 1 01-04 16:13:30.815 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610815 processors: 1 01-04 16:13:30.846 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610845 processors: 1 01-04 16:13:30.884 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610883 processors: 1 01-04 16:13:30.926 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610923 processors: 1 01-04 16:13:30.956 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610955 processors: 1 01-04 16:13:30.982 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598610981 processors: 1 01-04 16:13:31.015 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611014 processors: 1 01-04 16:13:31.056 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611054 processors: 1 01-04 16:13:31.080 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611079 processors: 1 01-04 16:13:31.114 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611113 processors: 1 01-04 16:13:31.147 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611147 processors: 1 01-04 16:13:31.182 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611181 processors: 1 01-04 16:13:31.216 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611215 processors: 1 01-04 16:13:31.246 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611246 processors: 1 01-04 16:13:31.285 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611283 processors: 1 01-04 16:13:31.318 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611317 processors: 1 01-04 16:13:31.347 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611347 processors: 1 01-04 16:13:31.381 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611380 processors: 1 01-04 16:13:31.425 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611425 processors: 1 01-04 16:13:31.448 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611448 processors: 1 01-04 16:13:31.479 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611479 processors: 1 01-04 16:13:31.517 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611516 processors: 1 01-04 16:13:31.550 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611549 processors: 1 01-04 16:13:31.581 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611579 processors: 1 01-04 16:13:31.615 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611615 processors: 1 01-04 16:13:31.649 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611648 processors: 1 01-04 16:13:31.684 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611683 processors: 1 01-04 16:13:31.721 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611721 processors: 1 01-04 16:13:31.746 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611746 processors: 1 01-04 16:13:31.783 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611782 processors: 1 01-04 16:13:31.812 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611811 processors: 1 01-04 16:13:31.848 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611847 processors: 1 01-04 16:13:31.885 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611883 processors: 1 01-04 16:13:31.917 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611916 processors: 1 01-04 16:13:31.947 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611947 processors: 1 01-04 16:13:31.983 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598611982 processors: 1 01-04 16:13:32.013 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612012 processors: 1 01-04 16:13:32.048 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612047 processors: 1 01-04 16:13:32.080 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612079 processors: 1 01-04 16:13:32.116 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612115 processors: 1 01-04 16:13:32.146 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612146 processors: 1 01-04 16:13:32.179 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612178 processors: 1 01-04 16:13:32.212 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612212 processors: 1 01-04 16:13:32.262 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612261 processors: 1 01-04 16:13:32.280 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612278 processors: 1 01-04 16:13:32.314 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612313 processors: 1 01-04 16:13:32.345 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612345 processors: 1 01-04 16:13:32.379 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612378 processors: 1 01-04 16:13:32.414 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612413 processors: 1 01-04 16:13:32.449 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612448 processors: 1 01-04 16:13:32.477 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612477 processors: 1 01-04 16:13:32.519 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612518 processors: 1 01-04 16:13:32.549 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612548 processors: 1 01-04 16:13:32.587 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612584 processors: 1 01-04 16:13:32.615 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612614 processors: 1 01-04 16:13:32.647 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612646 processors: 1 01-04 16:13:32.679 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612679 processors: 1 01-04 16:13:32.715 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612714 processors: 1 01-04 16:13:32.751 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612750 processors: 1 01-04 16:13:32.800 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612799 processors: 1 01-04 16:13:32.817 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612816 processors: 1 01-04 16:13:32.848 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612848 processors: 1 01-04 16:13:32.849 28740-28765/test.example.frametracker D/Camera1: CameraLogger - stopVideo mVideoRecorder is null? false 01-04 16:13:32.884 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612883 processors: 1 01-04 16:13:32.915 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612914 processors: 1 01-04 16:13:32.944 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612944 processors: 1 01-04 16:13:32.981 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598612981 processors: 1 01-04 16:13:33.015 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613014 processors: 1 01-04 16:13:33.051 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613051 processors: 1 01-04 16:13:33.109 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613100 processors: 1 01-04 16:13:33.126 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613125 processors: 1 01-04 16:13:33.149 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613148 processors: 1 01-04 16:13:33.181 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613180 processors: 1 01-04 16:13:33.209 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613209 processors: 1 01-04 16:13:33.244 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613244 processors: 1 01-04 16:13:33.281 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613280 processors: 1 01-04 16:13:33.321 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613321 processors: 1 01-04 16:13:33.348 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613347 processors: 1 01-04 16:13:33.379 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613378 processors: 1 01-04 16:13:33.413 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613411 processors: 1 01-04 16:13:33.462 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613460 processors: 1 01-04 16:13:33.485 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613484 processors: 1 01-04 16:13:33.521 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613521 processors: 1 01-04 16:13:33.547 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613546 processors: 1 01-04 16:13:33.582 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613581 processors: 1 01-04 16:13:33.616 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613615 processors: 1 01-04 16:13:33.648 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613646 processors: 1 01-04 16:13:33.676 28740-28874/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchOnVideoTaken com.otaliastudios.cameraview.VideoResult@73865cc 01-04 16:13:33.695 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchFrame: 1546598613694 processors: 1 01-04 16:13:33.716 28740-28740/test.example.frametracker D/CameraController: CameraLogger - Stop: posting runnable. State: STATE_STARTED 01-04 16:13:33.719 28740-28765/test.example.frametracker D/CameraController: CameraLogger - Stop: executing. State: STATE_STARTED 01-04 16:13:33.720 28740-28765/test.example.frametracker D/CameraController: CameraLogger - Stop: about to call onStop() 01-04 16:13:33.724 28740-28765/test.example.frametracker D/Camera1: CameraLogger - onStop: About to clean up. 01-04 16:13:33.972 28740-28765/test.example.frametracker D/Camera1: CameraLogger - destroyCamera: Clean up. Releasing camera. 01-04 16:13:34.273 28740-28765/test.example.frametracker D/Camera1: CameraLogger - destroyCamera: Clean up. Released camera. 01-04 16:13:34.273 28740-28765/test.example.frametracker D/Camera1: CameraLogger - onStop: Clean up. Returning. 01-04 16:13:34.274 28740-28765/test.example.frametracker D/CameraController: CameraLogger - Stop: returned from onStop(). Dispatching. 01-04 16:13:34.274 28740-28765/test.example.frametracker D/CameraCallbacks: CameraLogger - dispatchOnCameraClosed 01-04 16:13:35.568 28740-28740/test.example.frametracker D/Camera1: CameraLogger - onSurfaceDestroyed

APK

Github-Repo: https://github.com/bipinvaylu/FrameTracker/tree/v2-video-snapshot

video bug investigation

All 20 comments

@natario1 Thanks for fixing the issue #348. I have tried latest demo app and found this video snapshot issue. Here, Please find the recorded video file.

Please let me know if you need any other details from my side.

The fact that the DropBox player keeps spinning without playing, means that the snapshot is broken or is it just my internet connection?

Thank you, great report!

Nope, Your internet connection is good enough to play the video, Seems Snapshot is broken atm. Please play the video from here: http://recordit.co/9DxENCCGZB. Welcome and thanks for the continuous development of this library.

Yes I have seen that one! But it would be useful to have the actual snapshot MP4 that the lib recorded, so it can be inspected. Though I am nowhere near a video encoding expert

Yeah, That is the same video which I have shared via Dropbox link. I hope you can able to download, if not please let me know. FYI, The same issue is happening in the current demo app as well.

Hey, @natario1 Any update on this issue? Let me know if you want any input from my end or if you can guide me then I can try to fix it in the library itself.

I have no time now to look into this unfortunately, sorry. Also because it works well on my device. But v2 will stay beta until these are resolved, so maybe you might want to use v1 instead.

You might want to try to feed the broken video to some analyzer (not sure if it exists and where to find it), and try to understand why the duration is so wrong. Is it a metadata tag issue, is it an issue related to the presentation time of the frames... I don't know. But once this is known we can try to spot the bug into the library code.

Ah, Actually I am stuck at this point for implementation. Please find recorded video file metadata: https://www.get-metadata.com/result/7ed6c838-c0c9-42f0-97b7-feaf829f3547. Here, I am adding the question which I have asked on StackOverflow. If you can provide some help/insight about the same. https://stackoverflow.com/questions/54091648/camera-2-api-to-preview-record-and-extract-the-preview-frame-to-firebase-face-d. Thanks for your hardwork about this library.

Video Metadata

video-metadata

Audio Metadata

audio-metadata

I hope it will helpful for you to investigate. Let me know if you need any other details.

@natario1 Please find the detailed log file here:
CameraView-Logs.txt

@bipinvaylu could you try the fix/video-snapshot-frames branch?

It does not address this issue specifically, but it changes a few things about snapshot recording.

Same problem here for Snapshot video. Duration is wrong, and quality very very poor.
Hope it will be fix soon! :)

@eVerup can you try that branch and let me know?

The poor quality is kind of the point of snapshots, meant for small social-quality media. You can improve the video resolution by using setPreviewSize.

Thanks for your fast answer! I'm actually working to have a basic quality on the video. For a 5 seconds filming (same environment), the size is about 20MB (2048x1152). With Snapshot video, it is 300Kb, but very poor, bad duration showing, and with errors.

How can i have something better, with a duration max of 10 seconds in my app ? Did i have to change Bitrate, or something else ?

Thanks again and sorry for my bad english, i'm a french entrepreneur. :)

@eVerup If quality matters, don't use snapshots. For your case I would suggest calling cameraView.setVideoSize() to choose a smaller size (2048x1152 is a lot) and recording the video with cameraView.takeVideo().

I had a similar problem too. Video snapshot quality was very poor (you could see big squares). When recording with audio the video snapshot had some errors (black regions).
Switching to the fix/video-snapshot-frames branch solved the quality issues and most of the video errors, some errors are still there at the start of the video.

Thanks @RAN3000 , I was waiting to find time to write tests about it before merging, but apparently I don't have any. Will merge that now.

What are the errors at the start of the video?
Did you manage to have pictures working in #353 ?

No worries.
I played a little more with it. The errors at the start of the video I was talking about are visual glitch on the first frame. Though I noticed that they only appear on the first time the video is reproduced, so it not a big deal. Thanks for the work!

Yes, I managed to get the picture working yesterday. There's some stuff to be fixed, I hope that by tomorrow I'll have something decently working.

I'll consider this fixed for now. Thanks.

I have exactly the same problem with my Pixel 2XL. It's working fine on Emulator and on other devices. It's about exactly the same as bipinvaylu posted in his video.

Edit: I'm using 2.0.0-beta04

Was this page helpful?
0 / 5 - 0 ratings

Related issues

therealshabi picture therealshabi  路  10Comments

arsonistAnt picture arsonistAnt  路  9Comments

HD-AD picture HD-AD  路  8Comments

gabriel-TheCode picture gabriel-TheCode  路  8Comments

xuanxws picture xuanxws  路  4Comments