« Topics
123
Orry Verducci1,588 posts since 1 Feb 2005
Anglia (West) Look East
Looking at that again, I suspect there are some interlacing issues I need to sort.

It definitely like it's interlace video that's been captured and treated as progressive.


I've done a lot of tape digitising over the years, the key is to always capture as 720x576 25fps interlaced, which is full resolution digital SD.

For sharing the clips (e.g. uploading online), it's best to stick them in to an edit application which is using a project set to 720x576 50fps, and then export using whatever your prefered codec is (I use H264). If you're dealing with 16:9 footage you will want to set your project aspect ratio as 16:9 and then export as 1024x576. I use Adobe Premiere which works really well for this as it has a decent deinterlacer, but I'm sure most professional edit applications will give similar results.
1
Spencer For Hire gave kudos
noggin13,891 posts since 26 Jun 2001
Looking at that again, I suspect there are some interlacing issues I need to sort.

It definitely like it's interlace video that's been captured and treated as progressive.


I've done a lot of tape digitising over the years, the key is to always capture as 720x576 25fps interlaced, which is full resolution digital SD.

For sharing the clips (e.g. uploading online), it's best to stick them in to an edit application which is using a project set to 720x576 50fps, and then export using whatever your prefered codec is (I use H264). If you're dealing with 16:9 footage you will want to set your project aspect ratio as 16:9 and then export as 1024x576. I use Adobe Premiere which works really well for this as it has a decent deinterlacer, but I'm sure most professional edit applications will give similar results.


I thought you had to save it with 720x576 with a 16:9 flag on it.


If you are exporting for DVD or captured at 720x576 then keeping it as 720x576 (avoiding a rescale) and ensuring that it is encoded with a non-square PAR (Pixel Aspect Ratio) is a good idea IF your player and encoding workflow flags it correctly.

If you are exporting for viewing on a PC or uploading to a social media or streaming site you may be better scaling 720x576 to 1050x576 (not 1024) or cropping to 702x576 and scaling to 1024x576. In this case a deirterlace from i25 to p50 may also be a good idea. FFMPEG has a bit of a steep learning curve - but is well worth mastering. It's trivial to convert SD MPEG2 with incorrectly flagged ratios to a nice square pixel progressive version with a YADIF or W3FDIF 2x deinterlace and scale.

Golden rule with aspect ratios :

4:3 and 16:9 SD 50Hz are 702 x 576 NOT 720 x 576.

There are 9 samples either side of the 702x576 that make 720x576 slightly wider. They are there to avoid cropping overshoots/undershoots etc. (same reason we have black at 16 and not 0/1, and white at 235 not 254/5)

If you are converting between SD and HD :

HD->SD Scale 1920x1080 or 1280x720 to 702x576 and put 9 samples of black either side (or 704 + 8 if you have to)
SD->HD Crop 720x576 to 702x576 and scale the 702x576 to 1920x1080 or 1280x720.

And if you are scaling interlaced content - whatever you do make sure you deinterlace to 2x progressive, scale, and then re-interlace. Don't try to scale in the interlaced domain - or worse treat interlaced content as progressive when you scale...
1
harshy gave kudos
Orry Verducci1,588 posts since 1 Feb 2005
Anglia (West) Look East
I agree that FFmpeg is well worth mastering, it's my tool of choice. Newer versions have a deinterlacer called bwdif, which combines the comb detection from yadif with w3fdif's algorithm, and the results I've got from tests I've run have been very good.

I thought you had to save it with 720x576 with a 16:9 flag on it.


That's the correct way to do it, but many applications don't support this as well as they should, so as Noggin said it's usually better to go with 1024x576. For everything I've recorded/digitised, I keep it as 720x576 flagged as 16:9, which plays back just fine in VLC, but for anything I've uploaded I've scaled it to 1024x576 first so that I can guarrantee it plays as 16:9 rather than as square pixels. I think YouTube understands the flags and handles them correctly, but I wouldn't rely on it.

Noggin is also absolutely right (as he always is) that you should go with 1050x576, or crop to 702x576 and scale to 1024x576. I only mentioned 1024x576 for simplicity's sake, as I'm very aware this can get very complicated for a lot of people, but if you want to be technically accurate you should absolutely follow Noggin's advice.

