gitwtfhub

wtf is lumix-mdt-repair?

sckasturi/lumix-mdt-repair — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · generalComplexity · 3/5LicenseSetup · moderate

TL;DR

A Python tool that repairs interrupted LUMIX camera recordings, recovering both video and audio without quality loss.

Mindmap

mindmap
  root((lumix-mdt-repair))
    What it does
      Repairs MDT files
      Recovers video and audio
      Rebuilds missing index
    Tech stack
      Python
      ffmpeg libavcodec
    Use cases
      Recover interrupted recordings
      Repair without quality loss
      Selftest before repair
    Audience
      LUMIX camera owners
      Videographers
    Setup
      Python 3.8 plus
      ffmpeg 4.x for audio
      Reference clip needed

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Recover footage from a LUMIX .MDT file left after a camera battery died mid-recording.

REASON 2

Repair a broken MP4 recording while keeping both the video and AAC audio tracks intact.

REASON 3

Verify the repair method works for a specific camera before touching a broken file.

What's in the stack?

Pythonffmpeglibavcodec

How it stacks up

sckasturi/lumix-mdt-repair0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/52/52/5
Audiencegeneralgeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Audio recovery needs ffmpeg 4.x shared libraries specifically, ffmpeg 5+ is not compatible.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

This tool recovers video footage from Panasonic LUMIX cameras when a recording gets interrupted, for example by a dead battery or a card failure. When that happens, the camera leaves behind a file with the extension .MDT instead of a normal .MP4. The actual video and audio data is still inside that file, but the index that tells video players where each frame is located was never finished writing, so the file will not play normally. The tool rebuilds that missing index by scanning through the raw file directly. For video, it walks through the stream frame by frame using markers that the LUMIX camera's format always includes, which lets it record where every frame starts and ends. For audio, since AAC sound data does not have those same clear markers, the tool uses your computer's existing audio decoding library to figure out exactly how many bytes each audio frame took up. To get technical details right, like frame rate and how frames should be reordered for smooth playback, it needs a second, healthy video clip recorded on the exact same camera with the same settings, and it copies that structure over as a template. Before touching the broken file, the tool can run a self test that proves its method actually works correctly for your specific camera and settings, by rebuilding the index of the healthy reference clip and comparing it exactly against the original. By default, the tool never modifies your broken file directly. It either creates a brand new repaired copy, or, for very large files, can carefully patch just a small part of the original file in a way that can be fully undone later. It runs on Python and works on Mac and Linux, requiring an additional shared library called ffmpeg for audio recovery specifically, though video-only recovery needs nothing extra installed. It is released under the MIT license.

Yoink these prompts

Prompt 1
Help me run the selftest command on my healthy reference clip before repairing my MDT file.
Prompt 2
Walk me through repairing an interrupted LUMIX recording with this tool.
Prompt 3
Explain what the --in-place flag does and whether it is safe for my huge file.
Prompt 4
Help me install ffmpeg 4.x so this tool can recover the audio track.

Frequently asked questions

wtf is lumix-mdt-repair?

A Python tool that repairs interrupted LUMIX camera recordings, recovering both video and audio without quality loss.

What language is lumix-mdt-repair written in?

Mainly Python. The stack also includes Python, ffmpeg, libavcodec.

What license does lumix-mdt-repair use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is lumix-mdt-repair to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is lumix-mdt-repair for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.