]> cat aescling's git repositories - mastodon.git/commitdiff
Fix GIFV encoding params (#7098)
authorMIYAGI Hikaru <hcmiya@users.noreply.github.com>
Tue, 10 Apr 2018 07:11:55 +0000 (16:11 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 10 Apr 2018 07:11:55 +0000 (09:11 +0200)
- 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

index ac2aa7ed2171370da2e41c8f188b053978a84934..8fd9ac09fd807121a383f2cc36d4b5b9defc48d3 100644 (file)
@@ -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,
               },