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

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.1.tar.gz (228.2 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.1-py3-none-any.whl (227.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mp4fixer-0.2.1.tar.gz
  • Upload date:
  • Size: 228.2 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.1.tar.gz
Algorithm Hash digest
SHA256 5df8e4f6697b666293a13e0cc1fad96967f60d67257408b6e5eda76c87715561
MD5 6f605fc9e5132c32d080d511e603779c
BLAKE2b-256 09501d95716723459d51cf4aa3a49159d0f7503e8f42be605e91881124933940

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mp4fixer-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 807febe7e68febc84408575be08b80af6fe1d810f6d3a891610d9f347abded20
MD5 642b55e24bfd1f0b49b2e6b71ac807c1
BLAKE2b-256 0f7abe153997e6ac37c9d5b628e2b5b6be123ef82d921bd64951f6cf91c15abe

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