Re: CDROM will not play a music cd.
On seg, 23 jul 2018, Doug wrote: This may or may not be off topic, I wouldn't call it completely off-topic, but it's definitely a thread hijacking. It would have been better to start a new thread. My friend has just gotten a Korean car--it's either a Hundai or a Kia, I don't remember, but it has no CD player, but it does have a USB connection, which purports to be a sound input. So the question: I would make some copies of CDs onto a flash drive, if I knew how! I would prefer to use K3b to copy the CDs; do I have to format the flash drive, and if so with what system? (I thought that flash drives come formatted with a Windows file system?) And what other questions should I be asking, which I'm too uninformed to ask? And what are the answers? BTW: I have never, in 20 years or more, ever gotten Audacity to do anything for me, so that is out! Format the USB as FAT32 (other FAT variants should work), and add .mp3 files to it. Could not be simpler. (Other filesystems might be supported, and other audio formats, but don't count on that.) There are several CD rippers and mp3 encoders in Debian. -- Eduardo M KALINOWSKI edua...@kalinowski.com.br
Re: CDROM will not play a music cd.
On 07/22/2018 04:57 PM, Thomas Schmitt wrote: Hi, Bob Bernstein wrote: The playback is jumpy, or skippy, anything but smooth and continuous. https://www.cyberciti.biz/faq/linux-unix-mplayer-playing-audio-dvd-cd-using-bash-shell/ proposes option "-cache 5000": mplayer -cdrom-device /dev/sr0 cdda:// -cache 5000 I guess it's a real-time problem which can be solved by reading ahead. If the problem persists, try to copy the tracks to hard disk and see what happens if you play the resulting files. Selected audio codec: Uncompressed PCM [pcm] AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) [...] AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) [...] That "2 bytes per sample," above, looks suspicious. 2 bytes = 16 bit. That's exactly what is prescribed for CD-DA: headerless PCM (i.e. uncompressed) 44100 Hz sampling rate 16 bits per sample stereo (2 channels) little-endian byte order (Dunno why above "[alsa]"-line talks of 48000 Hz.) Have a nice day :) Thomas This may or may not be off topic, but you folks seem to know something about CDs, so I'll ask: My friend has just gotten a Korean car--it's either a Hundai or a Kia, I don't remember, but it has no CD player, but it does have a USB connection, which purports to be a sound input. So the question: I would make some copies of CDs onto a flash drive, if I knew how! I would prefer to use K3b to copy the CDs; do I have to format the flash drive, and if so with what system? (I thought that flash drives come formatted with a Windows file system?) And what other questions should I be asking, which I'm too uninformed to ask? And what are the answers? BTW: I have never, in 20 years or more, ever gotten Audacity to do anything for me, so that is out! Thanx for any kind words and info! --doug
Re: CDROM will not play a music cd.
Bob Bernstein (2018-07-22): > mplayer [cdda|cddb]://track[-endtrack][:speed][/device] [options] ^ > > I first tried 'mplayer cdda:///dev/cdrom' ^^ This is not a track. > The playback is jumpy, or skippy, anything but smooth and continuous. Rip the CD. Regards, -- Nicolas George signature.asc Description: Digital signature
Re: CDROM will not play a music cd.
On Sun, 22 Jul 2018, Thomas Schmitt wrote: https://www.cyberciti.biz/faq/linux-unix-mplayer-playing-audio-dvd-cd-using-bash-shell/ proposes option "-cache 5000": mplayer -cdrom-device /dev/sr0 cdda:// -cache 5000 Joy reigns supreme in Mudville! It has dawned on my somewhat dimmed (due to age, drugs, and low companions) brain that not everyone is familiar with the metaphor: http://www.dictionary.com/browse/there-is-no-joy-in-mudville Have a nice day :) Thank you sir. -- A person of great honour in Ireland (who was pleased to stoop so low as to look into my mind) used to tell me that my mind was like a conjured spirit, that would do mischief if I did not give it employment. Jonathan Swift
Re: CDROM will not play a music cd.
Hi, Bob Bernstein wrote: > The playback is jumpy, or skippy, anything but smooth and continuous. https://www.cyberciti.biz/faq/linux-unix-mplayer-playing-audio-dvd-cd-using-bash-shell/ proposes option "-cache 5000": mplayer -cdrom-device /dev/sr0 cdda:// -cache 5000 I guess it's a real-time problem which can be solved by reading ahead. If the problem persists, try to copy the tracks to hard disk and see what happens if you play the resulting files. > Selected audio codec: Uncompressed PCM [pcm] > AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) > [...] > AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) > [...] > That "2 bytes per sample," above, looks suspicious. 2 bytes = 16 bit. That's exactly what is prescribed for CD-DA: headerless PCM (i.e. uncompressed) 44100 Hz sampling rate 16 bits per sample stereo (2 channels) little-endian byte order (Dunno why above "[alsa]"-line talks of 48000 Hz.) Have a nice day :) Thomas
Re: CDROM will not play a music cd.
Firstly, *thank you* to all who chimed in with analysis and suggestions! This list is the best. I will present an update on my efforts and a bit more data. Update: I think it was Nicholas last night who mentioned the 'cdda://' type of URL. Today I noticed on mplayer's man page this line: mplayer [cdda|cddb]://track[-endtrack][:speed][/device] [options] I first tried 'mplayer cdda:///dev/cdrom' but apparently I did not grasp the syntax of the suggested "[/device]", above: --start snip-- Playing cdda:///dev/cdrom. ++ WARN: Can't get file status for dev/cdrom: No such file or directory ++ WARN: could not retrieve file info for `dev/cdrom': No such file or directory ++ WARN: can't open nrg image file dev/cdrom for reading Can't open CDDA device. Failed to open cdda:///dev/cdrom. --stop snip-- Then I tried 'mplayer cdda:// /dev/cdrom' and Mudville began to experience some joy: Here comes the data. --start-snip-- MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team Cannot open file '/home/bob/.mplayer/input.conf': No such file or directory Failed to open /home/bob/.mplayer/input.conf. Cannot open file '/etc/mplayer/input.conf': No such file or directory Failed to open /etc/mplayer/input.conf. Playing cdda://. Found audio CD with 13 tracks. CD-Text (CD): Track 1 CD-Text (track): Detected file format: rawaudio Selected audio codec: Uncompressed PCM [pcm] AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) AO: [pulse] Init failed: Connection refused AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 28.1 (28.1) of 3874.2 ( 1:04:34.1) 5.0% --stop-snip-- I am listening to music; God is good. The playback is jumpy, or skippy, anything but smooth and continuous. My spidey sense tells me this might be a configuration matter. That "2 bytes per sample," above, looks suspicious. Any thoughts on remediation of this defect, gentlemen? Thanks, -- Poobah
Re: CDROM will not play a music cd.
Thomas Schmitt wrote: ... > The classic CD-DA ripper is cdda2wav. i like jack, but it's broken at the moment in unstable, unfortunately i don't know python well enough to debug it yet. so for my temporary hackish project i'm trying to convert it all to python3 acceptable code, but i'm not sure i'll ever get it working or done. heh. which has sidetracked me from the other project i started... songbird
Re: CDROM will not play a music cd.
Hi, Nicolas George wrote: > To be accurate, mount only directs the kernel into doing the reads and > looking for filesystems. Yes. But in hindsight my explanation was already more technical than appropriate. "mount(8) is not the right way to access an audio CD." would have been better. But i was carried away by the fine specimen of an SCSI error message. > There are two ways for playing an audio CD. > The CD drive can play the audio CD all by itself. Those have become rare meanwhile. Most DVD drives and all BD drives seem to have no sound signal outlets. > Or the CD drive can read the audio CD, as you have described, and the > application can send the audio data on the fly to the audio controller. That's indeed the proposal i want to make. > I think you would be better off ripping the CD and then > listening to the resulting file. For that job i could even offer my program cdrskin. (See example "Extract audio tracks and CD-TEXT from CD into directory /home/me/my_cd" at the end of its man page.) The classic CD-DA ripper is cdda2wav. Have a nice day :) Thomas
Re: CDROM will not play a music cd.
Thomas Schmitt (2018-07-22): > Your reader program needs to use command READ CD or READ CD MSF. > mount(8) or dd(1) won't do this. (Also mount(8) would find no filesystem.) To be accurate, mount only directs the kernel into doing the reads and looking for filesystems. There was a kernel patch to treat audio CDs as a kind of filesystem, presenting all tracks as PCM audio files, but AFAIK it was discontinued. Since audio CDs lack accurate timing information, reading a track reliably requires some rather tricky operations that are not wanted in kernel space. > Program "mplayer" comes to my mind as potential reader. > But i am sure the list members can tell more programs which play music > from CD-DA media. There are two ways for playing an audio CD. The CD drive can play the audio CD all by itself. The application only needs to send commands to start the playback. But it requires an analog cable from the CD drive to the audio controller. When I had a tower assembled 17 years ago, the vendor simply forgot to plug it, that's how important it was then. Nowadays, I am not even sure the connector for the audio controller will be available, and I do not find the corresponding mixer. Or the CD drive can read the audio CD, as you have described, and the application can send the audio data on the fly to the audio controller. MPlayer can be complied with that feature, it is invoked using the URL cdda://. I just checked, and Debian's VLC also has that feature. I expect most usable music players have it. But really, it is not the best option. Unless your use case is very specific, I think you would be better off ripping the CD and then listening to the resulting file. It would be much more convenient on many aspects: no noise from the spinning CD, faster seeking, ease of archival, etc. The ripping can be done at the drive full speed (or slightly less if you want a reliable read), which means it takes very little time at all. And of course, you can start playing the first track before the whole CD is ripped. If you decide to encode the audio into a lossy codec in order to keep the file without spending too much disk space (Opus would be the best choice nowadays, unless you want to be able to play the file on an old device), it also takes very little time, probably less than the reading itself. For reference: uncompressed CD PCM data: 10 Mo/mn, transparent stereo Opus: <~1 Mo/mn. Regards, -- Nicolas George signature.asc Description: Digital signature
Re: CDROM will not play a music cd.
Hi, Bob Bernstein wrote: > bob@debian:~$ mount /dev/sr0 > mount: /dev/sr0 is write-protected, mounting read-only > mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing > codepage or helper program, or other error > [...] > bob@debian:~$ dmesg |tail > [...] > [ 1005.988702] Sense Key : Illegal Request [current] > [ 1005.988708] sr 1:0:0:0: [sr0] > [ 1005.988714] Add. Sense: Illegal mode for this track > [ 1005.988719] sr 1:0:0:0: [sr0] CDB: > [ 1005.988721] Read(10): 28 00 00 00 00 10 00 00 01 00 The drive refuses to read data from the medium. This is expectable if the medium is really an audio CD. Other than CD-ROM, a CD-DA medium contains sectors of 2352 bytes each rather than the 2048 bytes sectors which SCSI command READ(10) would able to read. Your reader program needs to use command READ CD or READ CD MSF. mount(8) or dd(1) won't do this. (Also mount(8) would find no filesystem.) Program "mplayer" comes to my mind as potential reader. But i am sure the list members can tell more programs which play music from CD-DA media. Have a nice day :) Thomas
Re: CDROM will not play a music cd.
Bob Bernstein composed on 2018-07-22 01:37 (UTC-0400): > /dev/sr0/media/cdrom0 udf,iso9660 user,noauto 0 0 > You can see where, on the last line, I tried monkeying > with sr0's options. I've left the file now as it was > installed by jessie, which flavor I am still running, > albeit sans (without) systemd. I have tried three > different audio cd's. Your type column (3) is invalid. Change udf,iso9660 to auto, so the whole line to something like the following: /dev/sr0 /media/cdrom0 auto ro,noauto,users,exec 0 0 -- "Wisdom is supreme; therefore get wisdom. Whatever else you get, get wisdom." Proverbs 4:7 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
CDROM will not play a music cd.
I'll try to provide some useful signs/symptoms of the particular difficulty. The principal message I get is: --start snip-- bob@debian:~$ mount /dev/sr0 mount: /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. --stop snip-- Following the above suggestion: --start-snip-- bob@debian:~$ dmesg |tail [ 1005.880749] UDF-fs: warning (device sr0): udf_fill_super: No partition found (1) [ 1005.988689] sr 1:0:0:0: [sr0] [ 1005.988695] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 1005.988700] sr 1:0:0:0: [sr0] [ 1005.988702] Sense Key : Illegal Request [current] [ 1005.988708] sr 1:0:0:0: [sr0] [ 1005.988714] Add. Sense: Illegal mode for this track [ 1005.988719] sr 1:0:0:0: [sr0] CDB: [ 1005.988721] Read(10): 28 00 00 00 00 10 00 00 01 00 [ 1005.988755] isofs_fill_super: bread failed, dev=sr0, iso_blknum=16, block=16 --stop-snip-- My /etc/fstab: --start-snip-- bob@debian:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # # / was on /dev/sda1 during installation UUID=b67d82e0-9444-4663-b3d4-1a4d20d2a0ef / ext4errors=remount-ro 0 1 # /home was on /dev/sda6 during installation UUID=8228885f-b035-49c9-81dc-ddef37063692 /home ext4defaults0 2 # swap was on /dev/sda5 during installation UUID=0766109e-dc13-4d6a-bf73-0d8754fd28e8 none swapsw 0 0 /dev/sr0/media/cdrom0 udf,iso9660 user,noauto 0 0 #/dev/sr0/media/cdrom0 udf,iso9660 user,noauto,exec 0 0 --stop-snip-- You can see where, on the last line, I tried monkeying with sr0's options. I've left the file now as it was installed by jessie, which flavor I am still running, albeit sans (without) systemd. I have tried three different audio cd's. Humbly and respectfully submitted for the amusement and edification of the assembled faithful, and Gene. Thanks, -- Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them. Joseph Heller