Movie Spectrum Generator is a Python script that takes in a video file and generates a movie spectrum/barcode like image by scanning video frames. Each vertical bar in the output image is made up of the dominant color of that particular frame. The script takes in various user parameters before saving the image to the user's desired file directory.
- Have these libraries installed and execute the script
- Select a video file. Most formats are accepted (.mp4 and .mkv have been tested and work)
- Select a location to save the movie spectrum image
- Create a name for the movie spectrum image
- Input desired width of movie spectrum image (vertical bar count)
- Each bar is 1 PIXEL WIDE
- Input desired height of movie spectrum image
- The script should now be running...
- Typical runtime for 2000x by 200y images is around 3-5 minutes
After user parameters are entered, these steps will execute:
- OpenCV will start a VideoCapture
- Script will record video metadata:
- fps
- total_frames
- frame_offset (total_frames/user specified width)
- Begin processing video frames
- Any frame being processed will run through colorthief and return the dominant_color of that frame
- Any frame being processed is also temporarily stored in a temp folder that will be deleted after the script finishes
- After a dominant_color is returned, a 1 x (height specified by user) is drawn with that dominant_color
- The next frame is determined by the frame_offset variable
The Lord of the Rings: The Two Towers
Avatar the Last Airbender S1 Ep1
Avatar the Last Airbender S3 Ep60
- binascii
- tkinter
- cv2
- imutils
- scipy
- PIL
- colorthief
- struct
- shutil
- GUI for user to input file paths and image parameters
- Improve speed of image generation
- Make this script into an executable