render: parametrize output frame rate with --fps (default 24) - #122
Open
eldermoraes wants to merge 1 commit into
Open
render: parametrize output frame rate with --fps (default 24)#122eldermoraes wants to merge 1 commit into
eldermoraes wants to merge 1 commit into
Conversation
extract_segment() hardcodes '-r 24', silently converting every source to 24fps — a 60fps vertical reel comes out at 24 with no warning, and there is no way to opt out. Adds --fps (default 24, so existing behavior is unchanged) and threads it through extract_all_segments() → extract_segment(). Found while editing a real 1080x1920@60 reel that came out at 24fps. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="helpers/render.py">
<violation number="1" location="helpers/render.py:595">
P3: No validation that --fps is a positive integer. Passing 0 or a negative value is threaded straight into ffmpeg's `-r str(fps)`, where it surfaces as a cryptic ffmpeg error (subprocess CalledProcessError) instead of a clear usage message. Consider validating the range at parse time (or in extract_segment) so an invalid fps fails fast with an actionable message.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| "--fps", | ||
| type=int, | ||
| default=24, | ||
| help="Output frame rate for segment extraction (default: 24).", |
There was a problem hiding this comment.
P3: No validation that --fps is a positive integer. Passing 0 or a negative value is threaded straight into ffmpeg's -r str(fps), where it surfaces as a cryptic ffmpeg error (subprocess CalledProcessError) instead of a clear usage message. Consider validating the range at parse time (or in extract_segment) so an invalid fps fails fast with an actionable message.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At helpers/render.py, line 595:
<comment>No validation that --fps is a positive integer. Passing 0 or a negative value is threaded straight into ffmpeg's `-r str(fps)`, where it surfaces as a cryptic ffmpeg error (subprocess CalledProcessError) instead of a clear usage message. Consider validating the range at parse time (or in extract_segment) so an invalid fps fails fast with an actionable message.</comment>
<file context>
@@ -586,6 +588,12 @@ def main() -> None:
+ "--fps",
+ type=int,
+ default=24,
+ help="Output frame rate for segment extraction (default: 24).",
+ )
ap.add_argument(
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
extract_segment()hardcodes-r 24, silently converting every source to 24fps. A 60fps vertical reel comes out at 24 with no warning, and there is no way to opt out — the skill's own guidance of preserving the source FPS cannot be followed.Change
Adds
--fps(default 24, so existing behavior is unchanged) and threads it throughextract_all_segments()→extract_segment().How it was found
Editing a real 1080x1920@60 reel: output came back at 24fps with no indication anywhere. Verified with ffprobe before/after:
🤖 Generated with Claude Code
https://claude.ai/code/session_01HTd52WxWgWPYeakcJAiAnR
Summary by cubic
Adds a
--fpsflag to control the output frame rate during segment extraction. Default stays 24, so current behavior is unchanged, and you can now match sources like 60fps.--fps(default 24) for segment outputs.fpsthroughextract_all_segments()andextract_segment(), replacing the hardcoded ffmpeg-r 24.--fps 60to keep 60fps reels at 60fps.Written for commit cb906eb. Summary will update on new commits.