Hugo Future Imperfect Slim

Tracey Jaquith · PoohBot Pictures

Technophile · Optimist · Cyclist · Archivist · Design · Video · TV · Nomad · Docker

tracey pooh

2-Minute Read

(uninter)"lacer" program having fun with

Having some challenging fun working on trying to deinterlace some toughie clips from my brother’s upcoming feature film.

His camera recorded in 24fps (24000/1001 to you fellow geeks 😎 and smartly did a “2323” writing/stretching of it to 60i (60 half-frames).

After correcting back to 24fps progressive most of his clips, he’s found ~10-20% are not able to be put back together visually properly even with CineTools and manually specifying the “cadence” and sequence starting frames, etc…

I started with code that I wrote to take a small segment of a video and split the interlaced frames into 1/2 height “fields” and then drop them down to grayscale to compare them all to each other to find the best matches (to verify the cadence is right and/or the fields aren’t “off by 1”, etc..)

It uses mplayer and ImageMagick (“convert” and “compare”) for pretty high-quality extraction of frames from the source video into the 1/2 height “fields”.

So I just do about 0.3 seconds to get 10 frames, and thus 20 1/2 frame fields for analyzing.

It will output the best matches of frames. For example:

bash lacer.txt  good.mov  0.5  0.8

I then extended it into a web page (screenshot above, where I’m left-shifting one field by 4 pixels for visual inspection)

/lacer/ try it out online! (sources: lacer.js lacer.txt)

that uses some CSS cleverness (clip property is your BFF!) to interlace together a pair of fields.

It supports:

  • field swapping (move one 1/2 image to be the 1st, 3rd, 5th, etc. lines – if it was previously the 2nd, 4th, 6th, etc. lines)
  • left and right shifting a field
  • pairing arbitrary fields
  • showing a “raw” 60i telecined sequence
  • showing the 60i sequence as a “deinterlaced” 24P sequence

Say Something

Comments

Nothing yet.

Recent Posts

Categories

Tags

#spottheshuttle 1940s 1st person 3d accident aids lifecycle airplane animals appeltart apple pie apple watch architecture arkit art ascii art asia augmented reality baking bali bay area best of biking birthday cafe racer camaro camera video camping candy cars cat pee cat psychology cats cloud coding college colorspaces computer vision cornell crictl css dark mode death valley decaf deinterlace desert design diy docker documentary driving ducting ebgb elbow break emacs endeavour family ffmpeg food games geek gitlab golden gate bridge google cardboard grand canyon gravel bike green magic man h.264 hack health highway 1 home https hugo hyperlapse internet archive ios iphone javascript jeep k3s kubernetes landscapes linux lisp luke battling darth mac macosx markdown mashup metal montclair motion-jpeg motorcycle mountain bike mplayer mt tamalpais nasa new bay bridge news ninja oakland olecranon partioning phoenix php php-htm-mode politics protest rancher recording remaster remix remodel sedona shuttle small town star wars surgery swift tahoe technical thirsty thursday time machine time-lapse timing belt adjustment top end rebuild tracey traefik training ride travel vacation valve job video virtual reality vlog vscode weekend-mechanic work x264 xcode yuvj420p zx6

About

tracey is a nonstop dance party. so you dont have to. dont ask me about containers. thanks for dropping by today. you look nice.