RCS file: multiburn,v Working file: multiburn head: 1.64 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 64; selected revisions: 64 description: Script to burn audio / data onto multiple CDs (or DVDs?) using multiple burners continuously ---------------------------- revision 1.64 date: 2008/04/13 15:21:38; author: dave; state: Exp; lines: +279 -268 Pre-gap from previous versions was a load of nonsense - caused corrupt tocs, and wouldn't have worked in any case. Changed to a post-track silence value. Works as expected now (thanks Graham). Some formatting changes (Emacs has changed its shell mode formatting). Some error / help text changes. ---------------------------- revision 1.63 date: 2008/02/09 22:20:43; author: dave; state: Exp; lines: +83 -75 Added waitwrirable function() to help clean up burn() This version is largely untested. ---------------------------- revision 1.62 date: 2008/01/26 23:35:48; author: dave; state: Exp; lines: +2 -2 Default burn speed is max - changed the help screen to reflect this. ---------------------------- revision 1.61 date: 2007/11/18 22:55:35; author: dave; state: Exp; lines: +182 -117 Added -v to [cd|dvd]record args Removed scan function - Most people will be using /dev/[h|s]dX devices, so the scanbus output is useless Added eject option, 'cause I put blanks in the drives before running multiburn. Code cleanups Beautified the console output Re-organised the help screen Added rmdir's to remove the scratch dir before error exits, if there's nothing in scratch. ---------------------------- revision 1.60 date: 2007/03/01 17:25:16; author: dave; state: Exp; lines: +2 -2 Added trap for SIGHUP to clean up / kill processes if the xterm is destroyed (xterm and gnome-terminal both SIGHUP the running process when they close) ---------------------------- revision 1.59 date: 2007/02/24 18:47:47; author: dave; state: Exp; lines: +1 -1 Version number mismatch. Must automate this at some point. ---------------------------- revision 1.58 date: 2007/02/24 18:37:42; author: dave; state: Exp; lines: +1 -1 Quoted $SCRATCHDIR in Ctrl-C trap. There was a possible data loss bug here if the patch had spaces. ---------------------------- revision 1.57 date: 2006/12/12 00:04:57; author: dave; state: Exp; lines: +1 -5 Removed unnecessary progress output for audio dir files ---------------------------- revision 1.56 date: 2006/10/09 17:19:40; author: dave; state: Exp; lines: +2 -2 Missed a quoted variable - non-fatal. ---------------------------- revision 1.55 date: 2006/08/19 08:41:19; author: dave; state: Exp; lines: +2 -2 Typo in help ---------------------------- revision 1.54 date: 2006/08/08 01:46:38; author: dave; state: Exp; lines: +51 -54 Re-sync with out-of-RCS changes, post Catalin tests. Better help screen. Fix single audio non-encode error message ($GO vs $AUDIO) ---------------------------- revision 1.53 date: 2006/08/08 01:28:44; author: dave; state: Exp; lines: +20 -20 Help screen cleanup Comment cleanup ---------------------------- revision 1.52 date: 2006/08/08 00:52:04; author: dave; state: Exp; lines: +3 -3 Altered purpose comment ---------------------------- revision 1.51 date: 2006/08/08 00:45:00; author: dave; state: Exp; lines: +254 -182 Last Catalin test Lots of code re-ordering Added waitreadable() Added --dummy option If a disc is in the source drive when a clone operation is started, that disc is used as the source, and is not spat out. Added blank-CD-in-source-drive protection Some code clean up. ---------------------------- revision 1.50 date: 2006/08/08 00:41:12; author: dave; state: Exp; lines: +261 -57 Now differentiating between disc types for writing. Now using readcd to read DVD discs Using directory name as volume name for data dir source Using the --paranoia-mode option to read audio CDs Some minor code re-ordering ---------------------------- revision 1.49 date: 2006/08/08 00:36:33; author: dave; state: Exp; lines: +326 -253 First Catalin test. Added: -o - Specify an Output directory for multiburn to use as a temp dir -k - Retain (Keep) the temp directory when multiburn exits -r - Change the burn speed (Rate). --scan - The cdrdao scanbus output (but cleaned up a bit). -p - audio cd pregap Now using 'shift' to traverse the command line args Outputs burning speed in info. ---------------------------- revision 1.48 date: 2006/07/27 00:20:50; author: dave; state: Exp; lines: +3 -3 Another change to the mplayer command. '-af resample' was giving one of: distorion, quiet sound, crap quality. I'm unsure exactly why. I've switched to lavcresample, which seems to be a better solution. ---------------------------- revision 1.47 date: 2006/07/26 12:21:57; author: dave; state: Exp; lines: +3 -3 Was getting clipping with mplayer resample=:1:2 changed to resample=44100:1:1 ---------------------------- revision 1.46 date: 2006/07/20 10:41:43; author: dave; state: Exp; lines: +1 -1 Altered other mplayer (audioDir function) syntax to match last update. Version sync. ---------------------------- revision 1.45 date: 2006/07/20 10:34:22; author: dave; state: Exp; lines: +3 -3 Altered mplayer syntax for more precise resampling ---------------------------- revision 1.44 date: 2005/12/09 01:48:22; author: dave; state: Exp; lines: +59 -1 Added a --test' option to look for needed utilities. It's a bit hairy, but it works for now. ---------------------------- revision 1.43 date: 2005/10/19 18:30:26; author: dave; state: Exp; lines: +2 -2 Added 'burnfree' option to the cdrecord command ---------------------------- revision 1.42 date: 2005/10/16 21:08:30; author: dave; state: Exp; lines: +3 -3 Altered the mplayer command, as the resample method used previously was causing distortion when upsampling. ---------------------------- revision 1.41 date: 2005/08/24 22:50:17; author: dave; state: Exp; lines: +3 -3 More mplayer syntax changes. ---------------------------- revision 1.40 date: 2005/08/19 02:58:26; author: dave; state: Exp; lines: +39 -40 Formatting cleanup. No code changes. ---------------------------- revision 1.39 date: 2005/06/19 04:45:59; author: dave; state: Exp; lines: +2 -1 Added sleep after non-writable CD eject to stop the about-to-be-ejected disc from being retested before it gets ejected. ---------------------------- revision 1.38 date: 2005/05/21 19:55:30; author: dave; state: Exp; lines: +3 -3 Sorted the mplayer syntax properly. The pre7 version of MPlayer crashes with this script, but the CVS version works fine. Tested (decoding is anyway) ---------------------------- revision 1.37 date: 2005/05/21 00:59:34; author: dave; state: Exp; lines: +3 -3 mplayer syntax again ---------------------------- revision 1.36 date: 2005/05/21 00:52:16; author: dave; state: Exp; lines: +3 -3 mistake with corrected syntax. Fixed, but untested. ---------------------------- revision 1.35 date: 2005/05/20 21:20:04; author: dave; state: Exp; lines: +3 -3 mplayer aofile syntax change ---------------------------- revision 1.34 date: 2005/03/27 16:46:02; author: dave; state: Exp; lines: +8 -8 Cleaned up some user messages. No logic changes. ---------------------------- revision 1.33 date: 2005/03/26 22:51:35; author: dave; state: Exp; lines: +3 -3 Serious issue with -a. CDs were being burned with the original files, not the decoded ones. Fixed. ---------------------------- revision 1.32 date: 2005/03/06 04:24:55; author: dave; state: Exp; lines: +2 -3 Code cleanup ---------------------------- revision 1.31 date: 2005/02/28 16:28:35; author: dave; state: Exp; lines: +2 -2 Added -dao to cdrecord burn line (data DVDs were failing without it). All cdrecord calls are for prepared ISOs anyway, so this makes sense. ---------------------------- revision 1.30 date: 2005/02/16 19:55:19; author: dave; state: Exp; lines: +1 -1 Version number wrong ---------------------------- revision 1.29 date: 2005/02/16 19:53:18; author: dave; state: Exp; lines: +2 -2 Added -vo dummy to mplayer lines. ---------------------------- revision 1.28 date: 2005/02/13 23:38:18; author: dave; state: Exp; lines: +5 -5 Modified license to allow only version 2 of the GPL. Who knows what the next version's going to be like. ---------------------------- revision 1.27 date: 2005/02/07 08:23:07; author: dave; state: Exp; lines: +9 -13 Changed the mplayer lines to force signed 16 bit. Changed the sleep loop to a wait. Removed the PIDLIST in favour of pkill. Added devnull redirection to the cdrecord and cdrdao checks. ---------------------------- revision 1.26 date: 2005/02/02 01:00:11; author: dave; state: Exp; lines: +14 -5 Changed the audioDir crddao TOC echo to look for whether a pregap has been specified, as the previous versions were broken when no pregap was supplied. ---------------------------- revision 1.25 date: 2005/02/01 23:32:00; author: dave; state: Exp; lines: +1 -1 Version number again ---------------------------- revision 1.24 date: 2005/02/01 23:27:09; author: dave; state: Exp; lines: +5 -2 Altered (c) remark Made the pregap description a bit easier to understand ---------------------------- revision 1.23 date: 2005/02/01 23:12:39; author: dave; state: Exp; lines: +1 -1 Version number wasn't updated at last check-in. Fixed ---------------------------- revision 1.22 date: 2005/02/01 23:10:48; author: dave; state: Exp; lines: +13 -2 Cleaned up an if [ $? != 0 ] Added check for cdrdao and cdrecord at start of execution ---------------------------- revision 1.21 date: 2005/02/01 17:10:40; author: dave; state: Exp; lines: +29 -24 Cleaned up the sed // stripper to not eliminate double spaces in filenames Cleaned up output for re-encoding Cleaned up some variables to be quoted for safety Made sure the 'file' tests follow links (CD format files which were linked to the audioDir directory were getting re-encoded because of this) This version has been tested. ---------------------------- revision 1.20 date: 2005/02/01 12:38:38; author: dave; state: Exp; lines: +32 -22 Mainly comment changes. Removed some exit 1; else; ... ifs. No logic changes. ---------------------------- revision 1.19 date: 2005/02/01 04:55:02; author: dave; state: Exp; lines: +9 -7 Changed the --help output to explain about the re-encoding, changed the (c) to 2004/5. ---------------------------- revision 1.18 date: 2005/02/01 04:46:21; author: dave; state: Exp; lines: +11 -3 Changed the post mplayer decode check to make sure the output file is a 44100 PCM RIFF, not just that the file exists. ---------------------------- revision 1.17 date: 2005/02/01 04:36:03; author: dave; state: Exp; lines: +172 -33 Added audio directory capability with decoding (on a case by case basis) Added single audio file decoding (only if required) Added image size advisories for user for each burn type This version has not been thoroughly tested (no simulated writes have been performed). ---------------------------- revision 1.16 date: 2005/01/27 08:19:38; author: dave; state: Exp; lines: +8 -8 Changed iso-level on burn from directory or single file to 1 from 3 (DOS can't read level 3 CDs) Comment clean up Moved SPEED= to top so it's easier to find for users ---------------------------- revision 1.15 date: 2005/01/25 07:42:32; author: dave; state: Exp; lines: +10 -2 Added user notice detailing the size of the image for -d. Couple of lines changed elsewhere. ---------------------------- revision 1.14 date: 2005/01/22 10:07:12; author: dave; state: Exp; lines: +1 -2 Removed the COPY/NO COPY part - We don't want to get into trouble. ---------------------------- revision 1.13 date: 2005/01/22 09:50:26; author: dave; state: Exp; lines: +2 -2 Changed the sed line which previously removed "NO COPY" (for the clone TOC) to insert "COPY" instead. Turns out the default is "NO COPY". ---------------------------- revision 1.12 date: 2005/01/22 09:27:08; author: dave; state: Exp; lines: +109 -65 Added directory/file ISO9660 filesystem creation and burning. Cleaned up the burn() procedure, to only have two burn cases (cdrdao or cdrecord). Changed the exit trap to not delete .multiburn on burn failure. Cleaned up some other bits and pieces. This version has been tested on simulate only. ---------------------------- revision 1.11 date: 2004/12/19 21:31:09; author: dave; state: Exp; lines: +27 -26 Changed -X args to be more sensible. ---------------------------- revision 1.10 date: 2004/12/17 18:41:33; author: dave; state: Exp; lines: +1 -1 Changed simulate back to write ---------------------------- revision 1.9 date: 2004/12/17 18:39:22; author: dave; state: Exp; lines: +221 -189 Added single wav file option Added check for pre-existing .multiburn directory ---------------------------- revision 1.8 date: 2004/11/08 23:51:08; author: dave; state: Exp; lines: +25 -5 Added code to check that each burner was usable by cdrecord ---------------------------- revision 1.7 date: 2004/11/05 18:56:04; author: dave; state: Exp; lines: +86 -77 Cleaned indents. Added second kill trap to rm -rf ./.multiburn sooner ---------------------------- revision 1.6 date: 2004/11/05 03:42:25; author: dave; state: Exp; lines: +1 -1 Improved readability. ---------------------------- revision 1.5 date: 2004/11/05 00:19:28; author: dave; state: Exp; lines: +1 -1 Corrected versioning error ---------------------------- revision 1.4 date: 2004/11/05 00:17:46; author: dave; state: Exp; lines: +2 -4 Slight modification to help message ---------------------------- revision 1.3 date: 2004/11/05 00:12:37; author: dave; state: Exp; lines: +203 -105 Added CD clone function. Tidied up the main loop counter. Switched to GPL from a vauge disclaimer. ---------------------------- revision 1.2 date: 2004/11/04 19:50:28; author: dave; state: Exp; lines: +1 -1 Altered versioning to reflect rcs versioning ---------------------------- revision 1.1 date: 2004/11/04 19:42:47; author: dave; state: Exp; Initial revision =============================================================================