about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-29 14:51:03 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-29 14:51:03 -0600
commitf18e6229b78f74c6118178e52290acf2e0316b36 (patch)
treefbd24ebb5487a5f187659b29c236c0b34c18bdf9 /app/models
parentc3c2ef2190177cb94c90a3340b4e3ae152502f51 (diff)
use static waveform for audio uploads & explicitly accept `audio/mp3`
Diffstat (limited to 'app/models')
-rw-r--r--app/models/media_attachment.rb6
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',