Announce: CDplayer plugin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bpa
    Senior Member
    • Oct 2005
    • 22880

    #16
    Try

    cdda2wav device=0,0,0 -verbose-level=toc -N -g -J

    If that works put 0,0,0 in the settings which had "/dev/cdrom"

    Comment

    • Ramage
      Senior Member
      • May 2006
      • 768

      #17
      Originally posted by bpa
      Try

      cdda2wav device=0,0,0 -verbose-level=toc -N -g -J

      If that works put 0,0,0 in the settings which had "/dev/cdrom"
      Tried cdda2wav device=0,0,0 -verbose-level=toc -N -g -J and got 2 messages:

      Code:
      WARNING: the deprecated pseudo SCSI syntax found as device specification.
      Support for that may cease in the future versions of wodim. For now,
      the device will be mapped to a block device file where possible.
      Run "wodim --devices" for details.
      Segmentation fault
      Then:

      Code:
      Unable to open this SCSI ID. Trying to map to old ATA syntax.This workaround will disappear in the near future. Fix your configuration.
      ran wodim --devices and got:

      Code:
      wodim: Overview of accessible drives (1 found) :
      -------------------------------------------------------------------------
       0  dev='/dev/scd0'     rwrw-- : 'COMBO' 'IDE5232CO'
      -------------------------------------------------------------------------
      tried /dev/scd0 in CDplayer - got error as before:

      Error loading CD index - (-1) No CD in drive'

      tried 0,0,0 in CDplayer and got a different error:

      Error loading CD index - (-1) CD drive is in use. Wait and then try again'

      I feel we are making progress but - any other suggestions?
      P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
      AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
      Dell 10v WinXP SBS 7.5.2 - r31264
      Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
      Players: Classic, Duet, Boom

      Comment

      • bpa
        Senior Member
        • Oct 2005
        • 22880

        #18
        Error loading CD index - (-1) No CD in drive'
        That looks good - I think the only condition this appear is when cdda2wav generates the "load cdrom please and press enter" message.
        Error loading CD index - (-1) CD drive is in use. Wait and then try again'
        Not as good as it might seem, That error is one generated by CDplayer supposedly when two user interfaces (e.g. Webui and remote) are trying to get the CD player to read TOC at the same time.

        Don't try using CDplayer until you can get a list of the tracks on a CD by using this command.

        cdda2wav device=DEVICENAME -verbose-level=toc -N -g -J

        If there is no CD in the drive you will get a message like
        Code:
        Type: ROM, Vendor 'SONY    ' Model 'DVD RW DW-Q120A ' Revision 'PYS2' MMC+CDDA
        load cdrom please and press enter
        If there is a CD in the drive you will get text like
        Code:
        569344 bytes buffer memory requested, 4 buffers, 55 sectors
        #Cdda2wav version 2.01_linux_2.6.16_i686_athlon, real time sched., soundcard, libparanoia support
        Tracks:20 78:24.05
        CDINDEX discid: 8xzquqrhU1Fnpbi.s79KJ_r.BhU-
        CDDB discid: 0x35126014
        CD-Text: not detected
        CD-Extra: not detected
        Album title: '' from ''
        T01:       0  4:27.10 audio linear copydenied stereo title '' from ''
        T02:   20035  3:27.67 audio linear copydenied stereo title '' from ''
        from ''
        .
        .
        .
        T20:  334995  3:57.35 audio linear copydenied stereo title '' from ''
        Leadout:  352805
        Is there a way you can get icedax to rip an CD and while it is ripping, do a "ps" command to get the command line which is being used. It would show the device name being used.

        Modern CDROM drive are intelligent and their onboard controllers remember and buffer too much including errors. I usually remove CD and re-insert CD between test runs of cdda2wav as this resets the controller's internal state.

        Comment

        • bpa
          Senior Member
          • Oct 2005
          • 22880

          #19
          Googling - There are lots of users with issues about Ubuntui abd Cdda2wav. It looks like Ubuntu builders have done something to the cdda2wav when they changed it into icedax.

          Amongst others see
          # ll /dev/scd0 brw-rw---- 1 root cdrom 11, 0 2007-08-24 12:36 /dev/scd0 #LANG=C id uid=1000(qwertz) gid=1000(qwertz) groups=4(adm),6(disk),8(mail),24(cdrom),25(floppy),26(tape),29(audio),30(dip),40(src),46(plugdev),106(lpadmin),108(scanner),121(admin),129(fuse),1000(qwertz) # icedax -B -e -D /dev/scd0 2>&1 | head -50 Type: ROM, Vendor 'PLEXTOR ' Model 'CD-ROM PX-12TS ' Revision '1.02' no MMC 765952 bytes buffer memory requested, 4 buffers, 75 sectors Read TOC CD Text failed (probably not ...

          Comment

          • Ramage
            Senior Member
            • May 2006
            • 768

            #20
            Originally posted by bpa
            Googling - There are lots of users with issues about Ubuntui abd Cdda2wav. It looks like Ubuntu builders have done something to the cdda2wav when they changed it into icedax.

            Amongst others see
            https://bugs.launchpad.net/ubuntu/+s...it/+bug/134493
            Thanks for the help and info, I'll do some more research. BTW I get a similar message to the reporter of the bug above when running icedax.
            P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
            AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
            Dell 10v WinXP SBS 7.5.2 - r31264
            Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
            Players: Classic, Duet, Boom

            Comment

            • Ramage
              Senior Member
              • May 2006
              • 768

              #21
              Tried this command and the cd tracks played:
              Code:
               sudo icedax -B -e -D /dev/scd0 2>&1 | head -50
              Type: ROM, Vendor 'COMBO   ' Model 'IDE5232CO       ' Revision 'L054' MMC+CDDA
              569344 bytes buffer memory requested, 4 buffers, 55 sectors
              Read TOC CD Text failed (probably not supported).
              #icedax version 1.1.6, real time sched., soundcard, libparanoia support
              AUDIOtrack pre-emphasis  copy-permitted tracktype channels
                    1-11           no              no     audio    2
              Table of Contents: total tracks:11, (total time 66:38.25)
                1.( 5:44.00),  2.( 6:16.00),  3.( 5:42.00),  4.( 7:39.00),  5.( 7:01.00),
                6.( 3:02.00),  7.( 3:41.00),  8.( 9:33.00),  9.( 4:50.00), 10.( 8:00.00),
               11.( 5:10.25)
              
              Table of Contents: starting sectors
                1.(       0),  2.(   25800),  3.(   54000),  4.(   79650),  5.(  114075),
                6.(  145650),  7.(  159300),  8.(  175875),  9.(  218850), 10.(  240600),
               11.(  276600), lead-out(  299875)
              CDINDEX discid: 8FmvTpfOkxeFRjZVdRUW8zuZPB4-
              CDDB discid: 0x820f9e0b
              CD-Text: not detected
              CD-Extra: not detected
              samplefile size will be 705306044 bytes.
              recording 3998.3333 seconds stereo with 16 bits @ 44100.0 Hz ->'audio'...
              percent_done:
              The catch is, I get a permission denied message and no playback except as root (sudo).

              Can the plugin be modified to run cdda2wav as root?
              Last edited by Ramage; 2008-05-06, 14:00. Reason: correction
              P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
              AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
              Dell 10v WinXP SBS 7.5.2 - r31264
              Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
              Players: Classic, Duet, Boom

              Comment

              • bpa
                Senior Member
                • Oct 2005
                • 22880

                #22
                The problem might be ownership and permissions of the /dev/scd0 device.

                Can you check the /dev/scd0 and give +rw to the world. Failing that change the ownership to your current id when testing.

                Otherwise you could do a "chmod +s" on cdda2wav but I hate doing that.

                Comment

                • Ramage
                  Senior Member
                  • May 2006
                  • 768

                  #23
                  Originally posted by bpa
                  The problem might be ownership and permissions of the /dev/scd0 device.

                  Can you check the /dev/scd0 and give +rw to the world. Failing that change the ownership to your current id when testing.

                  Otherwise you could do a "chmod +s" on cdda2wav but I hate doing that.
                  Yes. Both your suggested changes worked, and the music plays. Brilliant

                  Many thanks Bryan, I knew you could fix it
                  P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
                  AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
                  Dell 10v WinXP SBS 7.5.2 - r31264
                  Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
                  Players: Classic, Duet, Boom

                  Comment

                  • Ramage
                    Senior Member
                    • May 2006
                    • 768

                    #24
                    Originally posted by Ramage
                    Yes. Both your suggested changes worked, and the music plays. Brilliant

                    Many thanks Bryan, I knew you could fix it
                    One more thing, (sods law) on reboot /dev/scd0 is reset to the original permissions.

                    To overcome this add the command sudo chmod 666 /dev/scd0 to /etc/init.d/rc.local
                    P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
                    AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
                    Dell 10v WinXP SBS 7.5.2 - r31264
                    Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
                    Players: Classic, Duet, Boom

                    Comment

                    • bpa
                      Senior Member
                      • Oct 2005
                      • 22880

                      #25
                      Danco & other OSX users.
                      I don't know if you could issue a mount command, look for a line containing cddafs, and then pick up the disk number from the start of that line.
                      I've modified Bin/cdda2wavosx.sh and added the above
                      Code:
                       echo "cdda2wav script running " 1>&2
                       echo "command: $* \n\n"1>&2
                      [color=blue]
                       disk=`mount | grep cddafs | cut -d" " -f1`
                       if [ -n "$disk" ] ; then 
                        echo diskutil unmount $disk 1>&2
                       else
                        echo "No mounted cddafs found\n" 1>&2
                       fi
                      [/color]
                       "$app" $*
                      A new cdda2wavosx.sh file is attached for testing.
                      Edit: This attachment has been corrected to remove the errors found in the next few posts.
                      Last edited by bpa; 2008-05-07, 08:36.

                      Comment

                      • bhaagensen
                        Senior Member
                        • Sep 2006
                        • 1361

                        #26
                        Hi,

                        Regarding the dev access issue on Linux a, perhaps more acceptable, solution is to add the squeezecenter user to the cdrom group. 'sudo usemod -a -G cdrom squeezecenter'. This is on Ubuntu, but I believe hardware access control is done similarily on other distors.

                        Btw. bpa thanks for a very cool plugin.

                        Comment

                        • Ramage
                          Senior Member
                          • May 2006
                          • 768

                          #27
                          Originally posted by bhaagensen
                          Hi,

                          Regarding the dev access issue on Linux a, perhaps more acceptable, solution is to add the squeezecenter user to the cdrom group. 'sudo usemod -a -G cdrom squeezecenter'. This is on Ubuntu, but I believe hardware access control is done similarily on other distors.

                          Btw. bpa thanks for a very cool plugin.
                          Yes, good suggestion, I'll try that.
                          P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
                          AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
                          Dell 10v WinXP SBS 7.5.2 - r31264
                          Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
                          Players: Classic, Duet, Boom

                          Comment

                          • Ramage
                            Senior Member
                            • May 2006
                            • 768

                            #28
                            Originally posted by bhaagensen
                            Hi,

                            Regarding the dev access issue on Linux a, perhaps more acceptable, solution is to add the squeezecenter user to the cdrom group. 'sudo usemod -a -G cdrom squeezecenter'. This is on Ubuntu, but I believe hardware access control is done similarily on other distors.

                            Btw. bpa thanks for a very cool plugin.
                            added squeezecenter to group cdrom but could not access the cdrom using CDplayer (BTW you have a typo, the command is "usermod").

                            Do you have it working on ubuntu 8.04?
                            P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
                            AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
                            Dell 10v WinXP SBS 7.5.2 - r31264
                            Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
                            Players: Classic, Duet, Boom

                            Comment

                            • danco
                              Senior Member
                              • Apr 2005
                              • 1573

                              #29
                              The new version of the .sh program doesn't get it working. It unpacked as cdda2wav2.sh but even removing that last 2 did not help.

                              I ran SqueezeCenter from Terminal, and here's the report I got.

                              [08-05-06 19:07:06.0590] Plugins::CDplayer::CDhandler::setMode (119) setmode called
                              [08-05-06 19:07:06.0594] Plugins::CDplayer::CDhandler::LoadCDandIdentify (135) Request to load CD and identify
                              [08-05-06 19:07:06.0600] Slim::Utils::Misc::msg (1241) Warning: [19:07:06.0598] Backtrace:

                              frame 0: Plugins::CDplayer::CDhandler::LoadCDandIdentify (/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/CDhandler.pm line 121)
                              frame 1: Plugins::CDplayer::CDhandler::setMode (/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/CDhandler.pm line 86)
                              frame 2: Plugins::CDplayer::CDhandler::__ANON__ (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Common.pm line 1715)
                              frame 3: (eval) (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Common.pm line 1715)
                              frame 4: Slim::Buttons::Common:ushMode (/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/Plugin.pm line 166)
                              frame 5: Plugins::CDplayer::Plugin::setMode (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Plugin/Base.pm line 29)
                              frame 6: Slim::Plugin::Base::__ANON__ (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Common.pm line 1715)
                              frame 7: (eval) (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Common.pm line 1715)
                              frame 8: Slim::Buttons::Common:ushMode (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Common.pm line 1868)
                              frame 9: Slim::Buttons::Common:ushModeLeft (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Home.pm line 492)
                              frame 10: Slim::Buttons::Home::homeExitHandler (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Input/List.pm line 489)
                              frame 11: Slim::Buttons::Input::List::exitInput (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Buttons/Input/List.pm line 135)
                              frame 12: Slim::Buttons::Input::List::__ANON__ (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Hardware/IR.pm line 1006)
                              frame 13: Slim::Hardware::IR::executeButton (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Commands.pm line 157)
                              frame 14: Slim::Control::Commands::buttonCommand (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 1746)
                              frame 15: (eval) (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 1746)
                              frame 16: Slim::Control::Request::execute (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 815)
                              frame 17: Slim::Control::Request::executeRequest (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Client.pm line 563)
                              frame 18: Slim::Player::Client::execute (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Hardware/IR.pm line 1027)
                              frame 19: Slim::Hardware::IR:rocessCode (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Hardware/IR.pm line 726)
                              frame 20: Slim::Hardware::IR:rocessIR (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Commands.pm line 318)
                              frame 21: Slim::Control::Commands::irCommand (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 1746)
                              frame 22: (eval) (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 1746)
                              frame 23: Slim::Control::Request::execute (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Control/Request.pm line 815)
                              frame 24: Slim::Control::Request::executeRequest (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Client.pm line 563)
                              frame 25: Slim::Player::Client::execute (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Hardware/IR.pm line 117)
                              frame 26: Slim::Hardware::IR::idle (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/slimserver.pl line 479)
                              frame 27: main::idle (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/slimserver.pl line 453)
                              frame 28: main::main (/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/slimserver.pl line 1005)

                              [08-05-06 19:07:06.0605] Plugins::CDplayer::CDhandler::LoadCDandIdentify (137) cd use is 0 Busy=1
                              [08-05-06 19:07:06.0607] Plugins::CDplayer::CDhandler::LoadCDandIdentify (167) Create Fork to read CD TOC using cdda2wav on mac device IODVDServices
                              [08-05-06 19:07:06.0614] Plugins::CDplayer::Fork::go (82) Fork executing 'cdda2wavosx.sh' with 'device=IODVDServices -verbose-level=toc -N -g -J'
                              [08-05-06 19:07:06.0616] Plugins::CDplayer::Fork::go (83) Fork actual executing '"" device=IODVDServices -verbose-level=toc -N -g -J 2> "/Users/danco/Library/Caches/SlimServer/Forkoutput1.txt"'
                              [08-05-06 19:07:06.0662] Plugins::CDplayer::Fork::go (91) Child task (11585) forked: "" device=IODVDServices -verbose-level=toc -N -g -J 2> "/Users/danco/Library/Caches/SlimServer/Forkoutput1.txt"
                              [08-05-06 19:07:06.0679] Plugins::CDplayer::Fork::go (92) Child task is alive
                              [08-05-06 19:07:07.0685] Plugins::CDplayer::Fork::checkFork (127) Forked task 11585 is not alive
                              [08-05-06 19:07:07.0690] Plugins::CDplayer::Fork::checkFork (130) FORK 11585 : sh: : command not found
                              [08-05-06 19:07:07.0693] Plugins::CDplayer::Fork::checkFork (136) Forked task complete, invoking callback
                              [08-05-06 19:07:07.0696] Plugins::CDplayer::CDhandler:arsetoc (681) ERROR: No tracks were found
                              [08-05-06 19:07:07.0698] Plugins::CDplayer::CDhandler:rocessCDTOCResponse (230) Read CD TOC failed No CD in drive
                              [08-05-06 19:07:07.0740] Plugins::CDplayer::Fork::checkFork (144) Deleting Bat and output files /Users/danco/Library/Caches/SlimServer/Forkoutput1.txt

                              Comment

                              • bpa
                                Senior Member
                                • Oct 2005
                                • 22880

                                #30
                                I downloaded and untarred the file and all the names were correct and not the names you got.

                                OK - it looks like OSX does something bad to tar.gz file naming as this is the second time a "2" has been added. Would zip be a better format (the forums s/w limits the type of files that can be attached).

                                The script file should be called cdda2wavosx.sh and it replaces the current script with the same name in the CDplayer/Bin directory. The log shows SC couldn't find an excutable script call cdda2wavosx.sh. Also the script looks for an executable /usr/local/bin/cdda2wav.

                                The whole file looks like
                                Code:
                                #!/bin/sh
                                app=cdda2wav
                                
                                 if [ -x /usr/bin/$app ] ; then
                                 echo "Found cdda2wav in /usr/local/bin " 1>&2
                                 app=/usr/bin/$app
                                 fi
                                 
                                # Next line is only a guess - needs to be edited but redirection of stdout (1) is essential
                                 echo "cdda2wav script running " 1>&2
                                 echo "command: $* \n\n"1>&2
                                
                                 disk=`mount | grep cddafs | cut -d" " -f1`
                                 if [ -n "$disk" ] ; then 
                                  echo diskutil unmount $disk 1>&2
                                 else
                                  echo "No mounted cddafs found\n" 1>&2
                                 fi
                                 "$app" $*

                                Comment

                                Working...