Sometimes we download videos or movies from the internet, but at some point during its reproduction we find errors. The origin of the problem can be very varied, from a problem of codecs, of the player or that the video is damaged. To cover the problems in which the videos are damaged by downloading them, copy them from a USB flash drive or similar we will publish a
tutorial that will teach you to verify the integrity of a video
The video files can be of various types
(mkv, mp4, wmv, ...)
, but this method that we are going to show you will work in most cases. This is because we will use the
to verify that the video file has no errors.
In my case the problem was detected during the video playback, I could see that the sound was playing correctly but the video was freezing for several seconds. In other cases the problem can be detected because the image looks blurred, pixelated or simply because nothing is reproduced.
How to check the integrity of a video and verify that it has no errors.
Whenever possible we should check the integrity of the file in the classic way, that is, using the hash functions and algorithms designed for this purpose. That this does not scare you, it is a very simple process to which we already dedicate a tutorial to
verify the integrity of files in Windows
and how to do this
verification from the Linux terminal
If the above process does not help us or does not solve the problem, we will
to follow the instructions below.
Verify that a video file has no errors with FFmpeg.
When using FFmpeg we have a multiplatform tool, so this tutorial will be applicable from both Windows and Linux. Some experts recommend using tools such as
(included in the FFmpeg package)
to extract the metadata from the video and verify that there is nothing out of the ordinary.
This step takes a few seconds and helps us verify the metadata, but does not detect errors in the integrity of the file.
Ideally, to verify the integrity of the video is to execute the following command:
ffmpeg.exe -v error -i video.mkv -f null - >error.log 2>&1
ffmpeg -v error -i video.mkv -f null - 2>error.log
When the process is finished in both Windows and Linux, the
file will be created, which we will have to examine with a
to verify what errors it has detected. If the file is blank, there have been no errors.
Note that in the example command we use as a filename to verify
, but it
could be any video file supported by FFmpeg
. The verification process can take a long time, depending on the size of the file and the power of the equipment we are using. To give you an idea, verifying a 600MB file on my computer took about a minute.