Skip to content
Snippets Groups Projects
Commit 03a857f5 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Use more widely supported MP4 format for gifv's

parent 8d93f0ca
No related branches found
No related tags found
No related merge requests found
......@@ -59,13 +59,15 @@ class MediaAttachment < ApplicationRecord
{
small: IMAGE_STYLES[:small],
original: {
format: 'webm',
format: 'mp4',
convert_options: {
output: {
'c:v' => 'libvpx',
'crf' => 4,
'b:v' => '1300K',
'vsync' => 'cfr',
'movflags' => 'faststart',
'pix_fmt' => 'yuv420p',
'vf' => 'scale=\'trunc(iw/2)*2:trunc(ih/2)*2\'',
'vsync' => 'cfr',
'b:v' => '1300K',
'crf' => 4,
},
},
},
......
......@@ -11,8 +11,8 @@ module Paperclip
final_file = Paperclip::Transcoder.make(file, options, attachment)
attachment.instance.file_file_name = 'media.webm'
attachment.instance.file_content_type = 'video/webm'
attachment.instance.file_file_name = 'media.mp4'
attachment.instance.file_content_type = 'video/mp4'
attachment.instance.type = MediaAttachment.types[:gifv]
final_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment