[FFmpeg-user] How to use the diff of palettegen with screen capturen

jun li publicforlijun at gmail.com
Wed Mar 24 09:06:28 EET 2021


ffmpeg -f gdigrab -framerate 30 -i desktop -ss 1 -lavfi
palettegen=stats_mode=*diff*:transparency_color=ffffff[pal],[0:v][pal]paletteuse=new=1:dither=bayer:bayer_scale=1
default.gif
[image: image.png]
[image: image.png]
*memory increase until crash*

ffmpeg -f gdigrab -framerate 30 -i desktop -ss 1 -lavfi
palettegen=stats_mode=*single*:transparency_color=ffffff[pal],[0:v][pal]paletteuse=new=1:dither=bayer:bayer_scale=1
default.gif
[image: image.png]
*single* is ok.how to use *diff* replace *single*?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 19933 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210324/7e8eddc9/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 133773 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210324/7e8eddc9/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 111271 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210324/7e8eddc9/attachment-0002.png>


More information about the ffmpeg-user mailing list