shell - 带有 shell : oncat listed movies 的 ffmpeg

标签 shell ffmpeg

我是 shell 脚本的新手,试图将列出的电影连接到如下文件夹中:

filename="list.txt"
cat ${filename} | while read line;
do
    ffmpeg -y -i sum.mov -i $line -filter_complex concat tmp.mov
    cp tmp.mov sum.mov
done

但是,此循环只运行一次。
最佳做法是什么?

谢谢

最佳答案

解决了:

#list.txt
file 'movie1.mov'
file 'movie2.mov'
file 'movie3.mov'

不需要编写 shell 脚本。只是
ffmpeg -f concat -i list.txt -c copy output.mov

关于shell - 带有 shell : oncat listed movies 的 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35620434/

相关文章:

c - 使用 malloc 时出现无效转换错误

linux - 在不同组的行之间添加空行

ffmpeg - 以背景为中心连续旋转图像

bash - 命令有效,但使用 sh 时出错

python - 从 Python 执行 ffmpeg

linux - Unix命令在目录中所有文件的顶部插入注释

c - 如何从 shell 执行库调用命令?

ffmpeg - 无法在 filter_complex_script(电影过滤器)中使用输入文件

c++ - FFmpeg:编码 PCM 16 音频数据分配错误

bash - 比较两个未排序的文件