Hugo Future Imperfect Slim

Tracey Jaquith 路 PoohBot Pictures

Technophile 路 Optimist 路 CyclistArchivist 路 Design 路 Video 路 TV 路 Kubernetes 路 Docker

tracey pooh

2 minutes 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

See more

Categories

Tags

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

About

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