logo Sign In

Help with interlaced video in After Effects

Author
Time
 (Edited)

I've pretty much finished the color correction of Puggo's ROTJ but I'm having some trouble with the interlacing of Puggo's files.

Here's the media nfo of one of the AVIs I got from Puggo:

Format                                   : AVI
Format/Info                              : Audio Video Interleave
Commercial name                          : DVCPRO
Format profile                           : OpenDML
File size                                : 4.15 GiB
Duration                                 : 20mn 36s
Overall bit rate mode                    : Constant
Overall bit rate                         : 28.9 Mbps

Video
ID                                       : 0
Format                                   : DV
Commercial name                          : DVCPRO
Codec ID                                 : dvsd
Codec ID/Hint                            : Sony
Duration                                 : 20mn 36s
Bit rate mode                            : Constant
Bit rate                                 : 24.4 Mbps
Encoded bit rate                         : 28.8 Mbps
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 29.970 fps
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:1:1
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 2.357
Stream size                              : 4.14 GiB (100%)
Encoding settings                        : ae mode=manual / wb mode=one push / white balance= / fcm=manual focus

The only interlacing settings I found in AE were in the Interpret Footage menu for each input file. The default settings were "Lower Field First" but as you can see in picture A) bellow (open link in new panel to see full resolution) this created horrible aliasing, so I tried checking the "Preserve Edges" box, which helped a tiny bit but as you can see in picture C, when setting "Separate Fields" to "Off" the jaggies disappeared completely - I thought then, that I had figured it out, only to find, that the "Off" setting took care of the aliasing, only to introduce typical interlacing artifacts (as seen in picture C2) which in turn disappear, when you set it to "Lower Field First" (B2).

Trying to play with the pulldown settings only introduced even worse interlacing artifacts and I'm quite sure that there is no pulldown in Puggo's files anyway, because when you play them, they do run at 29.97fps (way too fast).

Can anyone please help?

Author
Time

It would be good if this could be solved by setting in AE but if it can't, what would be the best way to first convert those files to progressive, ideally keeping all other properties the same, so that I can then just swap the files in the AE Project.

Author
Time

If you send me the file, I'll have a look and see if I can decode it and then find a solution in AviSynth.  If I find one, I'll send back either a script or the video with the problem fixed, whichever is easier.

Author
Time
 (Edited)

Well, they are multiple very large files but if I could send you the smallest one an you could send back a script, that'd be great. PM sent.

Author
Time
 (Edited)

I don't see any combing at all, so I think the video is just sped up.  Try slowing it down to 23.976fps in AE.

AviSource won't open it because of the codec used.  Even installing the Panasonic DV codec did not help; however, VirtualDub was able to open the AVI, so I rendered it to Lagarith and then used AviSource().

EDIT:  I got AviSource() to work by installing CedoCida.

AviSource()

AssumeFPS(24000,1001)

Using DirectShowSource() on the original file seems to work too.

DirectSource()

AssumeFPS(24000,1001)

Author
Time

You wouldn't want to change the speed because I intend to do the pulldown later by setting the DVD pulldown flag on the final DVD.

If you end up unable to deal with the interlacing, perhaps you could describe the color curves you ultimately used, and I could try and replicate them in Vegas or Virtualdub?

"Close the blast doors!"
Puggo’s website | Rescuing Star Wars

Author
Time

Puggo - Jar Jar's Yoda said:  You wouldn't want to change the speed because I intend to do the pulldown later by setting the DVD pulldown flag on the final DVD.

 But that's not the point.  The video is at 29.97fps, and each of those frames is (as far as I can see) a unique image i.e. there is no telecine.  It has to be slowed down to 23.976fps.

Author
Time

I recall you showing the raw captures being played at 29.97fps in many of your behind the scenes featurettes.

So, a new book came out and we learned so much, and it is called, “Anguilosaurus, Killer of the Living”.

Author
Time
 (Edited)

In order to check for interlacing, it's better to use a scene with lots of motion. In any case, as far as I know DV is always interlaced. I am quite rusty in the matter as it's been a while since my last encode, but I can take a look if you want, Harmy. As a general rule of thumb, the best quality option is probably bobbing with QTGMC and then doing SelectEven() if you need to go back to the original framerate:

http://forum.doom9.org/showthread.php?t=156028

That can be quite slow, though. A good alternative would be straight-up deinterlacing using TDeint with NNEDI3, TMM and Vinverse:

http://bengal.missouri.edu/~kes25c/

http://bengal.missouri.edu/~kes25c/TMMv1.zip

http://avisynth.nl/index.php/Vinverse

Like so:

source loading and pre-deinterlacing filters
Interp = nnedi3()
Deinted=TDeint(type=1,edeint=Interp,emask=TMM())
vinverse()
rest of the filterchain

TDeint's type=1 interpolation works best on animated content, for real-life footage type=2 might be a better idea.

For even faster results, you might want to try Yadif: http://avisynth.nl/index.php/Yadif

To load the file in Avisynth, do as Chewtobacca said.

Author
Time

^ But we're dealing with a movie.  Movies hardly ever involve true interlacing, so there's no need for QGTMC or Yadif.  They can, of course, be telecined, but I see no sign of that here.

I don't have much experience with DV, but if DV (as opposed to one of its later variants) does not support 23.976fps, then the video might have been sped up to avoid having to telecine it.

Author
Time

Something tells me that the capturing device itself was operating in full interlaced mode, since that's typical for consumer devices of SD vintage and is indicated by DVCPRO. I highly doubt the capturing device converted film 23.976 to video 29.97 via telecine in this case. Either progressive marked as interlaced or full interlaced video.

If you can send me the sample I'll be glad to lend another set of eyes (and tools). Used to do this for a living.

Author
Time

The camera I used is DV.  However, it was not filming a DV movie.  Instead, it was being used simply to pass images to Cinecap software that assembles the frames into a DV movie on the computer.   Since DV plays at 30fps, but the 16mm frames were intended to be played at 24fps, that movie appears fast when played.

I don't need any of that altered - in fact I don't want any of it altered in any way.  Just the colors corrected.  DVD pulldown will take care of the speed later.  I think that Harmy is having trouble figuring out how to save the color-corrected movie without AE making other changes in the frame format.  Is it possible to have AE detect the format of the movie, and just save it in the same format?

[btw, as for the featurettes, i can't do pulldown on part of a movie, so in some cases I just left clips fast.  If it's important for a clip to run at the right speed within a standard DV featurette, I can have Cinecap do a pulldown in the typical way of adding duplicate frames.]

"Close the blast doors!"
Puggo’s website | Rescuing Star Wars

Author
Time

Puggo - Jar Jar's Yoda said:  I don't need any of that altered - in fact I don't want any of it altered in any way.  Just the colors corrected.  DVD pulldown will take care of the speed later.

It won't.  I understand what you are saying about not wanting anything to be altered at this stage apart from the color, and that's fine, but you shouldn't apply RFF flags to 29.97fps video.  At some stage, you will have to slow it back down to 23.96fps and then encode with RFF flags i.e. apply pulldown.

Author
Time

Puggo: This makes more sense. Assuming the cam was used more like a still camera, taking one image for each frame, then there should be no combing. In which case, Chewtobacca is absolutely correct that the footage should be interpreted as 23.976 (24000/1001).

Unfortunately, AE's interpret footage dialog doesn't seem to play nice. I see no option to assume a different input rate, only to conform to a new rate. So you'll probably want to run the source through AviSynth with the AssumeFPS() directive and use the resulting file as your source.

To be clear, you likely have 23.976 fps progressive footage, marked as 29.97 fps and marked as interlaced. You want to interpret it as 23.976 fps and non-interlaced. The latter can be achieved in AE by setting separate fields: none, however there seems to be no easy way to fix the input fps in AE.

Author
Time
 (Edited)

Chewtobacca said:

It won't.  I understand what you are saying about not wanting anything to be altered at this stage apart from the color, and that's fine, but you shouldn't apply RFF flags to 29.97fps video.  At some stage, you will have to slow it back down to 23.96fps and then encode with RFF flags i.e. apply pulldown.

This. ^

Ideally, what I would do in this case is use another tool such as AviSynth to interpret the footage as 24000/1001 progressive and save a lossless master. IIRC, DV/DVCPRO supports neither of these things, so it's at best suitable as an intermediary.

Author
Time
 (Edited)

But my AE Composition is set to 29.97fps, so I don't see any reason, why interlacing artifacts should appear, if the video is set as progressive - it should just take it as 29.97 full progressive frames per second.

Author
Time

But my AE Composition is set to 23.97fps, so I don't see any reason, why interlacing artifacts should appear, if the video is set as progressive.

How are you setting the video as progressive?

Author
Time
 (Edited)

I edited the post - I typed 23.97 instead of 29.97 by mistake - my AE Composition is set to 29.97fps.

I assumed that setting the fields to none would set the video as progressive.

Author
Time

I assumed that setting the fields to none would set the video as progressive.

Comp/project settings no, this would not affect your sources. Only the timeline and how the output is marked.

If you Interpret Footage > Separate Fields: None then you should have no combing, assuming the source footage is indeed progressive.

Author
Time
 (Edited)

That's almost certainly because you have a video that contains 29.97 unique images per second, and you're telling AE to make it 23.976fps.  It can do this in three ways: by discarding frames, by blending fields/frames together, or by slowing the clip down.  So far, it seems that you haven't found a way of making it do the last of these.

But none of that really matters because you have a way to slow the video back down to 23.976fps.  If Puggo really wants the video to be at 29.97fps (and I don't see why he would), you can do your work in AE, render the result, and then speed the clips back up with AviSynth.

AviSource()

AssumeFPS(30000,1001)

EDIT:  Harmy, I typed all this before I saw the correction to your post above.  I don't know why you are seeing combing with your project set to 29.97fps, but the fact that the DV codec is involved might have something to do with it.  AE might be programmed to handle DV footage in a certain way.

Author
Time
 (Edited)

And yet I do, as is evident in the picture I posted.

Broken link for me. :(

Premiere has a better Interpret Footage dialog. You can create and name a new 23.976 sequence, import the DV file, interpret as 23.976 and progressive, and drag the file to your sequence. Then save project and import the project into AE. The resulting sequence(s) will play back correctly.

If you're still getting combing after this, then it's baked into the source. Try upper/lower field. If neither works or only partially works, it's maybe telecine; in AE's Interpret Footage try Guess 24Pa Pulldown.

Edit: clarity.

Author
Time

OK, so upon closer examination, I found out, that it is only one of the files, that does this - all the others seem ok with the Separate Fields set to none. I could upload it for you to examine and see if anything can be done about it but it's over 4GB, would that be ok?

Author
Time

The file-size is fine by me.  I'd be happy to have a look.

Author
Time
 (Edited)

Chewtobacca said:

It won't.  I understand what you are saying about not wanting anything to be altered at this stage apart from the color, and that's fine, but you shouldn't apply RFF flags to 29.97fps video.  At some stage, you will have to slow it back down to 23.96fps and then encode with RFF flags i.e. apply pulldown.

Sorry if I'm being dense, but what do you mean by "slow it back down"?  The frames that are currently in the movie already correspond to 24fps, not 30fps.  Why do I need to slow it down further before pulldown?  I didn't do that for PG or PSB (at least I don't remember doing that).

By the way, thanks everyone for helping harmy look into this!

"Close the blast doors!"
Puggo’s website | Rescuing Star Wars