ReproNim / reprostim

Automated capture of audio-visual stimuli into BIDS datasets
5 stars 3 forks source link

Investigate and fix frames dropping issues in videocapture found in ses-20240830 #111

Closed vmdocua closed 3 weeks ago

vmdocua commented 2 months ago

This PR is brother of issue #68 we have with frames dropping. Got this issue in ReproNim ses-20240830 time calibration session. Closes #112. Closes #113. Closes #114.

Proposal is listed below:

Re-configure reprostim-videocapture/ffmpeg with options:

Current results of applied options on dev PC:

  1. Linux OOM doesn't kill ffmpeg anymore after 1-2 minutes of video capture.
  2. Video and audio streams are almost in sync in recorded video file, but it's possible some small deviations still exists.
  3. CPU usage should be reduced in 2+ times.
  4. Visually don't see video quality lost, but it's possible on real system we will need still to increase it.
  5. Increased *.mkv file size. For test was used video from calibration session we have, resolution 1920x1080, 60 FPS. Video length 10 minutes, video file size is 100MB, so this corresponds to 10MB/minute, 0.6GB /hour, 14.4GB /day or 430GB /month.

Current results of applied options @reproiner:

  1. Bad picture quality for dynamic videos, sports etc. It's possible that we need to increase bitrate from 2M close to standard quality for 1080p 60fps H.264 like 8-12Mbps. e.g -b:v 8M -maxrate 8M -bufsize 16M and monitor CPU, *.mkv size and quality.