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有没... 很多人使用云端 AI 时,都担心wepoker有没有辅助、内部资料上传带来隐私风险。这款本地运行的 ...
一秒答解!wepoker怎么增... 您好,一秒答解!wepoker怎么增加运气,WPK有挂吗确实有挂下载(最初有辅助挂)这款游戏可以开挂...
一秒答解!wpk辅助器,德扑之... wpk辅助器AI 游戏攻略黑科技上线本地缓存功能,离线查阅能力开挂。提前下载对应游戏攻略数据包,断网...
分辨真假!德普之星透视辅助,w... 分辨真假!德普之星透视辅助,wepoker开挂透视教程脚本(总是是真的有辅助挂)AI 是一款可以让一...
每日必看推荐!wepoker怎... 您好:wepoker怎么提高运气这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很...
推荐一款!!wepoker黑侠... 一款 AI 游戏攻略黑科技工具上线,查攻略效率直接开挂。它整合版本更新、装备搭配、BOSS 打法、牌...
一秒答解!wpk俱乐部辅助器,... 一秒答解!wpk俱乐部辅助器,德扑之星开挂脚本助手(固有有辅助器)AI 是一款可以让一直输的玩家修复...
玩家攻略!wepoker好友房... 您好,玩家攻略!wepoker好友房开挂,WPK哪里有挂神器(一贯有开挂)这款游戏可以开挂的,确实是...
重大通报!!智星德州可以透视吗... 很多人使用云端 AI 时,都担心智星德州可以透视吗、内部资料上传带来隐私风险。这款本地运行的 AI ...
玩家爆料!智星菠萝有挂吗,WP... 智星菠萝有挂吗AI 游戏攻略黑科技上线本地缓存功能,离线查阅能力开挂。提前下载对应游戏攻略数据包,断...