1

currently using this bat file from this post

        @echo off

    set "filtro=%1"
    if [%filtro%]==[] (
        set "filtro=*.mp4"
        )

    for /R %%a in (%filtro%) do call :doWork "%%a"

        PAUSE
        exit /B

    :doWork
        C:\ffmpeg\bin\ffmpeg.exe -v error -i %1 -f null - > "%~1.log" 2>&1

all I have to do execute the bat file on the folder and it checks all the files and create log for each. If the created "file name".log contains some entries, then the file is obviously corrupted. The opposite would be an empty .log file. it works fine but takes a long time currently found another post here where the top answerer had a faster code according to the op. but i couldn't use it cos I don't know how. i tried their code on the folder using cmd.it didnt work only got error

    Access denied - .
    File not found - -NAME
    File not found - -EXEC
    File not found - SH
    File not found - -C
    File not found - FFMPEG -V ERROR -I '{}' -MAP 0:1 -F NULL - 2>'{}.LOG'
    File not found - \

can anyone with better knowledge explain it exactly how to use that code? or share your own way of checking file integrity and also explain how to use. thanks

  • The code from [Quickly check the integrity of video files inside a directory with ffmpeg](https://stackoverflow.com/questions/34077302/quickly-check-the-integrity-of-video-files-inside-a-directory-with-ffmpeg) is a Unix shell script. You cannot use that code inside a Windows batch file. – DavidPostill May 09 '20 at 18:06
  • i used it on cmd. didnt work probably for the same reason. do u know the cmd equivalent of that code? i know they are very similar – wahiduzzaman sagar May 09 '20 at 18:37
  • 1
    Does this answer your question? [ffmpeg file integrity check and rename on error with a batch file](https://superuser.com/questions/1536452/ffmpeg-file-integrity-check-and-rename-on-error-with-a-batch-file) – Io-oI May 09 '20 at 18:53

0 Answers0