Skip to main content

Restoring damaged clips with untrunc

Written by Ben Hagen

This guide describes the installation and usage of the open source tool untrunc which is used to restore a damaged (truncated) mp4, m4v, mov or 3gp video. This is especially useful to rescue .RSV files written by a Sony camera.
​

A free web based version of untrunc which is optimized for .RSV files and runs locally in your browser can be found at https://rsv.repair. No uploads, no command line.

NOTE: Restoring in camera is prefered if it is supported by your camera model. Please also read the full article on .RSV files.

Installation

  • Install the homebrew package manager if you are not already using it:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Enable the OTTOMATIC tap

    brew tap ottomatic-io/video
  • Install the untrunc package

    brew install untrunc

Usage

To restore a clip, you need a donor file which has the same recording settings. Most often that is the clip you shot before.

Run

untrunc /path/to/C1001.MP4 /path/to/C1002.RSV

This will create a file called /path/to/C1002.RSV_fixed.mp4.

If you see an error like "Error: unable to find correct codec -> premature end (~0%)", please try to use the -s option to step through unknown sequences:

untrunc -s /path/to/C1001.MP4 /path/to/C1002.RSV

If your path contains spaces, you need to put it in quotes:

untrunc -s "/path with space/to/C1001.MP4" "/path/to/C1002.RSV"

NOTE: If it is not working, please do not hesitate to reach out to our support!

Did this answer your question?