https://github.com/sashacmc/mixvideoconcat
Mixed Videos Concatenator based on ffmpeg
https://github.com/sashacmc/mixvideoconcat
command-line-tool ffmpeg library python-library python3 utils video-processing
Last synced: 3 months ago
JSON representation
Mixed Videos Concatenator based on ffmpeg
- Host: GitHub
- URL: https://github.com/sashacmc/mixvideoconcat
- Owner: sashacmc
- License: gpl-3.0
- Created: 2024-04-23T19:27:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-08T08:21:09.000Z (over 1 year ago)
- Last Synced: 2025-10-29T13:07:37.066Z (7 months ago)
- Topics: command-line-tool, ffmpeg, library, python-library, python3, utils, video-processing
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MixVideoConcat

[](https://pypi.org/project/mixvideoconcat)
[](https://pepy.tech/project/mixvideoconcat)
[](https://github.comixvideoconcatm/psf/black)
MixVideoConcat is a Python tool/library based on ffmpeg for concatenating video files of different formats, resolutions, and orientations into a single video file. It supports various input formats and ensures seamless merging of videos while handling differences in resolution and orientation.
## Installation
You can install MixVideoConcat via pip:
```bash
pip install mixvideoconcat
```
## Command line tool usage
```bash
mixvideoconcat [-h] [-t TMPDIR] [-l LOGFILE] [-f] sources [sources ...] destination
positional arguments:
sources Source files
destination Destination file
options:
-h, --help show this help message and exit
-t TMPDIR, --tmpdir TMPDIR
Directory for temprary files (they can be huge!)
-l LOGFILE, --logfile LOGFILE
Log file
-f, --force Overwrite existing
--deinterlace {on,off,auto}
Deinterlace mode (default: auto)
--stabilize {on,off} Stabilize mode (default: on)
-v, --verbose Print verbose information (ffmpeg output)
```
## Example
Concatenate three video files (video1.mp4, video2.mov, video3.avi) into a single video file named output.mp4:
```bash
mixvideoconcat video1.mp4 video2.mov video3.avi output.mp4
```
## Library usage
```python
from mixvideoconcat import concat
concat(['video1.mp4', 'video2.mov', 'video3.avi'], 'output.mp4')
```
## Tune
You can override the default constant rate factor (CRF) of 23 by setting the `FFMPEG_CRF` environment variable.
The frame rate will be determined as the maximum frame rate among the source files.
To override this, use the `FFMPEG_FR` environment variable.
## Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
## Show your support
Give a ⭐️ if this project helped you!