View Full Version : Is there a program to find damaged mp4/avi?
LostRoss
2nd February 2016, 14:13
My hard drive started to fail and would cause errors in the video files on it, not too much of a problem when watching on PC but bigger problem when streaming those files to my xbox. Anyway, got a new hard drive, copied all the old files over and need a program to scan the mp4 and avi files to see which are damaged to know which ones I need to redownload. Does such a program exist?
Thanks.
StainlessS
2nd February 2016, 20:35
Well windows itself will tell if un-readable, just copy to another folder (on good drive).
After that, could try this
whatever.bat
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."
REM Where to place output file, No terminating Backslash.
set OUTDIR=".\OUTPUT"
FOR %%A IN (*.mov *.mp4 *.m4v) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MP4"
)
Pause
May need to modify in/out directories.
Watch for colored text in output window.
wonkey_monkey
2nd February 2016, 21:00
Anyway, got a new hard drive, copied all the old files over and need a program to scan the mp4 and avi files to see which are damaged to know which ones I need to redownload.
Obviously you mean "re-encode" not "redownload," because otherwise that would put you in violation of rule 6 (http://forum.doom9.org/forum-rules.htm), which you would have read when you signed up.
LostRoss
2nd February 2016, 21:37
Well windows itself will tell if un-readable, just copy to another folder (on good drive).
After that, could try this
whatever.bat
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."
REM Where to place output file, No terminating Backslash.
set OUTDIR=".\OUTPUT"
FOR %%A IN (*.mov *.mp4 *.m4v) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MP4"
)
Pause
May need to modify in/out directories.
Watch for colored text in output window.
Apologies if I'm reading that code incorrectly (never really learned FFMPEG commands, never found a comprehensive and easy to read list, plus mp4box and MeGui cover most of my needs) but would that basically demux and remux all the files and throw errors if one is damaged? If so, any way to simulate the copy as there are more than a terabyte of files and don't have the space for duplicates of them, plus never like wasting write operations to the disk.
Obviously you mean "re-encode" not "redownload," because otherwise that would put you in violation of rule 6, which you would have read when you signed up.
Scanned them when I first signed up, thought it was just warez, but apparently, I do mean re-encode. Damn autocorrect :D.
StainlessS
2nd February 2016, 23:31
Yes just remux.
Dont know of anything else, nor any simulation.
Do them in batches then delete originals.
LostRoss
2nd February 2016, 23:48
Ok, will give that a go when I clear up some space. Thanks.
I find it surprising that no-one has ever made a program that would basically play a video file in the background at high speed and log when there was a missing bit.
Anyway, thanks again.
StainlessS
3rd February 2016, 00:09
I find it surprising that no-one ...
There probably is one if you got lotsa wonga.
Warperus
3rd February 2016, 09:52
I find it surprising that no-one has ever made a program that would basically play a video file in the background at high speed and log when there was a missing bit.
As far as my file plays smoothly, I don't care of failed bits.
And what do I do if I get it with few failed bits, but file still plays? Making everything perfect is good idea, but killing a lot of time for it is just that, wasted time.
From time to time I get rendered files I can't even play on my computer, but they still upload to youtube well enough.
Sometimes I get failed files a month after HDD cleanup, total reencode of captured files, deleted sources etc. And at that time it's too late, but I can simply delete few totally wasted files, cut few good parts from not so bad files and move on.
vivan
3rd February 2016, 18:49
Ffmpeg has null muxer (-f null -) that doesn't write data.
Also you can change level of reported errors.
And of course write this to file.
Try this ffmpeg.exe -v error -i file.avi -f null - >error.log 2>&1Maybe also add -xerror (exit on first error).
LostRoss
4th February 2016, 15:14
Awesome, sounds perfect. Thanks vivan!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.