--- title: Video Frame Extractor emoji: 🔧 colorFrom: blue colorTo: green sdk: streamlit sdk_version: 1.53.0 app_file: app.py pinned: false license: mit python_version: 3.12 --- # Video Scene Frame Extractor A Streamlit web application that extracts frames from video files, detects scenes, and provides downloadable image packages. ## What It Does This app allows you to: 1. **Upload videos** - Supports MP4, AVI, MOV, MPEG, and GIF formats 2. **Extract frames** - Automatically extracts frames at configurable intervals 3. **Detect scenes** - Identifies distinct scenes within your videos 4. **Download results** - Get all extracted frames as a ZIP file 5. **Save to local folders** - Optionally save to Documents or OneDrive ## Quick Start ### Prerequisites - Python 3.8 or higher - pip (Python package manager) ### Installation 1. Clone the repository: ```bash git clone https://github.com/venkateshdecode/video_frame_extractor.git cd video_frame_extractor ``` 2. Install dependencies: ```bash pip install -r requirements.txt ``` 3. Run the app: ```bash streamlit run app.py ``` Or use the provided scripts: - **Windows**: `run_streamlit.bat` - **Linux/Mac**: `./start.sh` 4. Open your browser to `http://localhost:8501` ## How to Use 1. **Set Project Name** - Enter a name for your extraction project in the sidebar 2. **Configure Settings**: - **Frames per Scene**: How many frames to extract from each detected scene (1-15) - **Max Image Size**: Maximum dimension in pixels for extracted frames (200-2100) - **Extract More Frames**: Enable for denser frame coverage 3. **Upload Videos** - Drag and drop or click to upload video files 4. **Click "Start Processing"** - Wait for extraction to complete 5. **Download** - Click the download button to get your frames as a ZIP file ## Configuration The app uses `.streamlit/config.toml` for server settings: | Setting | Value | Description | |---------|-------|-------------| | `maxUploadSize` | 4000 MB | Maximum upload file size | | `maxMessageSize` | 4000 MB | Maximum message size | | `headless` | true | Run without opening browser automatically | | `gatherUsageStats` | false | Disable Streamlit analytics | ## Project Structure ``` decode-internal-app/ ├── app.py # Main Streamlit application ├── get_onedrive.py # OneDrive integration for saving frames ├── requirements.txt # Python dependencies ├── .streamlit/ │ └── config.toml # Streamlit configuration ├── run_streamlit.bat # Windows launcher ├── start.sh # Linux/Mac launcher └── README.md # This file ``` ## Dependencies | Package | Purpose | |---------|---------| | streamlit | Web UI framework | | opencv-python-headless | Video processing and frame extraction | | Pillow | Image manipulation and resizing | | pandas | Data handling for results | | numpy | Numerical operations | | tqdm | Progress bars | | scikit-learn | Optional: advanced scene detection | | timm | Optional: image model embeddings | | scenedetect | Optional: advanced scene detection | ## Output Format Extracted frames are organized as: ``` project_name/ ├── video1_name/ │ ├── video1_name_01.jpg │ ├── video1_name_02.jpg │ └── ... ├── video2_name/ │ ├── video2_name_01.jpg │ └── ... ```