diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-29 14:51:03 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-29 14:51:03 -0600 |
commit | f18e6229b78f74c6118178e52290acf2e0316b36 (patch) | |
tree | fbd24ebb5487a5f187659b29c236c0b34c18bdf9 /app/models | |
parent | c3c2ef2190177cb94c90a3340b4e3ae152502f51 (diff) |
use static waveform for audio uploads & explicitly accept `audio/mp3`
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/media_attachment.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 8fe75f948..ec77cd547 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -33,7 +33,7 @@ class MediaAttachment < ApplicationRecord IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime'].freeze VIDEO_CONVERTIBLE_MIME_TYPES = ['video/webm', 'video/quicktime'].freeze - AUDIO_MIME_TYPES = ['audio/mpeg', 'audio/mp4', 'audio/vnd.wav', 'audio/wav', 'audio/x-wav', 'audio/x-wave', 'audio/ogg', 'audio/flac',].freeze + AUDIO_MIME_TYPES = ['audio/mpeg', 'audio/mp3', 'audio/mp4', 'audio/vnd.wav', 'audio/wav', 'audio/x-wav', 'audio/x-wave', 'audio/ogg', 'audio/flac',].freeze BLURHASH_OPTIONS = { x_comp: 4, @@ -58,8 +58,8 @@ class MediaAttachment < ApplicationRecord format: 'mp4', convert_options: { output: { - filter_complex: '"[0:a]compand,showwaves=s=640x360:mode=line,format=yuv420p[v]"', - map: '"[v]" -map 0:a', + filter_complex: '"[0:a]compand,showwavespic=s=640x360:colors=lime|green,format=yuv420p[v]"', + map: '"[v]" -map 0:a', threads: 2, vcodec: 'libx264', acodec: 'aac', |