bytedeco/javacv

High quality gif with FfmpegFrameRecorder

Open

#1,112 opened on Dec 25, 2018

View on GitHub
 (32 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi, I'm using FfmpegFrameGrabber and FfmpegFrameRecorder to making Gif. First I extract Gif frames by grabber and convert them to bitmaps by Bitmap frameBitmap = new AndroidFrameConverter().convert(frame );

then I do some Edits on Them and convert them to Frame object again. and then make gif of them by recorder. I have tested different PixelFormat But the quality is still bad. also set videoquality to 1. .... from ffmpeg documentation I have found these commands make the Gif with high quality.. ffmpeg -i StickAround.mp4 -filter_complex "[0:v] palettegen" palette.png ffmpeg -i StickAround.mp4 -i palette.png -filter_complex "[0:v][1:v] paletteuse" prettyStickAround.gif is it possible to do this? I know it may be done by FrameFilter but I dont know how...

Contributor guide