[FFmpeg-user] (de)-interlacing question

Andy Furniss adf.lists at gmail.com
Tue Nov 22 20:32:47 EET 2016


Toerless Eckert wrote:
> On Tue, Nov 22, 2016 at 12:18:43PM +0000, Andy Furniss wrote:
>> Seems strange that that would happen. It certainly doesn't in the
>> UK, 25fps progressive SD does get flagged as interlaced
>
> Any idea why that flag is set ? Just because it makes the
> programming look more compatible ? Is there really any equipment that
> could not display the content without the flag or create a worse
> display result if it was not set ? Seems to me that even if you
> connected a digital STB to a CRT, every digitial STB would still be
> able to display a non-interlaced flagged program with the same visual
> result.

SD decoders have been around a long time, I guess initially they
couldn't handle progressive.

More recently in the UK on DVB-T2 only there is dynamic flagging for
interlaced/progressive, 1080i25(50) and 1080p25. This happens within the
same program (eg, credits are normally interlaced even if content
isn't). No one broadcasts 720 here, but the web catchup versions are 720p.

>> but there is no interpolation. Have you tried frame stepping with
>> say mplayer - it could be that vlc is adding filters because of the
>> flags.
>
> Whow, thats a far out idea ;-) WOuld love to challenge you: Vlc uses
> ffmpeg to do the hard parts. And i'd be quite curious if ffmpeg
> could create motion interpolated frames. Any example CLI line to do
> that ?

I was thinking more that vlc may be de-interlacing with something simple
which looked like interpolated, but was just de-interlace.

ffmpeg motion interpolaters are far from real time.

mpv can do real time simple interpolation via gpu/opengl.

> Btw: mplayer single steps displays frames. The MPEG2 SD TS recording
> shows clearly interlaced frames. The H264 MPEG4 HD mediathek file
> shows every second frame to be identical. Vlc seems to step fields,
> so i see non-interlaced field by field for the MPEG2 SD TS recording.
> And same frame duplication for the HD.

Yea, that's why I suggested it - so you could see if there was weave.

>> Also noted you say "Just download" which makes me wonder whether
>> you are talking about web content rather that broadcast.
>
> Yes indeed. I had only recorded (MPEG2 TS) of a program and then
> downloaded later the H264 HD version from mediathek to compare. I'll
> record another program HD and SD to make sure that the mediathek HD
> file didn't strip actual p50 programming into p25. Of course this is
> still no 100% proof, the production mater could still have been p50
> and they use more spatial bits for their HD channels and more
> temporal ones for the SD version.

It is normal for the BBC at least, to have 25fps versions of 50fps
content for download. More recently you can get 720p50 as well - but you
need to choose the correct version.

> Which is why i'd like to see how good motion interpolation created by
> eg: ffmpeg could be to see if one can recognize it (being worse than
> actual frames).

Depending on content, it's quite likely you would see artifacts by frame
stepping.

ffmpeg recently got some more interpolation code via GSOC see this thread -

Toerless Eckert wrote:
 > On Tue, Nov 22, 2016 at 12:18:43PM +0000, Andy Furniss wrote:
 >> Seems strange that that would happen. It certainly doesn't in the UK,
 >> 25fps progressive SD does get flagged as interlaced
 >
 > Any idea why that flag is set ? Just because it makes the programming
 > look more compatible ? Is there really any equipment that could not
 > display the content without the flag or create a worse display result
 > if it was not set ? Seems to me that even if you connected a digital STB
 > to a CRT, every digitial STB would still be able to display a 
non-interlaced
 > flagged program with the same visual result.

SD decoders have been around a long time, I guess initially they 
couldn't handle progressive.

More recently in the UK on DVB-T2 only there is dynamic flagging for 
interlaced/progressive, 1080i25(50) and 1080p25. This happens within the 
same program (eg, credits are normally interlaced even if content 
isn't). No one broadcasts 720 here, but the web catchup versions are 720p.

 >> but there is no
 >> interpolation. Have you tried frame stepping with say mplayer - it could
 >> be that vlc is adding filters because of the flags.
 >
 > Whow, thats a far out idea ;-) WOuld love to challenge you: Vlc uses
 > ffmpeg to do the hard parts. And i'd be quite curious if ffmpeg could
 > create motion interpolated frames. Any example CLI line to do that ?

I was thinking more that vlc may be de-interlacing with something simple 
which looked like interpolated, but was just de-interlace.

ffmpeg motion interpolaters are far from real time.

mpv can do real time simple interpolation via gpu/opengl.

 > Btw: mplayer single steps displays frames. The MPEG2 SD TS recording
 > shows clearly interlaced frames. The H264 MPEG4 HD mediathek file shows
 > every second frame to be identical. Vlc seems to step fields, so i
 > see non-interlaced field by field for the MPEG2 SD TS recording. And same
 > frame duplication for the HD.

Yea, that's why I suggested it - so you could see if there was weave.

 >> Also noted you say "Just download" which makes me wonder whether you are
 >> talking about web content rather that broadcast.
 >
 > Yes indeed. I had only recorded (MPEG2 TS) of a program and then 
downloaded
 > later the H264 HD version from mediathek to compare. I'll record
 > another program HD and SD to make sure that the mediathek HD file didn't
 > strip actual p50 programming into p25. Of course this is still no 100%
 > proof, the production mater could still have been p50 and they use more
 > spatial bits for their HD channels and more temporal ones for the SD 
version.

It is normal for the BBC at least, to have 25fps versions of 50fps 
content for download. More recently you can get 720p50 as well - but you 
need to choose the correct version.

 > Which is why i'd like to see how good motion interpolation created by 
eg: ffmpeg
 > could be to see if one can recognize it (being worse than actual frames).

Depending on content, it's quite likely you would see artifacts by frame 
stepping.

ffmpeg recently got some more interpolation code via GSOC see this thread -

https://www.mail-archive.com/search?l=ffmpeg-devel%40ffmpeg.org&q=subject:%22%5C%5BFFmpeg%5C-devel%5C%5D+%5C%5BGSoC%5C%5D+Motion+Interpolation%22&o=newest&f=1

Horrible link/thread layout, but anyway, motion interpolation is hard.

 > btw: there where reports saying that TV productions ARD/ZDF are p25 
and only
 > sports is actual p50. Eg:
 >
 > 
http://www.heise.de/newsticker/meldung/Petition-gegen-720p-HD-bei-ARD-und-ZDF-941806.html

Can't read the link, but yes, a lot of low motion TV is shot at 25fps.



More information about the ffmpeg-user mailing list