Found this for Unix based to do what is needed but needs to be converted to run under Windows system. Can anyone provide a batch file to do the same in Windows 10.
A quick way to find corrupted mp4 files in directory is to generate thumbnails for all the videos, and see where thumbnail generation fails.
find . -iname "*.mp4" | while read -r line; do
line=`echo "$line" | sed -r 's/^\W+//g'`;
echo 'HERE IT IS ==>' "$line";
if ffmpeg -i "$line" -t 2 -r 0.5 %d.jpg;
then echo "DONE for" "$line";
else echo "FAILED for" "$line" >>error.log;
fi;
done;
Thanks Don
+ Reply to Thread
Results 1 to 2 of 2
-
-
Something like this:
Put that in a batch file in the folder you want to check. Then double click on it to run it. It produces a file called errorlog.txt (in the same folder) with a list of files for which ffmpeg failed to build a thumbnail. It deletes the thumbnail images so as not to pollute the folder with them. It only finds very corrupt files. It doesn't find files which may have small corruptions later in the video or audio streams.Code:for %%F in (*.mp4) do ( ffmpeg -y -i "%%F" -t 2 -r 0.5 "%%~nF.jpg" if errorlevel 1 echo Error in file "%%F" >>errorlog.txt del "%%~nF.jpg" )
Similar Threads
-
Corrupted MP4?
By Juni745 in forum Video Streaming DownloadingReplies: 6Last Post: 28th Jun 2019, 09:58 -
Must files be in same directory as FFmpeg to convert them?
By Spica66 in forum Video ConversionReplies: 1Last Post: 29th Mar 2018, 10:55 -
where is the system directory in windows 10 ?
By vhelp in forum ComputerReplies: 3Last Post: 24th Nov 2015, 14:23 -
Accessing a corrupted Mp4
By Vidaket in forum Newbie / General discussionsReplies: 21Last Post: 26th Feb 2015, 17:37 -
MP4 files not recognized using old PC and Windows XP. What it depends on?
By pippoismaele in forum Newbie / General discussionsReplies: 6Last Post: 15th Oct 2014, 05:27



Quote