Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Capturing Video

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th May 2021, 21:19   #1  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
[S8/8mm film transfer] A setup for fast-capture and frame accurate result

EDIT:Now with visible images

Here is a more complete description of my setup for capturing 8mm/super8 footages.
It needs some work to be build but then, capture is fast and gives good results.

Users on this forum helped me a lot to understand Avisynth and S8/8mm aspects.
EDIT: especially on this thread
My turn to give back...

----------------------------------------------------------------------------------------------------------

One more capture system?

What is new in this system, is the use of an LED to allow synchronisation between video and footage frames.
Please let me know if you know a similar setup as I didn't find any on the net.
This whole thing is a [good working] work in progress and I am probably inaccurate on some points. Please feel free to correct and comment.

https://nmldqjct.preview.infomaniak....0wL0O/download

https://nmldqjct.preview.infomaniak....DJPIl/download



LED for images synchronisation

The idea is to use an LED signal on the side of the filmgate as mark for software post-synchronisation with the projector:
The LED is turned on while the projector changes from one frame to the next one. (the LED is captured on the side of the framegate).
This was inspired from JohnMeyer's system where the software detects the framechange to be able to keep only one video frame for each film frame.
I didn't feel confortable with the idea of relying on software to determine which image to throw away. (And was upmost too lazy, as I feared having to tweak a lot to find the right parameters for every different type of footage).
Intuitively, the LED solution also seems to me faster to calculate, instead of calculating if images are mixed or not. Especially while pans or scenes changes, for example.


Projection phases:

Projector with blades, normal:
|---------------Frame 1------------|change||---------------Frame 2------------|change| ...
|bright| dark |bright| dark |bright| dark ||bright| dark |bright| dark |bright| dark | ...


Projector without blades, LED:
|---------------Frame 1------------|change||---------------Frame 2------------|change| ...
|L. OFF|--------------------------|LED ON-||L. OFF|--------------------------|LED ON-| ...

.

Last edited by chmars; 18th October 2023 at 11:19. Reason: Add links, change pictures url to outside site
chmars is offline   Reply With Quote
Old 16th May 2021, 21:42   #2  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
Blades
Projectors are built with a two or three blades disk. The disk is passing between the light source and the footage. It's function is ment to hide the film when it moves from one frame to another. But doing this only at that moment (approx 1/6th of the time) would result in discomfort for the spectator. So this blanking has been set to a regular frequency, three times per frame in my projector.
This is a big problem as blades create flickering/exposure variation on the captured video.
On most capture systems, the blade-disk is removed. Mine was complicated to remove and I needed something to trigger a signal. So, I kept some degrees of the blade that passes behind the frame while the image changes.
This remaining part of blade is used as signal for the microcontroller to calculate the speed and the moment of the process.
This is not the perfect setup however. Because the disk becomes unbalanced and can introduce vibrations. I'd recommend to use another moving part of the projector to trigger the signal thus removing the disk completely.

https://nmldqjct.preview.infomaniak....n6S4m/download

https://nmldqjct.preview.infomaniak....XNZkr/download



LED control + Speed control

To determine what phase of the projecting process is happening, the remaining part of the blade passes into an optical endstop. At this moment precisely, a signal is triggered to the microcontroler (Arduino). With this signal happening once per frame, the microcontroler can calculate when to fire and stop the LED. It also adjusts the speed by driving a PWM motor controller.
Speed control was useful when I was capturing with the blade disk in place. The original knob was driving a rheostat which did not give a constant speed, changing with the temperature, for example.
When an LED is used to sync the images, a precise speed control is not mandatory any more. An approximative speed will do well too.

Here is the code for the microcontroller:
Code:
//     Posted on https://forum.doom9.org/showthread.php?p=1942980#post1942980
//     Chmars 05.2021
//     This code could be more clever, elegant, clean, rapid........but it works :-))
    
    #include <RBDdimmer_modif.h>
    #include <PID_v1.h>
    #include <FreqMeasure.h>    
    #define USE_SERIAL  Serial 
    #define outputPin  13 //  pwm
    #define zerocross  2 
    
    int potPin = A1;
    int potVal = 0;
    
    int ledPin = 6;
    int ledVal = 255;
    byte ledPower = 255;
    
    // User switches
    const byte debugPrint = 0; //Print to the console, debug
    bool compensateSpeed = 1; // Activation dimmer
    double Setpoint = 10.0; // Desired freq in Hz
    
    int freqMax = 0; 
    int freqMin = 10000; 
    int dureeCount = 100; 
    long lastCount = 0; 

    // PWM Dimmer
    dimmerLamp dimmer(outputPin); //initialase port for dimmer for MEGA, Leonardo, UNO, Arduino M0, Arduino Zero
    int outVal = 300; //Speed in dimmer langUAGE
    
    //PID
    //Define Variables we'll be connecting to
    double Input, Output; //

    double Kp = 20.0, Ki = 30.0, Kd = 1.0;
    PID myPID(&Input, &Output, &Setpoint, Kp, Ki, Kd, DIRECT);
    int OutputProv = 0;
    // FREQ
    double sum=0;
    int count=0;
    double myFrequency = 0;
    long nextLedStartTime = 0;
    long nextLedStopTime = 0;
    
    
//     ---------------------------------------------------------------------------------------------------
//     ---------------------------------------------------------------------------------------------------
//     ---------------------------------------------------------------------------------------------------

    void setup() {
        USE_SERIAL.begin(57600);
//         Serial.println(__FILE__);
//         Serial.println(__DATE__);
//         Serial.println(__TIME__);
        lastCount = millis();
        //Dimmer
        dimmer.begin(NORMAL_MODE, ON); //dimmer initialisation: name.begin(MODE, STATE) 
        //PID
        myPID.SetMode(AUTOMATIC); // turn the PID on/off
//         myPID.SetOutputLimits(600,130);
        FreqMeasure.begin();
        
        pinMode(ledPin, OUTPUT);
    }
    
    
//     ---------------------------------------------------------------------------------------------------
//     ---------------------------------------------------------------------------------------------------
//     ---------------------------------------------------------------------------------------------------

    void loop() {

//     READ POT VALUE  
    int potVal = analogRead(potPin);
    int provSetpoint = map(potVal, 0, 1023, 3000, 1000);
    Setpoint = (float)provSetpoint/100.0;
//     If right moment, swich LED on
    if ( millis() >= nextLedStopTime ) analogWrite(ledPin, 0);
    else if ( millis() >= nextLedStartTime ) analogWrite(ledPin, ledPower);

    
    //LED
//     If sensor changed state
    if (FreqMeasure.available()) {

//         Calculate next switch on
//         Remember value
        float freqValueProv = FreqMeasure.read();
//         What is the frequency
        float freqProv = (FreqMeasure.countToFrequency(freqValueProv));
        if (debugPrint > 0 ) Serial.print("freq: ");
        if (debugPrint > 0 ) Serial.println(freqProv);
//         How long for one image, one turn?
        float frameDuration = 1000.0/freqProv;
        if (debugPrint > 0 ) Serial.print("FD: ");
        if (debugPrint > 0 ) Serial.println(frameDuration);
//         When to swich the LED on
        nextLedStartTime = millis() + ((int)frameDuration / 2);
        nextLedStopTime = millis() + (((int)frameDuration / 2) + ((int)frameDuration / 3) );
        if (debugPrint > 0 ) Serial.print("time: ");
        if (debugPrint > 0 ) Serial.print(millis());
        if (debugPrint > 0 ) Serial.print(", next: ");
        if (debugPrint > 0 ) Serial.println(nextLedStartTime);
        
        
//MEASURE FREQUENCY
        // average several reading together
        sum = sum + freqValueProv;
        count = count + 1;
        if (count >= 3) { // Originalement 30
            myFrequency = (FreqMeasure.countToFrequency(sum / count));
//             Serial.println(myFrequency);
            sum = 0;
            count = 0;
            
            // Setup speed, only if new measues
            if (compensateSpeed == 1 ){
                Input = myFrequency;
                myPID.Compute();
                OutputProv = round(Output);
                outVal = map(OutputProv,0,255,350,170);      
            }
        }
    }

// PWM Serial command
    if (USE_SERIAL.available()){ 
        int buf = USE_SERIAL.parseInt();
        if (buf != 0 && buf < 10000 ) Setpoint = buf/100.0;
        else if (buf != 0 && buf > 10000) outVal = buf/100.0;
        delay(200);
    }
    dimmer.setPower(outVal); // setPower(130-600);
    
    //Debug
    if (debugPrint > 0 && millis() > lastCount + dureeCount && millis() > 4000){ //Si on a demandé d'afficher
        lastCount = millis(); // Reset compteur
        Serial.print(" "); //pour le plotter
        Serial.println(myFrequency);
        }
    delay(2);
}
https://nmldqjct.preview.infomaniak....UzyPE/download



