FYVideoCompressor icon indicating copy to clipboard operation
FYVideoCompressor copied to clipboard

Resolve Frame Drop Issue in Video Frame Reduction

Open raykim2414 opened this issue 2 years ago • 1 comments

Summary of the Changes

This PR specifically addresses the frame drop issue encountered during the frame reduction process in FYVideoCompressor. The changes made are:

  1. Improvement in Frame Reduction Logic: The reduce method in ReduceFrameEvenlySpaced has been modified to correctly handle frame indexes, using originalFPS * videoDuration as the loop condition. This effectively prevents frame drops, ensuring that each frame is appropriately processed.

  2. Refinement of Video Compression Settings: The video settings in the createVideoSettingsWithBitrate function have been refined to use targetFPS accurately, ensuring consistent frame rates during video compression.

Testing and Verification

These changes have been rigorously tested with various video files to ensure the frame drop issue is effectively resolved.

Invitation for Review

I would appreciate feedback from the FYVideoCompressor maintainers and contributors on these changes.

raykim2414 avatar Jan 17 '24 04:01 raykim2414

I previously submitted a PR to FYVideoCompressor to fix issues with frame rate handling, but noticed it hasn't been updated for some time. Since these fixes were important for my projects, I've created a new library at https://github.com/JEJEMEME/JMVideoCompressor that incorporates these improvements.

Key enhancements include:

  • Support for HEVC (H.265) codec with HDR preservation
  • Enhanced frame rate reduction strategies
  • More flexible configuration options
  • Modern async/await API
  • Progress reporting and cancellation support
  • Detailed analytics on compression results

I wanted to share this in case others are encountering similar issues. The new implementation builds upon the concepts from FYVideoCompressor while addressing these limitations.

raykim2414 avatar Apr 30 '25 03:04 raykim2414