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) 

相关内容

热门资讯

玩家必看科普!微乐小程序辅助工... 玩家必看科普!微乐小程序辅助工具!在哪里下载微乐自建房辅助软件(一直真的有辅助app)运辅助工具,进...
今日科普!微乐小程序辅助工具!... 今日科普!微乐小程序辅助工具!微乐小程序游戏破解器下载(真是真的有辅助器);1、有没有辅助教程、有透...
大家学习交流!微乐小程序自建房... 大家学习交流!微乐小程序自建房辅助!微乐小程序游戏破解器(都是存在有辅助脚本)1、每一步都需要思考,...
终于知道!微乐小程序自建房辅助... 终于知道!微乐小程序自建房辅助!微乐小程序自建房透视下载(确实有辅助脚本)该软件可以轻松地帮助玩家将...
一分钟教会你!微乐小程序辅助工... 一分钟教会你!微乐小程序辅助工具!微乐小程序辅助开发(都是真的是有辅助工具)1、玩家可以在线上大神俱...
玩家必备攻略!微乐小程序自建房... 玩家必备攻略!微乐小程序自建房辅助!微信小程序微乐辅助器教程(真是是真的有辅助技巧)所有人都在同一条...
技巧知识分享!微乐小程序自建房... 技巧知识分享!微乐小程序自建房辅助!微乐斗地主有挂吗(好像是有辅助攻略)1、进入到是否有挂之后,能看...
推荐攻略!微乐小程序辅助工具!... 推荐攻略!微乐小程序辅助工具!微乐自建房辅助下载(总是真的有辅助软件)1、脚本辅助下载、免费透视脚本...
总算清楚!微乐小程序自建房辅助... 总算清楚!微乐小程序自建房辅助!微信小程序多乐辅助器(原来是真的有辅助器)透视方法中分为三种模型:靠...
教程攻略!微乐小程序自建房辅助... 教程攻略!微乐小程序自建房辅助!微信微乐游戏苹果辅助器(都是真的有辅助攻略)一、游戏安装教程牌型概率...