![]() |
Creating CDs/DVDs for vehicles - must be a better way
I've spent a lot of time on this - including time experimenting, and time spend reading forums and looking for info. Nowhere, anywhere, can I seem to find help for what I am looking to do - which really doesn't strike me as anything special. In my view, its among the most basic of things that someone working with music on a Mac might want to do.....so I'm really surprised it seems to be so damned hard.
Bottom line: I want to make DVDs of music for my Jeep's 6-disc MP3 disc changer. It plays CDs and DVDs. I've successfully made both, using a variety of methods. However, because the MORONS at Daimler Chrysler, in their infinite lack of wisdom, did not put a RANDOM PLAY button on their stupid 6-disc changer (the single disc player has one), the results are less than satisfactory. I get tired of listening to the songs in the same order all the time. Summary of what I want to do: I want an EASY (i.e. fairly hassle free) way to make MP3 DVDs that lets me put selected songs on the disc in a random order, structured arbitrarily into folders, to keep under the 255 file files/folder limit imposed by the 6-disc changer in the Jeep. Summary of things I do NOT want to do: Use an iPod connected to the 6-disc changer. Sort songs by folder based on Artist, Album, Genre, leader guitarist's favourite color, choice of drug, or anything else. The closest I have come: Create a playlist in iTunes of anything I am interested in having on the disc - in this case, a bunch of hard rock stuff. Then, create a smart playlist, using that playlist as a source, to randomly choose 1000 (for example) songs (this puts me just under the 8.5GB limit of a DL DVD). Use itunes to burn a DVD (doesn't seem to be any way to save as disc image) using that playlist. Then, read that DVD back, manually placing the songs into folders on an arbitrary basis. For example, create 4 folders, put 250 songs in each folder (songs 1-250, 251-500, 501-750, 751-1000). Then burn that folder structure BACK to a DVD using Toast. This gets me a single DVD with songs of interest in a random order (of course, they're locked into that random order). It's a pain in the ass, and costs me 2 DL DVDs for every useful one I make. Second closest I have come: Using Toast, make an MP3 disc - use the media browser to read the iTunes Library, accessing the playlist of 1000 randomly chosen songs. Unfortunately, for some really stupid reason, Toast ALPHABETIZES the songs, rather than leaving them in the order indicated by the playlist (the iTunes method prepends the song title with the number, 1 to 1000, to keep them in the proper order). I really don't want to be so much of a dork as to listen to songs in alphabetical order - that's not much of an improvement over listening to them by artist or album. Anyway - the next step is to make 4 folders on the disk, sort the songs in the folders, and then burn it. If it were not for the whole alphabetizing thing, this method would be an improvement over the above method, in that it only uses one disc in the process, but it's still a huge pain in the ass that requires manual intervention on my part. Given how many discs I want to create (it is a 6 disc changer after all), it's not real practical to make 20 - 30 discs this way. Where I am at now: Based off what I've seen so far, if I want to get what I want, I will have to write a PERL program to parse the itunes library XML file, access the playlist I made, and use that to create the folder file structure of songs (for example 10 folders, 100 songs into each folder) and copy each song into the folder structure. Then I can burn that folder structure with toast. The disadvantage here of course is my time to create and debug this program, and having to make a copy of all the stuff to go on the disc. So, there it is. I'm hoping someone can save me from myself (: I've had this 6-disc changer for over 2 years now and have yet to get any use out of it because of this huge headache. Just the process of converting all my AAC stuff (500GB or so) to MP3 was a big pain (the player doesn't play AAC) - now I'm running into this issue. I'm hoping to get some use out of my 6 disc changer - one day. Please help (: |
Quote:
|
Quote:
|
Quote:
|
I know how you feel - although in regards to mp3 CDs not DVDs.
My workaround: Sort by song length in iTunes, then burn. Unfortunately Toast seems to have no way of sorting properly - and my car stereo will only play mp3s not AAC or mp4 - a lot of my library is AAC, so I have to copy them out of iTunes, convert them to mp3, then burn in Toast, and subsequently get the alphabetical problem. |
There are lots of existing scripts for manipulating iTunes data - so have a look around. E.g. google for:
iTunes scripts or iTunes AppleScripts |
Quote:
Quote:
Quote:
Quote:
|
Quote:
Or, you could make multiple 250-track playlists, and drag the contents of each into separate sub-folders. Might be easier than splitting the 1000 tracks manually in Finder. On a side note, does Toast support playlist files? That is, can you use one to prevent the alphabetical ordering problem? Though I'm not sure how easy it is to create a m3u file from an iTunes playlist.... |
Quote:
However....the downside is that if you do it that way, you end up with a folder of tracks, in alphabetical order. You lose the playlist ordering (prefixing track file names with 000-XXX) like you get if you burn the disc. Soo, good to know iTunes has that "drag out the tracks" functionality, but it's not functional for the purpose I am gunning for here. Quote:
Thanks! |
Here is what I would do.
Collect a folder of tunes that will fit on a DVD using the itunes drag method From an itunes playlist. Run this command in terminal from the folder directory. Quote:
Admittedly, This is not really random as it will group all tracks of the same number together. Someone else can probably use sed or awk to sort these more random. Also, oddly if you drag tracks from an itunes playlist it adds the track numbers where as if you just drag them from the library you only get the tracks names. This brings me to another point. What is wrong with a play list that is sorted alphabetically? You still get random song order that way. Update: Whoops, the above command is for playlist on my Sansa and assumes music is in /music. To get this to work with toast change '//music' to the path to your music/burn folder where you copied your tunes to. |
What you need is a script that will randomly obfuscate file names - in much the same way as what happens when tracks are transferred to an iPod/iPhone. For example, files have four-character alphanumeric names (e.g. x5aw.mp3). Then, the tracks would be in alphabetical order based on their new names, but random based on their original names.
I'll see what I can come up with in shellscript, although other people may well post something first! EDIT: Here we go: Code:
SOURCE="originals";This renames every file in the source folder to a random string of hexadecimal characters and moves the file to the destination folder. It preserves file extensions so can be used with folders containing multiple file types (e.g. mp3 and m4a). [b]Note:[/n] it does not check for duplicate file names in the destination folder (it can be done, but would take longer to code). For example, "originals/01 Penny Lane.mp3" becomes "obfuscated/a6f19aab.mp3" |
Quote:
|
Just seen your latest post, after editing my previous one. The Jeep not reading the ID3 tags is not good. The search for a solution continues....
(...new car? :D ) |
Quote:
Quote:
Quote:
Ain't Even Done With the Night John Mellencamp Ain't It A Shame - Demo, 1989 Nirvana Ain't It Fun Guns N' Roses Ain't No Fun (Waiting Round to Be a Millionaire) AC/DC Ain't Talkin' 'Bout Love Van Halen So for 5 songs in a row, I'd be listening to what something AIN'T about - in a manner of speaking. Your comment got me on the right mode of thinking though. I think I might have a solution to work up. Thanks (: |
Quote:
|
Code:
SOURCE=originals;* if you want 1000 tracks in the destination folder then change RNDIDX=${RANDOM:0:2} to RNDIDX=${RANDOM:0:3} So: $SOURCE/01 Penny Lane.mp3 $SOURCE/01 Revolution.mp3 $SOURCE/02 Fool on the Hill.mp3 could become: $DEST/43 Penny Lane.mp3 $DEST/54 Fool on the Hill.mp3 $DEST/98 Revolution.mp3 EDIT: here's how it works: For each file in the source directory, a random number in the range 0-99 is generated. If a temporary file corresponding to that random number is in the destination folder, we skip that file and move on to the next one. If no temporary file exists then this is a new random number and we move the file over, swapping everything up to the first space character (i.e. the track number in whatever album it is from) with the random number. If you don't want the existing track number to be removed then change f=${j#* } to f=$j . Then we create a temporary file indicating that the number has been used and carry on. |
Hey, thanks for putting that together! I wasn't expecting someone to do it for me (:
I ran your script. A couple of issues: a). It doesn't delete the temp files (easily fixed) (: b). It doesn't necessarily insert the correct number of songs into a directory. For example on my run it did 86 songs. c). I think your pattern matching is going to fail on some songs, which have file names like "02-4 Song Name" - renaming them to "-4 Song Name" after the random number (also easily fixed). I also need to "scale it up" to create multiple directories, insert songs in each, being sure to not repeat songs across the directories. But I can work on that, you guys have given me some great ideas. Thanks (: |
Quote:
Quote:
As for (c), it should work since "02-4 " will match with '* '. i.e. everything up to the first space will be replaced by the random number. However, it won't work on tracks with names like "01-Song Name". They'd get renamed to "XX Name" (where XX is the random number), since "01-Song " will match with '* '. But that's only a problem if iTunes isn't set to keep your library organised. Quote:
Code:
$MAXIDX=75 ; |
Quote:
a). In iTunes, create a playlist of whatever you want to deal with. b). Bring up that playlist, select all the tracks, and drag them to an empty directory, to create a copy of all the tracts of interest. I will refer to this as the "source" directory. c). Run my program (note: as written, it must be in the same directory as the source directory). d). Execute the output script it generates (movetracks.sh). e). Fire up Toast, configure to create an MP3 audio disk. Drag the directories created by movetracks.sh onto Toast, and then burn. Critical values (from plist): -name of output file (scriptFile) -file limit, number of songs per directory (fileLimit) -source directory name (sourceDir) -file extension to filter for (fileExtension) -output directory prefix (dirPrefix) PROGRAM SYNOPSIS: -uses an init sub to read a plist in user's home directory to get critical values. -read track names from source directory and put them in random order -create/open an output file -loop through the list of tracks -create and write a UNIX make directory command to the output file (as needed) -clean up the track name of the output (as needed) -prepend a sequential number to each track name (ensure ordering) -create and write a UNIX 'move file' command to the output file -close the file and make it executable You can look over the output file and see if it all looks good to you, before running it. When the output file is run, it will move files from the source directory into new directory structure, which contains X number of directories (based on the fileLimit value). So, if you run it with a source directory containing 1000 songs, with a fileLimit=100, it will create 10 directories, with 100 songs each - for example. Anyway - it seems to work. Seems reasonable for its purpose, but it's not bulletproofed or hardened or anything else - so it's quick and dirty. Be careful out there - and be sure to run it only on a copy of stuff from iTunes, not your master iTunes directory. This version is excessively complicated because it reads the critical values from a plist in the user's home preferences directory, but you could whack all that and just hard code values in as perl variables if you want (like the defaults are coded). KNOWN ISSUES: If an input file has backticks (`) in its name, problems ensue. So, any such files are SKIPPED and will not appear in the output script. Truthfully, such files should have their name changed in iTunes. On that note, as far as I can tell, the morons at Apple do not allow you to search (within iTunes) by file name, display file name in the "view" list, or do anything else with file name (or path name). WHY THE HELL NOT??? You can use useless crap, like beats per minute, but something USEFUL, like file name? Hell no. Idiots. Ok, Rant over (: I found the offending files from the command line, by doing the following from the directory above "iTunes Music" : Code:
find . -name "*\`*.*" -print./Du' Casco/CIRCUITO REGGAE 7/01 Du`Casco - Quem vai querer.mp3 ./Sammy Hagar/Marching to Mars/09 The Yogi`s so High (Im Stoned).mp3 So, I can change those file names and not have to worry about backticks anymore (: Code:
#!/usr/bin/perl |
Can I get a quick pointer on how to create a plist file please. I would like to try this script.
|
Quote:
1). Open "/Developer/Applications/Utilities/Property List Editor" 2). In the window that comes up, click on the "Root" element and then hit the "Add Child" button 5 times, to add 5 items. 3). Now, go through and rename all of the items from "New item..." to one of the item names needed. These are: scriptFile, sourceDir, fileLimit, fileExtension, and dirPrefix. 4). Next, change the Type for fileLimit to Number (the rest stay as String). 5). Now, assign the values you want to use. In my case, I am using the following: scriptFile - movetracks.sh sourceDir - songs fileLimit - 100 fileExtension - .mp3 dirPrefix - music_ 6). Finally, save the file in ~/Library/Preferences/trackmover.plist That's it. If you do not happen to have the Developer tools installed, you will need to manually create a file, using any text editor, that looks something like this: Code:
<?xml version="1.0" encoding="UTF-8"?>Also, regrarding point "d" in my previous post. You do NOT need to have the program in the same directory as the source directory, you only need to be in that directory when you run the program from the command line. Alternatively, you could specify a full path in the plist file, then you could be anywhere. If you specify a full path for the output directory prefix, then it would be even more flexible. FWIW, I installed this program in /usr/bin/local/trackmover.pl and made a link (ln -s) to /usr/bin/local/trackmover - so now I can run execute it by running "trackmover" from the command prompt, from anywhere. |
sorry for coming to this discussion late, but that seems like an UGLY mess of code. why not simply do this: set up your playlist in iTunes (using the shuffle option as needed to get a randomized selection), write an applescript that runs through the shuffled playlist and does the following:
|
Quote:
Quote:
Quote:
|
Quote:
|
umm, I would like to see the "draft". :)
|
Quote:
Code:
property burnFolderPath : (path to desktop as text) & "Burn Me" |
Looks nice - you've got the idea anyway.
Unfortunately, if you burn that folder "burn me" with Toast, all you get are the aliases, rather than the real files that will play in the Jeep (Toast warn about the .mp3 extensions, by the way). |
errr... the reason it's called a 'burn folder' is that you can just click the burn button in the folder itself, and the system will do it for you. no toast needed (unless you're hungry). admittedly, I've never tried to use a burn folder to burn a DVD, but there's kinks in every plan.
|
Quote:
|
ah, yeah... I got tricky and it snarked on me. use these lines instead, at the obvious places:
Code:
property burnFolderPath : (path to desktop as text) & "Burn Me.fpbf" |
Yep. That looks like a solution. I didn't actually burn it, but it was asking me for a disc, and said I needed 8GB or so. I'm assuming that if I followed through it it, it would make something that would actually work in the Jeep.
On a related note - I never heard of a burn folder before. Now, having had them pointed out to me, I can see an option for it as plain as day in the Finder's File menu. Go figure. |
Quote:
|
Quote:
|
| All times are GMT -5. The time now is 12:01 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.