VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Years ago, I downloaded an .mpg file of an episode from an old television show from the 1960's.

    Sometime later I backed it up to an external USB drive. A couple years later, I backed it up again.

    Recently, I was going over some my archives, and came across these two old backups. Of course, they are the exact same length. But, just out of curiosity, I wondered if they were byte-for-byte exactly the same. I mean, they should be-- they were both just copies of the same file (just performed several years apart). So, I used WinMerge to check, and, lo and behold, they were flagged as different. I then used the DOS utility "fc" (file compare-- with the /b switch for binary), and discovered that three bytes were different in the two files. The three bytes that were different differed in only 1 bit. The 4th bit (0x08) of the three bytes that differed was set in the second backup, and not set in the first backup.

    Question: Is there a way to display the frame(s) in which the differences occur, just to see if they are observable (in the still frame)? "fc" does show the address of the each of the three bytes that are different, but I don't know how to use that information. The files are .mpg files that are 282,638,336. The results of 'fc /b' are:

    01D05E7F: D4 DC
    05361E7F: E1 E9
    0DF20E7F: 51 59

    A curious thing. I wonder why any difference at all. And, given that they aren't the same, why only 3 bits different in the whole file. If disk were damaged, wouldn't whole blocks get corrupted?

    Anyway, I'm curious about how the differences might appear.

    Thank you for any comments.

    DG

    P.S. Ever hear of "I'm Dickens, He's Fenster" (an old sitcom from 1962)? It's an episode from that series.
    Quote Quote  
  2. It's probably not worth the trouble, but you can get checksums for each frame of each video, and compare them:
    https://trac.ffmpeg.org/wiki/framemd5%20Intro%20and%20HowTo

    (yes, that was one of the first TV shows I ever saw, starring the future Gomez Addams, John Astin)
    Last edited by raffriff42; 18th Feb 2018 at 03:09.
    Quote Quote  
  3. Originally Posted by dgpretzel View Post
    A curious thing. I wonder why any difference at all. And, given that they aren't the same, why only 3 bits different in the whole file. If disk were damaged, wouldn't whole blocks get corrupted?
    You can't really know how the corruption happened. Maybe it was a USB transfer problem.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Thank you, both, for helpful comments.

    Maybe, some day when I'm really bored, I'll take the time to track down the offending frame(s)... just for grins. Thank you for the tip.

    DG
    Quote Quote  
  5. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Heavily fragmented files will sometimes cause files (in my experience) to have errors when read. In the past I have simply defragmented the file or copyed the file off the drive to have it be error free. I'm not promising anything but it's worth defragmenting the file if it's on a HDD.

    You can use HxD to find differences in files.

    When transferring files I always use Teracopy as it has a file checker after a transfer to make sure the hash of the source and hash of the copy are the same. Windows does not check hashes of the newly created file when copying/moving files.
    Last edited by KarMa; 19th Feb 2018 at 00:35.
    Quote Quote  
  6. ffprobe can tell you the offset (pkt_pos) of each frame of the video. It gives you the information as a decimal value so you'll have to convert the hex value fc gives you. For example, the following in a batch file:

    ffprobe.exe -v quiet -pretty -print_format json -show_entries "frame=coded_picture_number,pkt_pts_time,pict_type ,width,height,size,pkt_pos" -select_streams v:0 filename.mp4 > stats.json

    will give you stats for filename.mp4 in json format as stats.json:

    Code:
            {
                "pkt_pts_time": "0:00:00.100000",
                "pkt_pos": "27687",
                "width": 1920,
                "height": 1080,
                "pict_type": "B",
                "coded_picture_number": 4
            },
            {
                "pkt_pts_time": "0:00:00.133000",
                "pkt_pos": "27372",
                "width": 1920,
                "height": 1080,
                "pict_type": "P",
                "coded_picture_number": 1
            },
            {
                "pkt_pts_time": "0:00:00.167000",
                "pkt_pos": "48476",
                "width": 1920,
                "height": 1080,
                "pict_type": "B",
                "coded_picture_number": 7
            },
    Note that the list is in presentation order, not coded order.
    Quote Quote  
  7. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by raffriff42 View Post
    It's probably not worth the trouble, but you can get checksums for each frame of each video, and compare them:
    https://trac.ffmpeg.org/wiki/framemd5%20Intro%20and%20HowTo
    Exactly right. Run a framemd5 format output for both videos, then use a file compare command to pinpoint the differences down to the frame. It's quite easy.
    Quote Quote  



Similar Threads