视频处理:免费将avi转换mp4格式

应用场景:必剪等应用软件只支持mp4格式的视频进行剪辑

源码

1
2
3
4
5
6
7
8
9
10
11
from moviepy.editor import *

def convert_avi_to_mp4(avi_file, mp4_file):
video = VideoFileClip(avi_file)
video.write_videofile(mp4_file, codec="libx264")

# 示例用法
avi_file = "input.avi"
mp4_file = "output.mp4"

convert_avi_to_mp4(avi_file, mp4_file)

exe下载地址

运行exe即可一键转换avi视频
https://github.com/whale3070/avi2mp4/releases/tag/convertV1