0

I am checking the integrity of a lot of video files from a directory. I found this question (for Ubuntu). My question is what the code would be if I wanted to do the same on my Windows machine.

ffmpegBin-folder: /downloads/ffmpeg/bin
<br>
videoSource-folder: /downloads/ffmpeg/videos
<br>
error-Folder: /downloads/ffmpeg/error

When I do it with every single file instead of for the whole directory, I use the folowing code:

bin\ffmpeg.exe -v error -i videos\fileName.mp4 -f null - >error\fileName.log 2>&1

PS. All the videos have the ".mp4" extension, but preferably I would like to fetch all the files despite them having different extension.

Community
  • 1
  • 1

1 Answers1

0

This is what I use for the exact same purpose. This is a batchfile

@echo off

for /f "delims=" %%I in ('dir /b /s "M:\Movies\*.mp4" 2^>nul') do (

    echo Checking "%%I"
    "M:\Movies\ffmpeg.exe" -v error -i "%%I" -f null - >"M:\Movies\%%~nI.log" 2>&1
)
Shaun
  • 554
  • 1
  • 3
  • 17