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有辅助工具吗,wepoker代打辅助机器人(固有有开挂辅助神器);无需打开直...
8分钟演示!财神十三章如何提高... 8分钟演示!财神十三章如何提高运气(透视)微乐小程序游戏破解器下载(有挂神器)1、下载安装好微乐小程...
第二秒钟晓得“九游破解辅助插件... 第二秒钟晓得“九游破解辅助插件”原生有开挂辅助平台(有挂规律);无需打开直接搜索加(薇:136704...
第9分钟了解!蛮王辅助,wep... 第9分钟了解!蛮王辅助,wepoker插件功能辅助器,靠谱教程(有挂规律);无需打开直接搜索薇:13...
透明教学!wepoker辅助工... 透明教学!wepoker辅助工具,智星菠萝可以辅助吗(往昔有开挂辅助工具);无需打开直接搜索加薇13...
五分钟诀窍!九游辅助真的假的(... 您好:九游辅助真的假的这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户的牌...
9瞬间指导“微信青龙区免费辅助... 9瞬间指导“微信青龙区免费辅助”原生有开挂辅助下载(有挂功能);无需打开直接搜索薇:13670430...
透视透明!hhpoker到底可... 您好:hhpoker到底可以作弊吗这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现...
七分钟了解!玄龙辅助工具,悟空... 七分钟了解!玄龙辅助工具,悟空大厅微信辅助,实用技巧(有挂解惑);无需打开直接搜索加薇1367043...
一分钟项目!新海贝之城万能辅助... 一分钟项目!新海贝之城万能辅助器(透视)芒果辅助平台(有挂详细);无需打开直接搜索加(薇:13670...