Skip to content

Fixed conversion of variable refresh rate videos - #539

Open
MartelliEnrico wants to merge 3 commits into
mainfrom
variable-fps-videos-fix
Open

Fixed conversion of variable refresh rate videos#539
MartelliEnrico wants to merge 3 commits into
mainfrom
variable-fps-videos-fix

Conversation

@MartelliEnrico

@MartelliEnrico MartelliEnrico commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved video conversion to keep WebM files within the maximum supported size, with an automatic fallback when required.
    • Improved handling of application start-up errors and exit codes on Windows.
    • Enhanced compatibility when processing multimedia commands.
  • Tests

    • Added coverage for videos with highly accurate frame-rate metadata.
    • Updated multimedia validation checks for improved clarity and reliability.
  • Chores

    • Updated supporting application start-script references and documentation links.

Also added a new Docker ARG: VIDEO_BUFFER_SIZE with default value 600K, useful to quickly change directly in production the max size of the buffer used in 2pass video conversion, in case some files conversion result in videos greater than the maximum file size allowed
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The change migrates external command execution to list-based APIs, adds WebM bitrate fallback encoding and coverage, enables final-field mutation in JVM runs, and updates Unix and Windows startup script templates.

Media and runtime startup

Layer / File(s) Summary
List-based command execution
src/main/java/.../process/ProcessHelper.java, src/main/java/.../media/MediaHelper.java, src/test/java/.../media/MediaHelperTest.java
ProcessHelper.executeCommand and affected ffprobe, ffmpeg, and test calls now use List<String> commands.
WebM bitrate retry flow
src/main/java/.../media/MediaHelper.java, src/test/java/.../media/MediaHelperTest.java
WebM conversion performs two-pass encoding, checks the output size, retries with fallback bitrate settings when necessary, and adds high-accuracy frame-rate coverage.
JVM execution configuration
build.gradle
Test and application JVM arguments now enable final-field mutation for unnamed modules.
Application startup script control flow
src/main/resources/customUnixStartScript.txt, src/main/resources/customWindowsStartScript.txt
Unix references are refreshed, while Windows environment setup and Java failure/error-level handling are revised.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing conversion issues for variable refresh rate videos.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4736d458-3b36-4b51-a77e-68c56b409a80

📥 Commits

Reviewing files that changed from the base of the PR and between 44fa406 and b60d3ac.

⛔ Files ignored due to path filters (1)
  • src/test/resources/highly_accurate_fps_count.mp4 is excluded by !**/*.mp4, !**/*.mp4
📒 Files selected for processing (6)
  • Railway.dockerfile
  • build.gradle
  • src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java
  • src/main/resources/customUnixStartScript.txt
  • src/main/resources/customWindowsStartScript.txt
  • src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java

Comment thread Railway.dockerfile Outdated
Comment thread Railway.dockerfile Outdated
Comment thread src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java Outdated
Comment thread src/main/resources/customWindowsStartScript.txt

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eb6a4b4e-1bda-4618-b59a-695079b019f0

📥 Commits

Reviewing files that changed from the base of the PR and between b60d3ac and 617fc0a.

📒 Files selected for processing (3)
  • src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java
  • src/main/java/com/github/stickerifier/stickerify/process/ProcessHelper.java
  • src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java

@MartelliEnrico
MartelliEnrico requested a review from rob93c July 30, 2026 14:33
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.

1 participant