From f18e6229b78f74c6118178e52290acf2e0316b36 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 29 Nov 2019 14:51:03 -0600 Subject: use static waveform for audio uploads & explicitly accept `audio/mp3` --- app/models/media_attachment.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/models') 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', -- cgit