MP4Fixer
MP4Fixer is a simple and powerful tool that repairs broken / corrupted MP4 videos by re-encoding them using FFmpeg. It can successfully fix 70% – 90% of damaged MP4 files, depending on corruption level. It uses: libx264 for video aac for audio and applies -movflags +faststart so even partially processed files are more playable.
What's new in 0.2.1
Minor bug fix.
Bug is...
When you type mp4analyzer on terminal so your terminal are not found this command.
0.2.1 is fixed it!
What's new in 0.2.0!
A powerful analyzer is added contain a cli command and a new python function thats detailed in CLI usage and Python usage.
✨ Features Fix broken & unplayable MP4 files Simple CLI usage Python API available Safe graceful stop using Ctrl + C Supports all FFmpeg speed presets Works on Linux, Termux, Windows, and macOS ⚙️ Requirements Python 3.7+ FFmpeg binary Either provide a binary named mf inside the package folder OR modify to use system ffmpeg New of 0.2.0 Analyzer give issues report with your mp4 file.
📦 Installation
This is not require to install ffmpeg because that was inbuilt inside it.
pip install mp4fixer
🚀 CLI Usage
Basic usage
mp4fixer
With output path
mp4fixer --output_path
With preset Copy code
mp4fixer --output
if you not provide output path so that automatically make fixed file in same folder where input file. if you not provide preset so that automatically set preset to ultrafast.
mp4analyzer
This is show problems with your mp4 file.
🎛️ Supported Presets
ultrafast superfast veryfast faster fast medium slow slower veryslow placebo ultrafast = fastest, larger file veryslow = slow but best compression Default = ultrafast
Python Usage
from mp4fixer import fix
print( fix( input_file="video.mp4", output_file="fixed_video.mp4", preset="fast" ) )
Returns: "OK" if success "ERR: message" if something failed "Re-Encoding stopped cleanly" if cancelled 🛑 Stopping Encoding (Ctrl + C) If you press Ctrl + C, MP4Fixer: Sends q to FFmpeg FFmpeg closes cleanly Output file remains playable No broken partial files 🎉
from mp4fixer import analyze
print(analyze("video.mp4"))
Returns
issues in list form like ["","",""] if no issue mean your file is healthy "CRITICAL ERROR : " internal error thats very low chance. "Stopping analysis" when you hit ctrl+c
📌 Notes If no output path is given, output is created in same folder:
fixed_.mp4 Input must exist Output folder must exist Preset must be valid
👑 Author
Abdul Moeez
Metadata
Release files for mp4fixer 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mp4fixer-0.2.1.tar.gz | 228.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mp4fixer-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 456.0 kB
Release files / mp4fixer-0.2.1.tar.gz
| Download URL | mp4fixer-0.2.1.tar.gz |
|---|---|
| Size | 228.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5df8e4f6697b666293a13e0cc1fad96967f60d67257408b6e5eda76c87715561
|
|
BLAKE2b-256 checksum How to use checksums |
09501d95716723459d51cf4aa3a49159d0f7503e8f42be605e91881124933940
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mp4fixer-0.2.1-py3-none-any.whl
| Download URL | mp4fixer-0.2.1-py3-none-any.whl |
|---|---|
| Size | 227.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
807febe7e68febc84408575be08b80af6fe1d810f6d3a891610d9f347abded20
|
|
BLAKE2b-256 checksum How to use checksums |
0f7abe153997e6ac37c9d5b628e2b5b6be123ef82d921bd64951f6cf91c15abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|