-
Notifications
You must be signed in to change notification settings - Fork 204
Installing on macOS
sk9c00 edited this page Sep 3, 2024
·
4 revisions
- Get Docker Desktop.
- Via brew:
brew install --cask docker
- Via brew:
- Start Docker Desktop. Make sure bottom left green bar says
Engine Running
. - Clone git repo.
- Via direct zip download.
- Click download.
- Unzip.
- Via git.
- Via direct zip download.
- Open Terminal.
-
cd
into folder.- Type
cd
. Note the space. - Drag respective
untrunc-master
folder into terminal window. - Press enter.
- Type
-
docker build --build-arg FF_VER=3.3.9 -t untrunc .
(specifies specific FFMPEG version) ordocker build -t untrunc .
. Please note the space and full stop. - (OPTIONAL)
docker image prune --filter label=stage=intermediate -f
. Cleanup. Didn't do much for me. -
docker run untrunc
. Check untrunc runs. You should see:
Usage: untrunc [options] <ok.mp4> [corrupt.mp4]
...
-
docker run -v ~/Movies/:/mnt untrunc /mnt/ok.mp4 /mnt/broken.mp4
. - Done.
The base command for the Docker CLI. For further info see here.
Create and run a new container from an image. For further info see here.
Bind mount a volume. For further info see here.
Mounts "user home directory"/Movies
, usually /Users/[username]/Movies
, to /mnt
of docker container.
The base command for untrunc CLI.
Usage: untrunc [options] <ok.mp4> [corrupt.mp4]
general options:
-V - version
-n - no interactive
repair options:
-s - step through unknown sequences
-st <step_size> - used with '-s'
-sv - stretches video to match audio duration (beta)
-dw - don't write _fixed.mp4
-dr - dump repaired tracks, implies '-dw'
-k - keep unknown sequences
-sm - search mdat, even if no mp4-structure found
-dcc - dont check if chunks are inside mdat
-dyn - use dynamic stats
-range <A:B> - raw data range
-dst <dir|file> - set destination
-skip - skip existing
-noctts - dont restore ctts
-mp <bytes> - set max partsize
analyze options:
-a - analyze
-i[t|a|s] - info [tracks|atoms|stats]
-d - dump samples
-f - find all atoms and check their lenghts
-lsm - find all mdat,moov atoms
-m <offset> - match/analyze file offset
untrunc <ok.mp4> <ok.mp4> - report wrong values
other options:
-ms - make streamable
-sh - shorten
-u <mdat-file> <moov-file> - unite fragments
logging options:
-q - quiet, only errors
-w - show hidden warnings
-v - verbose
-vv - more verbose
-do - don't omit potential noise
A working sample mp4 file. Preferably from the same/similar camera source etc.
This is equivalent to ~/Movies/ok.mp4
on your computer.
The broken mp4 file. Errors like ffmpeg: "moov atom not found"
should be fixable. Usually what's left in the file should be salvageable.
This is equivalent to ~/Movies/broken.mp4
on your computer.