charmbracelet / charmbracelet/vhs

Allow customizing FFmpeg options

Open
#656 1 comment 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
20.9k
Forks
474
Avg merge
4d 1h
Merged PRs (30d)
2

Description

Right now, the encoding options for FFmpeg are hard-coded. It would be great if those could be overridden.

For x264 in particular, if the video gets post-processed, `-crf 17` or even lower would be useful. Also, for typical terminal screencast content, `-tune animation` or `-tune stillimage` can improve quality a lot, and `-movflags +faststart` allows output files to start streaming in a browser before fully downloaded. Finally, the current `-pix_fmt yuv420p` default triggers a fairly lossy RGB to YUV color space conversion; being able to use `-c:v libx264rgb -pix_fmt rgb24` would help with that.

FFmpeg also has preset file support; maybe that's the easiest way - have an `--ffpreset` option for `vhs` that, if set, is passed to FFmpeg using `-fpre` instead of all the defaults above (and then it's up to the user to ensure a working profile file).

Contributor guide

Open the contributing guide

Research direction

Start by locating the vhs CLI option definitions and the FFmpeg command assembly. Compare the proposed --ffpreset behavior with customizable encoding options, including the listed x264 and pixel-format examples. Done means users can override the hard-coded options through a documented interface without breaking the default encoding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
audio-video-rtc, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.