JasonMillward / Autorippr

Rip discs automatically using a blend of Python, MakeMKV and HandBrake
MIT License
239 stars 60 forks source link

Several DVDs error out during ripping, then won't compress. #102

Closed ascendedguard closed 8 years ago

ascendedguard commented 8 years ago

The following error message is common on my setup:

2015-11-12 21:15:02 - Rip - DEBUG - Checking for DVDs
2015-11-12 21:15:02 - Rip - DEBUG - Ripping initialised
2015-11-12 21:15:05 - Rip - DEBUG - 1 DVDs found
2015-11-12 21:15:18 - Makemkv - DEBUG - MakeMKV found 1 titles
2015-11-12 21:15:18 - Makemkv - DEBUG - MakeMKV title info: Disc Title: [    'MIRACLE_ON_34TH_DISC1'], Title No.: 0, Title: ['title00.mkv'],    
2015-11-12 21:15:18 - Rip - DEBUG - Attempting to rip title00.m    kv from Mi    racle     On 34Th Disc1    
2015-11-12 21    :28:13 - Makemkv - ERROR - Drive BD-ROM ATAPI iHES112   3 ML02 has     RPC protectio    n that can not be bypassed. Change drive region or update drive     firmware from     http://tdb.rpc1.org. Errors likely to follow.
2015-11-12 21:28:13 - Rip - INFO - MakeMKV did not did not complete successfully
2015-11-12 21:28:13 - Rip - INFO - See log for more details

In each case, the MKV file writes out properly, but the error at the end prevents compression from running. If I write a script to just manually run the compression, it compresses just fine.

Seems like there needs to be a setting to try to compress anyways if ripping fails for any reason... just make sure the target files exist first.

JasonMillward commented 8 years ago

Errors likely to follow.

It looks like this is what tripped the error detection, should be easy to fix

JasonMillward commented 8 years ago

Can you check to see if branch issue-102 fixes this? None of my discs have triggered a region error so I'm flying blind here.

Update your settings.cfg with https://github.com/JasonMillward/Autorippr/blob/issue-102/settings.example.cfg#L21

git pull
git checkout issue-102
ascendedguard commented 8 years ago

Edit: Ignore me, something went wrong pulling that branch apparently because I don't see the ignore_region in makemkv.py on my server... I'll need to retest again.

ascendedguard commented 8 years ago

Okay, definitely got the scripts updated this time. The message is now a warning, and it completes the ripping, but never bothered to encode... I haven't tried a bluray yet to make sure this latest version still works completely...

2015-11-19 20:55:01 - Rip - DEBUG - Ripping initialised
2015-11-19 20:55:01 - Rip - DEBUG - Checking for DVDs
2015-11-19 20:55:03 - Rip - DEBUG - 1 DVD(s) found
2015-11-19 20:55:17 - Makemkv - DEBUG - MakeMKV found 1 titles
2015-11-19 20:55:17 - Makemkv - DEBUG - MakeMKV title info: Disc Title: ['CHRISCRL'], Title No.: 0, Title: ['title00.mkv'],
2015-11-19 20:55:17 - Rip - DEBUG - Attempting to rip title00.mkv from Chriscrl
2015-11-19 21:08:49 - Makemkv - WARNING - Drive BD-ROM ATAPI iHES112   3 ML02 has RPC protection that can not be bypassed. Change drive region or update drive firmware from http://tdb.rpc1.org. Errors l$
2015-11-19 21:08:49 - Rip - INFO - It took 13 minute(s) to complete the ripping of title00.mkv from Chriscrl
2015-11-19 21:10:02 - Rip - DEBUG - Ripping initialised
2015-11-19 21:10:02 - Rip - DEBUG - Checking for DVDs
2015-11-19 21:10:03 - Rip - DEBUG - 1 DVD(s) found
2015-11-19 21:10:03 - Rip - INFO - Video folder Chriscrl already exists

