mp4 file repair

William Salibrici bsalibrici at
Wed Nov 8 18:55:25 UTC 2017

Thanks, Michael - I will check it out.


From: gstreamer-devel [mailto:gstreamer-devel-bounces at] On Behalf Of Michael MacIntosh
Sent: Wednesday, November 08, 2017 1:36 PM
To: gstreamer-devel at
Subject: Re: mp4 file repair


You could try untrunc:

But you need a reference file from the same source, and your mileage may vary with how much it will gather out of it.

In gstreamer land to get around this, you need to send the end of stream event.  I think sometimes the muxer might play nice with you and write the moov atom while going to null state, but it isn't something you should count on.  If you are using the command line, I believe you need the -e flag so it sends and waits for EOS when you hit CTRL+C.

Hope that helps!


On 11/8/2017 7:46 AM, William Salibrici wrote:
I am creating mp4 recordings in a known format.
Below is the discover tool result [short version] for a test recording:

  container: Quicktime
    audio: MPEG-4 AAC
    video: H.264 (Constrained Baseline Profile)

  Duration: 0:00:48.000000000
  Seekable: yes
      audio codec: MPEG-4 AAC audio
      bitrate: 21346
      language code: en
      datetime: 2017-10-25T15:04:50Z
      container format: ISO MP4/M4A
      video codec: H.264 / AVC
      maximum bitrate: 5222160

The problem is that sometimes I will get a recording that was not finalized so the data is there but the recording is unreadable.
However, the audio and video formats are known.
The question is this: does anyone know of a repair tool that can go over the existing data in the recording file and create the proper moov atom at the end of the file?
Thank you for your help,


This message has been scanned for viruses and dangerous content by
E.F.A. Project<>, and is believed to be clean.
Click here to report this message as spam.<>


gstreamer-devel mailing list

gstreamer-devel at<mailto:gstreamer-devel at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list