GNOME Bugzilla – Bug 344583
[PATCH] ffmpegenc to support/expose more avcodec properties
Last modified: 2006-09-06 14:51:34 UTC
ffmpeg/avcodec supports quite some properties that can be of interest in transcoding/encoding applications (for example 2-pass encoding, VBR encoding, etc) which are available through e.g. mencoder, though not through ffmpegenc. The attached patch exposes (quite some of) the AVCodecContext configurable settings, as well as some additional (though simple) logic for b-frame delay handling.
Created attachment 67138 [details] [review] Patch for ffmpegenc enhancement Note that the properties are added in a 'configurable' manner, that is, a property need not be applicable to all ffmpeg codecs (e.g. bitrate, motion estimation not to huffyuv). Currently, the new set of properties are only enabled for MPEG4-like codecs, though this can be changed fairly easily to suit taste (and sense). Similarly, only video codecs have so far been considered (though this too is open to future change).
Patch by: Mark Nauwelaerts <manauw at skynet dot be> * ext/ffmpeg/Makefile.am: * ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_pass_get_type), (gst_ffmpeg_lim_pass_get_type), (gst_ffmpeg_mb_decision_get_type), (gst_ffmpeg_mb_cmp_get_type), (gst_ffmpeg_dct_algo_get_type), (gst_ffmpeg_idct_algo_get_type), (gst_ffmpeg_quant_type_get_type), (gst_ffmpeg_pre_me_get_type), (gst_ffmpeg_pred_method_get_type), (gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init), (gst_ffmpeg_cfg_codec_has_pspec), (gst_ffmpeg_cfg_install_property), (gst_ffmpeg_cfg_set_property), (gst_ffmpeg_cfg_get_property), (gst_ffmpeg_cfg_set_defaults), (gst_ffmpeg_cfg_fill_context): * ext/ffmpeg/gstffmpegcfg.h: Added helper object to handle extra properties. * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init), (gst_ffmpegenc_init), (gst_ffmpegenc_dispose), (gst_ffmpegenc_getcaps), (gst_ffmpegenc_setcaps), (gst_ffmpegenc_chain_video), (gst_ffmpegenc_chain_audio), (gst_ffmpegenc_flush_buffers), (gst_ffmpegenc_event_video), (gst_ffmpegenc_set_property), (gst_ffmpegenc_get_property), (gst_ffmpegenc_change_state), (gst_ffmpegenc_register): * ext/ffmpeg/gstffmpegenc.h: Exposes (quite some of) the AVCodecContext configurable settings, as well as some additional (though simple) logic for b-frame delay handling. Most of the properties are only enabled for mpeg4-like codecs. Fixes #344583.