~cytrogen/masto-fe

05093266e6e3c54f9096da9cdcdafdc83703c578 — Eugen Rochko 2 years ago 16681e0
Fix some video encoding failing due to uneven dimensions (#26766)

1 files changed, 1 insertions(+), 0 deletions(-)

M app/models/media_attachment.rb
M app/models/media_attachment.rb => app/models/media_attachment.rb +1 -0
@@ 102,6 102,7 @@ class MediaAttachment < ApplicationRecord
        'preset' => 'veryfast',
        'movflags' => 'faststart', # Move metadata to start of file so playback can begin before download finishes
        'pix_fmt' => 'yuv420p', # Ensure color space for cross-browser compatibility
        'vf' => 'crop=floor(iw/2)*2:floor(ih/2)*2', # h264 requires width and height to be even. Crop instead of scale to avoid blurring
        'c:v' => 'h264',
        'c:a' => 'aac',
        'b:a' => '192k',