[FFmpeg-user] Concat limited to certain file types?

Jan Ehrhardt phpdev at ehrhardt.nl
Wed Oct 17 12:51:12 CEST 2012


Nicolas George in gmane.comp.video.ffmpeg.user (Wed, 17 Oct 2012
11:23:46 +0200):
>Le sextidi 26 vendémiaire, an CCXXI, Jan Ehrhardt a écrit :
>> This one produced the same output as the one with -s 384x288:
>> 
>> -filter_complex " \
>> 	[0:0] scale=384:288 [0:2], \
>> 	[1:0] scale=384:288 [1:2], \
>> 	[0:2] [0:1] [1:2] [1:1] concat=n=2:v=1:a=1 [v] [a]"
>> 	-map [v] -map [a]
>
>Did you read the documentation for the graph syntax?
>
>http://ffmpeg.org/ffmpeg.html#Filtergraph-syntax-1
>
>You should probably start by drawing the graph you want to build, and then
>translate it to filter graph syntax. You seem to have stuck to the "take an
>example, imitate and tweak" approach: it is seriously limited.

It was quite logical to start with the example, because it had the
wanted feature of synchronising the video and audio streams of each
segment. But in the mean time I had already done what you are suggesting
now and separated the concat and scale filters:

-filter_complex " \
	[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]; \
	[v] scale=384:288 [vs]" -map [vs] -map [a]

Is this also seriously limited in your eyes?

And do you have a suggestion how I can use this kind of syntax for the
two MPG-files that -concat:"file1.mpg|file2.mpg" fine, but are denied by
the concat filter because of their starttimes?

This would require a filter before the concat filter that resets the
starttime of each inputfile to 0, probably using a combination of setpts
and asetpts. Is that possible without losing a/v sync?

Jan



More information about the ffmpeg-user mailing list