VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 2 of 2
  1. Member
    Join Date
    Mar 2019
    Search Comp PM
    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;

    Thanks Don
    Quote Quote  
  2. Something like this:

    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"
    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.
    Quote Quote  

Similar Threads