Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
avfilter: add palettegen filter
- Loading branch information
Showing
with
408 additions
and
0 deletions.
-
+24
−0
doc/filters.texi
-
+1
−0
libavfilter/Makefile
-
+1
−0
libavfilter/allfilters.c
-
+382
−0
libavfilter/vf_palettegen.c
|
|
@@ -6927,6 +6927,30 @@ 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 option: |
|
|
|
|
|
@table @option |
|
|
@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. |
|
|
Set by default. |
|
|
@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. |
|
|
|
|
|
@@ -160,6 +160,7 @@ OBJS-$(CONFIG_OPENCL) += deshake_opencl.o unsharp_opencl. |
|
|
OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o dualinput.o framesync.o |
|
|
OBJS-$(CONFIG_OWDENOISE_FILTER) += vf_owdenoise.o |
|
|
OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o |
|
|
OBJS-$(CONFIG_PALETTEGEN_FILTER) += vf_palettegen.o |
|
|
OBJS-$(CONFIG_PERMS_FILTER) += f_perms.o |
|
|
OBJS-$(CONFIG_PERSPECTIVE_FILTER) += vf_perspective.o |
|
|
OBJS-$(CONFIG_PHASE_FILTER) += vf_phase.o |
|
|
|
|
|
@@ -175,6 +175,7 @@ void avfilter_register_all(void) |
|
|
REGISTER_FILTER(OVERLAY, overlay, vf); |
|
|
REGISTER_FILTER(OWDENOISE, owdenoise, vf); |
|
|
REGISTER_FILTER(PAD, pad, vf); |
|
|
REGISTER_FILTER(PALETTEGEN, palettegen, vf); |
|
|
REGISTER_FILTER(PERMS, perms, vf); |
|
|
REGISTER_FILTER(PERSPECTIVE, perspective, vf); |
|
|
REGISTER_FILTER(PHASE, phase, vf); |
|
|
|
Oops, something went wrong.