comparison mencoder.c @ 5166:f99487594e08

supporting ffmpegs "hopefully better bitrate control"
author michael
date Sun, 17 Mar 2002 17:09:04 +0000
parents 66b7488f9dd4
children 5d54fdcf066d
comparison
equal deleted inserted replaced
5165:51fcb1e5c96e 5166:f99487594e08
72 static AVCodecContext lavc_venc_context; 72 static AVCodecContext lavc_venc_context;
73 static AVPicture lavc_venc_picture; 73 static AVPicture lavc_venc_picture;
74 /* video options */ 74 /* video options */
75 char *lavc_param_vcodec = NULL; 75 char *lavc_param_vcodec = NULL;
76 int lavc_param_vbitrate = -1; 76 int lavc_param_vbitrate = -1;
77 int lavc_param_vrate_tolerance = 1024*1024*8;
77 int lavc_param_vhq = 0; /* default is realtime encoding */ 78 int lavc_param_vhq = 0; /* default is realtime encoding */
78 int lavc_param_vme = 3; 79 int lavc_param_vme = 3;
79 int lavc_param_vqscale = 0; 80 int lavc_param_vqscale = 0;
81 int lavc_param_vqmin = 3;
82 int lavc_param_vqmax = 15;
83 int lavc_param_vqdiff = 3;
84 float lavc_param_vqcompress = 0.5;
85 float lavc_param_vqblur = 0.5;
80 int lavc_param_keyint = -1; 86 int lavc_param_keyint = -1;
81 #endif 87 #endif
82 88
83 #ifdef USE_WIN32DLL 89 #ifdef USE_WIN32DLL
84 static BITMAPINFOHEADER* vfw_bih=NULL; 90 static BITMAPINFOHEADER* vfw_bih=NULL;
1084 lavc_venc_context.height = vo_h; 1090 lavc_venc_context.height = vo_h;
1085 if (lavc_param_vbitrate >= 0) /* != -1 */ 1091 if (lavc_param_vbitrate >= 0) /* != -1 */
1086 lavc_venc_context.bit_rate = lavc_param_vbitrate; 1092 lavc_venc_context.bit_rate = lavc_param_vbitrate;
1087 else 1093 else
1088 lavc_venc_context.bit_rate = 800000; /* default */ 1094 lavc_venc_context.bit_rate = 800000; /* default */
1095 lavc_venc_context.bit_rate_tolerance= lavc_param_vrate_tolerance;
1089 lavc_venc_context.frame_rate = (float)(force_ofps?force_ofps:sh_video->fps) * FRAME_RATE_BASE; 1096 lavc_venc_context.frame_rate = (float)(force_ofps?force_ofps:sh_video->fps) * FRAME_RATE_BASE;
1097 lavc_venc_context.qmin= lavc_param_vqmin;
1098 lavc_venc_context.qmax= lavc_param_vqmax;
1099 lavc_venc_context.max_qdiff= lavc_param_vqdiff;
1100 lavc_venc_context.qcompress= lavc_param_vqcompress;
1101 lavc_venc_context.qblur= lavc_param_vqblur;
1090 /* keyframe interval */ 1102 /* keyframe interval */
1091 if (lavc_param_keyint >= 0) /* != -1 */ 1103 if (lavc_param_keyint >= 0) /* != -1 */
1092 lavc_venc_context.gop_size = lavc_param_keyint; 1104 lavc_venc_context.gop_size = lavc_param_keyint;
1093 else 1105 else
1094 lavc_venc_context.gop_size = 250; /* default */ 1106 lavc_venc_context.gop_size = 250; /* default */