untrunc
untrunc copied to clipboard
Error when try to run untruc
Reading: /mnt/d/Escapades/Delhi One From Peter/VID_20180903_145438.mp4 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)
running on ubuntu 16.04. could not compile with normal command so sued this instead https://github.com/ponchio/untrunc/blob/1a2ef11dafe852e7f72420f9c04df48172b9ec03/build.sh
I get the same error. I use docker container like this:
docker run -v /tmp:/tmp -it synctree/untrunc /tmp/file_a.mp4 /tmp/file_b.mp4
Good file has size of 4080804692 bytes (3.9G) Bad file has size of 3786378662 bytes (3.6G)
This bug happens when using large "good" file. For example, when I have tried to use 3.9G good file and 3.6G bad file, I got std::bad_alloc error. But when I used small 55M "good" file, untrunc successfully restored my video and audio (all 3.6G).
So something is wrong with "good" file handling.
It is not always possible to create small "good" file, for example when recovering video from broken DVR after car crash, so this bug may prevent some people from recovering their video files.
I made an attemp to better support >2GB files on my branch.
It also handles file_ok<2GB and file_bad>2GB, by replacing stco
with co64
if needed.
I get this message :
stamatis@stamatis:~$ '/home/stamatis/Desktop/MP4 Repair/untrunc/untrunc-master/untrunc' '/home/stamatis/Desktop/MP4 Repair/GOPR7983.MP4' '/home/stamatis/Desktop/MP4 Repair/GOPR8310.MP4'
Reading: /home/stamatis/Desktop/MP4 Repair/GOPR7983.MP4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/stamatis/Desktop/MP4 Repair/GOPR7983.MP4':
Metadata:
major_brand : mp41
minor_version : 538120216
compatible_brands: mp41
creation_time : 2015-09-02 16:26:32
Duration: 00:00:08.91, start: 0.000000, bitrate: 59951 kb/s
Stream #0.0(eng): Video: h264 (High), yuvj420p, 1920x1440 [PAR 1:1 DAR 4:3], 59818 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc
Metadata:
creation_time : 2015-09-02 16:26:32
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2015-09-02 16:26:32
Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s
Metadata:
creation_time : 2015-09-02 16:26:32
Stream #0.3(eng): Data: gpmd / 0x646D7067, 34 kb/s
Metadata:
creation_time : 2015-09-02 16:26:32
Stream #0.4(eng): Data: fdsc / 0x63736466, 14 kb/s
Metadata:
creation_time : 2015-09-02 16:26:32
terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits