Windows - One Button DVD/BluRay Ripping using a Launcher from within XBMC

  Thread Rating:
  • 9 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
talon_card Offline
Junior Member
Posts: 2
Joined: Feb 2014
Reputation: 0
Post: #316
G'day everyone,

First of all, thank you so much for all the time and effort you've put into this Spinalcrack. It's really quite impressive.

Now I have found a glitch of sorts and have been trying to figure out the solution. I'm trying to rip a the TV series grey's anatomy Season 1 and I've found that the volID which it parses to MakeMKV is most likely what's causing the problem. The DVD's title is "GA10EUT1_ " Note the trailing spaces and the underscore. EDIT: When posting the extra spaces have been removed, but there are 16 spaces following the underscore, ie the rest of the title is filled with spaces.

Now I've been going through the processcontd function and I can see that the name should be modified somewhat there, however after MakeMKV analyses the disk, MakeMKV returned with a path error as follows;

"Error 'OS error - the system cannot find the path specified' occurred while creating 'E:\movies\GA10EUT1 /title00.mkv" which repeats for all MKV's which would normally be saved (title00 to title05 in this case).

Obviously since that's an invalid path it's not going to work, but does has anyone had this before? And furthermore, does anyone know what I should add in to truncate those paths so that it can work?

The directory E:\movies\GA10EUT1 is created, however it is empty after the script is run.

This is the only DVD I've tested so far which causes this, normally I'd work around this as it's a once off. However I'm using this script in an attempt to make a completely noob friendly UI for XBMC for other users

Edit: one last thing, The script I'm using is your most recent version available from downloads. The only modification I've made so far is adding changing the minimum title seconds to 1020 (so that the TV ep's are found) and adding PAUSE after running MakeMKV so that I can view the errors.

Thanks,
Talon_Card
(This post was last modified: 2014-02-22 12:21 by talon_card.)
find quote
Spinalcrack Offline
Senior Member
Posts: 117
Joined: Jul 2011
Reputation: 10
Post: #317
That is really bizarre because this code

Code:
:processcontd
set nospace=%volid%
echo [%nospace%]
echo.
for /f "tokens=* delims= " %%A in ('echo %nospace% ') do set nospace=%%A
set nospace=%nospace:~0,-1%
echo [%nospace%]
set volid=%nospace%
echo: %volid%

removes the trailing spaces, so this shouldn't happen. Can you please post the entire batch file?
(This post was last modified: 2014-02-22 14:42 by Spinalcrack.)
find quote
Niksal12 Offline
Junior Member
Posts: 2
Joined: Mar 2014
Reputation: 0
Post: #318
I am trying to rip all of the movies in my collection which is about 800 movies. I have a tower in my closet that has 4 DVD drives, I used this script and it does not want to work. I installed it into 4 different directories and edit each of the 4 bat files. Each bat file is looking at each individual drive and saving to the same folder, so I run the bat file and it sees each individual movie with no issues. however when it starts MakeMKV each instance starts to read the same single disc. Any help would be appriciated.

EDIT: I figured that part out, it was an edit that had to be make when it calls for makemkv to start. Now I am having another issue, when one disc finishes it ejects the one that is done as well as the 3 other drives. This is the complete vbs script. How would i edit this so it only ejects one disc at a time?
Code:
Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'As Scripting.FileSystemObject
Const CDROM = 4
    On Error Resume Next
    Set fs = CreateObject("Scripting.FileSystemObject")
    strDriveLetter = ""
    For intDriveLetter = Asc("A") To Asc("Z")
        Err.Clear
        If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
            If Err.Number = 0 Then
                strDriveLetter = Chr(intDriveLetter)
                Exit For
            End If
        End If
    Next
'MSGBOX "YOUR CD IS: " & strDriveLetter,VBOKONLY + 48,"CDROM=> " & strDriveLetter

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
     For d = 0 to colCDROMs.Count - 1
           colCDROMs.Item(d).Eject  
Next 'null
set owmp = nothing
set colCDROMs = nothing
wscript.quit
(This post was last modified: 2014-03-01 05:05 by Niksal12.)
find quote
Spinalcrack Offline
Senior Member
Posts: 117
Joined: Jul 2011
Reputation: 10
Post: #319
(2014-03-01 02:41)Niksal12 Wrote:  I am trying to rip all of the movies in my collection which is about 800 movies. I have a tower in my closet that has 4 DVD drives, I used this script and it does not want to work. I installed it into 4 different directories and edit each of the 4 bat files. Each bat file is looking at each individual drive and saving to the same folder, so I run the bat file and it sees each individual movie with no issues. however when it starts MakeMKV each instance starts to read the same single disc. Any help would be appriciated.

EDIT: I figured that part out, it was an edit that had to be make when it calls for makemkv to start. Now I am having another issue, when one disc finishes it ejects the one that is done as well as the 3 other drives. This is the complete vbs script. How would i edit this so it only ejects one disc at a time?
Code:
Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'As Scripting.FileSystemObject
Const CDROM = 4
    On Error Resume Next
    Set fs = CreateObject("Scripting.FileSystemObject")
    strDriveLetter = ""
    For intDriveLetter = Asc("A") To Asc("Z")
        Err.Clear
        If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
            If Err.Number = 0 Then
                strDriveLetter = Chr(intDriveLetter)
                Exit For
            End If
        End If
    Next
'MSGBOX "YOUR CD IS: " & strDriveLetter,VBOKONLY + 48,"CDROM=> " & strDriveLetter

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
     For d = 0 to colCDROMs.Count - 1
           colCDROMs.Item(d).Eject  
Next 'null
set owmp = nothing
set colCDROMs = nothing
wscript.quit

Replace the AutoRipComplete.vbs to this for each install of AutoRipDVD

Code:
Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'As Scripting.FileSystemObject
Const CDROM = 4
    On Error Resume Next
    Set fs = CreateObject("Scripting.FileSystemObject")
    strDriveLetter = ""
    For intDriveLetter = Asc("A") To Asc("Z")
        Err.Clear
        If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
            If Err.Number = 0 Then
                strDriveLetter = Chr(intDriveLetter)
                Exit For
            End If
        End If
    Next
'MSGBOX "YOUR CD IS: " & strDriveLetter,VBOKONLY + 48,"CDROM=> " & strDriveLetter

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
colCDROMs.Item(0).Eject
set owmp = nothing
set colCDROMs = nothing
wscript.quit

Where it says

colCDROMs.Item(0).Eject

Change the number to change which drive it ejects. 0 = D: 1 = E: etc ie colCDROMs.Item(1).Eject or colCDROMs.Item(2).Eject etc. Just change that number save and then double click the vbs file to see which drive ejects. Don't have to do a whole rip to test or anything.

Cheers!
(This post was last modified: 2014-03-01 08:22 by Spinalcrack.)
find quote
Niksal12 Offline
Junior Member
Posts: 2
Joined: Mar 2014
Reputation: 0
Post: #320
Awesome thank you, that worked. I love this add in it has made this process soooo much easier compared to going into make mkv each time.
find quote
Spinalcrack Offline
Senior Member
Posts: 117
Joined: Jul 2011
Reputation: 10
Post: #321
Awesome! I'm really happy you're enjoying it. It'll be great to have your whole collection in xmbc with the fanart etc.
find quote
talon_card Offline
Junior Member
Posts: 2
Joined: Feb 2014
Reputation: 0
Post: #322
Hi again,

(sorry for how long it took for me to get back to this thread, I'm balancing uni work and this project)

As I mentioned, this script should be identical to the script provided in the installer, the only changes I've made in this one are the destination path to dump movies, the minimum title length, and also I've added PAUSE after makemkvcon64.exe is run for debugging.

Here's my current script

Code:
@Echo offSetlocal enableextensions
::******************************************************************************​***************
::*** AutoRipDVD is brought to you by Spinalcracker
::******************************************************************************​***************
::
::******************************************************************************​***************
::***  Change the following variables to match your setup
::******************************************************************************​***************
::
::*** DriveLetter=The drive letter of your DVD or Blu-Ray drive ie. D: or G: etc
::
::------------------------------
Set DriveLetter=D:
::------------------------------
::
::*** RipDir=Where you want your DVD ripped to ie. your xbmc movie folder *BE SURE TO INCLUDE TRAILING \
::
::------------------------------
Set RipDir=C:\Movies\
::------------------------------
::
::*** IntDir=Where you installed MakeMKV to
::
::----------------------------------------
Set IntDir=C:\Program Files (x86)\MakeMKV
::----------------------------------------
::
::*** ScriptPath=Where the files for this script are located with trailing "\" ie. Where AutoRipComplete.vbs & Beep.vbs are located *BE SURE TO INCLUDE TRAILING \
::
::------------------------------------
Set ScriptPath=C:\Program Files (x86)\AutoRipDVD\
::------------------------------------
::
::*** RipMinSeconds=Minimum time in seconds that should be ripped off disk to avoid getting previews etc.  Default is 3600 seconds or 1 hour
::
::---------------------
Set RipMinSeconds=1080
::---------------------
::
::*** Using Handbrake to compress - Yes or No?
::
::------------------------------------
Set Handbrake=No
::------------------------------------
::
::*** Sets the install path to handbrake
::
::------------------------------------
Set Handbrakepath=C:\Program Files (x86)\Handbrake\
::------------------------------------
::
::*** Sets the level of compression in Handbrake so unless you really know what you are doing, do NOT adjust this next setting!
::
::------------------------------------
Set X264=b-adapt=2:rc-lookahead=50:me=umh:bframes=5:ref=6:direct=auto:trellis=2:subq=10:psy-rd=1.0,0.10:analyse=all
::------------------------------------
::
::*** Sets the format of the new compressed file, so again, unless you know what you are doing, please leave it as mkv!
::
::------------------------------------
Set FORMAT=--optimize --format mkv
::------------------------------------
::
::*** Sets the quality to something visually appealing but in a small files size - play with this if your outcome isn't to your liking
::
::------------------------------------
Set QUALITY=--ab 64 --mixdown mono --quality 23 -e x264 -x %X264%
::------------------------------------
::
::*** Sets the output to 720p resolution - change if you prefer something else
::
::------------------------------------
Set SIZE=--width 1280 --height 720
::------------------------------------
::
::******************************************************************************​***************
::******************************************************************************​***************
::******* DO NOT EDIT ANYTHING BELOW THIS!!!!!!************************************************
::******************************************************************************​***************
::******************************************************************************​***************



::For /f %%# In ('Mountvol^|Findstr [d-z]:\\') Do (
::        Fsutil fsinfo drivetype %%#|Find "CD-ROM">Nul&&(Set "CDROM=%%~d#"))
::If Not Defined CDROM call :NoDrive


for /f "tokens=1-5*" %%1 in ('vol %DriveLetter%') do (
    set volid=%%6 & goto processcontd
)

:processcontd
set nospace=%volid%
echo [%nospace%]
echo.
for /f "tokens=* delims= " %%A in ('echo %nospace% ') do set nospace=%%A
set nospace=%nospace:~0,-1%
echo [%nospace%]
set volid=%nospace%
echo: %volid%



set str=%volid%
echo.%str%
set str=%str:_= %
echo.%str%
set volid=%str%
If "%volid%"=="_= " call :NoDrive

Echo:Ripping %volid% now...

mkdir "%RipDir%%volid%"

cd /d "%ScriptPath%"
OSDAutoRip.hta

cd /d "%IntDir%"
makemkvcon64.exe --minlength=%RipMinSeconds% mkv disc:0 all "%RipDir%%volid%"

PAUSE

SET _tmpPath="%RipDir%%volid%"
cd /d %_tmpPath%
for %%i in ("title*.mkv") do (set fname=%%i) & call :rename

If %Handbrake%==Yes call :HBEncode

cd /d "%ScriptPath%"
AutoRipComplete.vbs
cscript Beep.vbs
exit

:NoDrive
cd /d "%ScriptPath%"
cscript Beep.vbs
NoDiskDrive.hta
AutoRipComplete.vbs
exit

:HBEncode
cd /d "%Handbrakepath%"
HandBrakeCLI -v0 -i "%RipDir%%volid%" -o "%RipDir%%volid%\%volid% 720p.mkv" %FORMAT% %QUALITY% %SIZE%
cd /d %_tmpPath%
del "%volid%_*.mkv"

:rename
::Cuts off 1st 5 characters of fname, then appends prefix
ren %fname% "%volid%"_%fname:~5%

Now here's what I probably should have included in my first post to give a better idea of what's happening

Here's a screenshot of MakeMKV encountering problems with the path and paused immediately after
http://imgur.com/2vlQHY6

And here's the title of the DVD with the highlighted extra spaces
http://imgur.com/zGCZ9Gd

Right now I'm running this on my own laptop directly via the script, but I'm getting the same problem with the same disk on the rig running XBMC. (I figured trying different hardware might be worth a shot)

Also, if I run Make MKV via the Gui it can handle the paths okay, and the rip works out fine (but it doesn't do any naming so that's to be expected)
(This post was last modified: 2014-03-03 03:27 by talon_card.)
find quote
Spinalcrack Offline
Senior Member
Posts: 117
Joined: Jul 2011
Reputation: 10
Post: #323
The underscore is probably getting created as the directory name, but is getting stripped out by the script when trying to write the MakeMKV files so can't find the path. I can take more of a look later when I'm home.
find quote
Post Reply