Skip to content

Commit

Permalink
Fix videos not playing in some browsers due to unsupported color space (
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Aug 31, 2023
1 parent 1471be8 commit ecd76fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/media_attachment.rb
Expand Up @@ -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',
Expand Down

0 comments on commit ecd76fa

Please sign in to comment.