From 1fffa00bc05c44f3b9f04439bd6337d0f1aa1009 Mon Sep 17 00:00:00 2001
From: Alex Lee <alexleegk@gmail.com>
Date: Wed, 23 Jan 2019 11:50:40 -0800
Subject: [PATCH] Add rgba option to save_gif.

---
 video_prediction/utils/ffmpeg_gif.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/video_prediction/utils/ffmpeg_gif.py b/video_prediction/utils/ffmpeg_gif.py
index a0fa1f28..724933f7 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,
-- 
GitLab