How to implement capped crf #158
Answered
by
asticode
mdsohelmia
asked this question in
Q&A
-
ffmpeg -I Sintel.mp4 -c:v libx264 -crf 23 -maxrate 2M -bufsize 4M -preset medium Sintel_CRF23_2M.mp4 |
Beta Was this translation helpful? Give feedback.
Answered by
asticode
Jun 24, 2025
Replies: 1 comment
-
|
You need to provide a dictionary containing the proper options in the // Create dictionary
d := astiav.NewDictionary()
// Make sure to free it
defer d.Free()
// Parse dictionary
d.ParseString("preset=medium,crf=23", "=", ",", 0)
// Open codec context with the dictionary
encoderCtx.Open(codec, d) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
asticode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to provide a dictionary containing the proper options in the
CodecContext.Open()method (I've omitted error handling for readability purposes below however you should handle error when needed):