bytedeco/javacv

High quality gif with FfmpegFrameRecorder

Open

#1,112 建立於 2018年12月25日

在 GitHub 查看
 (32 留言) (0 反應) (0 負責人)Java (1,583 fork)batch import
help wantedquestion

倉庫指標

Star
 (6,985 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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...

貢獻者指南