LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-26-2019, 02:12 AM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,849

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
Increasing cdda2wav's performance


I've been building up my collection of online music for the home LAN, grabbing stacks of CDs from the shelves and converting them to Oggs. (This is an ongoing project of mine that became a special mini-marathon effort what with the approach of the holidays, the multi-disc changer now in storage, and the family's hankering for me to play holiday music.) To speed the process up, I've been tinkering with some of the cdda2wav options in an effort to match the software to the hardware using suggestions in the cdda2wav(1) manpage.

Before my tuning efforts, I was setting "speed=0" on the cdda2wav command line and that works well for many CDs. I interpreted the man page information as saying 0=full speed which, for my Lite-On ("iHAS324") drive is 48x when reading CDs. At times, though, I was getting messages about minor errors with some of the reads (0.1%, 0.2%, 0.3% of the reads) even for discs that had zero scratches, fingerprints, and any other visible flaws. The cdda2wav(1) page mentions that for "maximum extraction quality" that users should keep speed no higher than 8. Generating WAV files was noticeably slower at this speed (no big surprise there), but still usually just taking a few minutes.

To try and speed things up, I then tried configuring the readahead to be a better match to the drive's buffer. In the case of the Lite-On, that's 2MB which, according to the manpage, tells me that I should be using a value of "450" for each megabyte of buffer or "900". WAV creation time jumped a whopping amount: 24 minutes! Zero read errors but at a huge decrease in throughput.

Setting the drive speed back to "0" but still using the expanded readahead, got it back down to a tad over 6 minutes to read ~75 minutes of content which is better but will likely bring back some of those read errors on some discs.

Q1: Any tips on methods to speed up this read process?

Q2: Is cdda2wav really using the larger readahead setting? When starting the read, I see:
Code:
$ sudo /usr/bin/cdda2wav dev=4,0,0 -speed 8 -vall -B -cddb=0 -x -paranoia -paraopts=readahead=900
Type: ROM, Vendor 'ATAPI   ' Model 'iHAS324   F     ' Revision 'CL8E' MMC+CDDA
569344 bytes buffer memory requested, transfer size 131072 bytes, 4 buffers, 55 sectors
cdda2wav: Read TOC CD Text failed (probably not supported).
#Cdda2wav version 3.02a09_linux_4.12.14-lp151.24-default_x86_64_x86_64, real time sched., soundcard, libparanoia support
...
which is exactly the same startup information I get when I omit the "-paraopts=..." switch. Passing arguments to increase libparanoia's readahead buffering doesn't seem to be affecting anything. Or... does that buffer memory message in the program startup have nothing to do with the libparanoia's buffering?

Q3: Is using the "-paranoia" switch the culprit here? If so, I suspect there's an entirely different method of tuning cdd2wav for good performance when not using the "-paranoia" switch, right?

Any tips are welcomed.

TIA...
 
Old 12-26-2019, 07:16 PM   #2
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,060

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Use multiple optical drives and multiple computers. This task can be parallelized.

I don't recall using any special options when I extracted my audio CDs years ago. I do remember having to extract them twice due to a (then-expensive) 200GB hard drive failing.
Ed
 
Old 12-28-2019, 12:21 PM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,849

Original Poster
Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
Quote:
Originally Posted by EdGr View Post
Use multiple optical drives and multiple computers. This task can be parallelized.
Limited desk space prohibits that. As would the missus.

Quote:
I do remember having to extract them twice due to a (then-expensive) 200GB hard drive failing.
Ouch! That's why I've been stashing the files on a networked RAID device and backing that up daily. Even parallelized, I surely don't want to do this again. It's taken a long time to get where I am and have a lot more to go -- it's a fairly large CD collection -- and any time savings is a real boon. (I've got a similar-sized collection of LPs that I want to run through Audacity and I see absolutely no way to automate that process.)

(At first I read that as a 200MB hard disk and thought: "Wow! You did this a lo-o-ong time ago". The last time I used drives in the megabyte range on a PC was on a '486. :^D )

The generic settings work OK for the most part but the messages about problems encountered while extracting the WAVs make me wonder if I'm going to be re-extracting some of them when, upon playback, those errors turned out to be not so minor after all.

I reworked my script to, initially, run 'cdda2wav' at full speed, scraping its screen output, and producing an exception list of tracks that have to re-extracted at slow speed, dropping the speed to 1/3 of the previous pass on each following pass. I was a bit surprised to find that, during testing, there were a few tracks that weren't even successfully extracted at "-speed 1". At that point I started tinkering with the readahead buffering. The formula in the the cdda2wav manpage that I was using (450 x number of MB in drive) wasn't enough. I wound up doubling it. Those two changes seem they'll work. We'll see.
 
Old 12-28-2019, 12:43 PM   #4
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,060

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by rnturn
Limited desk space prohibits that. As would the missus.
I thought all LQ'ers were surrounded by old Linux boxes.

Quote:
Originally Posted by rnturn
(I've got a similar-sized collection of LPs that I want to run through Audacity and I see absolutely no way to automate that process.)
I also have a large LP collection. After careful consideration and some testing, I concluded that music on LPs is best kept in analog form. Part of the appeal of LPs is putting them on the turntable.
Ed
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b; cdrecord; cdda2wav PROBLEM! pepeq SUSE / openSUSE 2 10-20-2004 01:35 PM
is there a way to let cdda2wav write files and dirs with cddb names? darkleaf Linux - Software 5 10-11-2004 03:34 PM
cdda2wav audio ripping problem ugenn Linux - Software 4 06-26-2004 02:08 AM
cdda2wav problem bleedingturnips Linux - Software 0 06-21-2004 11:17 AM
Help with Eroaster and cdda2wav PiMoGo Linux - Software 2 10-29-2002 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration