Spaces:
Running
Running
|
Download README.md from DecodeMarketing/video_frame: direct link, hf CLI and curl.
- Browser
- Download file 3.56 kB
-
https://huggingface.co/spaces/DecodeMarketing/video_frame/resolve/main/README.md
- Command line
-
hf download hf://spaces/DecodeMarketing/video_frame/README.md
-
curl -L -o README.md https://huggingface.co/spaces/DecodeMarketing/video_frame/resolve/main/README.md
3.56 kB
A newer version of the Streamlit SDK is available: 1.67.0
metadata
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:
- Upload videos - Supports MP4, AVI, MOV, MPEG, and GIF formats
- Extract frames - Automatically extracts frames at configurable intervals
- Detect scenes - Identifies distinct scenes within your videos
- Download results - Get all extracted frames as a ZIP file
- Save to local folders - Optionally save to Documents or OneDrive
Quick Start
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
Installation
Clone the repository:
git clone https://github.com/venkateshdecode/video_frame_extractor.git cd video_frame_extractorInstall dependencies:
pip install -r requirements.txtRun the app:
streamlit run app.pyOr use the provided scripts:
- Windows:
run_streamlit.bat - Linux/Mac:
./start.sh
- Windows:
Open your browser to
http://localhost:8501
How to Use
- Set Project Name - Enter a name for your extraction project in the sidebar
- 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
- Upload Videos - Drag and drop or click to upload video files
- Click "Start Processing" - Wait for extraction to complete
- 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
β βββ ...