-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terminate called after throwing an instance of 'std::bad_alloc' on video file smaller than 4GiB #30
Comments
I have the same issue |
untrunc seems to be loading the entire videos into RAM. For me that was ~400GB of video data. I worked around the issue by creating a large swap file on a fast SSD, but it would be neat if untrunc would load large files incrementally. |
I don't understand because at the time of my test my swap had (and still has) about 12GiB free which should be enough :
Can you please look into this issue ? |
I have this issue too. I did sound like a memory issue, but I have 10GB of free memory. The good file is 17GB and the truncated file is 12GB. I'll try the swap creating solution. I guess it only loads 1 video as a time into memory? |
I had this issue and it can be solved using 'unsigned int' for all 'start', 'length', 'offset' variables. I will try to send a merge request. |
@cdemoulins As far as I can tell you submitted a merge request that was merged into the master. Unfortunately I still got that error with any mp4 file, despite having loads of swap memory, that was exceeding both video files. The "workaround" that fixed it for me was using a much shorter video clip for the "working video". |
I ran into the same issue. For some reason
...and inevitably fails with the error in question. |
@rysiekpl Hi, geat ! It seems you have found why the pb. crashes :) ! |
Just letting you know, I changed all "start" and "offset" from int to unsigned int and recompiled. Did not help, it still tries to mmap 16exabytes. |
It's more complicated than that. If your video is bigger than 4Gb, you also need to change the offset vectors from vector to vector<int64_t>, the chunk method too and everywhere where there is an I've started to do this with some success, but I think there is also an issue in atom.cpp. basically I think, but might be wrong, there is a lot of work to have this work with videos >4G. It would also be nice to buffer the mdat reading of the correct video instead of trying to load it all in ram... |
My file is not even 1GiB. Why not create a separate issue for files bigger than 4GiB ? |
Oh you didn't mention the size of your video. Everybody else was giving out files bigger than 4GB. I will open another ticket. |
Hi,
I have build untrunc and run it on Ubuntu 14.10 and here is what I have :
When running it without arguments it prints the following usage :
Usage: untrunc [options] <ok.mp4> [<corrupt.mp4>]
Can you tell the possible options for your program to be more verbose ?
Running
movdump.exe -i BAD.MOV -o BAD-REPAIRED.MOV -nfd -ref REFERENCE.MOV >> movdump.txt
on Windows repaired the video but I don't want to be stuck to Windows only for that.UPDATE : My video file is much smaller than 4GiB
Can you help ?
The text was updated successfully, but these errors were encountered: