50i-to-50p (or 60i-to-60p) double deinterlacing
August 06, 2012 12:49PM
(NTSC-landers please substitute '60' and '30' for the '50' and '25' in this writeup.)

Preamble:
A 50i video can be deinterlaced to either 25p or 50p. A 25p deinterlace is an approximation of an originally shot (with too short shutter time) 25p video and a 50p deinterlace is an approximation of an originally shot 50p video. Naturally the approximations fall short of the goals because in each of them half the lines are constructions. Using complex deinterlacers the constructions can be very good. For each high quality deinterlacer the approximation to the 50p goal will be just as good as the approximation to the 25p goal. The 50p goal contains more information than the 25p goal. More of the 50i information is preserved in the 50p deinterlace than in the 25p deinterlace. Whether that extra information can be of use in the final output depends on the case at hand.

Example where it's useful: A video shot DV-PAL (720x576 50i) needed to be cropped to 16:9 (720x432) and then released as anamorphic 720x576 50i. The 50i original should be doubly deinterlaced to 50p before the rescaling and re-interlacing.

50i video represents 50 moments per second. Which 25 moments per second are represented by the 25p deinterlace? (Actually, the moments need not be any of the original 50; deinterlacing could as well produce new moments midway between original moments so all the lines are constructions!) The Apple 25p deinterlace represents the 1st, 3rd, 5th, etc. moments from the 50i video. This is so whether the 50i video has upper or lower dominance. The task for making a 50p deinterlace using Apple software is then to make a second 25p deinterlace representing the 2nd, 4th, 6th, etc. moments from the 50i video.

The Apple software can be tricked into making a 25p deinterlace representing the 2nd, 4th, 6th, etc. moments by modifying the 50i (with the field shift filter) so its actual field dominance is opposite to its nominal (header data) field dominance. However such 25p deinterlaces (except from very simple deinterlacers) show nasty artifacts as they should from a wrong-dominance video.

Maybe some video editing software offers 50i-to-50p deinterlacing.
Maybe some video editing software offers a choice when deinterlacing 50i-to-25p whether to represent the 1st, 3rd, 5th, etc. moments or the 2nd, 4th, 6th, etc. moments.
Maybe some video editing software lets you delete the first field of a 50i video so what were the 2nd, 4th, 6th, etc. moments become the 1st, 3rd, 5th, etc. moments.
I don't have such softwares. But here is a purely FCP+Compressor method for double deinterlacing which includes producing a clean 25p deinterlace representing the 2nd, 4th, 6th, etc. moments:

...1. Compressor: Make a 25p best deinterlace from the original 50i: "25p1".

...2. FCP: Make the speed of the 50i original -100%. Change the sequence setting to the opposite dominance. Export a QT movie.

...3. Compressor: Make a 25p best deinterlace from that QT movie.

...4. FCP: Import what Compressor just made and change the speed to -100%. Export a QT movie: "25p2".

25p1 and 25p2 are the two sought deinterlaces. The 50p deinterlace will be comprised from these two. There are probably elegant ways for intercutting 25p1 and 25p2, such as with .xml scripting, but I used a clunky-but-sure method:

