# HG changeset patch # User michael # Date 1072640170 0 # Node ID 9165fbc7d89dd9203a51277b44a7b72c8442f1ce # Parent 7d17a79e4dd3c58b9411ced43cb656730dd039a3 scenechange_threshold command line option patch by (Balatoni Denes ) diff -r 7d17a79e4dd3 -r 9165fbc7d89d DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Sun Dec 28 17:14:04 2003 +0000 +++ b/DOCS/man/en/mplayer.1 Sun Dec 28 19:36:10 2003 +0000 @@ -3859,6 +3859,13 @@ For a strict MPEG1/\:2/\:4 compliance this would have to be <=132. (default: 250 or one key frame every ten seconds in a 25fps movie) .TP +.B sc_threshold=<-1000000\-1000000> +Threshold for scene change detection. +Libavcodec inserts a keyframe when it detects a scene change. +You can specify the sensitivity of the detection with this option. +-1000000 means there is a scene change detected at every frame, 1000000 means +no scene changes are detected (default 0). +.TP .B vb_strategy=<0\-1> strategy to choose between I/\:P/\:B frames (pass\ 2): .RSs diff -r 7d17a79e4dd3 -r 9165fbc7d89d libmpcodecs/ve_lavc.c --- a/libmpcodecs/ve_lavc.c Sun Dec 28 17:14:04 2003 +0000 +++ b/libmpcodecs/ve_lavc.c Sun Dec 28 19:36:10 2003 +0000 @@ -139,6 +139,7 @@ static int lavc_param_noise_reduction= 0; static int lavc_param_qp_rd= 0; static int lavc_param_inter_threshold= 0; +static int lavc_param_sc_threshold= 0; static int lavc_param_ss= 0; static int lavc_param_top= -1; @@ -269,6 +270,7 @@ {"ss", &lavc_param_ss, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_SLICE_STRUCT, NULL}, #endif {"inter_threshold", &lavc_param_inter_threshold, CONF_TYPE_INT, CONF_RANGE, -1000000, 1000000, NULL}, + {"sc_threshold", &lavc_param_sc_threshold, CONF_TYPE_INT, CONF_RANGE, -1000000, 1000000, NULL}, {"top", &lavc_param_top, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -380,6 +382,9 @@ lavc_venc_context->coder_type= lavc_param_coder; lavc_venc_context->context_model= lavc_param_context; #endif +#if LIBAVCODEC_BUILD >= 4680 + lavc_venc_context->scenechange_threshold= lavc_param_sc_threshold; +#endif #if LIBAVCODEC_BUILD >= 4690 lavc_venc_context->noise_reduction= lavc_param_noise_reduction; #endif