You can check the integrity of a video file using FFmpeg, the free cross-platform solution for recording, converting and streaming audio and video.
Here are examples of the code you can employ; both in Windows and Linux environments.
- Windows Example
[path to ffmpeg.exe executable] -v error -i [path to video file] -f null - >[path to error.log] 2>&1
- Linux Example
[path to ffmpeg.exe executable] -v error -i [path to video file] -f null - 2>[path to error.log]
NB: If there are no errors, no error.log will be generated.