[FFmpeg-user] Using -filter_complex instead of lavfi with amerge hangs.

Nicolas George nicolas.george at normalesup.org
Thu Jun 28 12:33:03 CEST 2012


Le nonidi 9 messidor, an CCXX, Tim Nicholson a écrit :
> Not sure about that as the original file is huge, *but* all streams were
> definitely longer than the 10 seconds I was asking it to encode.
> 
> However doing a first pass to make a 10 second 4 track mov from the
> original file, and then using the above syntax completed successfully.
> 
> So is it that the streams are of different length (unlikely since I
> wasn't taking the whole file) or the -t 10, or something to do with the
> interleave on the original file?

Ok, I understand the bug. The short of it is: you can not use -t with
-filter_complex.

The slightly longer version: -t is an output option. In fact, if you put -t
on one input, it is just kept warm for the next output (this in itself is
already a bug).

But the test on the time given to -t is tested on the input file (see
check_output_constraints).

Streams from -filter_complex are not associated with any input file, so the
constraint can not be tested.

The correct fix, IMHO, is to distinguish -t for the input and the output,
but that will require some work.

> ..and yes all streams in the original file are reported by ffprobe as
> being the same length..

IMHO, this is not completely reliable, but now we know it is not the source
of the problem.

> What problem is it that needs fixing? I cannot find anything on trac. It
> would seem to be somewhat serious if it hangs without good reason.

The whole transcoding process in ffmpeg was designed before filters
appeared, when there was a clear input<->output mapping. The result is that
the various functions take their timestamps more or less where they can.
Unfortunately, with filters, there is no clear mapping, and even when there
is, the timestamps can be completely different.

So the whole process need to be scrutinized to really distinguish parts that
should look at timestamps from the input and parts that should look at
timestamps from the output.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120628/c8ea0b66/attachment.asc>


More information about the ffmpeg-user mailing list