Frame Extraction Software

Here are some interesting projects that have done this with other software methods/languages/etc.

What am I missing?

Using AVI Synth for cleaning up a scan (scratch removal, etc.):

Example videos (amazing!): Freddy Van de Putte’s Videos on Vimeo

jas8mm’s Raspberry Pi 8mm project has some software hints:
https://github.com/jas8mm/rpitelecine

Use of ffmpeg and other useful stuff (esp. links at end of article):
http://www.linuxjournal.com/magazine/linux-based-8mm-telecine?page=0,2

Python/C + legos, by Shay Moses
http://www.faculty.idc.ac.il/smozes/8mm.html

Links (including AviSynth stuff above) and explanations of processes by “Jim”:
http://www.thebattles.net/video/8mm_restoration.html

Josh Gladstone used Python and OpenCV:

I have used the MEncoder tool on a Raspberry Pi to batch encode stills into a video. I only used the command line util but it looks like there are many GUI frontends available for it now. If you are going the route of Raspberry Pi (especially for the 8mm version), this could be nice to roll into one big image that a user could purchase or flash onto the SD card for the Pi.

Nice. I’ll definitely look into that. I’m building a RPi machine right now actually. Updates on that coming soon, hopefully.

Here is a small editable
Avisynth script, to import sequences of single image files into a video editing and encoding software like VirtualDub or Avidemux.
All you need is Avisynth 2.6 and the FFmpeg plugin for Avisynth.
Once installed, you can create a new .avs file and paste the script in it.
If the video and audio variables are set proper, the script could be opened as a video in
VirtualDub and other video editors.

[quote]#
#LoadPlugin(“X:…\ffms2.dll”)
#for the case, that avisynth does not find the FFmpeg plugin

#video variables
##########################################################################
startframe = 0
endframe = 0
lcdigits = “%07.0f” #enumerate images files with 7 leading digits
framerate = 24
v_dir = “” #directory of the image files
v_filename = “” #name of the image files
v_filetype = “” #file type of the images

#audio variables
#########################################################################
delay = 0 #audio delay in
ms
a_dir = “” #directory of the audio file
a_filename = “” #name of the audio file
a_filetype = “” #file type of the audio

#########################################################################
#load video
#########################################################################
inf=FFImageSource(v_dir+v_filename+String(startframe, lcdigits)+v_filetype)
v_width = inf.Width
v_height = inf.Height
v_type = inf.PixelType
video = BlankClip((endframe-startframe), v_width, v_height, pixel_type=v_type).KillAudio()
video = video.ScriptClip(""“FFImageSource(String(current_frame+startframe, v_dir+v_filename+lcdigits)+v_filetype)”"")
video = video.AssumeFPS(framerate)

#video filters
################################
#video = video.Levels(0,1,255,255,0) #converts video from negative to positve
#video = video.ConvertToRGB()
#video = video.ConvertToYUY2()
#video = video.ConvertToYV12() #only color space supported by avidemux
#video = video.Spline64Resize(720,576) #resizes video to given resolution (SD PAL), width = 720, height = 576
#video = video.TurnLeft() #rotates video by 90° counterclockwise
#video = video.TurnRight() #rotates video by 90° clockwise
#video = video.Tun180() #rotates video by 180°

########################################################################
#load audio (if present)
########################################################################
“” != (a_dir+a_filename+a_filetype) ? Eval(""“audio = FFAudioSource(a_dir+a_filename+a_filetype)”"") : Eval(""“audio = BlankClip()”"")
dubvid = AudioDubEx(video, audio).DelayAudio(Float(delay)/1000)

#audio filters
################################
#dubvid = dubvid.Normalize(1.0) #1.0 for peaking at 0dB
#dubvid = dubvid.ConvertAudioTo16bit()
#dubvid = dubvid.ConvertAudioTo24bit()
#dubvid = dubvid.ConvertAudioTo32bit()
#dubvid = dubvid.ConvertAudioToFloat()
#dubvid = dubvid.ResampleAudio(48000) #resamples audio to given sampling rate, spr = 48kHz

return dubvid[/quote]

Example:

[quote] #
#video variables
##########################################################################
startframe = 0
endframe = 1000
lcdigits = “%07.0f” #enumerate images files with 7 leading digits
framerate = 24
v_dir = “X:\video” #directory of the image files
v_filename = “video1_” #name of the image files
v_filetype = “.dpx” #file type of the images

#audio variables
#########################################################################
delay = 875 #875ms are 21 frames at a framerate of 24fps
a_dir = “X:\audio” #directory of the audio file
a_filename = “audio1” #name of the audio file
a_filetype = “.wav” #file type of the audio [/quote]

If the audio variables are left as in the unedited script, the video will be opened without
audio. So the audio can be added via the video editor or encoder

1 Like

@Andreas I’ve heard of avisynth but never tried it. The scripting looks nice and easy. What has your experience been with the software?

The only other time I’d heard about it was through this project (amazing stuff):

@matthewepler
I use avisynth for a while now.
It highly depends on the task how easy or complex it can get.
If you just want to import images and cut a video it is really simple.
But if you use external filters or plug-ins it can be very opaque.
There are so many different developers for the plug-ins out there, so sometimes the functions are documented really good, but sometimes you have to read across hundreds of posts in forums.

It could be, that the script I posted above might not work, because the forum software has added some line breaks within the commands.

There are some digital motion cameras that use the CinemaDNG format. Which is basically a bunch of DNG raw format files. This allows non destructive editing, color correction, cropping etc. Since it’s a DNG I think even photoshop or lightroom could be used to edit the single frames, or batch process and export them.

1 Like