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) 

相关内容

热门资讯

真的有挂!德普之星的辅助工具介... 真的有挂!德普之星的辅助工具介绍,九九联盟辅助神器,扑克教程(原来真的有挂);相信小伙伴都知道这个九...
真的有挂!wepoker怎么下... 《真的有挂!wepoker怎么下载游戏,欢乐互娱辅助器,技巧教程(一直真的有挂)》 欢乐互娱辅助器软...
真的有挂!德州hhpoker脚... 真的有挂!德州hhpoker脚本,衡阳丫丫字牌辅助,爆料教程(一直真的有挂);超受欢迎的衡阳丫丫字牌...
真的有挂!智星德州插件怎么下载... 真的有挂!智星德州插件怎么下载,闲聚鱼虾蟹软件脚本,高科技教程(果然真的有挂);闲聚鱼虾蟹软件脚本A...
真的是有挂!hhpoker德州... 真的是有挂!hhpoker德州辅助,小程序跑得快的辅助,黑科技教程(果然真的是有挂);小薇(透视辅助...
是有挂的!wepoker私人局... 是有挂的!wepoker私人局有透视吗,欢乐情怀怎么开挂,解密教程(一直是有挂的);欢乐情怀怎么开挂...
真的有挂!aapoker发牌逻... 真的有挂!aapoker发牌逻辑,wepoker内置辅助器,软件教程(一直真的有挂);wepoker...
真的有挂!cloudpoker... 真的有挂!cloudpoker辅助,来趣广西友玩脚本辅助,力荐教程(一贯真的有挂);来趣广西友玩脚本...
是有挂!wepokerplus... 是有挂!wepokerplus透视脚本免费,天天爱柳州辅助,必备教程(果然是有挂);天天爱柳州辅助软...
确实有挂!wepoker有人用... 确实有挂!wepoker有人用过吗,老友辅助器,曝光教程(其实确实有挂);一、老友辅助器AI软件牌型...