View Single Post
Old 13th August 2013, 10:58   #1  |  Link
MrJ
Registered User
 
Join Date: Jul 2013
Posts: 7
Repair frames, AVSLib array, crop or animate to save forgotten quick release disaster

This is my first post so be gentle please.

I turned up to shoot a video and couldn't find the quick release plate which screws the camera to the tripod. I didn't have time to get another so I put a lump of plasticine between camera and tripod and taped it up as best I could. When I got home and checked the footage I found the camera had slowly leaned back with the lens heading toward the roof. I think the heat from the camera must have gradually softened the plasticine. Thankfully I just pressed record so there is no tilting, panning or zooming to complicate matters. It is helped by that fact that there is always a fixed microphone in shot so I can be fairly sure how the camera moved. I think it's a fairly unusual set of circumstances which is probably why I can't find anyone else writing about it until I read the previous repair frames post here today.

I went through the video and now have a mathematical formula which tells me how the angle changed with time. For every 1920 x 1080 frame I have, I want to cut out a 1280 x 720 one. I can crop in avisynth as long as I want the crop to be in the same place in each frame. However with this crop I want the top left hand corner (or centre of the 1280 x 720 frame) to change with time (or framenumber). As my camera moved by accident in a mathematically controlled way, I know exactly where I want the cuts to go and can easily make a spreadsheet or text file with the information for the thousands of necessary cuts. At the moment I could only export stills and cut them by hand and then put them back together like Magic Lantern users do with dng files. I want a program to read in the x and y co-ordinates of the cut along with the framenumber and want the program to then save the 1280 x 720 picture in some format, either a video format or some other image one which I can convert back to video.

I think the AVSLib software can do it but I'm finding their tutorials hard to follow as I haven't done much programming in years. Also avisynth is different to the other programming languages I've used so it's a whole new way of thinking. I think someone who is familiar with the code could made something which worked in 5 or 10 minutes whereas I would probably take me 5 or 10 hours.

I don't have After Effects or Nuke or any software like that installed although I'm looking in buying something which can handle canon dng raw files to shoot some video on my 50D. Maybe I could download an evaluation copy, solve this one-off problem and see if I want to buy for the Raw video stuff.

I'd be very grateful for any suggestions.

(The equation for how many pixels to crop is in the form p = ax^2 + bx + c where x is frame number and I know constants a, b, c. The R squared value for the curve is something like 0.9996 from memory so I'm confident that if I can get the thing cut well, the video will at least be watchable).

Last edited by MrJ; 13th August 2013 at 11:02.
MrJ is offline   Reply With Quote