Check the clips that are recorded by the capture device first though, making sure there are small black bars on the left and right sides. Many don't follow these rules themselves and will use the full frame, in which case you don't want to mess around and can just do a simple scale to 1024x576.
2
harshy and noggin gave kudos
noggin13,891 posts since 26 Jun 2001
I agree that FFmpeg is well worth mastering, it's my tool of choice. Newer versions have a deinterlacer called bwdif, which combines the comb detection from yadif with w3fdif's algorithm, and the results I've got from tests I've run have been very good.


Yep - I prefer not using anything adaptive so stick with w3fdif for most stuff.
1
harshy gave kudos
Orry Verducci1,588 posts since 1 Feb 2005
Anglia (West) Look East
Yep - I prefer not using anything adaptive so stick with w3fdif for most stuff.


The admittedly small problem I've found with w3fdif is that you get a slight but noticeable bobbing on the edges of static objects. On tests I've run it's been quite noticeable on sport scoreboards and the Sky News DOG for example.

With bwdif I've not seen this at all, although it's still obviously w3fdif's excellent deinterlacing.

Having said that w3fdif on its own is still excellent, and most people probably wouldn't notice, so each to their own.
davidhorman2,063 posts since 8 Mar 2005
Channel Channel Islands
w3fdif is alright, but it's very simple (surprisingly so, considering the result isn't bad). Without scene-change detection it will introduce artefacts and can also do so within scenes. Yadif's considerably nicer and can still run in realtime - it's available as a filter in VLC Player (although I've ditched VLC Player itself because it does weird things like changing colour casts when you active deinterlacers, and not playing 60fps smoothly).

In Avisynth circles, QTGMC is the dog's unmentionables. It's slow, but the results are excellent.
Orry Verducci1,588 posts since 1 Feb 2005
Anglia (West) Look East
w3fdif is alright, but it's very simple (surprisingly so, considering the result isn't bad). Without scene-change detection it will introduce artefacts and can also do so within scenes. Yadif's considerably nicer and can still run in realtime - it's available as a filter in VLC Player (although I've ditched VLC Player itself because it does weird things like changing colour casts when you active deinterlacers, and not playing 60fps smoothly).


I disagree with you there about yadif being nicer, although yadif is good it introduces noticeable artifacts, especially on graphics. A prime example of this are tickers on news channels, which have very noticeable artifacts when being run through yadif. With w3fdif I've not seen these artifacts.

Here's an example I've run on FFmpeg just now using a recording from BBC News Channel as an example:

Yadif:
*

W3fdif:
*

You'll notice from this example the w3fdif one is much more accurate than yadif. I've also never encountered any scene change issues with w3fdif myself. As a BBC developed algorithm it's used a lot in the broadcast world, especially by the BBC themselves (I think they use it currently for iPlayer encodes), so clearly it can't be bad.

It will also happily run in real time. I've just run it on FFmpeg on both SD and HD recordings from BBC channels going to a null output, so it gives me raw benchmarks for decoding and filtering, and got an average of 650fps for SD and 175fps for HD. This is on my 6 year old MacBook, so it's probably fair to say most devices in use today would have no trouble.
2
harshy and London Lite gave kudos
noggin13,891 posts since 26 Jun 2001
Yep - I prefer not using anything adaptive so stick with w3fdif for most stuff.


The admittedly small problem I've found with w3fdif is that you get a slight but noticeable bobbing on the edges of static objects. On tests I've run it's been quite noticeable on sport scoreboards and the Sky News DOG for example.

With bwdif I've not seen this at all, although it's still obviously w3fdif's excellent deinterlacing.

Having said that w3fdif on its own is still excellent, and most people probably wouldn't notice, so each to their own.


Yes - W3FDIF works better on 'real' content than it does on electronic graphics (which have electronic 'perfect' edges that you don't usually find on camera outputs, and that would probably twitter on a CRT too)

W3FDIF is in daily use in both software and hardware in the broadcast chain AIUI. It's certainly used in BBC News workflows where scaling of interlaced sources is required, and was a standard deinterlacer on DVEs and standards converters for a long time.

What I like about W3FDIF is that it's entirely predictable and totally non-adaptive, as it's just a cleverly designed Vertical/Temporal filter. I've seen YADIF cope poorly in some situations and switched to W3FDIF as soon as I could. (It's also available as an option in the LAVFilters/Codec ecosystem)

Now how long until the BBC/Snell PhC patents lapse...
harshy5,819 posts since 24 Mar 2001
So if I have 544x576 interlaced clip, do I do a w3fdif interlace whilst scaling it to 720x576 with the right aspect ratio set and then do a interlace on the deinterlaced file do I have to also to put it back to 25fps when reinterlacing?