The same happened to me and I was able to restore the video, using a tiny and very easy tu use program: mp4fixer
Step 1: find the mux files
First (for someone else who is a step behind), you need to find the lost temp video files, with .mux
extension. In your linux terminal, go to the root folder and type:
$ find . -type f -name "*.mux"
My files were located in my Videos folder:
kazam_mv84r5fr.movie.mux
kazam_mv84r5fr.movie
Step 2: record a new sample video
Now, you need to generate with Kazam a new video of at least 20 seconds long, if possible similar to the one you are trying to recover:
Be sure to record it exactly under the same conditions, including even
shaking on the screen (same bitrate), if it was - so we will find
exactly what we are looking for. The length of the video is 20
seconds, but if you feed more - it's ok.
You will get a new video file, for example: goodvideo.mp4
Step 3: download mp4fixer
Go to mp4fixer Github page and download the zip file (there is a green dropdown button on the top-right section of the screen).
Save the file somewhere in your disk and unzip it.
Copy the mux
files and the sample mp4
file into the same folder.
Step 3: run the program
In the terminal, go to the folder where you unzipped the program and you copied the video files, and run:
$ perl fixer.pl goodvideo.mp4 kazam_mv84r5fr.movie.mux recovered
When the program finishes, you will see some new files in the folder:
recovered-headers.aac
recovered-headers.h264
recovered-nals-stat.txt
recovered-nals.txt
recovered-out-audio.raw <-- AUDIO
recovered-out-video.h264 <-- VIDEO
recovered-stat.mp4
Step 4: convert to mp4
The last step is to convert the recovered video from .h264 to .mp4, and to include the audio in it.
I did it using the ffmpeg utility (install it first):
$ ffmpeg -i "recovered-out-video.h264" -i "recovered-out-audio.raw" -c:v copy -c:a copy -f mp4 "recovered-video.mp4"
A recovered-video.mp4
working video file will be created in the folder.
It worked for me, I hope it works for you as well.