Conversion of 25fps footage to slower frame rates ..

I would love to see “Slow Speed” features in Kdenlive ..

Everytime I get an editor to myself I ask if it's possible to do “Real” changes of FPS in ANY editing software and once I've explained what I want to do (which takes about 10 minetes) they tell me that there SHOULD be a way to do it but the only way would be very long winded and involve about four different programs ..

The only way to explain what I want is to explain how we got here .. by the convergence of video and film technologies ..

With a film camera the frame rate depends pretty much on how fast you turn the handle. So varying the frame-rate is easy .. you turn the handle (or motor) faster or slower. Once you start to get involved with modern film cameras and especially modern film cameras with a motion control rig .. you can do all sorts of funky tricks .. ramps from 1fps to 50fps .. seamlessly and with a compensated aperture or shutter ..

With Motioncontrol you simply control the camera as an extra axis on the rig .. so regardless of the camera speed the images will line up perfectly ..

For example .. you set up a move with a car in the foreground. You set the rig to run at 25fps and thus drive the camera at 25fps. For the first pass you put a blue screen behind the car then you run the pass (say a track) with a man walking past opening the door and getting in ..

Now you pull out the blue screen reset the rig to 1fps (or even less) and thus the camera to 1fps (lets forget the aperture pull for a second) now you shoot a second pass with people crossing behind the car.

When played back the second pass will look like ghosts and the two passes together will look like the driver is real but the people surrounding the car are ghosts ..

