如何循环输入视频x使用FFMPEG的时间?

Hit*_*kla 5 ffmpeg

我希望将相同的视频循环4次,并使用ffmpeg作为视频输出.所以我在ffmpeg中创建这样的代码.

ffmpeg -loop 4 -i input.mp4 -c copy output.mp4
Run Code Online (Sandbox Code Playgroud)

但是当我运行它时会给出这样的错误.

Option Loop Not Found.
Run Code Online (Sandbox Code Playgroud)

怎么做错误.请帮我

Gya*_*yan 11

In recent versions, it's

ffmpeg -stream_loop 4 -i input.mp4 -c copy output.mp4
Run Code Online (Sandbox Code Playgroud)

Due to a bug, the above does not work with MP4s. But if you wrap to a MKV, it works for me.

ffmpeg -i input.mp4 -c copy output.mkv
Run Code Online (Sandbox Code Playgroud)

then,

ffmpeg -stream_loop 4 -i output.mkv -c copy output.mp4
Run Code Online (Sandbox Code Playgroud)