From 4c4a168a0140156f02354efc4befd0b833b20f9f Mon Sep 17 00:00:00 2001 From: rfelker Date: Tue, 29 Jan 2002 16:27:21 +0000 Subject: added constant-qscale encoding support with lavc, fixed slightly incorrect definition for the vme lavc option git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4409 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index a5638250db..1313a61692 100644 --- a/mencoder.c +++ b/mencoder.c @@ -72,6 +72,7 @@ char *lavc_param_vcodec = NULL; int lavc_param_vbitrate = -1; int lavc_param_vhq = 0; /* default is realtime encoding */ int lavc_param_vme = 3; +int lavc_param_vqscale = 0; int lavc_param_keyint = -1; #endif @@ -988,11 +989,13 @@ case VCODEC_LIBAVCODEC: encoder context - FIXME */ motion_estimation_method = lavc_param_vme; -#if 0 /* fixed qscale :p */ - lavc_venc_context.flags |= CODEC_FLAG_QSCALE; - lavc_venc_context.quality = 1; -#endif + if (lavc_param_vqscale) + { + printf("Using constant qscale = %d (VBR)\n", lavc_param_vqscale); + lavc_venc_context.flags |= CODEC_FLAG_QSCALE; + lavc_venc_context.quality = lavc_param_vqscale; + } if (avcodec_open(&lavc_venc_context, lavc_venc_codec) != 0) { -- cgit v1.2.3