How to use the diff of palettegen with screen capturen

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use the diff of palettegen with screen capturen

jun li
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*?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

image.png (26K) Download Attachment
image.png (178K) Download Attachment
image.png (148K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to use the diff of palettegen with screen capturen

Carl Eugen Hoyos-2
Am Mi., 24. März 2021 um 08:38 Uhr schrieb jun li <[hidden email]>:
>
> 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

This is not how palettegen / paletteuse work, see:
https://ffmpeg.org/ffmpeg-filters.html#palettegen-1

The examples you found only work for short input files.

For future questions:
Never attach screen shots, post the complete, uncut console
output as text instead.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to use the diff of palettegen with screen capturen

jun li
ffmpeg -f gdigrab -framerate 5 -i desktop output.gif
when i record windows desktop. some colors are strange (see gif.png),how to
fix it ( see normal.png)?

Carl Eugen Hoyos <[hidden email]> 于2021年3月24日周三 下午3:43写道:

> Am Mi., 24. März 2021 um 08:38 Uhr schrieb jun li <
> [hidden email]>:
> >
> > 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
>
> This is not how palettegen / paletteuse work, see:
> https://ffmpeg.org/ffmpeg-filters.html#palettegen-1
>
> The examples you found only work for short input files.
>
> For future questions:
> Never attach screen shots, post the complete, uncut console
> output as text instead.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

normal.png (81K) Download Attachment
gif.png (242K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to use the diff of palettegen with screen capturen

Carl Eugen Hoyos-2
Am Mo., 29. März 2021 um 12:22 Uhr schrieb jun li <[hidden email]>:
>
> ffmpeg -f gdigrab -framerate 5 -i desktop output.gif

This command line cannot produce a nice-looking gif,
paletteuse is needed for good pal8 output.

Either record first (not using gif) and convert to gif later
or use a palette of your choice.

Please find out what top-posting means and avoid it here.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".