[FFmpeg-devel] [PATCH] ffmpeg: redesign video resampling in case of mid-stream video size/format change

Michael Niedermayer michaelni at gmx.at
Sat Apr 23 22:59:13 CEST 2011


On Sat, Apr 23, 2011 at 08:34:09PM +0200, Stefano Sabatini wrote:
> On date Saturday 2011-04-23 19:56:37 +0200, Michael Niedermayer encoded:
> > On Sat, Apr 23, 2011 at 12:34:03PM +0200, Stefano Sabatini wrote:
> [...]
> > > > compile without avfilter
> > > > 
> > > > then try
> > > > ./ffmpeg -i 23.mpg -an -s 100x100 100.avi -s 200x200 200.avi
> > > > 
> > > > where 23.mpg is some file with a resolution change (here it was 200x200 -> 300x300)
> > > 
> > > Tested with and without CONFIG_AVFILTER, works fine.
> > 
> > did you look at the output videos?
> > they didnt look fine here when played
> 
> Output size/format is set to the initial size/format, for the rest
> they look fine to me. Do you have a specific sample to try?

--disable-libavfilter

 ./ffmpeg -t 2 -i ~/videos/matrixbench_mpeg2.mpg -s 100x100 100.mpg
 ./ffmpeg -t 2 -i ~/videos/matrixbench_mpeg2.mpg -s 200x200 200.mpg
cat 100.mpg  200.mpg >12.mpg
./ffmpeg  -i 12.mpg -s 150x150 150.mpg -s 300x300 300.mpg

and then watch the 150.mpg with ffplay

it will show only a croped part not the video scaled to 150x150

or try

./ffmpeg  -i 12.mpg -s 300x300 300.mpg -s 150x150 150.mpg
and watch 300.mpg it shows a small image and random mess in the rest
of the frame

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

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- 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/20110423/ff377e10/attachment.asc>


More information about the ffmpeg-devel mailing list