Answers.Body: <p>I just ran into this myself. I had a bad file called: <code>P1100020.mdt</code> from my Panasonic LUMIX GX85. The solution is to record a video with the same exact settings, then copy both to a Debian/Ubuntu box under Videos and run:</p>
  <pre><code>sudo apt install git libavformat-dev libavcodec-dev libavutil-dev
  git clone https://github.com/anthwlock/untrunc
  cd untrunc
  make
  sudo cp untrunc /usr/local/bin
  cd ~/Videos
  untrunc -s  P1100021.MP4 P1100020.mdt
  </code></pre>
  <p>Keep in mind that <code>P1100021.MP4</code> is my working .mp4 with the same settings. That should spit out a working MP4 for those GNU/Linux users out there with a name like <code>P1100020.mdt_fixed-s1.MP4</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-29T19:31:09.117Z
Answers.LastActivityDate: 2021-09-29T19:31:09.117Z
Answers.UserDisplayName: David Hamner
Answers.Body: <p>This advice worked for me!</p>
  <p>&quot;Use the free software called untrunc. It is free and easy to use. It uses the corrupted MDT file and an uncorrupted MP4 file from the same camera to repair the MDT file. If it fails on the first pass it will suggest some options to get passed the errors.&quot;</p>
  <p><a href="https://github.com/anthwlock/untrunc/releases/tag/latest" rel="nofollow noreferrer">https://github.com/anthwlock/untrunc/releases/tag/latest</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-24T02:46:17.397Z
Answers.LastActivityDate: 2024-11-24T02:46:17.397Z
Answers.UserDisplayName: user47664
Body: <p>When Panaconic videocameras are abruptly interrupted while recording, the video is on the SD card as <code>.mdt</code>.</p>
  <p>It's supposedly a video stream without a header and a footer.</p>
  <p>How can I convert this to be an MP4 which the camera normally produces?</p>
  
Tags: <video-recording><panasonic>
Title: Fixing MDT file from Panasonic camcorder
UserDisplayName: Ondra Žižka
ThreadText: # Fixing MDT file from Panasonic camcorder
  
  (Asked by: username_0 on 2021-04-09)
  
  When Panaconic videocameras are abruptly interrupted while recording, the video is on the SD card as `.mdt`.
  
  It's supposedly a video stream without a header and a footer.
  
  How can I convert this to be an MP4 which the camera normally produces?
  
  **Tags:** video-recording, panasonic
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-09-29. Score: 2
  
  I just ran into this myself. I had a bad file called: `P1100020.mdt` from my Panasonic LUMIX GX85. The solution is to record a video with the same exact settings, then copy both to a Debian/Ubuntu box under Videos and run:
  
  ```
  sudo apt install git libavformat-dev libavcodec-dev libavutil-dev
  git clone https://github.com/anthwlock/untrunc
  cd untrunc
  make
  sudo cp untrunc /usr/local/bin
  cd ~/Videos
  untrunc -s  P1100021.MP4 P1100020.mdt
  
  ```
  
  Keep in mind that `P1100021.MP4` is my working .mp4 with the same settings. That should spit out a working MP4 for those GNU/Linux users out there with a name like `P1100020.mdt_fixed-s1.MP4`
  
  
  ---
  
  ### Answer by username_2 on 2024-11-24. Score: 1
  
  This advice worked for me!
  
  "Use the free software called untrunc. It is free and easy to use. It uses the corrupted MDT file and an uncorrupted MP4 file from the same camera to repair the MDT file. If it fails on the first pass it will suggest some options to get passed the errors."
  
  <https://github.com/anthwlock/untrunc/releases/tag/latest>
  
  
  ---
  
  