c# - 以单一 mp4 格式复制 m3u8 段文件
问题描述
嗨,我使用以下命令将 m3u8 段文件复制到单个 mp4 文件:
我在 c#类
上运行此命令。Process
-y -i "D:\OtherProjects\ConvertProj\video\2018\4\1\m3u8\200p\out.m3u8"
-y -i "D:\OtherProjects\ConvertProj\video\2018\4\1\m3u8\360p\out.m3u8"
-y -i "D:\OtherProjects\ConvertProj\video\2018\4\1\m3u8\480p\out.m3u8"
-y -i "D:\OtherProjects\ConvertProj\video\2018\4\1\m3u8\720p\out.m3u8"
-map 0 -c:v copy -c:a copy -threads 0 "D:\OtherProjects\ConvertProj\video\2018\4\1\1-200.mp4"
-map 1 -c:v copy -c:a copy -threads 0 "D:\OtherProjects\ConvertProj\video\2018\4\1\1-360.mp4"
-map 2 -c:v copy -c:a copy -threads 0 "D:\OtherProjects\ConvertProj\video\2018\4\1\1-480.mp4"
-map 3 -c:v copy -c:a copy -threads 0 "D:\OtherProjects\ConvertProj\video\2018\4\1\1.mp4"
我得到这个错误:
[hls,applehttp @ 00000000047e3400] Failed to open segment of playlist 0
Last message repeated 353 times
[hls,applehttp @ 00000000047e3400] Error when loading first segment 'out0.ts'
D:\OtherProjects\ConvertProj\video\2018\4\6208-3905956\m3u8\200p\out.m3u8: Invalid data found when processing input
问题是什么?我必须做什么?这是一个错误吗?
解决方案
我在下面的新命令中以这种方式更改了输入和输出的寻址作为ffmpeg的路径:
-y -i "../video/2018/4/1/m3u8/200p/out.m3u8"
-y -i "../video/2018/4/1/m3u8/360p/out.m3u8"
-y -i "../video/2018/4/1/m3u8/480p/out.m3u8"
-y -i "../video/2018/4/1/m3u8/720p/out.m3u8"
-map 0 -c:v copy -c:a copy -threads 0 "../video/2018/4/1/1-200.mp4"
-map 1 -c:v copy -c:a copy -threads 0 "../video/2018/4/1/1-360.mp4"
-map 2 -c:v copy -c:a copy -threads 0 "../video/2018/4/1/1-480.mp4"
-map 3 -c:v copy -c:a copy -threads 0 "../video/2018/4/1/1.mp4"
我设置了ffmpeg 不存在的 c# 进程类的/video/
路径。WorkingDirectory
推荐阅读
- c# - 在列表中搜索列表中的元素
- azure - Azure B2C - 使用非英语电子邮件地址登录
- php - 向 ajax jQuery 添加方法时显示 PHP 警告消息
- service - 如何注册自定义服务链元素
- matlab - 'HessPattern' 在 matlab 中不起作用?
- php - 使用 phpseclib 检查文件是否已存在
- javascript - 删除最后一个正斜杠和它之前的文本
- qt - Qt:使用 QFileDialog 选择文件夹和文件,使用本机对话框
- php - 如何在本地主机上修剪我的家庭网址
- sql-server - SQL Server Management Studio 命令延迟