Identifying Unplayable Video Files in Media Library

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

K D

Well-Known Member
Dec 24, 2016
1,439
320
83
30041
After suddenly receiving errors in Plex on a few videos, I was curious as to how many files I have that have some issues with playback. Looked around and the only way to do this seemed to be using ffmpeg to transcode the file and see if succeeds. Here's what I came up with. Running it against my library now. Should complete in about 16 hours. ErrorList.txt should give me a list of files with errors.

Code:
@echo off
dir/b/s "\\SERVER\Share\*.mkv" >InputFileList.txt
for /F "delims=;" %%F in (InputFileList.txt) do (
    echo %%F
    echo %%F >> ProcessedFiles.txt
    "C:\ffmpeg\bin\ffmpeg.exe" -loglevel error -i "%%F" -acodec copy -vcodec copy -f null - 2>> ProcessedFiles.txt
)
DEL InputFileList.txt
How do you guys deal with this issue?
 
Last edited: