How to concatenate two MP4 files using FFmpeg?

后端 未结 22 3471
遇见更好的自我
遇见更好的自我 2020-11-22 02:32

I\'m trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I\'m converting the two files into .ts files and th

22条回答
  •  庸人自扰
    2020-11-22 03:21

    A one-liner snippet that does not require an intermediate file:

    ffmpeg -safe 0 -f concat -i <(find "$PWD" -name '*.mp4' -printf "file '%p'\n" | sort) -c copy output.mp4

    Here, the <() syntax actually creates a temporary file "in the background" so to say

提交回复
热议问题