diff --git a/video_prediction/utils/ffmpeg_gif.py b/video_prediction/utils/ffmpeg_gif.py index a0fa1f28eeb7a38c7d55bf1152281fac865b138d..724933f7e1057e2e0b6174401021e6941bda5959 100644 --- a/video_prediction/utils/ffmpeg_gif.py +++ b/video_prediction/utils/ffmpeg_gif.py @@ -26,7 +26,7 @@ def save_gif(gif_fname, images, fps): '-vcodec', 'rawvideo', '-r', '%.02f' % fps, '-s', '%dx%d' % (w, h), - '-pix_fmt', {1: 'gray', 3: 'rgb24'}[c], + '-pix_fmt', {1: 'gray', 3: 'rgb24', 4: 'rgba'}[c], '-i', '-', '-filter_complex', '[0:v]split[x][z];[z]palettegen[y];[x][y]paletteuse', '-r', '%.02f' % fps,