Commit c1ffa824 authored by Ilkka Ollakka's avatar Ilkka Ollakka Committed by Ilkka Ollakka

avcodec: set some hopefully reasonable defaults to vp8 encoding

(cherry picked from commit 86263dcd)
Signed-off-by: default avatarIlkka Ollakka <ileoo@iki.fi>
parent 6a79ddf8
......@@ -579,6 +579,20 @@ int OpenEncoder( vlc_object_t *p_this )
/* Misc parameters */
p_context->bit_rate = p_enc->fmt_out.i_bitrate;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 68, 2 )
/* Set reasonable defaults to VP8, based on
libvpx-720p preset from libvpx ffmpeg-patch */
if( i_codec_id == CODEC_ID_VP8 )
{
p_context->bit_rate_tolerance = 2* p_enc->fmt_out.i_bitrate;
p_context->lag = 16;
p_context->level = 216;
p_context->profile = 0;
p_context->rc_buffer_aggressivity = 0.95;
p_context->token_partitions = 4;
}
#endif
if( i_codec_id == CODEC_ID_RAWVIDEO )
{
/* XXX: hack: Force same codec (will be handled by transcode) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment