Tuesday, February 10, 2015

Avid Behaving Badly #15: Rendering a Scaled Effect on a Framerate Converted Clip Breaks Field Order

You know how sometimes you feel like you've dealt with all the weird shit that the version of Avid you're using is ever going to throw at you, and you're fucking Avid Superman around the office?  And then this happens.  This weird, absurd, ridiculous problem.

I mean, I just wrote that title, which is an exact description of the issue, and it still looks like goddamn gibberish.

So what error am I talking about?  Well, none.  Avid doesn't give an error in this case, it just spits out video that's corrupted.  If you, unlike Avid, know what fields are, the rendered video has the fields out of order.  The resulting image looks like it has scan lines, or some kind of fucked up interlacing, or something.  It's all shitty looking on the screen, basically.

Now this is a rare issue.  It seems to only happen when you do all of the following:
Step 1) Convert the framerate of your source video clip to another framerate, either by editing with it in a different framerate project, or by exporting the clip as a different framerate and then re-importing it.
Step 2) Put a scaling effect on the clip such as 3D Warp, Pan and Scan, or Resize.
Step 3)  Render it.

That's the thing - the effects look and play FINE unrendered.  It's only when you render them that Avid decides to shit the bed.

If you're like me, you'll assume that the rendering is the problem (but it isn't).  I tried every fucking render setting combination that's goddamn possible, and the problem still occurred.  So what the fuck?  A video mixdown is essential a media file of a render, and that still has the problem.  Exporting the clip is the same.  Exporting the source clip in the new framerate and reimporting it as the same framerate as your project, and then putting the effect on it still has the problem!  WHAT??

I suppose that, if I had a real-time playback to an actual tapedeck (and not a U1 drive), I could just hit record on the deck and play on the Avid and then let the output happen that way, but god damn if that isn't some bullshit and also not a thing I can do with my current hardware.

So how does one actually fix this nonsense?  Well, the big clue is that the problem really is the fields being out of order.  And there is one effect in Avid that can identify field order:  Timewarp.

But you can't apply a timewarp effect to a framerate converted clip!  So first you have to export the asshole clips in the framerate of the project that you're working in.  Strip off all of their FX, export them with 709 color space, full-res, in an Avid DNx codec of your proper framerate.  Note that for all of my example pics, I'm converting from 23.976 to a 59.94i project.  If you're going the other way, you'll need slightly different settings that pictured.


Then you need to import the video, ignoring alpha channels (why the fuck does DNx put the video on the alpha channel and have a blank video channel anyway?), and recognizing that 709 colorspace.



I stripped off the scaling effect and put a 100% speed timewarp on the source clip (that's normal playback speed; no time is actually being warped).  Then check the ignore render settings and set the render to "Both Fields."  Set the source video to "Film with 2:3 Pulldown" and the output video to "Interlaced" or "Progressive" depending on if you're in a 59.94i or 23.976p framerate project, respectively.  Click "Detect."

Then you can render that bitch.

Now apply your scaling effects to the rendered 100% timewarp clip, and they should render perfectly.

Fucking retarded that you need to use a motion effect to correct a field order conversion discrepancy, but that's goddamn Avid for you.