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) 

相关内容

热门资讯

关于"四川微乐自建房... 关于"四川微乐自建房辅助器"四川微乐自建房辅助器(确实真的有挂)1、游戏颠覆性的策略玩法,独创攻略技...
第6分钟了解!山西扣点有没有辅... 1、第6分钟了解!山西扣点有没有辅助器(辅助挂)确实是有挂(详细辅助教程)2、进入游戏-大厅左侧-新...
如何分辨真伪!超级三加一辅助软... 如何分辨真伪!超级三加一辅助软件(辅助挂)总是是有挂(详细辅助AI教程);支持多人共享记分板与复盘,...
6分钟透视!微乐自建房辅助(辅... 6分钟透视!微乐自建房辅助(辅助挂)科技教程(竟然是有挂);小薇(透视辅助)致您一封信;亲爱微乐自建...
一秒答解"丫丫陕西插... 一秒答解"丫丫陕西插件"丫丫陕西插件(本来真的是有挂);暗藏猫腻,小编详细说明丫丫陕西插件原来是有挂...
第8分钟了解!中至赣牌圈挂件价... 第8分钟了解!中至赣牌圈挂件价格明细(辅助挂)都是是有挂(详细辅助神器);小薇(透视辅助)致您一封信...
玩家必看科普!赣牌圈破解器(辅... 《玩家必看科普!赣牌圈破解器(辅助挂)其实真的有挂(详细辅助技巧教程)》 赣牌圈破解器软件透明挂更新...
2分钟辅助器!呗兔辅助怎么样(... 2分钟辅助器!呗兔辅助怎么样(辅助挂)科技教程(起初存在有挂);小薇(透视辅助)致您一封信;亲爱呗兔...
大神推荐"新世界辅助... 大神推荐"新世界辅助器免费下载"新世界辅助器免费下载(都是有挂);1、新世界辅助器免费下载机器人多个...
十分钟了解!闲逸碰胡金钟罩(辅... 十分钟了解!闲逸碰胡金钟罩(辅助挂)都是存在有挂(详细辅助软件)1、很好的工具软件,可以解锁游戏的a...