PNG to GIF - Accessing the Disposal Method

Questions involving a Windows version of FFmpeg.
Post Reply
User avatar
JHPJHP
Posts: 3
Joined: Wed Apr 03, 2019 7:29 pm

PNG to GIF - Accessing the Disposal Method

Post by JHPJHP » Wed Apr 03, 2019 7:53 pm

Hi,

Version: 4.1.1
Architecture: Windows 32-bit
Linking: Shared

I am having trouble with transparency, changing the disposal method.

When I output PNG images to GIF using the following Complex Filter the images are overlapped (disposal method 1), but I need the next image to replace the previous image (disposal method 2).

Code: Select all

-filter_complex palettegen=reserve_transparent=1:transparency_color=ffffff:stats_mode=diff[x];[0:v][x]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle -gifflags -transdiff
Full Command:

Code: Select all

ffmpeg -vsync cfr -f concat -r 20 -safe 0 -i _png.txt -final_delay 50 -pix_fmt pal8 -filter_complex palettegen=reserve_transparent=1:transparency_color=ffffff:stats_mode=diff[x];[0:v][x]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle -gifflags -transdiff test.gif -v 16 -y -hide_banner
Any help is greatly appreciated; thank you.
Last edited by JHPJHP on Sun Apr 07, 2019 5:42 am, edited 1 time in total.

User avatar
JHPJHP
Posts: 3
Joined: Wed Apr 03, 2019 7:29 pm

Re: PNG to GIF - Accessing the Disposal Method

Post by JHPJHP » Sun Apr 07, 2019 5:22 am

Hi,

I ended up writing my own in-place cross platform GIF patching application. The nice thing about this approach is that I'm able to access not only the Disposal Method, but also every other animated GIF parameter.

I would still like to know if FFmpeg provides inherent access to some of these settings.

Cheers.
PureBasic Scripts & Programs :: Deform Image: MLS :: Video Snipping Tool (applications using FFmpeg)

Post Reply