django - python视频编辑器库接收文件对象而不是文件路径
问题描述
我在django项目中工作,我想从保存到defult_storage的视频文件中制作缩略图,我需要python视频编辑器库来接收文件对象而不是文件路径我检查moviepy和opencv但不能很好的解决方案如果我会很感激有人可以帮我解决这个问题,这是模型:
class BusinessVideo(ModificationLogMixin, models.Model):
video = models.FileField(upload_to='business_videos', null=True, blank=True)
这就是我想将视频传递给编辑器的方式
video_cap = cv.VideoCapture(default_storage.open(
os.path.relpath(self.video_url, settings.MEDIA_URL)))
我需要一些库来接收文件对象,因为我的 default_storage 基于 minio,我不知道如何获取视频路径
解决方案
推荐阅读
- python - python字典-使键值对相反,而某些键共享相同的值而无需重写
- php - 如何在 Woocommerce 客户邮件中添加“相关产品”
- c# - Excel - 无效的日期转换(1900 年之前)
- php - 我正在使用它正在插入的准备好的语句插入数据但是当我插入以检查重复时它给了我错误如何解决
- laravel - 如何获取另一列等于的先前记录
- git - 整理本地 git 分支(最佳实践)
- javascript - 如何将日期从英文格式重新转换为法文格式
- katalon-studio - 在 Katalon 工作室中出现“无法找到对象”错误
- lua - 如何在wireshark lua脚本中从用户数据创建一个tvb范围对象
- post-build-event - 如何以管理员权限运行已部署的 .exe 文件?