[FFmpeg-devel] [PATCH 3/4] ffmpeg: with filter_complex, avoid random in<->out mapping.

Michael Niedermayer michaelni at gmx.at
Mon Jun 4 17:14:47 CEST 2012


On Mon, Jun 04, 2012 at 08:25:42AM +0200, Nicolas George wrote:
> Le septidi 17 prairial, an CCXX, Michael Niedermayer a écrit :
> > ffmpeg -i matrixbench_mpeg2.mpg -filter_complex null test.avi
> > failing with:
> > timebase 1/90000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
> 
> Indeed, and that is to be expected. OTOH, the current behaviour, or the one
> you suggested, break, differently, on something like that:
>

> ffmpeg -i matrixbench_mpeg2.mpg -filter_complex 'setpts=2*PTS' test.avi

This produces the expected AV desync as setpts is a video filter it
slows the video down.

with your patch your example fails hard the same way as my example:
timebase 1/90000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535

PTS/2 instead of 2*PTS works fine as well and produces the expected
2x speedup of the video

So far we have 3 cases that work before the patch and fail after the
patch.
I hope this explains my concerns i had about this patch
I surely understand your argument that it is theoretically nonsense
as its done but it simply works better than without that code for the
end user.


> 
> Using -filter_complex is, inherently, complex. The code I propose to remove
> only works in the simplest of cases. In fact, mostly in the cases where
> complex filters are useless.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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-devel/attachments/20120604/1029fb50/attachment.asc>


More information about the ffmpeg-devel mailing list