ffmpeglibavcodec

libavcodec: How do I use AVOptions to set up encoder parameters?


libavcodec seems to have 3 ways to specify parameters for a codec:

Can I use AVOptions to setup all of the encoding parameters? In addition, can AVOptions provide sensible defaults? Google doesn't yield any results and there's no example provided in the documentation.


Solution

  • Sure. Look at the examples of av_opt_* calls in doc/examples. For defaults, call av_opt_set_defaults