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) 

相关内容

热门资讯

一分钟了解!四川游戏家园破解,... 一分钟了解!四川游戏家园破解,吉祥填大坑有插件吗,窍门教程(有挂猫腻)该软件可以轻松地帮助玩家将吉祥...
传递经验!pokeplus脚本... 传递经验!pokeplus脚本,雀神广东定制插件辅助,资料教程(有挂猫腻)1、全新机制【雀神广东定制...
手段辅助!wpk模拟器,wep... 手段辅助!wpk模拟器,wepoker新号好一点吗,解迷教程(存在有挂)1、wepoker新号好一点...
玩家必看攻略!多乐保皇辅助,天... 玩家必看攻略!多乐保皇辅助,天天爱柳州有没有辅助器,烘培教程(有挂助手)该软件可以轻松地帮助玩家将天...
攻略讲解!aapoker怎么拿... 攻略讲解!aapoker怎么拿好牌,微乐福建辅助器,技法教程(发现有挂)1、进入到微乐福建辅助器是否...
窍要辅助!来玩德州破解器,we... 窍要辅助!来玩德州破解器,wepoker私人局透视教程,有挂教程(存在有挂)1、wepoker私人局...
1.9分钟了解!四川辅助软件,... 1.9分钟了解!四川辅助软件,福建天天开心辅助器,总结教程(有挂存在)1、玩家可以在福建天天开心辅助...
一分钟了解!aapoker免费... 一分钟了解!aapoker免费透视脚本,哈糖大菠萝免费辅助器,讲义教程(有挂方法)1、每一步都需要思...
窍门辅助!wpk辅助软件,有没... 窍门辅助!wpk辅助软件,有没有人wepoker,详情教程(有挂功能)1)有没有人wepoker免费...
玩家科普!天天互娱app辅助,... 玩家科普!天天互娱app辅助,福建天天开心辅助真实性,指引教程(有挂讲解)福建天天开心辅助真实性能透...