From e6e93ecd8a45cea5f0c398054c2292a5fdf944cf Mon Sep 17 00:00:00 2001 From: MIYAGI Hikaru Date: Tue, 10 Apr 2018 16:11:55 +0900 Subject: [PATCH] Fix GIFV encoding params (#7098) - Explicitly specify video codec. When ffmpeg isn't compiled with libx264 but openh264, mpeg4 is selected as video codec. - Swap avarage bitrate and max bitrate. --- app/models/media_attachment.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index ac2aa7ed21..8fd9ac09fd 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -130,8 +130,9 @@ class MediaAttachment < ApplicationRecord 'pix_fmt' => 'yuv420p', 'vf' => 'scale=\'trunc(iw/2)*2:trunc(ih/2)*2\'', 'vsync' => 'cfr', - 'b:v' => '1300K', - 'maxrate' => '500K', + 'c:v' => 'h264', + 'b:v' => '500K', + 'maxrate' => '1300K', 'bufsize' => '1300K', 'crf' => 18, },