Skip to content

Conversation

@raykim2414
Copy link

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.

1. Updated the `reduce` method in `ReduceFrameEvenlySpaced` to use `originalFPS * videoDuration` for loop condition and index checks, preventing frame drop by ensuring all frames are correctly processed.
2. Altered video compression settings in `createVideoSettingsWithBitrate` to accurately use `targetFPS`, enhancing the frame rate consistency during compression.

These changes collectively resolve the previously observed frame drop issue, ensuring a more reliable and accurate frame reduction in FYVideoCompressor.
Copy link
Contributor

@wzio wzio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seem it is good to me

soobeen27 added a commit to soobeen27/FYVideoCompressor that referenced this pull request Sep 10, 2024
@raykim2414
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants