Kodi Community Forum

Full Version: [RELEASE] Luemmel's DVD-Ripper (Script) for Linux, Mac, and Windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
Pete_London Wrote:Hi Jon, or is it Hans (or both?)

Everything works fine from the command line but nada happens from the XBMC interface... how do I find a log of what's going wrong? the ones in ~/dvdripper are empty.

Thanks,

Pete

inn german I call me hans in english jon in french jean in spain juan in italiano jovanni in russan ivan

Ok did you adapt the settings from the script ... ? the command ssh as one of the main-parts ?

Regards
Linuxluemmel
Pete_London Wrote:Hi Jon, or is it Hans (or both?)

Everything works fine from the command line but nada happens from the XBMC interface... how do I find a log of what's going wrong? the ones in ~/dvdripper are empty.

Thanks,

Pete

I guess you have a problem with ssh
If you can login without a password under your user ... all logs are written to the directory
if you can not login ... nothings is written because all log-files are written from the scripts....

Regards
hans (german)
ok... I'll try it in the morning...

Pete / Pierre / Pablo / Pieter / Pedro Laugh
Man I was so excited to see this and followed the entire thread. Any luck on the windows side as of yet?

Sorry to pressure you if I am.
kizer Wrote:Man I was so excited to see this and followed the entire thread. Any luck on the windows side as of yet?

Sorry to pressure you if I am.

I allready said that after release 0.5H I work for the blue-pill.

- Blue pill will have the folliowing

- All settings are stored in a configuration file
- You can burn iso
- 2 modes of operartion (confirmend / default values)
- Dialog-Boxes to select directorys

But one thing I do not implement inside the blue-pill for linxu and windows
(I wonna call it Version 0.5H)

- Transcode

Because this would bypass the css or remove the css and make the script
illegal in a few countrys (france as example)

Regards
Hans

PS : At first I would like to make the red-pill release 0.5H
Pete_London Wrote:Hi Jon, or is it Hans (or both?)

Everything works fine from the command line but nada happens from the XBMC interface... how do I find a log of what's going wrong? the ones in ~/dvdripper are empty.

Thanks,

Pete

Every command I send over the script is written in clear-text inside the python-window.
Open the script -> do some action
and close the script

Right-click with the mouse "Debug-mode" and you should see a lot messages
including the commands that are send over ssh


As you allready said that all scripts are working ... the error must be by ssh.
Could you make a ssh like ssh user@localhost without prompting for any password ?

Regards
Hans
linuxluemmel Wrote:I allready said that after release 0.5H I work for the blue-pill.

- Blue pill will have the folliowing

- All settings are stored in a configuration file
- You can burn iso
- 2 modes of operartion (confirmend / default values)
- Dialog-Boxes to select directorys

But one thing I do not implement inside the blue-pill for linxu and windows
(I wonna call it Version 0.5H)

- Transcode

Because this would bypass the css or remove the css and make the script
illegal in a few countrys (france as example)

Regards
Hans

PS : At first I would like to make the red-pill release 0.5H

Thanks I must of some how miss-read it. I also got your dd.exe file to work in windows tinkering around with the command that the script generates, but didn't seem to work directly from XBMC, which you already know. I just thought I'd pass that along.
kizer Wrote:Thanks I must of some how miss-read it. I also got your dd.exe file to work in windows tinkering around with the command that the script generates, but didn't seem to work directly from XBMC, which you already know. I just thought I'd pass that along.

Of course does it work ...
Jus play a few secounds of the movie inside xbmc and do exit.

After this you can call dd with the right commands inside a batch-file ..
the iso would be created.

Regards
Hans
linuxluemmel Wrote:Every command I send over the script is written in clear-text inside the python-window.
Open the script -> do some action
and close the script

Right-click with the mouse "Debug-mode" and you should see a lot messages
including the commands that are send over ssh


As you allready said that all scripts are working ... the error must be by ssh.
Could you make a ssh like ssh user@localhost without prompting for any password ?

Regards
Hans

I could do the following in the next release ....

In the moment the log file for any process in generated at at the start of
of the script with
> path-to-log
after this any log will be append with
>> path-to-log

If would create the log file with

ssh ....... > path-to-log &

and if for some reason the ssh command is not accepted you would see it inside
the logs ...


Regards
Hans
linuxluemmel Wrote:Of course does it work ...
Jus play a few secounds of the movie inside xbmc and do exit.

After this you can call dd with the right commands inside a batch-file ..
the iso would be created.

Regards
Hans

Hmm, I'll test that this evening. I thought I caught a brief mention of that earlier. I'll report back later. Big Grin
Hi Jon,

Still getting no luck from the interface... I can ssh xbmc@localhost without being asked for a password, but when I try to transcode from the menu, the dvd drive light comes on for a second and then everything stops. The system just goes back to the dvd-red menu.

There's no log files generated. Any ideas?

Thanks,

Pete
Pete_London Wrote:Hi Jon,

Still getting no luck from the interface... I can ssh xbmc@localhost without being asked for a password, but when I try to transcode from the menu, the dvd drive light comes on for a second and then everything stops. The system just goes back to the dvd-red menu.

There's no log files generated. Any ideas?

Thanks,

Pete

Ok in the settings your user xbmc is written correct ? xbmc@localhost

Did you have a look in the debug-mode of the script to see the ssh-commands the script is generating ?

Regards
Hans
Hey Pete

As a sugestion I would make following enhancments in the function to transcode ?

Code:
#######################################################
# Function : show_transcode_menu                      #
#######################################################
# Parameter                                           #
# Device       DVD file or Device for transcoding     #
# Directory    Directory for storing the file         #
# FileName     Filename of the transcoded file        #
# VSelect      Selected Video Chapter                 #
# ASelect      Selected 1.Audio Track                 #
# Dual         Boolen Use Dual-Audio                  #
# ASelect2     Selected 2.Audio Track                 #
# ask          Boolean of confirmation                #
# do_default   Default menu entry                     #
# subyes       Boolean use subtitles                  #
# subaudio     Selected subtitle track                #
#                                                     #  
# Returns      0 False 1 True                         #
#######################################################
def show_transcode_menu(Device,Directory,FileName,Vselect,ASelect,Dual,ASelect2,ask,do_default,subyes,subaudio):

    if (ask):

        # Ask for the ssh-command

        kb = xbmc.Keyboard('default', 'heading', True)
        kb.setDefault(configuration[3])
        kb.setHeading(__language__(32017))
        kb.setHiddenInput(False)
        kb.doModal()
        if (kb.isConfirmed()):
           SSH = kb.getText()
        else:
           return(1)
    else:
        SSH = configuration[3]

    if (ask):
        dialog = xbmcgui.Dialog()
        choice  = dialog.select(__language__(32050) , [ __language__(32051), __language__(32052),__language__(32053),__language__(32054),
                                 __language__(32055)])
    else:
        choice = do_default  
        
    if (choice == 0):
        print 'transcode mpeg2'
        if (Dual == False) and (subyes == False):  
            command = SSH + ' ./dvd2mpeg2.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' &'
        if (Dual) and (subyes == False):
            command = SSH + ' ./dvd2mpeg2.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) + ' &'
        if (Dual == False) and (subyes):
            command = SSH + ' ./dvd2mpeg2.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -s ' + str(subaudio) + ' &'
        if (Dual) and (subyes):
            command = SSH + ' ./dvd2mpeg2.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) +  ' -s ' + str(subaudio) + ' &'
        sys.platform.startswith('linux')
        pid_process = 'dvd2mpeg2.sh'
        status = os.system("%s" % (command))

        # Inserted for better error-handling
        # special for pete ;_)

        print 'command with will be executed ->' + command


    if (choice == 1):
        print 'transcode iso'    
        if (Dual == False) and (subyes == False):
            command = SSH + ' ./dvd2iso.sh ' + Device + ' ' + Directory + ' ' + str(Vselect) + ' ' + str(ASelect) + ' &'
        if (Dual) and (subyes == False):
            command = SSH + ' ./dvd2iso.sh ' + Device + ' ' + Directory + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) + ' &'
        if (Dual == False) and (subyes):
            command = SSH + ' ./dvd2iso.sh ' + Device + ' ' + Directory + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -s ' + str(subaudio) + ' &'
        if (Dual) and (subyes):
            command = SSH + ' ./dvd2iso.sh ' + Device + ' ' + Directory + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) +  ' -s ' + str(subaudio) + ' &'
  
        sys.platform.startswith('linux')
        pid_process = 'dvd2iso.sh'
        status = os.system("%s" % (command))

        # Inserted for better error-handling
        # special for pete ;_)

        print 'command with will be executed ->' + command

    
    if (choice == 2):
        print 'transcode xvid '
        if (Dual == False) and (subyes == False):
            command = SSH + ' ./dvd2divx.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' &'
        if (Dual) and (subyes == False):
            command = SSH + ' ./dvd2divx.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) + ' &'
        if (Dual == False) and (subyes):
            command = SSH + ' ./dvd2divx.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -s ' + str(subaudio) + ' &'
        if (Dual) and (subyes):
            command = SSH + ' ./dvd2divx.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) +  ' -s ' + str(subaudio) + ' &'
        sys.platform.startswith('linux')
        pid_process = 'dvd2divx.sh'
        status = os.system("%s" % (command))

        # Inserted for better error-handling
        # special for pete ;_)

        print 'command with will be executed ->' + command


    if (choice == 3):
        print 'transcode h264'  
        if (Dual == False) and (subyes == False):
            command = SSH + ' ./dvd2h264.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' &'
        if (Dual) and (subyes == False):
            command = SSH + ' ./dvd2h264.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) + ' &'
        if (Dual == False) and (subyes):
            command = SSH + ' ./dvd2h264.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -s ' + str(subaudio) + ' &'
        if (Dual) and (subyes):
            command = SSH + ' ./dvd2h264.sh ' + Device + ' ' + Directory + ' ' + FileName + ' ' + str(Vselect) + ' ' + str(ASelect) + ' -a ' + str(ASelect2) +  ' -s '+ str(subaudio) + ' &'  
        sys.platform.startswith('linux')
        status = os.system("%s" % (command))
        pid_process = 'mp4.sh'

        # Inserted for better error-handling
        # special for pete ;_)

        print 'command with will be executed ->' + command


    if (choice == 4):
        print 'goto mainmenu'

    if (pid_process):

        print 'we search for : ' + pid_process

        # Inserted for better error-handling
        # special for pete ;
        # Increased time to sleep  
  
        time.sleep(5)    

        complet_command = "ps -axu |grep " + pid_process + " |grep -v grep |awk '{print $2}' > ~/TRANSCODE_PID"          
        status = os.system("%s" % (complet_command))  

        # if PID contains zero size .... whe have a problem ...

        pid_path = (os.getenv("HOME") + '/TRANSCODE_PID')
        stat_info = os.stat(pid_path)
        file_of_pid_transcode = stat_info[stat.ST_SIZE]
    
        if (file_of_pid_transcode  != 0):      
            f = open(pid_path,'r')
            pid_transcode = int(f.readline())
            f.close
            os.remove(pid_path)
            if (pid_transcode):
                transcode_startet()  

    print 'leave transcode menu'  
    return(0)  
#######################################################
OK.. time to sound dumb... how do I do that?
Pete_London Wrote:OK.. time to sound dumb... how do I do that?

Make a copy of default.py to default-py-red and insert the above function
with a editor of your choice .... the old function do please delete ....
I added a few lines of code for better error-handling

print 'command with will be executed ->' + command

This will print the ssh-command

CU Hans
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44