我'm planning a RoR project that involves the upload and compression of videos. Normally I'与shrine一起处理文件附件,并在上传后使用ffmpeg在后台作业中处理视频压缩 .

现在 ActiveStorage 是内置的Rails 5.2,我不确定它是否能够很好地处理视频(带压缩) . 到目前为止,我只发现了处理图像(使用MiniMagick)或创建视频/ pdf预览(使用ffmpeg或mutools)的文档,这些文档似乎都是即时发生的 .

由于视频压缩是时间密集的,我会说它应该在上传后直接发生,以便为请求做好准备 . Is there on option the process files after upload, using ActiveStorage, or only on-the-fly

如果没有,为什么或者更确切地说建议处理所有文件处理 on-the-fly

谢谢