From 9b964690e39928af616d88b3e8ab47a7db14a538 Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Sat, 24 Jan 2015 21:37:59 +0100 Subject: avfilter: add palettegen filter --- doc/filters.texi | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'doc') diff --git a/doc/filters.texi b/doc/filters.texi index 8069554eb4..7789bf0cac 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6909,6 +6909,51 @@ pad="2*iw:2*ih:ow-iw:oh-ih" @end example @end itemize +@section palettegen + +Generate one palette for a whole video stream. + +It accepts the following options: + +@table @option +@item max_colors +Set the maximum number of colors to quantize in the palette. +Note: the palette will still contain 256 colors; the unused palette entries +will be black. + +@item reserve_transparent +Create a palette of 255 colors maximum and reserve the last one for +transparency. Reserving the transparency color is useful for GIF optimization. +If not set, the maximum of colors in the palette will be 256. You probably want +to disable this option for a standalone image. +Set by default. + +@item stats_mode +Set statistics mode. + +It accepts the following values: +@table @samp +@item full +Compute full frame histograms. +@item diff +Compute histograms only for the part that differs from previous frame. This +might be relevant to give more importance to the moving part of your input if +the background is static. +@end table + +Default value is @var{full}. +@end table + +@subsection Examples + +@itemize +@item +Generate a representative palette of a given video using @command{ffmpeg}: +@example +ffmpeg -i input.mkv -vf palettegen palette.png +@end example +@end itemize + @section perspective Correct perspective of video not recorded perpendicular to the screen. -- cgit v1.2.3