[FFmpeg-user] Best way to scale interlaced video

Andy Furniss adf.lists at gmail.com
Thu Mar 6 21:15:51 CET 2014


Mark Himsley wrote:

> Now, I need to tell you that your scale from 1920x1080 down to
> 720x432 will leave your video about 2.5% wrong in aspect-ratio.
> That's because you've fallen in to the usual trap of thinking that
> the 720 pixels across an SD frame are all the "active" pixels. You
> should actually be scaling the video down to 702x432 and padding that
> all back up to 720x576 to preserve the aspect ratio correctly.
> Unfortunately, padding 9 pixels each side of the 702 up to 720 is not
> possible with sub-sampled chroma, so in the BBC we have calculated
> that we get much more accurate scaling if we pad the source video up
> and then scale down rather than scaling down and padding up.
> Therefore I suggest this is the correct scale (within 0.06%) for HD
> down to 4:3 SD.

I am curious why the BBC do this - not the 702/704 thing, but why put it
into 720 when others use 704 directly.

I don't actually watch much TV and when I do it's HD, but after seeing a
report on uk.tech.broadcast (or maybe ".digital.tv) about mpeg blocking
artifacts on the edges of BBC SD during pans I had a look at a recording
and could see, albeit rarely, what the poster described.

Wondering whether the 8px sidebars were involved I tried scaling/coding
something to ffmpegs default (too low) bitrate with 0, 8 and 16 pads and
sure enough the 8px pad looked far more blocky at the edges than the others.

So it seems that both ffmpeg and the BBCs encoders don't like black bars
!= 0 or 16. I can't really claim to know why, but assume that as MBs are
16px that the residual needed for the black half eats more bits, or
maybe the half black chroma dct block is involved?

Any clues for the curious?



Whatever it is



More information about the ffmpeg-user mailing list