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) 

相关内容

热门资讯

我来教大家!哈糖大菠萝有没有挂... 我来教大家!哈糖大菠萝有没有挂,微信小程序微乐辅助器教程(透视)都是真的是有器(哔哩哔哩)1)微信小...
一秒答解!epoker有透视吗... 一秒答解!epoker有透视吗,微乐自建房辅助工具安全吗(透视)总是存在有脚本(哔哩哔哩);微乐自建...
重大通报!!福建大菠萝万能辅助... 重大通报!!福建大菠萝万能辅助器,如何下载微乐自建房黑科技入口(透视)真是真的是有工具(哔哩哔哩)1...
截至发稿!pokerworld... 截至发稿!pokerworld软件,微乐自建房插件如何安装(透视)原来存在有工具(哔哩哔哩)1、完成...
最新技巧!!cloudpoke... 最新技巧!!cloudpoker作必弊,微乐小程序辅助工具2025(透视)总是是真的有方法(哔哩哔哩...
玩家必备攻略!菠萝德普辅助器免... 玩家必备攻略!菠萝德普辅助器免费版在哪里,广西微乐小程序微信辅助器免费(透视)都是真的有插件(哔哩哔...
连日来!来玩德州破解器,微信小... 连日来!来玩德州破解器,微信小程序自建房记牌器(透视)总是真的是有插件(哔哩哔哩)1、首先打开微信小...
一分钟教会你!拱趴大菠萝挂怎么... 一分钟教会你!拱趴大菠萝挂怎么安装,微乐辅助工具哪个好用(透视)一贯有有攻略(哔哩哔哩)1、用户打开...
玩家亲测!聚星ai辅助工具下载... 玩家亲测!聚星ai辅助工具下载,微乐自建房脚本免费下载苹果版(透视)一直有有教程(哔哩哔哩)所有人都...
揭秘几款!poker红龙辅助,... 揭秘几款!poker红龙辅助,微乐自建房免费黑科技推荐(透视)一贯真的有攻略(哔哩哔哩)微乐自建房免...