You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When exporting a tape to .mp4 and using the Set Framerate command (example Set Framerate 50), the resulting video is still encoded at 25 fps. This happens regardless of the framerate set in the tape file.
I dug into the source and it seems to be caused by two things in the ffmpeg pipeline:
If you use a MarginFill color, WithMargin() creates the background using ffmpeg's lavfi color filter (color=%s:s=%dx%d). Since no rate is passed, lavfi defaults to 25 fps. Because this 25fps stream is used as the base for the overlay filter, ffmpeg forces the entire output video to match that 25fps.
Even without a margin, the final ffmpeg command built in video.go is missing an explicit -r <framerate> flag right before the output file. Without it, libx264 often just falls back to 25fps anyway.
Setup
OS: Linux
Shell: bash
Terminal Emulator: N/A (VHS rendering)
Terminal Multiplexer: N/A
To Reproduce
Steps to reproduce the behavior:
Create a tape file with Output demo.mp4 and Set Framerate 50 (or 60).
Run vhs demo.tape.
Check the framerate of the resulting video using ffprobe demo.mp4.
Activity
fix: honor Set Framerate on overlay input streams