View Full Version : Is there MPEG 1 & 2 error scanner?
Caleb13
4th September 2007, 22:01
Hi all, yet again, I encoutered a problem I was unable to solve with the help of Google and this forum's search function:
You see, I have tons of old MPEG-1 and MPEG-2 videos and I have begun painstaking process of sorting, duplicity elimination etc. Now the trouble is, that I have dozens of clips which have same filesize and the same content, BUT some of them are corrupt. When I compare two such files, the difference is usually just few bits here and there (the result of lousy backups, but this would be topic for a different discussion). Of course, from few bits I can't know which clip is damaged and which is not. Watching the videos in hope to spot the errors in picture turned out to be futile. So I tried searching for some MPEG-1 and 2 video scanners, but I found nothing. And video scanning in VirtualDubMod proved to be useless...
Thanks for any tips!
chickenmonger
12th September 2007, 00:36
On first glance, I'd say either DGIndex or Mplayer.
DGIndex outputs way more information than a normal human can comprehend regarding frames and GOPs in MPEG files. I haven't run it on a known corrupt file, though.
And Mplayer usually spits out dozens of messages when playing a file, some of which could pertain to corruption and missing data. FFmpeg might also output similar data.
Any chance on providing a sample of the corrupted data? Others might be able to run it through their chosen suite of tools to determine what software can find the visible error.
GrofLuigi
12th September 2007, 04:42
I use these free tools for repair of mpeg1/2 files:
http://www.vcdgear.com/
http://homepages.roadrunner.com/mwilczyn/mpeg2repair
I don't know if they allow batch reporting of damaged files, but I'm sure they'll report errors they encounter in interactive mode.
Then there are payware tools like VideoReDo, Womble MPEG Video Wizard, and many freeware Mpeg editors which have error repairing features.
If you have both good and bad versions of a file, you could make a binary compare between them - often the errors originating from the media will be all zeroes or some other number - but not always!
GL
laserfan
12th September 2007, 15:40
I use these free tools...
http://homepages.roadrunner.com/mwilczyn/mpeg2repairYes, mpeg2repair is excellent (though slow). I've used it to make reports, then checked the reported problem areas to see what kind of visual glitch occurred (sometimes they are subtle/hard to see). You could make reports for each of your dupe recordings, and then WinMerge comparison tool or some such to compare the reports, or just trust the summary of m2repair if there is one file has many-fewer errors than another.
Caleb13
21st September 2007, 23:51
Thanks for the tips, but none seems to help me in any way. I see I failed to describe the problem properly last time, so allow me to make amends:
You see, I had several hundred of old MPEG-1 and MPEG-2 videos. Some are "originals" and then there are files from two different backups. But both "originals" and "backups" suffered some damage.
So, I had lots of 100% identical files (same size and binary content), which I eliminated using one of duplicity finder programs. However, I still have some 100 files which have the same size, but their binary content is slightly different - from a few bits to several KB difference. With the help of "Compare Files" in Total Commander, I was able to eliminate obviously corrupted files (those which contained long strigs of 0x00's or 0xFF's), but only a few files were corrupted this much.
Now, my trouble is that I have dozens of slightly different MPEG files, BUT I have no way of knowing which one is actually undamaged or corrupt (or rather, which one is LESS corrupt than the other). Thus my need for some automated way to detect MPEG errors.
I sure tried all the tools you proposed here. Sadly, none seems to be able to detect the errors. I tested them on several corrupt files, I even "created" my own corrupt files (I damaged them using hex editor), to no avail.
-mpeg2repair is able to work with Transport Streams only and crashes when I try to load "normal" MPEG1 or 2 files. But thanks for the tip anyway, mpeg2repair will sure come in handy to check streams I record from DVB-T.
-DGIndex - of course I tried this before I even posted here, but it reported no errors in my files.
-vcdgear - I tried "mpeg -> mpeg" mode, but no errors appeared in the log. Is there some special scanning mode? I can't seem to find it.
-Mplayer - you mean the Linux video player from http://www.mplayerhq.hu ? Well, it reported no errors even though the picture was getting "garbled" during playback. Does it contain some special error-checking plugin or something?
-ffmepg - I can see no way how this could help...
I also tried TMPGenc 2.0 Trial, but i could not find any error-detection function.
Please note that I don't need to repair the errors, I merely want to detect them. Which brings me to the question - is it EVEN possible to detect all errors in MPEG stream? Does MPEG EVEN have some parity or CRC check or something like that? And is this check turned on by default or is it optional?
My knowledge of MPEG1 and 2 is sure pretty limited, but... it seems to me - if it possible to detect errors at all, it must be done at the decoder level. Therefore, I probably need some tool which employs built-in decoder instead of some system codec.
Well, I will be grateful for any further suggestions. Also, I would like to provide you with a sample of corrupt file, but none of the free cutting tools seems to support MPEG-1 files...
neuron2
22nd September 2007, 05:46
-DGIndex - of course I tried this before I even posted here, but it reported no errors in my files. It will detect some errors, but you have to run a preview over the whole movie. You'll also have to keep an eye on the Info box. But I agree, it's not suitable for mass screening. But any tool that does this is going to have to decode the whole movie.
There are no CRCs. There is data that can change that will affect the display and not be detectable. You'll only detect things that cause the decoder to generate a fault condition. Players, though, are designed to hide these, not bring them to light!
DGIndex can cut your MPEG1 file. Just set a range with the [ and ] buttons. Then do Save Project and Demux Video. The resulting M2V file is what you want.
45tripp
22nd September 2007, 13:07
Also,
Cuttermaran can cut elementary mpeg1.
Caleb13
23rd September 2007, 23:11
Thank you very much, neuron2! I didn't know that DGIndex reports errors during preview, I've always used it to index MPEG files only.
With DGIndex's help, I was able to eliminate most of the corrupt files - I got lucky, from two or tree copies I had, at least one was error-free... usually. I ended up with 10 pairs of files in which DGIndex found no errors, yet they were different on binary level. So I tried to demux audio streams and run them through BeSliced - and of course, I found some errors in audio. After this step, I had only 5 pairs of files, which were different in one or two bits. I could not locate any errors by watching them, so simply "tossed the coin" to decide which ones I should keep... In one instance, I was able to "combine" two damaged files into one undamaged (in hex editor).
Well, it was pretty amateurish approach, I admit, but it worked. And it took mere six hours (or so) to do, which seems almost like a miracle to me now, considering I needed to sort a hundred of files in the beginning...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.