Checking Blu-Ray ISO's integrity generated by AnyDVD HD

Discussion in 'AnyDVD HD (Blu-ray issues)' started by Mr Cron, May 28, 2018.

  1. Mr Cron

    Mr Cron Member

    I was seeing a few errors when I was transcoding from an AnyDVD ripped Blu-Ray. So I thought I would look at doing an integrity check on my images. My ISO was generated straight from AnyDVD from a Blu-Ray.

    From a bit of reading it seems like ffmpeg can provide a good analysis of video file integrity. So I mounted the ISO and iterated though each m2ts file under BDMV/STREAM. The ffmpeg command was:

    ffmpeg -v error -i 00002.m2ts -f null -
    etc for each m2ts file

    One of my disc shows no errors on all files. But all the rest show varying amounts of errors such as (and other types):


    00079.m2ts
    [h264 @ 0xf756a0] Reference 4 >= 2
    [h264 @ 0xf756a0] error while decoding MB 64 11, bytestream 21644
    [dca @ 0xfb5b40] ERROR: block code look-up failed
    [dca @ 0xfb5b40] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [h264 @ 0xf5ea80] left block unavailable for requested intra mode at 0 25
    [h264 @ 0xf5ea80] error while decoding MB 0 25, bytestream 32909
    [dca @ 0xfb5b40] ERROR: block code look-up failed
    [dca @ 0xfb5b40] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [dca @ 0xfb5b40] ERROR: block code look-up failed
    [dca @ 0xfb5b40] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [h264 @ 0xf74320] Reference 4 >= 2
    [h264 @ 0xf74320] error while decoding MB 96 34, bytestream 10443


    So my questions are:

    1/ Is this a valid test to apply to these files?

    2/ I know on a read error AnyDVD usually stops ripping, but are there (common) circumstances where AnyDVD will not see a read error but the data is still invalid? I guess this maybe a "feature" of Blu-Ray discs?
     
  2. Ch3vr0n

    Ch3vr0n Translator NL & Mod

    The most recent anydvd (beta) versions ripper does an integrity check on its own. and if there's an actual read error, it'll tell you and ask what to do with it.
     
  3. Mr Cron

    Mr Cron Member

    So I guess we are saying it is possible for a Read Error on the media to not be seen and generate video file corruption? And maybe common?
     
  4. Ch3vr0n

    Ch3vr0n Translator NL & Mod

    Yup, not everyone watches bonus features where for example the read error may be.

    Sent from my Nexus 6P with Tapatalk
     
  5. Mr Cron

    Mr Cron Member

    I thought the latest beta location was at the top of this forum. I can't see it.

    I see a reference to 8.2.5.0 2018 05 14 (which is the current version I have I think) and it says:

    - New (Blu-ray): Added integrity check to AnyDVD ripper (unprotected image and folder)

    But I can't see anything in the current version that would do this?
    Or if this checking can be applied to ISO's too?
     
  6. Ch3vr0n

    Ch3vr0n Translator NL & Mod

    That's because there's no beta yet. At this time 8250 is the most recent version. There's no setting for it. It's hardcoded when you use the anydvd ripper.

    Sent from my Nexus 6P with Tapatalk
     
  7. Mr Cron

    Mr Cron Member

    Does it verify images with ISO ripping or just "to hard disk"?

    Cause I ripped a BD disc with this version the other day and it does have errors with my ffmpeg verify but wasn't flagged by AnyDVD.
     
  8. Ch3vr0n

    Ch3vr0n Translator NL & Mod

    Both. The only thing that matters is that you ripdm DECRYPTED. Maybe @James can chime in

    Sent from my Nexus 6P with Tapatalk
     
  9. Mr Cron

    Mr Cron Member

    I have written a shell script on Linux to check my Blu-Ray Images. I had quite a few errors on my existing images, but changing to a new LG drive is producing much better results, most disc images are totally clean but some produce some errors (but a lot less than my previous drive, so I'm guessing BD disc problem with these). Anyway (for what it's worth) here's my shell script if anyone else is interesting (needs to be run as root as mounts the BD):
    Code:
    #!/bin/bash
    
    # Script to check if a Blu-Ray Video ISO has been ripped with no errors
    
    MNTPT=/bd
    
    if [ $# -ne 1 ] ; then
      echo "Usage: $0 bdisofile"
      echo "Must specify a Blu-Ray Video ISO filename to check"
      exit 1
    fi
    
    ISOF="$1"
    
    if ! [ -f "$ISOF" ] ; then
    echo "ISO File $ISOF doesn't exist"
    exit 1
    fi
    
    if ! [ -d "$MNTPT" ] ; then
      echo "Mount point $MNTPT doesn't exist"
      exit 1
    fi
    
    mount |grep -q "on $MNTPT"
    if  [ $? -eq 0 ] ; then
      echo "Mount point $MNTPT already in use"
      exit 1
    fi
    
    mount -t udf -o loop,ro "$ISOF" "$MNTPT"
    if  [ $? -ne 0 ] ; then
      echo "Unable to Mount $ISOF"
      exit 1
    fi
    
    if ! [ -f "$MNTPT/disc.inf" ] ; then
    umount "$MNTPT"
    echo "Mount looks incorrect"
    exit 1
    fi
    
    bn=`basename "$ISOF"`
    echo $bn
    echo
    
    find "$MNTPT/BDMV/STREAM" -iname "*.m2ts" | while read f; do
    bnf=`basename "$f"`
    echo $bnf
    
    ffmpeg -v error -i "$f" -f null - 2>&1 </dev/null
    echo
    done
    
    umount "$MNTPT"
    As I say, most discs should just output the filenames (internal to the BD image) with no other information.

    I'm also thinking errors like:
    Code:
    00011.m2ts
    [mp3 @ 0xf82660] Header missing
        Last message repeated 49 times
    /bd/BDMV/STREAM/00011.m2ts: could not find codec parameters
    Output file #0 does not contain any stream
    , may simply mean this particular stream file doesn't have video data (some other kind of data) that ffmpeg doesn't understand, so not letting that bother me.

    I'm more looking for errors like:

    Code:
    00013.m2ts
    [h264 @ 0x25914a0] error while decoding MB 59 51, bytestream -12
    [h264 @ 0x258d4c0] Reference 4 >= 4
    [h264 @ 0x258d4c0] error while decoding MB 100 6, bytestream 16891
    [h264 @ 0x25914a0] Reference 2 >= 2
    [h264 @ 0x25914a0] error while decoding MB 62 18, bytestream 25067
    [h264 @ 0x258d4c0] Reference 3 >= 2
    [h264 @ 0x258d4c0] error while decoding MB 55 13, bytestream 32300
    [h264 @ 0x2590960] left block unavailable for requested intra4x4 mode -1 at 0 42
    [h264 @ 0x2590960] error while decoding MB 0 42, bytestream 42422
    [h264 @ 0x258fe20] left block unavailable for requested intra mode at 0 36
    [h264 @ 0x258fe20] error while decoding MB 0 36, bytestream 6408
    [h264 @ 0x258e7a0] Reference 5 >= 4
    [h264 @ 0x258e7a0] error while decoding MB 44 50, bytestream 22393
    [h264 @ 0x258f2e0] error while decoding MB 78 33, bytestream -8
    
    A number of my discs still generate a few errors (more minor than this above) but much less than my previous drive did. So I'm thinking they are okay, or as good as I can get from my discs (a small flaw on them) e.g.

    Code:
    00010.m2ts
    [dca @ 0x23fdfa0] Overread auxiliary data by 32 bits
    [dca @ 0x23fdfa0] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [dca @ 0x23fdfa0] Overread auxiliary data by 32 bits
    [dca @ 0x23fdfa0] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [dca @ 0x23fdfa0] Overread auxiliary data by 32 bits
    [dca @ 0x23fdfa0] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    [dca @ 0x23fdfa0] Overread auxiliary data by 32 bits
    [dca @ 0x23fdfa0] error decoding block
    Error while decoding stream #0:1: Invalid data found when processing input
    Any thoughts welcome
     
  10. Mr Cron

    Mr Cron Member

    Pretty much verified that the majority of errors I see reported are from small m2ts files, so likely types of data that ffmpeg doesn't understand. The likelyhood (probability) is that read errors would be in the huge video files (as they occupy the vast bulk of the disk). So I'm looking for error in files that are say >400MB (esp >1GB), they are likely true. To see this easily I have added file size reporting to my testing script:

    Code:
    #!/bin/bash
    
    # Script to check if a Blu-Ray Video ISO has been ripped with no errors
    
    MNTPT=/bd
    
    if [ $# -ne 1 ] ; then
      echo "Usage: $0 bdisofile"
      echo "Must specify a Blu-Ray Video ISO filename to check"
      exit 1
    fi
    
    ISOF="$1"
    
    if ! [ -f "$ISOF" ] ; then
    echo "ISO File $ISOF doesn't exist"
    exit 1
    fi
    
    if ! [ -d "$MNTPT" ] ; then
      echo "Mount point $MNTPT doesn't exist"
      exit 1
    fi
    
    mount |grep -q "on $MNTPT"
    if  [ $? -eq 0 ] ; then
      echo "Mount point $MNTPT already in use"
      exit 1
    fi
    
    mount -t udf -o loop,ro "$ISOF" "$MNTPT"
    if  [ $? -ne 0 ] ; then
      echo "Unable to Mount $ISOF"
      exit 1
    fi
    
    if ! [ -f "$MNTPT/disc.inf" ] ; then
    umount "$MNTPT"
    echo "Mount looks incorrect"
    exit 1
    fi
    
    bn=`basename "$ISOF"`
    echo $bn
    echo
    
    find "$MNTPT/BDMV/STREAM" -iname "*.m2ts" | while read f; do
    bnf=`basename "$f"`
    size=`ls -lh "$f" | awk '{print $5}'`
    echo $bnf '('$size')'
    
    ffmpeg -v error -i "$f" -f null - 2>&1 </dev/null
    echo
    done
    
    echo DONE
    
    umount "$MNTPT"
    Just for completeness I also have written a version of this for DVD isos:

    Code:
    #!/bin/bash
    
    # Script to check if a DVD Video ISO has been ripped with no errors
    
    MNTPT=/dvd
    
    if [ $# -ne 1 ] ; then
      echo "Usage: $0 dvddisofile"
      echo "Must specify a DVD Video ISO filename to check"
      exit 1
    fi
    
    ISOF="$1"
    
    if ! [ -f "$ISOF" ] ; then
    echo "ISO File $ISOF doesn't exist"
    exit 1
    fi
    
    if ! [ -d "$MNTPT" ] ; then
      echo "Mount point $MNTPT doesn't exist"
      exit 1
    fi
    
    mount |grep -q "on $MNTPT"
    if  [ $? -eq 0 ] ; then
      echo "Mount point $MNTPT already in use"
      exit 1
    fi
    
    mount -t udf -o loop,ro "$ISOF" "$MNTPT"
    if  [ $? -ne 0 ] ; then
      echo "Unable to Mount $ISOF"
      exit 1
    fi
    
    if ! [ -d "$MNTPT/VIDEO_TS" ] ; then
    umount "$MNTPT"
    echo "Mount looks incorrect"
    exit 1
    fi
    
    bn=`basename "$ISOF"`
    echo $bn
    echo
    
    ls -v $MNTPT/VIDEO_TS/VTS_??_0.IFO | while read f; do
    
    bn=`basename $f | cut -d'_' -f1-2`
    echo "$bn"
    echo
    ls -lhv $MNTPT/VIDEO_TS/"$bn"_*.VOB | awk 'function basename (f) { sub(".*/", "", f); return f; } {print basename($9),"-",$5}'
    a=`ls -v $MNTPT/VIDEO_TS/"$bn"_*.VOB | tr '\n' '|'`
    b="${a::-1}"
    ffmpeg -v error -i "concat:$b" -f null - 2>&1 </dev/null
    echo
    
    done
    
    echo
    
    umount "$MNTPT"
    
    I realise I'm maybe just talking to myself at this point but thought I'd put these out here in case of use to anyone in the future.