[FFmpeg-user] concat issue

Liam Condron-Farnos 23liam at googlemail.com
Thu Jan 24 11:29:52 CET 2013


To use the concat protocol, your files need to be one of a limited number
of container formats, lkike mpeg ts. If they are MP4s, you have to create
intermediate .ts files in the way I described upthread.

With the demuxer, you don't need to do that, it can take any input from any
container, as long as they have the same resolution and codecs. So even if
you want to concatenate an MP4 and an FLV files, you can do that, so long
as they both have h.264 video/AAC audio. Because the demuxer doesn't care
about the container format, there is no need to create those intermediate
.ts files, it can work straight from your initial MP4s.

If you create a folder called inputs.txt in your working directory, and
have it contain lines like:

file '01.mp4'
file '02.mp4'
file '03.mp4'

...then you can use the demuxer like so:

ffmpeg -f concat -i inputs.txt -c copy output.mp4

...which will concatenate the files in the order described in the
inputs.txt file.

IF you are saying that you want to cut up & re-arrange a file on a single
command-line, without creating those smaller MP4 files... well, I daresay
that you could kludge something together with the split, select and concat
filters, if you really wanted to... but personally that's the point where
I'd just fire up an NLE.

On 24 January 2013 00:21, John de la Garza <john at jjdev.com> wrote:

> On Wed, Jan 23, 2013 at 09:51:37AM +0000, Liam Condron-Farnos wrote:
> > However, I would strongly recommend using the concat demuxer, as it
> avoids
> > creating those intermediate files. Really, with recent ffmpeg you should
> > only use the concat protocol if your input files are already in one of
> the
> > formats that supports file-level concatenation (like mpeg, vob, or ts
> > files).
>
> I have read the docs, but don't still don't understand how the concat
> demuxer will help me avoid creating intermediate files.
>
> From what I am understanding, it seems like I would still cut up the
> file and concat it back.  The docs say to create a file with the
> names of the files you want to concat.  Are those the intermediate
> files?
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list