python 写入网络视频文件很慢_用Python的moviepy剪视频,为什么视频的写入速度非常慢?...

本文探讨了使用Python的moviepy库在处理网络视频文件时遇到的写入速度慢的问题。通过分析代码,发现视频剪辑、合并和添加水印等操作可能导致速度减缓。为提高效率,可以考虑优化视频处理流程,如分块处理大视频,减少内存占用,或调整moviepy的输出设置以优化编码速度。
摘要由CSDN通过智能技术生成

为什么程序在运行几秒后视频写入速度变得特别慢。

bVbIbjU

下面是全部代码了

from moviepy.editor import VideoFileClip

from moviepy.editor import CompositeVideoClip

from moviepy.editor import concatenate_videoclips

import xlrd

#文件路径

path = ".\\sources\\{}"

word_art_path = path.format("art{}.mov")

source_path = path.format("{}.mp4")

op_path = path.format("op.mp4")

ed_path = path.format("ed.mp4")

logo_path = path.format("logo.png")

result_path = ".\\results\\{}.mp4"

def fun1(sources, logo_size, logo_top_distance, logo_right_distance, art_one, art_two, art_four, art_five):

#加logo、花字

import moviepy.editor as mp

clip = VideoFileClip(sources)

clip1 = VideoFileClip(word_art_pat

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值