Search code examples
ffmpegffmpeg-php

How to concatenate videos until a certain video length is reached FFMPEG


I have some videos that I need to concatenate, but only until the video length has reached 10 minutes. How do I do this.


Solution

  • Use the -t 00:10:00 output option with the concat demuxer:

    ffmpeg -f concat -i input.txt -t 00:10:00 output
    

    If your videos do not have the same parameters use filtering to conform them, then use the concat filter to concatenate them.

    See: