Skip to content

Program that trims a video based on a lightbulb's status

License

Notifications You must be signed in to change notification settings

ftondolo/Firefly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Firefly

Program created with the purpose of analysing a video and creating 40 second long snippets based on the status of a lightbulb. More specifically, when the lightbulb is first found to be on, the code createws a .WMV file of the preceeding 20 seconds and the 20 seconds following the activation of said lightbulb. The program works its magic on every single wmv file in its directory creating an OUTPUT folder in which files with the format output_<filename>-<clip#>.wmv are saved. As you can see, the program creates a clip for every single lightbulb activation within a file, no matter how many, as long as they do not occur within 20 seconds of the previous lightbulb activation (as this would be part of the previous truncated clip.

Notice

For a proper reading, it is necessary for the lightbulb to be within the region shown below. Moreover, if possible, place lightbulb in such a way as to eliminate extraneous light in its immediate vicinity whether it be caused by other lights or the lightbulb's own reflection Spaces in filenames are allowed!
Tip: An electrical tape square under the light solves both of these problems.

For future reference: the framing of mouse 61's recall test under the effects of Citalopram was spot on! ;)

alt text

Windows Install

Administrator Privileges Required

  1. Download and install all of the following files in the order in which they appear:

  2. Download firefly.py and position it in a folder with all of the .wmv files you want examined

  3. Open firefly.py in IDLE (Python 3.7 64-bit)

    File->Open...

  4. Run firefly.py

    Run->Run Module

  5. Wait for completion, should take about 20 seconds per 10-minute video
    DO NOT MANIPULATE THE FILE STRUCTURE UNTIL THE PROGRAM FINISHES

Debian Install

Administrator Privileges Required

  1. Download and install all of the following files in the order in which they appear:

    • Pip : sudo apt-get install python-pip
    • ffmpeg : sudo apt-get install ffmpeg
    • ffmpy :pip install ffmpy
    • NumPy : pip install numpy
    • OpenCV : pip install opencv-python
  2. Download firefly.py and position it in a folder with all of the .WMV files you want examined

  3. Open a Terminal window and navigate to the directory which you have selected

    cd /...

  4. Run firefly.py

    python firefly.py

  5. Wait for completion, should take about 20 seconds per 10-minute video
    DO NOT MANIPULATE THE FILE STRUCTURE OR THE TERMINAL WINDOW UNTIL THE PROGRAM FINISHES
    IF YOU WISH TO PLAY THE .WMV FILES THEN YOU WILL NEED TO INSTALL UBUNTU RESTRICTED EXTRAS

About

Program that trims a video based on a lightbulb's status

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages