Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dpbm/extract_frames
extract frames from videos
https://github.com/dpbm/extract_frames
frames frames-extract linux numpy opencv pip pipenv py python python-opencv python3 simple-program study terminal tool video videos
Last synced: 14 days ago
JSON representation
extract frames from videos
- Host: GitHub
- URL: https://github.com/dpbm/extract_frames
- Owner: Dpbm
- Created: 2020-12-06T22:59:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-21T22:50:59.000Z (about 1 year ago)
- Last Synced: 2024-11-18T21:43:48.864Z (3 months ago)
- Topics: frames, frames-extract, linux, numpy, opencv, pip, pipenv, py, python, python-opencv, python3, simple-program, study, terminal, tool, video, videos
- Language: Python
- Homepage: https://dpbm.github.io/extract_frames/
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# extract frames from a mp4 video
https://github.com/Dpbm/extract_frames/assets/75098594/789637b4-6ba7-488a-95d2-07de1737251a
This is an old project of mine, using python, to extract frames from videos.
The idea here is an automate this process, and learning something about [Pillow](https://pillow.readthedocs.io/en/stable/) and [OpencvPython](https://pypi.org/project/opencv-python/).
## Requirements
To run that you need to have installed in your machine:
* python3 (3.8)
* pip
* gitUsing [Pipenv](https://pipenv.pypa.io/en/latest/) or [conda](https://www.anaconda.com/) is optional here, but recommended.
## Installation
To install this project:
1. clone this repo
```bash
git clone https://github.com/Dpbm/extract_frames.git
cd extract_frames
```3. install dependencies
```bash
# using pip
pip install -r requirements.txt# using conda
conda env create -f enviroment.yml
conda activate extract_frames# using pipenv
pipenv install
pipenv shell
```## Using
In the project directory run:
```bash
python3 main.py
```Then provide the `folder path` where the videos are and the `salt number`, this number provides how much time you need to wait before getting a frame.
The resulting images are put inside the directory `./frames`
`Note: this scripts run over a folder, not a single file!`
---
For sure, this is a too simple project, and all this could be done so much better using [ffmpeg](https://ffmpeg.org/) or similar. However, this project I've made a couple of year ago, and I don't intend to update it for now.
If you want to update this project by yourself, I'll be pleasured to accept your pull request :)