【问题标题】:FFMpeg : Falied to combine two MPEG TS files into a Single MP4 FileFFMpeg:无法将两个 MPEG TS 文件合并为一个 MP4 文件
【发布时间】:2017-03-07 12:13:26
【问题描述】:

我正在尝试使用 FFMpeg2 个 .ts 文件 合并到一个 单个 .mp4 文件中。我需要使 concat dumuxer 方法工作,以便在我的 Android 应用程序中使用它。在我的 android 应用程序中,concat 协议 无法识别。所以我正在尝试 concat demuxer 方法

concat 协议 在我的 windows pc 中运行良好:

ffmpeg -i "concat:s1.ts|s2.ts" -c copy -bsf:a aac_adtstoasc output.mp4

但是,concat demuxer 在我的 windows pc 中不起作用:

ffmpeg -f concat -i s1.ts -i s2.ts -c copy -bsf:a aac_adtstoasc output2.mp4

Error : 
[concat @ 0000000000516e00] Line 1: unknown keyword 'G@'
s1.ts: Invalid data found when processing input

有用于测试的文件: http://fourbigbrothers.com/s1.tshttp://fourbigbrothers.com/s2.ts

请帮忙。我最近一直在咀嚼我的大脑。

【问题讨论】:

    标签: android video command-line ffmpeg


    【解决方案1】:

    concat demuxer 需要一个文本文件作为输入,其中包含以下格式的视频名称:

    file 's1.ts'
    file 's2.ts'
    

    命令将是

    ffmpeg -f concat -i list.txt -c copy -bsf:a aac_adtstoasc output2.mp4
    

    【讨论】:

    • 谢谢穆尔维亚。我尝试使用这种方法仍然得到同样的错误。
    • 在这里工作。使用-report 运行您的命令并上传报告。
    • 尝试使用 -report。现在是第 1 行:未知关键字 'G@' s1.ts:处理输入时发现无效数据
    • 上传报告和concat文本文件。
    • 它有效。我不小心在两者之间留了一个额外的空间是我的错。非常感谢您的时间和支持。我真的很感激。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-29
    • 2012-06-20
    • 2021-03-07
    • 2017-01-05
    • 1970-01-01
    相关资源
    最近更新 更多