...5. FCP: Make a mask clip consisting of alternating clear and black frames.
...6. FCP: Make 25p1 50% speed -- no "frame blending" -- and multiply by the mask clip (with the first frame clear).
...7. FCP: Make 25p2 50% speed -- no "frame blending" -- and multiply by the mask clip (with the first frame clear).
...8. FCP: Add sequence 6 to sequence 7 displaced one frame to the right. (This gets around FCP's nutty omission of the first frame from a 50% speed render.)

The result is in a 25p timeline and runs at half correct speed.

...9. Compressor: Change this so the frames play at 50p.


Remarks: Excepting the two deinterlacings, all the steps are computationally simple and should be swift and lossless. Still to avoid possible degradation you might prefer to work in an uncompressed codec. Sadly I found FCP's handling of 8-bit Uncompressed 422 too glitchy for this procedure. FCP has a mind of its own concerning field dominance with this codec. If using Apple Uncompressed check all steps' results carefully. ProRes HQ is unglitchy and did a beautiful job. You can download 10-second samples of 50i original, 25p1 deinterlace, and 50p double deinterlace for examination.

To avoid the risk of 25p1 acquiring a different gamma from 25p2, initially render the interlaced original ProRes HQ and proceed within that codec.

Dennis Couzin
Berlin, Germany

[Steps 7 and 8 were modified on 11 August 2012.]
[Note added 18 August 2012: Compressor's deinterlacing is hardly state of the art. Its "better" can give better looking results than its "best".]
[Note added 7 November 2013: See modification to the method posted in this strand today.]
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
August 16, 2012 07:23AM
I'm not sure whether I understand why you're doing all of the above described.
50i to 25p can be can done with quite a good quality very simple and fast without leaving FCP.

Place the 50i movie into a sequence and apply the de-interlace and use lower field for interpolation. Set the composite mode to 'add'. Set the transparency to 50%.
Now duplicate this track and put it above the original track, change the interpolation to upper field.
This way all the information of the fields are kept - though still interpolation is used.

Now you can edit, crop, rescale

Simple example here:
[www.spherico.com]

If you have After Effects it will be way easier.

Andreas

Some workflow tools for FCP [www.spherico.com]
TitleExchange -- juggle titles within FCS, FCPX and many other apps.
[www.spherico.com]
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
August 17, 2012 03:22AM
Andreas:
You showed a method for making 50i-to-25p deinterlacing in FCP which includes information from all the fields of the 50i.
Your method can be described:
1. FCP simple line-averaging deinterlace on the 1st, 3rd, 5th, etc. fields.
2. FCP simple line-averaging deinterlace on the 2st, 4rd, 6th, etc. fields.
3. Superimpose the deinterlaced frames with 50% opacity.

Your final 25p result can be described as having for each of its lines a weighted average of three lines: 1/4 weight from the line below; 1/2 weight from the line itself; 1/4 weight from the line above (the lines coming from whichever of the two fields has them). So even where there is no motion at all, there is vertical blur in your 25p. Where there is motion your 25p is very blurry because it doesn't represent the moments of either field but a combination moment. All decent 50i->25p deinterlacers I've seen compute just half the lines while yours computes all the lines.

Anyhow, my goal is 50i-to-50p deinterlacing. The 50p should have 50 different images per second which are as good representatives of the original action as possible. Your test square takes 78 frames to make its motion both in the original 50i and in the your final 25p. It must take 156 frames in the 50p. Indeed you did make 156 different frames by your method, but you smashed them together to make 78 frames. It requires some work to make a 50p from your 156 frames and it would not be a very good 50p.

Line averaging as the FCP deinterlace filter does, is extremely crude. The poorness doesn't show itself with your test object which has its perfectly vertical sides moving horizontally! There are better 50i-to-25p deinterlace filters such as in Compressor. Good 50i-to-25p deinterlacing requires optical flow or some other 3D (x,y,t) filtering. For this reason I doubt that however you assemble your 78+78 frames into 156 frames a high quality 50p can result.

The idea behind my method is to make use of the best available 50i-to-25p deinterlacer in order to make 50i-to-50p. The 50i-to-25p deinterlacer will use information from all the fields but be biased towards half the fields: the ones whose moments the 25 frames will correspond to. I have no better deinterlacer than Compressor's. Compressor's deinterlacers set on the 1st, 3rd, 5th, ... fields. It was that limitation I had to work around. The FCP deinterlacer lets you choose which fields (1st, 3rd, 5th... or 2nd, 4th, 6th...) but it is a crude deinterlacer, so of no use in my method.

Dennis Couzin
Berlin, Germany

[Note added 18 August 2012: Compressor's deinterlacing is hardly state of the art. Its "better" can give better looking results than its "best".]
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
September 06, 2012 11:32PM
As technical as this is, this could be a very useful procedure in cases where we need 50- or 60i conversion to 50 or 60p. Thank you, Dennis!

Pretty odd about Compressor's dislexic settings. Is that 3.5 or 4.0?

- Loren

Today's FCP 7 keytip:
Advance to next/previous keyframes in a clip with Shift/Option-K !

Your Final Cut Studio KeyGuide™ Power Pack
with FCP7 KeyGuide --
now available at KeyGuide Central.
www.neotrondesign.com
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
September 07, 2012 08:15AM
Loren, it's Compressor 3.5. I'm curious what's improved in Compressor 4. Is Compressor 4 fully compatible with FCP7?

Dennis Couzin
Berlin, Germany
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
September 07, 2012 10:01AM
You can't send to Compressor 4 directly from FCP 7 but otherwise it's compatible. It's not vastly different to be honest.

My software:
Pro Maintenance Tools - Tools to keep Final Cut Studio, Final Cut Pro X, Avid Media Composer and Adobe Premiere Pro running smoothly and fix problems when they arise
Pro Media Tools - Edit QuickTime chapters and metadata, detect gamma shifts, edit markers, watch renders and more
More tools...
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 01, 2013 07:09AM
Hi Dennis

I've only just come across this post so sorry that I'm late to the party.

I've recently been converting my 50i (PAL) camcorder material to 25p and obvioulsy the softening of the original video material is very noticable due to the discard/merge of the two fields into one frame. It did occur to me that the saviour of interlaced material on progressive formats will be when 50p becomes a standard on home players at which time I'm hoping that there will be converters which can generate 50fps (progressive) from the 50 fields a second (interlaced) which will then retain the characteristic 'Video' look of home movies etc which I personally prefer.

I'm yet to find any such conversion process - did you manage to find anything like this?

regards
Luga
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 02, 2013 05:07AM
50i-to-50p (or 60i-to-60p) double deinterlace is the natural deinterlace. Various software and hardware players do 50i-to-50p double deinterlace routinely. strypes pointed out that the Apple DVD player does this. A Sony deck playing 50i HDCAM does it nicely. As realtime deinterlacing algorithms improve, we should expect this from all players.

I found a lively subculture of video hackers at doom9.org with sophisticated ideas about deinterlacing. What I call "double deinterlace" they call "double framerate deinterlace". It is best to not think of 50i video as being 25 frames per second in the first place.

Dennis Couzin
Berlin, Germany
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 02, 2013 07:00AM
Thanks Dennis.

I'm actually looking for an encoder that will do this so that I end up with a file encoded at 50p.

I'm not entirely sure if something like Handbrake will do this.

I'll dig around, thanks again for your time.

Luga.
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 02, 2013 09:46AM
Luga, Nattress's Standards Converter V2.5 says it does 60i-to-60p conversion. I'd guess this means it does 50i-to-50p too, but if not you could trick it by first conforming your 50i to 60i and then the output 60p to 50p. The software does a simple kind of deinterlacing.
There are more advanced deinterlacers discussed at doom9.org.
There are hardware converters such as Alchemist and Teranex.
I've no experience with any of these softwares or hardware.

Dennis Couzin
Berlin, Germany
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 05, 2013 12:10AM
What about stib's tools? It includes a free De-Interlacer.
Pashdej
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 05, 2013 01:23AM
Further to my mention of stib's I realised that I had often used JES_Deinterlacer.app and once having done enough experimentation with a short piece of footage I found it very effective. The same Developer has a Video Cleaning tool as well called JVC which does require much set-up but so it should.
Pashdej
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
April 05, 2013 07:47AM
Pashdej: JES_Deinterlacer.app uses a simple (non-motion compensated) deinterlacing, so its 50i-to-50p won't be top flight. The idea behind this strand was to make use of the best available 50i-to-25p deinterlacer in order to make high quality 50i-to-50p.
There is a vibrant underground of video hacking which video professionals are unwise to ignore. Such software as QTGMC looks promising.

Dennis Couzin
Berlin, Germany
Re: 50i-to-50p (or 60i-to-60p) double deinterlacing
November 07, 2013 08:50PM
In 15 months I've found no simplification of the double deinterlacing method, but incorporating some QT Edit steps makes it more robust. Here is the method with those modifications. (NTSC-landers please substitute '60' and '30' for the '50' and '25'.) Additional details will be found in the first post.

...0. QT Edit: Examine the video encoding attributes of the original.

...1a. Compressor: Make a 25p deinterlace from the 50i original: "25p1".

...1b. QT Edit: Examine the video encoding atrributes of 25p1. Modify, if necessary: Color to original's; Pixel aspect ratio to original's; Fields to "Progressive"; Field Dominance to "Unknown". Save.

...2a. QT Edit: Modify the video encoding attributes of the 50i original. Change Fields to "Progressive" and change Field Dominance to "Unknown". Save the QT: "25p0".

...2b. FCP*: Import 25p0. Make its speed -100%. Export a QT movie: "25p0r".

...2c. QT Edit: Modify the video encoding attributes of 25p0r. Change Fields to "Interlaced" and change Field Dominance to the opposite of the original's. Save the QT: "50ir".

...3a. Compressor: Make a 25p deinterlace from 50ir: "25p2r".

...3b. QT Edit: Examine the video encoding attributes of 25p2r. Modify, if necessary: Color to original's; Pixel aspect ratio to original's; Fields to "Progressive"; Field Dominance to "Unknown". Save.

...4. FCP*: Import 25p2r. Make its speed -100%. Export a QT movie: "25p2".

...5. FCP: Make a mask clip consisting of alternating clear and black frames.
...6. FCP*: Make 25p1 50% speed and -- no "frame blending" -- multiply by the mask clip (with the first frame clear).
...7. FCP*: Make 25p2 50% speed -- no "frame blending" -- and multiply by the mask clip (with the first frame clear).
...8. FCP: Add sequence 6 to sequence 7 displaced one frame to the right.
...9. QT Edit: Conform this to 50 fps.


Dennis Couzin
Berlin, Germany

*Note added 14 Feb 2020. FCP7 does something nasty with imported 720x576 framerate 25 clips. If "None" is chosen for field dominance in the sequence settings, FCP7 doubles the even lines, erasing the odd lines. So you must allow FCP7 to "think" a 720x576 framerate 25 clip is interlaced, even if it isn't. Accept whichever field it "thinks" is dominant, lest it apply a field shift filter. Thus step 2a creating 25p0 can be skipped, and the 50i original used directly in step 2b. Field dominance matters for the deinterlace steps, 1a and 3a. There, Compressor's Inspector's A/V Attribute should show Native Field Dominance correctly, as in steps 0 and 2c.

FCP7's field problem with 720x576 framerate 25 clips affects all codecs. FCP7 hasn't similar problems with other clips. One way to check whether line doubling is occurring is to include a test frame like 720x576, 720x480, 640x480, 1920x1080.
Sorry, only registered users may post in this forum.

Click here to login

 


Google
  Web lafcpug.org

Web Hosting by HermosawaveHermosawave Internet


Recycle computers and electronics