When they first started to make video cameras that ran at different speeds the camera manufacturers did not (and to a large extent still can't) make the camera run at anything except a fixed speed. Early camera like the Panasonic Varicam would record continuously at 60 fps and then apply a time code flag to each frame it would use .. The disadvantage of this setup was that the shutter speed was preset at 1/60 sec so if you shot at 1fps then you got a frame with a 1/60th sec exposure as opposed to ½ second and as you can imagine this would have made the shot outlined above look totally different ..
The obvious answer would be to shoot at 25fps while running the rig at 1fps and retime the second pass in post .. it will not look like film .. but it will look pretty close ..
The problem with doing that is that the shutter phase will be incorrect and the shutter angle will be 360degrees which is not necessarily what we what ..
What we need is a “Proper” slow speed converter. For instance ..

We shoot our first pass with a 180 degree shutter the rig is synced to the video camera so top of the “shutter fully closed” appears in the same place each time .. the rig also drives a “sync clock” which is put on the board .. either a stepper motor driven one or an electronic one .. See this video that shows a sync clock .. http://www.youtube.com/watch?v=IJt6UieDo6s (this also shows the action of the rolling shutter .. it should at 1/50 sec be exactly 1/2 of the image ..

Then we shoot a second pass also with a sync clock .. the sync clock will now instead of showing the phase with move over several frames ..
So for instance if the first frame of the 25fps move has the sync clock running from 3 o'clock to 9 o'clock then then for the “extraction frames” we need the 12 frames (or 13 depending) where the clock is pointing from 3 – 9 O'clock. The twelve frames we have chosen are then added together to make one new frame. We then need to totally discard the next 13 (or 12) frames (because on our original 25fps pass the shutter was closed). And then start again ..
Of course once you have made the interface to do that you can adjust the shutter angle .. obviously not infinity but to match the frames required .. so for instance if you want 1fps (assuming a 25fps finishing speed) a 180 degree shutter angle is impossible .. but a 172.8 shutter angle or a 187.2 is very simple .. you could also widen out the shutter angle to say 288 with no problems.

It looks and sounds a very semantic difference .. but I don't think it is ..

I'm aware that this can be a difficult idea to get your head round .. so please ask enough questions until I have explained it properly ..

If I understood right, it is actually long exposure time you're after (to make those people "ghostly" through motion blur)?

If I remember right, the "Shutter Angle" is actually the fraction of 1/FPS that the film is exposed (exposure time = 1/fps*SA/360).
So, with a fixed angle, slower FPS gives longer exposure.

Some camcorders do allow a slower shutter/lower FPS, but mainly in "night mode".

One could try to simulate slow shutter by adding together a number of successive frames, provided that the video cam shoots with a 360 "shutter angle" (some chips are capable of this). Otherwise there would be gaps in the traces of moving objects.

Now about syncing, I did not understand what you want to sync to what?
In the video you linked, was the motor synced to the cam or the other way around?
Obviously, such syncing is a hardware question, and very little could be done in a video editing program, to emulate such sync!

Exactly you understand it ! I missed out the 359.99 shutter angle so as not to confuse things (that's a camera thing rather than a post thing) The camera that allow the slow shutter like the Sony F3 do this but only down to 6 fps or so .. certainly not as far down as 1 fps ...

The bit I didn't explain properly was the sync ...

With motion control the camera move is perfectly repeated. Imagine you have a pan of 180 degrees in 180 frames and that this pan is constant so that frame one was at 1 degree and frame two at 2 degrees etc .. What you need to happen is that the shutter opens at 1.25 degrees and shuts again at 1.75 degrees .. if this does not happen then the camera is in a different place for each frame on successive passes so the move does not line up properly ..

With a stepper motor driven film camera there is simply a shaft driven my a motor and this is stepped in sync with the internal timebase of the motion control rig. When I explain the screen on a motion control rig to people I tell them to think of it as a 16 track tape recorder .. I record each channel of motion as a separate track and with a stepper motor driven camera the camera is one of those tracks .. so if I run the "tape machine" at 25 cm/s forward then the whole machine (including the camera) will run forward if I run it backwards at 25 cm/s backwards the whole machine will run backwards. If I run it at 1cm/s forwards then the whole thing INCLUDING the camera will run at 1/25th of the original speed.

There is a second way to sync the moco rig with the camera .. if the camera is xtal controlled then you take a frame pulse from the camera and feed it into the moco rig the moco rig adjusts it's internal clock until it's locked with the frame pulse output. The rig then starts in sync with the camera. With simpler video cameras you can take the Pal output and then feed it into a sync stripper and take the +5V frame sync out and feed it into the moco rig this "Fools" the moco rig into believing that the rig is connected to a film camera that is shooting at exactly 25fps. With more complicated video cameras you have to genlock the camera to a known source and then feed the same source to the moco rig. The reason for this is because the the image processing in the camera bears no relation to the movement of the shutter (this is drifting a bit but that's the problem we had with the Canon 5D because the output frame sync is not consistently in the same place relative to the camera frame sync I have since built a machine to detect the actual frame sync on the 5D).

So at 25fps the camera is in sync with the moco rig .. in order to check exactly where the shutter opens and closes in relation to the internal timebase we get a single stepper motor and attach a pointer to it. The motor is indexed to a zero mark and then a new move "or channel in our tape machine analogy" is made so that for every frame the rig does this motor turns one revolution. When we film this motor the white line is only visible when the shutter is open so if the index mark is at the top and index mark is "shutter fully closed" then at a 180degree shutter the white line should be visiable from 90 degrees to 270 degress (3 O'clock to 9o'clock) (and you can adjust the rig's internal clock to make this so).

Now if we shoot the same move with the rig running at 1/25th of the speed so that for every frame from the original move we now have 25 frames (and with a 359.99 shutter) if we film the same stepper motor we shot at 25fps then every frame will have the arrow pointing at something within it. So when the arrow is pointing at 0 (12 o'clock) we know this is where the original pass was "Shutter Fully closed" but infact the most useful frame is when the arrow is pointing at 3 O'clock (or 90 degrees) as that is the frame that that is the start of or our sample. So if we start the sample at the frame where the pointer is pointing to 3 o'clock and then take the next 12 frames and mix them into a new frame one .. this frame will match exactly with the first frame from the 25fps pass. However the sync for the second pass is set within the software the adjustment is pretty course (each frame is 14.4 degrees .. but in the real world 7 degrees of error is quite acceptable).

So what do I (we?) looking for in a slow frame rate convertor ? We need to be able to convert a clip to a framerate with a shutter angle .. .. there are a limited number of possible frame rates and shutter angles .. but we are all used to this anyway as (certainly in PAL land) we usually used these figures anyway ..

12.5 FPS 180 degree shutter (an easy one as it's a just drop each alternate frame)
6.25 FPS 180 degree Shutter (two on and two off)
3.25 FPS 180 degree Shutter (four on four off)

(once we get lower than that there are so many frames it's easy to do the maths we might not get an exact 180 degree shutter as in my 1 fps example)

To my mind if there was a converter that made these unattainable frame rates properly (ie dropping the frames when the shutter is "Closed") that would be a great and the sync could be attained by cutting the clip at the beginning (for instance when the pointer is at the 3) in this way we could emulate sync in a video editing program .. (However you are 100 % correct for the 12.5 / 6.25 and 3.25 fps passes there would need to be a divider on the framepulse so that the frames were shot in sync, ie for 12.5 fps one frame would have the pointer running from 3 - 9 on the clock .. and the (dropped) frame would run 9 - 3 by starting the converter with the first frame as a 3-9 then all the 9-3's would be dropped.)

Does this make more sense now ?

Yes, now it's clear to me what you are after.

Making a "frame dropper & adder" would be quite simple, but as you say, the shutter phase reference could present problems. Maybe one could use the time code or a sound channel for that, but I only do Frei0r plugins, where these are not available, so the reference signal had to be present in the video signal itself (one pixel in alpha channel would do...)

The output frame rate would still be 25, but the sum of X frames would be displayed for Y frames, Y>X. There would also be a minimum of X frames of delay, requiring a sound re-sync after it.

BTW, curious about your 5D sync extraction hack - can this be done without going inside the camera? Light from the LCD or something?
Or maybe battery current spikes :-)

[quote]
Making a "frame dropper & adder" would be quite simple, but as you say, the shutter phase reference could present problems. Maybe one could use the time code or a sound channel for that, but I only do Frei0r plugins, where these are not available, so the reference signal had to be present in the video signal itself (one pixel in alpha channel would do...)

The output frame rate would still be 25, but the sum of X frames would be displayed for Y frames, Y>X. There would also be a minimum of X frames of delay, requiring a sound re-sync after it.[/quote]

This has created some very very fun ideas in my head! But I'll get back to them later ..

The way I sort of envisaged this working was that trimmed the clip so that the first frame was the first frame of the source frames. So if we had shot the clock then the first frame would be with the pointer pointing at 3 o'clock. Then you select the clip (in the time line or as a clip?) and right click, then the "Motion" menu and then a third option which says "Cine Speed" then a box comes up in the effects stack "Speed" is a drop down menu as is shutter angle .. the shutter angle is greyed out if it's not available.

This would also have the effect or removing any sound associated with the clip .. the sum of X frames would be displayed for 1 frame .. in your example y would always be one .. in theory our "12.5 fps" would be the same as the "Speed 50%" (certainly to the uninitiated) (ie it would reduce the length of the clip by 50%) (or is it speed 200%? These things always confuse me .. fps I understand!)

THEN we could have the higher shutter angles .. so that instead of a 360 degree shutter angle we could have a 720 or even a 1440 degree shutter angle ..

(this is the same idea as before but the application is different).

I built a camera with a 360 degree shutter .. http://www.portablemotioncontrol.com/gp.html (it's not 360 of course it's 359.xx)

The effect on the Acela commerical is the camera running at 6fps and then being retimed back to 25fps in chronos ..

Someone asked us if we could make a second one so we could shoot into a semi silvered mirror and overlap the frames so that we could get a 720 degree shutter angle .. (ie the shutter is open for 1/6th of a second even though the camera is running at 12fps (in theory).

If we ran the camera at 25 fps and then added the frames like so .. (lets assume no change in speed)

out frame one = in frame one + in frame two
out frame two = in frame one + in frame two + in frame three
out frame three = in frame two + in frame three + in frame four

Thats a 1080 degree shutter ..

How possible is all of this ?

RE the 5D sync ..

http://www.portablemotioncontrol.com/usync.html

It's not a "Proper" sync extraction .. but it does work ..

If you want less that 3FPS then you can use the the 5d in stills mode ..and get perfect sync (and no rolling shutter) ..