This is how i'm running it now... I was previously running --rip and --compress, but noticed that it'll move on rename, so I changed to --all

*/5 * * * * python /home/will/Autorippr/autorippr.py --all --silent --debug

Edit: Sure enough, it's not compressing at all currently, even for Blurays. Changing it back to --rip --compress to see if it helps.

Edit 2: Nope... it's just not compressing anymore in this version.

Edit 3: Redid my config file incase I missed something... I ran it with Notification: True and it ran fine on a Bluray, so i'm not sure if that's the culprit or just something else i had missed. I'll test it a little further and let you know.

JasonMillward commented 8 years ago

I'll test it a little further and let you know.

Much appreciated

ascendedguard commented 8 years ago

Well, as far as I can tell, your script is working, but something changed with how it's doing encodes in this new version and I have no idea why. I manually compiled Handbrake months ago, so it's never updated, and it shouldn't rely on any other libraries.

My encoding settings are exactly the same, yet Plex can no longer read the videos that are output by Handbrake. Did anything change that would change how Handbrake encodes the videos?

In Plex I'm now getting these errors:

Nov 22, 2015 22:57:11 [0x7f65123fe700] ERROR - [Transcoder] Error while decoding stream #0:1: Invalid data found when processing input
Nov 22, 2015 22:57:11 [0x7f65103fa700] ERROR - [Transcoder] [mp3 @ 0x20e7d80] Header missing
Nov 22, 2015 22:57:11 [0x7f651c3fd700] ERROR - [Transcoder] Error while decoding stream #0:1: Invalid data found when processing input
Nov 22, 2015 22:57:11 [0x7f651cbfe700] ERROR - [Transcoder] [mp3 @ 0x20e7d80] Header missing
Nov 22, 2015 22:57:11 [0x7f65263fc700] ERROR - [Transcoder] Error while decoding stream #0:1: Invalid data found when processing input
Nov 22, 2015 22:57:11 [0x7f650fbf9700] ERROR - [Transcoder] [mp3 @ 0x20e7d80] Header missing
Nov 22, 2015 22:57:11 [0x7f65253ff700] ERROR - [Transcoder] Error while decoding stream #0:1: Invalid data found when processing input
Nov 22, 2015 22:57:11 [0x7f65123fe700] ERROR - [Transcoder] [mp3 @ 0x20e7d80] Header missing

Here are my compress settings, incase you have any idea:

compress:
    # Path to compression app (with trailing slash) in case it is unavailable in your $PATH
    compressionPath: ""

    # File format of compressed video (mkv, mp4, avi)
    format:     "mkv"

    # The compression application to use.
    #   handbrake: Compress the video using Handbrake
    #   ffmpeg:    Compress the video using FFmpeg
    type:       handbrake

    # The scheduling priority of the HandBrake program
    #   -20 is the highest (The task gets top priority)
    #    19 is the lowest  (The task get no priority and runs on spare CPU cycles)
    nice:       15

    # The HandBrake command line options and arguments
    # Configure this to change output quality
    # each line should start with -
    com:
        -   --x264-preset="slow"
        -   --two-pass
        -   --turbo
        -   -q 22
        -   --markers
        -   --x264-tune="film"
        -   --encoder="x264"
        -   -x level=4.1

    # Example FFmpeg command line
    #com:
    #    -   -map 0
    #    -   -c copy
    #    -   -c:v libx264
    #    -   -crf 20
    #    -   -preset medium

The videos play fine in VLC, and the only difference between the old and new videos I can tell is there's some new metadata information showing in the codec page. The old videos show no metadata information:

image

Either way, it seems like the original issue here is likely fixed. DVDs and Blurays both worked for all 3 stages, but I'm getting stumped on what possibly changed the encoding or why it's completely broken now.

JasonMillward commented 8 years ago

That's interesting, I'll recreate this as a new issue since the original one has been solved.