The other night my camera shut down from excessive heat and I was left with a corrupt .MDT file, rather than a .MP4, on my Lumix ZS100.
I spent all day scouring the internet for methods on how to retrieve the data from the 39 GB file and here is the combination of methods I landed on. It may be others know of better ways to achieve this.
______
STEP 1
First you will need to prepare your files. Move the file from your SD card to your HDD. Duplicate the corrupt file in a folder on your HDD. I went with P1000_2.mdt and P1000.mdt.
Open Terminal
Change directory to the folder container your files, if on an external drive, you will need to use the command :
cd /Volumes/(drive name)
followed by
cd /(folder)
Using the cat command, you want to have something like this :
cat P1000.mp4 P1000_2.mdt > (your file name).mdt
This will create a single file that you need for the next step. It may take awhile, mine ran for about twenty min before the terminal produced a complete file, just let it run until the terminal prompts a new command line.
STEP 2
Download this app when Terminal is finished :
https://main.grauonline.de/video-repair-tool/Open
mac start.command in the folder that was downloaded. It will open the terminal and possibly ask your admin password, once entered it will open the app and ask for a language.
Once opened, on the left column you have Repair, Batch, Options etc. You want to be on the Repair tab.
Where it says choose movie, this is where you select the file we created earlier using the Terminal.
It asks for a reference movie next, hopefully you have another video from this camera to use. Pick any file created using the camera, not sure if same settings matter or not, I had other shows on my SD card.
Next go to the Options tab.
Basically uncheck everything on Stage 1 and leave the top pull downs alone.
Go back to the Repair tab, hit Scan, and let it run.
The app will create a folder called "repaired" in the same folder the video is in.
Once completed, the app will produce a .MDT file that you can promptly just rename to .MP4
At this point you have a video that has choppy playback intermittently, maybe weird artifacts on the screen, do not worry.
(It's worth noting that at this point, VLC will play the file perfectly fine, but I was unable to configure any settings on VLC's Convert/Stream that would result in anything different than the same choppy video, it's probably possible, but I gave up)
STEP 3
Download this app :
https://handbrake.fr/Open the app, select Open Source and go to the folder with the repaired .MP4 file we created in Grau.
Select the preset that matches your video, I went with HQ 2160p60 4K HEVC, but modified the output.
Under Summary, I selected MP4 and checkmark on Align A/V Start, though, the sound in my case isn't necessary, I line up the video to a separate audio source.
Next tab for Dimensions I left alone.
The Filters tab I left alone, but you should have Interlace Detection set to Default and Deinterlace set to Decomb
The next tab is Video, I have selected for Video Encoder H.265 10-bit (x265) and Framerate set to my cameras 30 FPS, Peak Framerate is checked. For Quality, Constant Quality is checkmarked and my RF was set to 10.
I hit start on the top of the app window and a few hours later I was left with a flawless video, no skips or funny artifacts.
______________________
Hopefully this will help anyone else who ends up stuck in a similar nightmare after a great night out. I noticed the connection to my camera was lost while monitoring on my phone, resulting in the .MDT file.