Monday, October 3, 2011

H.264 workflow: Flawless 1080i to 1080p with JES

OK, so you've got some 1080i60 footage in H.264.

Freaking out because:
  1. Final Cut is showing just black
  2. QT Player X is showing just black
  3. QT Player 7 re-export is showing jitter: 1-in-60 fields out of place in the timeline
You're starting to regret not shooting 1280x720p60, because it's such a pain in the arts.

Never fear — just skip over the running waters with these 4 stones:

1.  Convert from ersatz 1080p60 to an "embedded 60i" 30fps movie:
     — export with QTP7 not QTPX
     — enforce 29.97fps
     — use H.264* with high bitrate / low crunch
     This gets a better result than the QuickTime 7.5.5 hack to allow 1080i compatibility
     (a crude 100% threading in-playback filter, changing dominance EVERY frame).

     * you could use intra (pixlet/AIC/prores) but it's a once-use-only intermediate.
     Plus, bypass another colourspace transform (funnily enough, with Apple's codec).

     QuickTime Player 7.5.5+ tells you H.264 1080i60 is 1080p60, by faking it.

2.  Check your "30p" movie has true interlacing, NOT field doubling:
     — open file in QuickTime Player and view in Original Size (Cmd-1)
     — skim forward to a frame with no global motion, and some horizontal edges
     — look for any staircasing, effectively 540p not 1080p

     If you find problems, repeat step 1 but remove a frame from the source.
     Delete one or three or five frames ("60p" ersatz) from the original & save a copy.


3.  Convert to 1920x1080p60 using JES Deinterlacer:
     — input = NOT progressive, top field first*
     — enforce 59.94fps
     — enforce 1080 lines, 1920 width in 'custom' under Standards Conversion
     — slide open that Inspector, and select NTSC and 'Video' range
     — video output 'Direct' to Apple Intermediate Codec
* you may have to switch TFF to BFF if you've been trimming

I've seen all sorts of problems with colour shifting, if you select "HD" instead of "NTSC";  brilliant green dresses become dull or turquoise, and skin tones lose their pink blushing highlights.

Living in a PAL world I still see the occasional problem with NTSC colourspaces looking dull on TV, but things have improved a lot since the big shift of 2009.  The only persistent offenders now are ESPN 1&2 HD and SD, which continues to insist on heavier shadows and a brown/purple bias on PAL displays and HDTVs in PAL land.

4.  Check your original / target with an overlay test:
     — open both files on the same frame in QuickTime Player
     — slide windows exactly over the same space
     — use Cmd-` (command-backtick) to repeatedly switch

Bright areas unequal are a likely sign that gamma values are wrong.
Dark areas unequal are a likely sign that NTSC/HD colourspace wrongly selected.

In a previous project I found I had to use 'Use Separate Gamma' with values of 2.11 and/or 2.12.  If brighter areas are mismatching, try this.  (I think I may have been using JES for step 1 as well as step 3).

No comments:

Post a Comment