Re: Copying audio CD with dd/cdrecord produces unplayable CD
Polytropon wrote: Strange... are these definitely audio CD tracks? You could They are definitely raw audio CD tracks. use this form to explicitely tell sox how to interpret the data (which is "headerless" on audio CDs, of course): sox -r 14400 -c 2 -b -L -S -x track.cdr track_rev.cdr This command fails: $ sox sox: Bits value `-L' is not a positive integer Also -L option seems to conflict with -x: $ Failed: only one endian option per file is allowed But this command works and again produces the errors: $ sox -r 14400 -c 2 -b 16 -S -x track-03.cdr track-03.cdr.swp $ sox mp3-duration: recoverable MAD error $ sox mp3-duration: MAD lost sync $ sox mp3-duration: recoverable MAD error $ sox mp3-duration: recoverable MAD error This looks like that sox reads / generates MP3 files...? Are these definitely standard audio CD tracks (such as every old fashioned CD player can play)? No, it seems like sox is trying to interpret raw audio data as an mp3 (and other) formats for some unknown reason. It's silly but the only way I can think of to reliably do this (very slowly) in a command line is: perl -pi -e "s/(.)(.)/\\2\\1/g" track.cdr Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
Joerg Schilling wrote: Well, then the handbook is sub-optimal. dd in general does not work at all to read CD-Audio; FreeBSD is an exception with repect to the fact that you get data at all. Here is a list of cons for dd even on FreeBSD: - dd may not work with all drives - Do you know what byteorder you get from a MMC CD-ROM drive on FreeBSD/Sparc? You would need network byteorder on Sparc but the MMC CD-ROM drive delivers intel byteorder due to a bug in the MMC standard cdrecord always asumes network byte order for RAW audio data, this is reasonable - Why would you deal with raw audio data at all if there are audio file formats that include a notation for byte order and sampling rates? - There is no jitter check and no quality control with dd on FreeBSD, cdda2wav works on all OS and has jitter control and qualiti control with e.g. libparanoia. - There is no way to get the correct CD structure back if you use dd. Cdda2wav reads meta-data and puts them into *.inf files. - With dd, you cannot read intentionally defective media as sold by the music mafia. Allowing to read CD-DA using dd on FreeBSD is a nice gag but nothing I would recommend in order to create a copy from an audio CD. Thank you, good points. This seems to be reflected in the Handbook. I will file a PR for this. Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
Yuri <[EMAIL PROTECTED]> wrote: > Joerg Schilling wrote: > > Well, you should not expect to get a usable read > > result from dd. > > > > Why? > Handbook recommends the use of dd for audio CD ripping. Well, then the handbook is sub-optimal. dd in general does not work at all to read CD-Audio; FreeBSD is an exception with repect to the fact that you get data at all. Here is a list of cons for dd even on FreeBSD: - dd may not work with all drives - Do you know what byteorder you get from a MMC CD-ROM drive on FreeBSD/Sparc? You would need network byteorder on Sparc but the MMC CD-ROM drive delivers intel byteorder due to a bug in the MMC standard cdrecord always asumes network byte order for RAW audio data, this is reasonable - Why would you deal with raw audio data at all if there are audio file formats that include a notation for byte order and sampling rates? - There is no jitter check and no quality control with dd on FreeBSD, cdda2wav works on all OS and has jitter control and qualiti control with e.g. libparanoia. - There is no way to get the correct CD structure back if you use dd. Cdda2wav reads meta-data and puts them into *.inf files. - With dd, you cannot read intentionally defective media as sold by the music mafia. Allowing to read CD-DA using dd on FreeBSD is a nice gag but nothing I would recommend in order to create a copy from an audio CD. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
Joerg Schilling wrote: Well, you should not expect to get a usable read result from dd. Why? Handbook recommends the use of dd for audio CD ripping. Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
On Saturday 29 November 2008 09:10:44 Yuri wrote: > Polytropon wrote: > > It sounds like "byte order reversal" which makes the typical noise. > > In order to 1:1 copy a CD, I'd recommend the use of the cdrdao > > tool - "cdrdao read-cd" and "cdrdao write" are the commands. > > It's easy to use them in order to get a CD "at once" and then > > reproduce it to blank media. > > > > If you need to use cdrecord, you can "preprocess" the .cdr > > files with "sox -x". You can always use the "play" command > > (from sox) to check what your files sound like. > > > > This is a sample command to turn .cdr files into .wav files, > > just to illustrate the correct parameters for interpreting > > the .cdr (CD audio data) format: > > > > sox -r 14400 -c 2 -b -L -S ${OUTFILE}.cdr ${OUTFILE}.wav > > Thank you Polytropon, > Byte order was really a problem. > Strange that burncd is supposed to take the original byteorder and > cdrecord takes reversed one. > > > I didn't try burncd since FreeBSD 4. Since then, I#m very > > comfortable with cdrecord and cdrdao and the atapicam facility. > > burncd is still recommended by handbook for ATAPI CDROMs > for some reason. Well, cdrecord don't work without CAM. > I feel like cdrecord is much nicer and once suggested to retire > burncd in handbook and to always recommend cdrecord instead. > But some people disagreed. Manpages with over 10 pages just describing options and arguments make some people dizzy. Especially for simple tasks like burning a cd. "Just do it". -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
>I am trying to copy an audio CD. >First I've ran: >dd if=/dev/acd0tN of=track-N.cdr bs=2352 >for every track. This gets raw track files. >Secondly I run: >cdrecord -v -dao -audio $* dev=2,0,0 speed=4 >This is supposed to recreate the original CD. >But when I try to play it I can hear only noise. Well, you should not expect to get a usable read result from dd. It is much better to use cdda2wav -vall to read the original and if you later use cdrecord -useinfo you will get a correct copy. BTW: cdrecord of course works in a platform independent way and thus expects raw audio data in standard network byte order Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
On Fri, Nov 28, 2008 at 11:26:51PM -0800, Yuri wrote: > I am trying to copy an audio CD. > > First I've ran: > dd if=/dev/acd0tN of=track-N.cdr bs=2352 > for every track. This gets raw track files. It is better to use cdparanoia (from the audio/cdparanoia port), since it outputs WAV files. It also tries to restore the data in case of a damaged disc. To make it to work, I have a symbolic link /dev/cdrom [courtesy of /etc/devfs.conf] that links to the real (atapicam) CD device. Ripping is now done by running the following command: cdparanoia -B "1-" This will result in a number of wav files. You can use these with cdrecord and it will Just Work. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpqLhnw7kInW.pgp Description: PGP signature
Re: Copying audio CD with dd/cdrecord produces unplayable CD
On Sat, 29 Nov 2008 00:53:32 -0800, Yuri <[EMAIL PROTECTED]> wrote: > Polytropon wrote: > > On Fri, 28 Nov 2008 23:26:51 -0800, Yuri <[EMAIL PROTECTED]> wrote: > > > > If you need to use cdrecord, you can "preprocess" the .cdr > > files with "sox -x". You can always use the "play" command > > (from sox) to check what your files sound like. > > > > 'sox -x' fails for some tracks with the message: > sox formats: no handler for detected file type `video/x-unknown' Strange... are these definitely audio CD tracks? You could use this form to explicitely tell sox how to interpret the data (which is "headerless" on audio CDs, of course): sox -r 14400 -c 2 -b -L -S -x track.cdr track_rev.cdr This describes CD audio as 14.4 kHz stereo 16 Bit (little endian - to be swapped). From the manual: -1/-2/-3/-4/-8 The sample datum size is 1, 2, 3, 4, or 8 bytes; i.e. 8, 16, 24, 32, or 64 bits. The flags -b/-w/-l/-d which are respectively aliases for -1/-2/-4/-8, and abbreviate byte, word, long word, double long (long long) word, are retained for backwards compatibility only. Seems like I'm a bit old fashioned. :-) > and for some other tracks with these errors: > sox mp3-duration: recoverable MAD error > sox mp3-duration: MAD lost sync > sox mp3-duration: recoverable MAD error > sox mp3-duration: recoverable MAD error This looks like that sox reads / generates MP3 files...? Are these definitely standard audio CD tracks (such as every old fashioned CD player can play)? -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
Polytropon wrote: On Fri, 28 Nov 2008 23:26:51 -0800, Yuri <[EMAIL PROTECTED]> wrote: If you need to use cdrecord, you can "preprocess" the .cdr files with "sox -x". You can always use the "play" command (from sox) to check what your files sound like. 'sox -x' fails for some tracks with the message: sox formats: no handler for detected file type `video/x-unknown' and for some other tracks with these errors: sox mp3-duration: recoverable MAD error sox mp3-duration: MAD lost sync sox mp3-duration: recoverable MAD error sox mp3-duration: recoverable MAD error Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
Polytropon wrote: It sounds like "byte order reversal" which makes the typical noise. In order to 1:1 copy a CD, I'd recommend the use of the cdrdao tool - "cdrdao read-cd" and "cdrdao write" are the commands. It's easy to use them in order to get a CD "at once" and then reproduce it to blank media. If you need to use cdrecord, you can "preprocess" the .cdr files with "sox -x". You can always use the "play" command (from sox) to check what your files sound like. This is a sample command to turn .cdr files into .wav files, just to illustrate the correct parameters for interpreting the .cdr (CD audio data) format: sox -r 14400 -c 2 -b -L -S ${OUTFILE}.cdr ${OUTFILE}.wav Thank you Polytropon, Byte order was really a problem. Strange that burncd is supposed to take the original byteorder and cdrecord takes reversed one. I didn't try burncd since FreeBSD 4. Since then, I#m very comfortable with cdrecord and cdrdao and the atapicam facility. burncd is still recommended by handbook for ATAPI CDROMs for some reason. I feel like cdrecord is much nicer and once suggested to retire burncd in handbook and to always recommend cdrecord instead. But some people disagreed. Thanks for your helpful response, Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copying audio CD with dd/cdrecord produces unplayable CD
On Fri, 28 Nov 2008 23:26:51 -0800, Yuri <[EMAIL PROTECTED]> wrote: > I am trying to copy an audio CD. > > First I've ran: > dd if=/dev/acd0tN of=track-N.cdr bs=2352 > for every track. This gets raw track files. > > Secondly I run: > cdrecord -v -dao -audio $* dev=2,0,0 speed=4 > This is supposed to recreate the original CD. > > But when I try to play it I can hear only noise. > > What I am doing wrong? > How to troubleshoot this problem? It sounds like "byte order reversal" which makes the typical noise. In order to 1:1 copy a CD, I'd recommend the use of the cdrdao tool - "cdrdao read-cd" and "cdrdao write" are the commands. It's easy to use them in order to get a CD "at once" and then reproduce it to blank media. If you need to use cdrecord, you can "preprocess" the .cdr files with "sox -x". You can always use the "play" command (from sox) to check what your files sound like. This is a sample command to turn .cdr files into .wav files, just to illustrate the correct parameters for interpreting the .cdr (CD audio data) format: sox -r 14400 -c 2 -b -L -S ${OUTFILE}.cdr ${OUTFILE}.wav > burncd doesn't work on my system: it breaks with my PIONEER DVD-RW > DVR-112D/1.21. I didn't try burncd since FreeBSD 4. Since then, I#m very comfortable with cdrecord and cdrdao and the atapicam facility. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"