How to repair an mp4 video

There is an mp4 video that will play flawlessly in some applications and not others. Using the tools of ffmpeg, I was able to determine the problem and remove it.

By executing the following command, the problem(s) became easily identifiable.

ffprobe -hide_banner -analyzeduration 1G -probesize 1G  -i bad.mp4

The truncated results of the output are below. This is the first and last line of the output.

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5566d2404e80] stream 0, timescale not set
Unsupported codec with id 100359 for input stream 3

Recreate the mp4, but strip out the text. This includes chapter names and closed captions.

ffmpeg  -c:v copy -c:a copy -map_metadata:c -1 good.mp4 -i bad.mp4

Whilst that may not be the best solution for some, it was one that worked for me and took very little effort and time to process the file. It was easier than recreating it.