Adventures getting the program working
I tried the docker install which went smooth, however i failed to get it working when the folder where the files was located was my home folder or a subfolder of my home folder:
sudo docker run -v /home/user/test:/files/ untrunc /files/good2.mp4 /files/borken.mp4
Reading: /files/good2.mp4
Could not open file: /files/good2.mp4
My fix was putting the files literally into /path/to/files/ which was ugly but worked expect:
Buffer size exceeded (163913 > 71722).
Found 494791 packets.
Saving to: /files/borcken.mp4_fixed.mp4
Track 0 (mp4a): duration: 298635264 timescale: 44100
Adjusting track duration to movie timescale: New duration: 6771775 timescale: 1000.
Track 1 (avc1): duration: 104015360 timescale: 15360
Adjusting track duration to movie timescale: New duration: 6771834 timescale: 1000.
Movie duration: 6771834 timescale: 1000
Could not create file for writing: /files/borcken.mp4_fixed.mp4
I have running it multiple times like that (one time i did touch the file before, everything was chmod 7777 ls)(and getting my laptop really hot)
I then decided to spin up a virtual CentOs machine and follow those instructions where i came into this problem:
Some packages in your transaction are brought to you by GetPageSpeed:
- untrunc-0-0.1.20181013git2953f36.el7.x86_64
To enable package installs, subscribe using the following link:
https://www.getpagespeed.com/repo-subscribe?server_ip=1.1.1.1
So i followed the link check all the Terms of Service boxes (weird but ok) and was then asked to pay 10$ a month (nope i am out) to have the privilege of installing packages from PageSpeed
Then i decided to keep the CentOs7 vm and do manual install (had to install unzip and curl manually since Centos doesn't come with it WTF?), where this occurred:
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
but what they really wanted to say was is gcc not found.
This was quickly rectified by a:
yum groupinstall 'Development Tools'
which led to this dead end while running
atom.cpp:104:67: error: incompatible types in assignment of ‘const char [1]’ to ‘char [5]’
Atom::Atom() : start(0), length(0), name(""), head(""), version("") { }
^
atom.cpp:104:67: error: incompatible types in assignment of ‘const char [1]’ to ‘char [4]’
atom.cpp:104:67: error: incompatible types in assignment of ‘const char [1]’ to ‘char [4]’
Then i tried the docker route on my vm which failed:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/Dockerfile: no such file or directory
....
My solution in the end: i got it working with docker in a ubuntu vm on somebodies cluster.
Turns out the / after test is really important is really important.
sudo docker run -v /home/user/test/:/files/ untrunc /files/good2.mp4 /files/borken.mp4
for the beginning step this helped me understand how to exactly use the command at the begining
@crazydude
docker run -v /Users//Downloads/untrunc-master:/files untrunc /Users//Downloads/working-video.m4v /Users/*/Downloads/corrupt_videos/2020_0210_191419_035.m4vThe "/files" point to the untrunc-master, example:
docker run -v C:/Users/Downloads/:/filestells docker that the files in the "C:/Users/Downloads/" can be referred to by "/files". so your command will be:docker run -v C:/Users/Downloads/:/files /files/working-video.m4v /files/corrupt_videos/2020_0210_191419_035.m4v