@ -172,34 +172,34 @@ typedef struct {
# define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
static const AVOption drawtext_options [ ] = {
{ " fontfile " , " set font file " , OFFSET ( fontfile ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " text " , " set text " , OFFSET ( text ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " textfile " , " set text file " , OFFSET ( textfile ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " fontcolor " , " set foreground color " , OFFSET ( fontcolor_string ) , AV_OPT_TYPE_STRING , { . str = " black " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " boxcolor " , " set box color " , OFFSET ( boxcolor_string ) , AV_OPT_TYPE_STRING , { . str = " white " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " shadowcolor " , " set shadow color " , OFFSET ( shadowcolor_string ) , AV_OPT_TYPE_STRING , { . str = " black " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " box " , " set box " , OFFSET ( draw_box ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " fontsize " , " set font size " , OFFSET ( fontsize ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , FLAGS } ,
{ " x " , " set x expression " , OFFSET ( x_expr ) , AV_OPT_TYPE_STRING , { . str = " 0 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " y " , " set y expression " , OFFSET ( y_expr ) , AV_OPT_TYPE_STRING , { . str = " 0 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " shadowx " , " set x " , OFFSET ( shadowx ) , AV_OPT_TYPE_INT , { . i64 = 0 } , INT_MIN , INT_MAX , FLAGS } ,
{ " shadowy " , " set y " , OFFSET ( shadowy ) , AV_OPT_TYPE_INT , { . i64 = 0 } , INT_MIN , INT_MAX , FLAGS } ,
{ " tabsize " , " set tab size " , OFFSET ( tabsize ) , AV_OPT_TYPE_INT , { . i64 = 4 } , 0 , INT_MAX , FLAGS } ,
{ " basetime " , " set base time " , OFFSET ( basetime ) , AV_OPT_TYPE_INT64 , { . i64 = AV_NOPTS_VALUE } , INT64_MIN , INT64_MAX , FLAGS } ,
{ " draw " , " if false do not draw " , OFFSET ( draw_expr ) , AV_OPT_TYPE_STRING , { . str = " 1 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " expansion " , " set the expansion mode " , OFFSET ( exp_mode ) , AV_OPT_TYPE_INT , { . i64 = EXP_NORMAL } , 0 , 2 , FLAGS , " expansion " } ,
{ " none " , " set no expansion " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_NONE } , 0 , 0 , FLAGS , " expansion " } ,
{ " normal " , " set normal expansion " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_NORMAL } , 0 , 0 , FLAGS , " expansion " } ,
{ " strftime " , " set strftime expansion (deprecated) " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_STRFTIME } , 0 , 0 , FLAGS , " expansion " } ,
{ " timecode " , " set initial timecode " , OFFSET ( tc_opt_string ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " tc24hmax " , " set 24 hours max (timecode only) " , OFFSET ( tc24hmax ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " timecode_rate " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " r " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " rate " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " reload " , " reload text file for each frame " , OFFSET ( reload ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " fix_bounds " , " if true, check and fix text coords to avoid clipping " , OFFSET ( fix_bounds ) , AV_OPT_TYPE_INT , { . i64 = 1 } , 0 , 1 , FLAGS } ,
{ " fontfile " , " set font file " , OFFSET ( fontfile ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " text " , " set text " , OFFSET ( text ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " textfile " , " set text file " , OFFSET ( textfile ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " fontcolor " , " set foreground color " , OFFSET ( fontcolor_string ) , AV_OPT_TYPE_STRING , { . str = " black " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " boxcolor " , " set box color " , OFFSET ( boxcolor_string ) , AV_OPT_TYPE_STRING , { . str = " white " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " shadowcolor " , " set shadow color " , OFFSET ( shadowcolor_string ) , AV_OPT_TYPE_STRING , { . str = " black " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " box " , " set box " , OFFSET ( draw_box ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " fontsize " , " set font size " , OFFSET ( fontsize ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , FLAGS } ,
{ " x " , " set x expression " , OFFSET ( x_expr ) , AV_OPT_TYPE_STRING , { . str = " 0 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " y " , " set y expression " , OFFSET ( y_expr ) , AV_OPT_TYPE_STRING , { . str = " 0 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " shadowx " , " set x " , OFFSET ( shadowx ) , AV_OPT_TYPE_INT , { . i64 = 0 } , INT_MIN , INT_MAX , FLAGS } ,
{ " shadowy " , " set y " , OFFSET ( shadowy ) , AV_OPT_TYPE_INT , { . i64 = 0 } , INT_MIN , INT_MAX , FLAGS } ,
{ " tabsize " , " set tab size " , OFFSET ( tabsize ) , AV_OPT_TYPE_INT , { . i64 = 4 } , 0 , INT_MAX , FLAGS } ,
{ " basetime " , " set base time " , OFFSET ( basetime ) , AV_OPT_TYPE_INT64 , { . i64 = AV_NOPTS_VALUE } , INT64_MIN , INT64_MAX , FLAGS } ,
{ " draw " , " if false do not draw " , OFFSET ( draw_expr ) , AV_OPT_TYPE_STRING , { . str = " 1 " } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " expansion " , " set the expansion mode " , OFFSET ( exp_mode ) , AV_OPT_TYPE_INT , { . i64 = EXP_NORMAL } , 0 , 2 , FLAGS , " expansion " } ,
{ " none " , " set no expansion " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_NONE } , 0 , 0 , FLAGS , " expansion " } ,
{ " normal " , " set normal expansion " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_NORMAL } , 0 , 0 , FLAGS , " expansion " } ,
{ " strftime " , " set strftime expansion (deprecated) " , OFFSET ( exp_mode ) , AV_OPT_TYPE_CONST , { . i64 = EXP_STRFTIME } , 0 , 0 , FLAGS , " expansion " } ,
{ " timecode " , " set initial timecode " , OFFSET ( tc_opt_string ) , AV_OPT_TYPE_STRING , { . str = NULL } , CHAR_MIN , CHAR_MAX , FLAGS } ,
{ " tc24hmax " , " set 24 hours max (timecode only) " , OFFSET ( tc24hmax ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " timecode_rate " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " r " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " rate " , " set rate (timecode only) " , OFFSET ( tc_rate ) , AV_OPT_TYPE_RATIONAL , { . dbl = 0 } , 0 , INT_MAX , FLAGS } ,
{ " reload " , " reload text file for each frame " , OFFSET ( reload ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , 1 , FLAGS } ,
{ " fix_bounds " , " if true, check and fix text coords to avoid clipping " , OFFSET ( fix_bounds ) , AV_OPT_TYPE_INT , { . i64 = 1 } , 0 , 1 , FLAGS } ,
/* FT_LOAD_* flags */
{ " ft_load_flags " , " set font loading flags for libfreetype " , OFFSET ( ft_load_flags ) , AV_OPT_TYPE_FLAGS , { . i64 = FT_LOAD_DEFAULT | FT_LOAD_RENDER } , 0 , INT_MAX , FLAGS , " ft_load_flags " } ,