Fix videos not playing in some browsers due to unsupported color space (#26745)

lolsob-rspec
Eugen Rochko 2023-08-31 17:21:06 +02:00 committed by GitHub
parent 3f1b38932b
commit 703178c117
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ class MediaAttachment < ApplicationRecord
output: {
'loglevel' => 'fatal',
'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
'c:v' => 'h264',
'c:a' => 'aac',
'b:a' => '192k',