JasonMillward / Autorippr

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

MakeMKV error preventing Autorippr from continuing #64

Closed ericmatthys closed 9 years ago

ericmatthys commented 9 years ago

I am running into an error that prevents Autorippr from compressing the video. The error mentioned in the debug logs doesn't appear to be fatal and it doesn't happen until the video has been completely ripped. There is an mkv file in the tmp directory that plays fine all the way through with VLC. I tried using MakeMKV separately and it handled the dvd perfectly fine. Any advice on how to 1) prevent the error or 2) allow Autorippr past the error so it can compress the video?

± python autorippr.py --all --debug
2014-10-25 14:46:06 - Rip - DEBUG - Ripping initialised
2014-10-25 14:46:06 - Rip - DEBUG - Checking for DVDs
2014-10-25 14:46:09 - Rip - DEBUG - 1 DVDs found
2014-10-25 14:46:21 - Makemkv - DEBUG - MakeMKV found 1 titles
2014-10-25 14:46:21 - Makemkv - DEBUG - Title number: 0
2014-10-25 14:46:21 - Makemkv - DEBUG - ['Test']
2014-10-25 15:35:10 - Makemkv - ERROR - Profile parsing error: default profile missing, using builtin default
2014-10-25 15:35:10 - Rip - INFO - MakeMKV did not did not complete successfully
2014-10-25 15:35:10 - Rip - INFO - See log for more details
2014-10-25 15:35:10 - Rip - DEBUG - Movie title: Test
2014-10-25 15:35:10 - Compress - DEBUG - Compressing initialised
2014-10-25 15:35:10 - Compress - DEBUG - Looking for movies to compress
2014-10-25 15:35:10 - Compress - INFO - Queue does not exist or is empty
2014-10-25 15:35:10 - Extras - INFO - No movies ready for filebot
JasonMillward commented 9 years ago

Interesting.

What OS & version are you running?

ericmatthys commented 9 years ago

It's a fresh OSX Yosemite install.

JasonMillward commented 9 years ago

If you could check out /usr/share/MakeMKV (should be the same on OSX) and look for mmcp.xml files, there should be 4. (3 since you're missing the default)

-rw-r--r--   1 root root 8.6K Oct 27 18:54 aac-stereo.mmcp.xml
-rw-r--r--   1 root root 2.6K Oct 27 18:54 default.mmcp.xml
-rw-r--r--   1 root root 4.3K Oct 27 18:54 flac.mmcp.xml
-rw-r--r--   1 root root 3.2K Oct 27 18:54 wdtv.mmcp.xml

If you're only missing the default you might need to reinstall makemkv again, or I can share a copy of the file with you.

If this is the wrong directory you can try to find other mmcp.xml files using find /usr -name "*.mmcp.xml" or even find / -name "*.mmcp.xml"

ericmatthys commented 9 years ago

The mmcp.xml files are in /Applications/MakeMKV.app/Contents/Resources/, but not /user/share/MakeMKV. There is no MakeMKV directory within /usr/share actually. Should I copy the files there?

Thanks for the help, and for your work on this script, btw.

JasonMillward commented 9 years ago

No, I don't think you should copy the files if the directory doesn't exist.

Can you checkout branch issue-64 and test my change? It should skip over profile parse errors now

I don't have access to my usual development environment for now and I made the change in the browser so it may or may not work.

ericmatthys commented 9 years ago

That got me to the compressing state, but there was an error.

± python autorippr.py --all --debug
2014-10-31 09:05:43 - Rip - DEBUG - Ripping initialised
2014-10-31 09:05:43 - Rip - DEBUG - Checking for DVDs
2014-10-31 09:05:46 - Rip - DEBUG - 1 DVDs found
2014-10-31 09:05:58 - Makemkv - DEBUG - MakeMKV found 1 titles
2014-10-31 09:05:58 - Makemkv - DEBUG - Title number: 0
2014-10-31 09:05:58 - Makemkv - DEBUG - ['TestMovie']
2014-10-31 09:50:32 - Eject - DEBUG - Ejecting drive: "/dev/rdisk2"
2014-10-31 09:50:32 - Eject - DEBUG - Attempting OS detection
2014-10-31 09:50:32 - Eject - DEBUG - OS detected as OSX
2014-10-31 09:50:37 - Rip - INFO - It took 44 minute(s) to complete the ripping of TestMovie
2014-10-31 09:50:37 - Compress - DEBUG - Compressing initialised
2014-10-31 09:50:37 - Compress - DEBUG - Looking for movies to compress
2014-10-31 09:50:38 - Compress - INFO - Compressing TestMovie
2014-10-31 09:50:38 - HandBrake - ERROR - HandBrakeCLI (compress) returned status code: 2
2014-10-31 09:50:38 - HandBrake - DEBUG - /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
2014-10-31 09:50:38 - HandBrake - DEBUG - /bin/sh: -c: line 1: syntax error: unexpected end of file
2014-10-31 09:50:38 - HandBrake - DEBUG - 
2014-10-31 09:50:38 - Compress - INFO - HandBrake did not complete successfully
2014-10-31 09:50:38 - Extras - INFO - No movies ready for filebot
JasonMillward commented 9 years ago

Can you pull issue-64 and reply with the debug output? I added the command to run to the debug output since that appears to be related to the the issue you're having now.

And I'll need to investigate compatibility issues with /bin/sh and /bin/bash

ericmatthys commented 9 years ago

I'm away from my setup currently but I can try next week. I'm using zsh btw.

ericmatthys commented 9 years ago

My most recent attempt failed for a different reason. The title was odd. I'll have to try another disc.

± python autorippr.py --all --debug
2014-11-14 14:14:38 - Rip - DEBUG - Ripping initialised
2014-11-14 14:14:38 - Rip - DEBUG - Checking for DVDs
2014-11-14 14:14:46 - Rip - DEBUG - 1 DVDs found
2014-11-14 14:15:01 - Makemkv - DEBUG - MakeMKV found 1 titles
2014-11-14 14:15:01 - Makemkv - DEBUG - Title number: 0
2014-11-14 14:15:01 - Makemkv - DEBUG - ['\xc2\xa0']
2014-11-14 14:55:42 - Eject - DEBUG - Ejecting drive: "/dev/rdisk2"
2014-11-14 14:55:42 - Eject - DEBUG - Attempting OS detection
2014-11-14 14:55:42 - Eject - DEBUG - OS detected as OSX
2014-11-14 14:55:48 - Rip - INFO - It took 40 minute(s) to complete the ripping of Test
2014-11-14 14:55:48 - Compress - DEBUG - Compressing initialised
2014-11-14 14:55:48 - Compress - DEBUG - Looking for movies to compress
2014-11-14 14:55:48 - Compress - INFO - Compressing Test
Traceback (most recent call last):
  File "autorippr.py", line 329, in <module>
    compress(config)
  File "autorippr.py", line 219, in compress
    dbMovie=dbMovie
  File "...Autorippr/classes/handbrake.py", line 89, in compress
    ' '.join(args)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 25: ordinal not in range(128)
JasonMillward commented 9 years ago

Just letting you know I have not forgotten about this.

I've cloned my Autorippr dev VM and changed the shell to zsh and I plan on using it to find out what's going on.

ericmatthys commented 9 years ago

Ok I tried again with the latest commit and there was an issue in my Handbrake config. I think this can be closed now.