Skip to main content

A powerful mp4 files fixer and analyzer that fix 70% to 90% of mp4 files

Project description

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.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mp4fixer-0.2.0.tar.gz (228.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mp4fixer-0.2.0-py3-none-any.whl (227.7 kB view details)

Uploaded Python 3

File details

Details for the file mp4fixer-0.2.0.tar.gz.

File metadata

  • Download URL: mp4fixer-0.2.0.tar.gz
  • Upload date:
  • Size: 228.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mp4fixer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7cb3132f336162df12ca1da7c505bdee8458b1877de10c217e596568f7c5c26f
MD5 7d7bc0decaa297cfc1b60380658af9b0
BLAKE2b-256 b9b35898fdeb5d3d1455dca75b5e69f2056a28e6fe25db7d001efd25477da7de

See more details on using hashes here.

File details

Details for the file mp4fixer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mp4fixer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 227.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mp4fixer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d285bf15141eeeb89193acf5be4f677ee6cffb87aae82f5e5f562f7ad385ebe
MD5 3dde57e3495fe9a1727215010253441f
BLAKE2b-256 e99f80306b07ded782cae16ca3777e257bce84b1af66f6ea195029779b6ffa01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page