# Frame Extraction Software

**URL:** <https://forums.kinograph.cc/t/frame-extraction-software/39>\
**Category:** Software\
**Created:** [August 9, 2015, 4:23pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39 "2015-08-09T16:23:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewepler](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/matthewepler/32/919_2.png) [@matthewepler](https://forums.kinograph.cc/u/matthewepler)\
**Post date:** [August 9, 2015, 4:23pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/1 "2015-08-09T16:23:53Z")

</div>

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.):

> **[The power of Avisynth: restoring old 8mm films. - Doom9's Forum](http://forum.doom9.org/showthread.php?t=144271)**
>
> The power of Avisynth: restoring old 8mm films. Avisynth Usage

Example videos (amazing!): [Freddy Van de Putte’s Videos on Vimeo](https://vimeo.com/user678523/videos/all/sort:date)

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

Use of ffmpeg and other useful stuff (esp. links at end of article):

> **[Linux-Based 8mm Telecine | Linux Journal](https://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](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](http://www.thebattles.net/video/8mm_restoration.html)

Josh Gladstone used Python and OpenCV:

[![](https://forums.kinograph.cc/uploads/default/original/2X/e/e77bdaab4cca5a913d393e56b2b692a0913ca485.jpeg "StepCapture Function") ](https://www.youtube.com/watch?v=5BQaqG4sK_I)

---

<div class="post-metadata">

**Author:** ![johnny5alive](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/johnny5alive/32/52_2.png) [@johnny5alive](https://forums.kinograph.cc/u/johnny5alive)\
**Post date:** [August 10, 2015, 4:22am UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/2 "2015-08-10T04:22:38Z")

</div>

I have used the [MEncoder](http://www.linuxtv.org/wiki/index.php/MEncoder "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.

---

<div class="post-metadata">

**Author:** ![matthewepler](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/matthewepler/32/919_2.png) [@matthewepler](https://forums.kinograph.cc/u/matthewepler)\
**Post date:** [August 23, 2015, 4:34pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/3 "2015-08-23T16:34:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andreas](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/andreas/32/2515_2.png) [@Andreas](https://forums.kinograph.cc/u/Andreas)\
**Post date:** [April 13, 2016, 8:10pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/4 "2016-04-13T20:10:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matthewepler](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/matthewepler/32/919_2.png) [@matthewepler](https://forums.kinograph.cc/u/matthewepler)\
**Post date:** [April 15, 2016, 4:42pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/5 "2016-04-15T16:42:49Z")

</div>

@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):

https://player.vimeo.com/video/2823934?h=b1cea7b429&app_id=122963

---

<div class="post-metadata">

**Author:** ![Andreas](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/andreas/32/2515_2.png) [@Andreas](https://forums.kinograph.cc/u/Andreas)\
**Post date:** [April 15, 2016, 6:43pm UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/6 "2016-04-15T18:43:36Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![coreyriggle](https://forums.kinograph.cc/letter_avatar_proxy/v4/letter/c/6f9a4e/32.png) [@coreyriggle](https://forums.kinograph.cc/u/coreyriggle)\
**Post date:** [July 6, 2016, 4:01am UTC](https://forums.kinograph.cc/t/frame-extraction-software/39/7 "2016-07-06T04:01:56Z")

</div>

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.
