Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd February 2016, 14:13   #1  |  Link
LostRoss
Registered User
 
Join Date: May 2015
Posts: 4
Is there a program to find damaged mp4/avi?

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.
LostRoss is offline   Reply With Quote
Old 2nd February 2016, 20:35   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,079
Well windows itself will tell if un-readable, just copy to another folder (on good drive).

After that, could try this

whatever.bat
Code:
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 2nd February 2016, 21:00   #3  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,369
Quote:
Originally Posted by LostRoss View Post
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, which you would have read when you signed up.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 2nd February 2016, 21:37   #4  |  Link
LostRoss
Registered User
 
Join Date: May 2015
Posts: 4
Quote:
Originally Posted by StainlessS View Post
Well windows itself will tell if un-readable, just copy to another folder (on good drive).

After that, could try this

whatever.bat
Code:
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.

Quote:
Originally Posted by davidhorman

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 .
LostRoss is offline   Reply With Quote
Old 2nd February 2016, 23:31   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,079
Yes just remux.
Dont know of anything else, nor any simulation.
Do them in batches then delete originals.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 2nd February 2016, 23:48   #6  |  Link
LostRoss
Registered User
 
Join Date: May 2015
Posts: 4
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.
LostRoss is offline   Reply With Quote
Old 3rd February 2016, 00:09   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,079
Quote:
I find it surprising that no-one ...
There probably is one if you got lotsa wonga.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 3rd February 2016, 09:52   #8  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 139
Quote:
Originally Posted by LostRoss View Post
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.
Warperus is offline   Reply With Quote
Old 3rd February 2016, 18:49   #9  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 643
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
Code:
ffmpeg.exe -v error -i file.avi -f null - >error.log 2>&1
Maybe also add -xerror (exit on first error).

Last edited by vivan; 3rd February 2016 at 18:53.
vivan is offline   Reply With Quote
Old 4th February 2016, 15:14   #10  |  Link
LostRoss
Registered User
 
Join Date: May 2015
Posts: 4
Awesome, sounds perfect. Thanks vivan!
LostRoss is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.