[FFmpeg-devel] [PATCH] ffmpeg: redesign video resampling in case of mid-stream video size/format change
Stefano Sabatini
stefano.sabatini-lala at poste.it
Mon Apr 25 00:26:05 CEST 2011
On date Saturday 2011-04-23 22:59:13 +0200, Michael Niedermayer encoded:
> 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
New approach, this is the neatest design I can find without
introducing filterchain re-configuration. It also fixes some problems
in the non-libavfilter code path.
--
FFmpeg = Formidable Fancy Majestic Prodigious Eager Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffmpeg-redesign-video-resampling-in-case-of-mid-stre.patch
Type: text/x-diff
Size: 15224 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110425/9747699c/attachment.bin>
More information about the ffmpeg-devel
mailing list