python 腾讯会议录屏文件转化为MP4
创始人
2024-09-26 15:24:30
0
import os  import ffmpeg from ffmpeg import output, run   def convert_wemtv_to_mp4(input_file, output_dir):     """     将 WEMTV 文件转换为 MP4 文件并保存      Args:     input_file (str): 输入 WEMTV 文件路径     output_dir (str): 输出 MP4 文件保存目录     """     try:         if  os.path.exists(input_file):             print(f"input_file:存在")         # 检查输出目录是否存在         if not os.path.exists(output_dir):             os.makedirs(output_dir)             print(f"output_dir:不存在")          # 构建输出文件路径         output_file = os.path.join(output_dir, output_dir + ".mp4")          print(f"input_file:{input_file}")          # 创建 FFmpeg 处理流         stream = input(input_file)         print(f"stream:{stream}")         stream = output(stream, output_file, codec='libx264', f='mp4')          # 执行转换         run(stream)         print(f"转换成功: {output_file}")     except Exception as e:         print(f"转换失败: {input_file}")         print(e)   # 示例用法 input_file = 'path/to/input.wemtv' output_file = 'path/to/output.mp4' output_dir = 'directory' convert_wemtv_to_mp4(input_file, output_dir) 

相关内容

热门资讯

7分钟了解!拱趴大菠萝挂哪里,... 7分钟了解!拱趴大菠萝挂哪里,约局吧怎么看有没有挂,指南书教程(有挂神器)1、下载好约局吧怎么看有没...
6分钟辅助!蜀山四川麻亲友房祈... 6分钟辅助!蜀山四川麻亲友房祈福(辅助挂)切实有辅助软件(确实有挂)1、蜀山四川麻亲友房祈福免费辅助...
4分钟了解!智星德州辅助译码插... 4分钟了解!智星德州辅助译码插件靠谱吗,德州私人局怎么透视,模块教程(确实有挂)1、每一步都需要思考...
第六分钟辅助!小程序家乡大二辅... 第六分钟辅助!小程序家乡大二辅助工具(辅助挂)原来真的有辅助app(今日头条)1、每一步都需要思考,...
一分钟了解!佛手在线有挂吗,a... 一分钟了解!佛手在线有挂吗,aapoker透视方法,演示教程(真是有挂);1、操作简单,无需佛手在线...
第三分钟辅助!苹果手机微信小程... 第三分钟辅助!苹果手机微信小程序游戏破解器(辅助挂)都是存在有辅助器(有挂秘诀)1)苹果手机微信小程...
1分钟了解!wepoker插件... 1分钟了解!wepoker插件下载,wpk透视怎么安装,诀窍教程(有挂教学)1、全新机制【wpk透视...
第十分钟辅助!微信小程序微乐房... 第十分钟辅助!微信小程序微乐房间有技巧吗(辅助挂)总是是真的辅助软件(有挂猫腻)1、超多福利:超高返...
第六分钟了解!werplan透... 第六分钟了解!werplan透视挂,wepoker有没有透视方法,模板教程(真的有挂)1、很好的工具...
第五分钟辅助!永久免费脚本辅助... 第五分钟辅助!永久免费脚本辅助工具(辅助挂)总是真的有辅助脚本(有挂细节)1、永久免费脚本辅助工具透...