A Python script to automatically process home movies by:
- Detecting scene changes
- Extracting and transcribing audio using OpenAI's Whisper model
- Assigning transcript segments to corresponding scenes
- Generating a CSV file with scene numbers, timestamps, and transcripts
- Scene detection using PySceneDetect
- Audio extraction with FFmpeg
- Speech-to-text transcription using Whisper
- Python 3.8 or newer
- CUDA-enabled GPU recommended for performance (Whisper transcription)
pip install scenedetect openai-whisper torch torchvision torchaudio
Ensure you have FFmpeg installed and accessible from the command line.
Run the script with the video filename as a command-line argument:
python home_movie_ai.py "your-video-file.mp4"
Or simply:
python home_movie_ai.py
The script will prompt for the filename if not provided in the command.
The script generates a CSV file named results-[your-video-file].csv
with the following columns:
- Scene Number
- Start Time (min:sec)
- End Time (min:sec)
- Transcript
This project is licensed under the MIT License. Please provide attribution when using or modifying this software.
Created by Ted Barnett. Contributions and forks are welcome!