Skip to main content

MixVideoConcat

CodeQL PyPI - Version PyPI - Downloads Code style: 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.

Requirements

MixVideoConcat requires FFmpeg (including ffprobe) to be installed and available on your system PATH.

  • Linux: sudo apt install ffmpeg (or your distro's package manager)
  • macOS: brew install ffmpeg
  • Windows: Download from ffmpeg.org (e.g., the gyan.dev GPL build), extract it, and add the bin folder to your system PATH.

Alternatively, you can point to a custom FFmpeg binary by setting the FFMPEG_BINARY environment variable.

Installation

You can install MixVideoConcat via pip:

pip install mixvideoconcat

Command line tool usage

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:

mixvideoconcat video1.mp4 video2.mov video3.avi output.mp4

Library usage

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!

Metadata

Release files for mixvideoconcat 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mixvideoconcat 1.4.1
File Size Uploaded
mixvideoconcat-1.4.1.tar.gz 50.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mixvideoconcat 1.4.1
File Interpreter ABI Platform
mixvideoconcat-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 83.8 kB

Release files / mixvideoconcat-1.4.1.tar.gz

Download URL mixvideoconcat-1.4.1.tar.gz
Size 50.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ee098c14e41cd7fa8dd6ea7af4fb876797aa71c820cb6ea7da330fd9c5e69da9
BLAKE2b-256 checksum
How to use checksums
28caadd28cfcd80bdc2b2244caf85fa87fdb032f463b06afd04c6ec8e4fa56e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / mixvideoconcat-1.4.1-py3-none-any.whl

Download URL mixvideoconcat-1.4.1-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d219b0e36e599639bb81ae941d3ae925c8c27d95e8f3c0233081016db214ae8
BLAKE2b-256 checksum
How to use checksums
a61721cd86b2d89fd0f55e814db8a496df5491fd19dc2a6e409c27e05602b115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page