Skip to content

Fix PyAV frame rate handling in video writer#287

Open
ModifierLTD wants to merge 1 commit into
PeterL1n:masterfrom
ModifierLTD:master
Open

Fix PyAV frame rate handling in video writer#287
ModifierLTD wants to merge 1 commit into
PeterL1n:masterfrom
ModifierLTD:master

Conversation

@ModifierLTD

Copy link
Copy Markdown

Summary

  • pass a rational frame rate to PyAV when creating H.264 output streams
  • avoid the AttributeError raised by newer PyAV versions when rate is passed as a formatted string

Verification

  • ran python inference.py --variant mobilenetv3 --checkpoint rvm_mobilenetv3.pth --device cuda --input-source input.mp4 --output-type video --output-composition composition.mp4 --output-alpha alpha.mp4 --output-foreground foreground.mp4
  • ran python inference.py --variant resnet50 --checkpoint rvm_resnet50.pth --device cuda --input-source input.mp4 --output-type video --output-composition composition.mp4 --output-alpha alpha.mp4 --output-foreground foreground.mp4
  • confirmed output metadata matches the input video and sampled frame statistics show non-degenerate alpha, foreground, and composition outputs

Artifacts

Co-Authored-By: Oz oz-agent@warp.dev

Co-Authored-By: Oz <oz-agent@warp.dev>
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