gpt4 book ai didi

ffmpeg - 连接多个视频文件,添加音频,将长度设置为视频组合长度

转载 作者:行者123 更新时间:2023-12-04 23:25:41 27 4
gpt4 key购买 nike

到目前为止,我已经分两步完成了这项工作。

  • 将视频文件连接到 outputNoAudio.mp4
  • 使用 -shortest
  • 将音频添加到 outputNoAudio.mp4 修剪

    现在我正在尝试使用这条线一步一步地做到这一点
    ffmpeg -f concat -safe 0 -i 'vidlist.txt' -i 'music.m4a' -c copy -movflags faststart -y 'test.mp4'

    如果我使用 -shortest,我最终会输出 vidlist.txt 中最短视频的长度。我想要实现的是所有视频的总长度。

    最佳答案

    正如@Mulvya 指出的那样。该命令与 -shortest 一起使用。当我开始测试时,我的测试视频时间错误。将答案留给其他尝试这样做的人。

    ffmpeg -f concat -safe 0 -i 'vidlist.txt' -i 'music.m4a' -c copy -movflags faststart -shortest -y 'test.mp4'

    关于ffmpeg - 连接多个视频文件,添加音频,将长度设置为视频组合长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48968776/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com