-
FFmpeg: Validate Integrity of video (.mp4)
Hoping someone can help me, I’ve found a lot of info online though it doesn’t seem to work.
My aim: To validate the integrity of several hundred .mp4 which where downloaded over http. Due to connection issues, some of the videos are only partially downloaded. They show as correct video duration but the file size is significantly smaller. Videos play fine at start then cut off.
Below are several commands I’ve used with FFmpeg with varying success:
Scan Each Frame (Works, but takes very long time)
ffmpeg -v error -i "File Name".mp4 -f null - >error.log 2>&1Scan 1 audio track (False negative)
ffmpeg -v error -i "File Name".mp4 -map 0:1 -f null - >error.log 2>&1Scan Last 60sec (False negative, unless -sseof > or = video duration)
ffmpeg -v error -sseof -60 -i "File Name".mp4 -f null - >error.log 2>&1I also would like to be able to run a batch scan of all files in folder, though can’t get it to work.
Batch Scan Each Frame
find . -type f -exec sh -c 'ffmpeg -v error -i "{}" -f null - > "{}".log 2>&1' \;
Gives following error:Access denied - .
File not found - -TYPE
File not found - F
File not found - -EXEC
File not found - SH
File not found - -C
File not found - 'FFMPEG
File not found - -V
File not found - ERROR
File not found - -I
File not found - -F
File not found - NULL
File not found - -
File not found - '
File not found - \;
Sorry, there were no replies found.