Gate frame
On the gate, the small part reducing the frame was removed to allow capturing the whole image.


.

Last edited by chmars; 18th October 2023 at 11:19. Reason: Add microcontroller code
chmars is offline   Reply With Quote
Old 16th May 2021, 21:49   #3  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
Removing "bad" images.
The capture is made with a projector speed of 20fps. At these speed, the minimum camera speed is approximatively 60fps.
EDIT: depending on the position on the reel, vibrations appear at different speeds. Safe projection speed seems to be 10fps.
This results in a lot of duplicated/mixed frames. As the LED is ON at each frame change, it is then easy (for one who masters Avisynth scripts :-) ) to keep only one image between each one containing the illuminated LED. This was possible thanks to the huge help of user StainlessS. See the dedicated thread.

Optical + camera setup
The projector lens is removed. The camera is equiped with a canon MP-E 65mm macro lens. I use this equipment because it is af may disposal at the moment but it is overkill. Another camera with manual mode and a good rushes format could do the job.
The best aperture compromise between aberration and depth of field seem to be around 5.6-6.3. The exposure time is 1/425th of second but some different speeds can be used without problems. Naturally, the exposure time cannot be longer than 1/3 of the footage image duration.
A test I made about exposure time, here.

Light source

On almost every capture system, an LED is used to illuminate the footage. But LED's white light is tricky. Not every RGB or white LED have a good CRI (colour rendering index). There can be gaps into the spectrum, resulting in poor rendition of certain colours.
This is very true in the photography and filming world. As I had no fun+time in searching a good LED model and no idea of the CRI influence by footage capturing, I chosen to keep the halogen bulb added with a daylight (Rosco or LEE full CTB) filter. The halogen light has to be day filtered as the camera sensors are daylight. Balancing during the grading process would increase the noise by lifting up the blue.

Last edited by chmars; 19th May 2021 at 09:21. Reason: Correct spec
chmars is offline   Reply With Quote
Old 16th May 2021, 21:54   #4  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
Sharpness
Focusing is not easy. You need a really stable and precise setup to make a good focus. Therefore, I put the camera on an old precision travelling which is actually a bearing linear table,


File format, Codec, compression...

No idea!
I'd need a deep course on this subject and my knowledge is very thin here.
What I believe to believe so far:
Capturing with Slog3 is ok because the shadows are more richly defined than is Slog2.
Xavc-L 50 is not too big but still 10bit, good compromise.
Using RAW as we do with a RED camera would be a good option but not available with an FS7 in our setup.
Please contradict!

Workflow

Not yet well defined. The steps are:
Capture -> LED frames removal with Avisynth -> Grading in Davinci Resolve -> eventual use of Avisynth to remove dirt and increase details (Videofred's script and Johnmeyer's version). I wouldn't like to process the rushes too early in deshake and dirt removal as these steps are optional.

I don't know yet where to stabilize between Resolve, VirtualDub and Avisynth.
chmars is offline   Reply With Quote
Old 18th May 2021, 22:56   #5  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
Now. contraption images are visible (without generating moderators extra-work)

And here a video sample. This is the stage before grading, just after having removed redundant BLUE_LED frames and trimmed the frame.
The fotage itself is very shaky, but the capture is stable, as it can be seen on the left side.
Slog3, hence so uncontrasted:
https://nmldqjct.preview.infomaniak....BbRds/download


Last edited by chmars; 18th October 2023 at 11:21. Reason: Add sample
chmars is offline   Reply With Quote
Old 19th May 2021, 09:26   #6  |  Link
chmars
Registered User
 
Join Date: Apr 2021
Posts: 127
Have to say:"fast-capture" is not always true:
It appears that depending on the position on the reel, vibrations can appear at 20 fps. Specially in the beginning of the reel.
Tried to free the footage form both in and out reels, no changes.

Safe projection speed: more around 10fps.
chmars is offline   Reply With Quote
Reply

Tags
super8 film capture

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.