You are not logged in.
I googled around for this but haven't found a solution. I want to take a directory of wav files and write them to an iso file that can be burned off to a CD (a functional audio CD) at a later time. Closest I found is using /usr/bin/genisoimage but it doesn't make an audio CD image, rather, just a data iso.
genisoimage -o test.iso ./music/*.wav
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I haven't tried it:
http://linuxdevcenter.com/pub/a/linux/2 … tml?page=2
cdrecord -v speed=2 dev=0,0 -audio /home/dlphilp/soundfiles/cd-audio/my_songs/*.wav
Edit: Argh, you wanted to burn it later. Sorry, back to the drawing board.
Edit 2: Have you tried the cue + bin pair instead of an iso?
Last edited by karol (2012-07-02 22:53:29)
Offline
Love to, but it has to be from the shell... any ideas there?
EDIT: Getting closer I think. Using sox to convert flac files to .cdda files and then make a toc file:
find . -type f -name *.flac | parallel sox {} {.}.cdda
for file in *.cdda; do echo "TRACK AUDIO" >> toc; echo "FILE \"$file\" 2" >> toc; done
Now cdrdao can be used to write out to a CDR drive... now to figure out how to redirect to an iso file???
Source: http://duganchen.ca/burning-gapless-audio-cds-in-linux/
Last edited by graysky (2012-07-03 00:50:45)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Install shntool and cdrdao.
$ shntool cue *.wav > foo.cue
$ shntool join *.wav
$ cdrdao write --device /dev/sr0 foo.cue
Test it
$ mplayer cdda://
<blah blah blah>
Playing cdda://.
Found audio CD with 2 tracks.
Track 1
Detected file format: rawaudio
<forwarded a bit>
A: 347.8 (05:47.7) of 642.2 (10:42.1) 1.7%
Track 2
A: 350.0 (05:50.0) of 642.2 (10:42.1) 1.8%
Offline
@karol - right but I don't want to actually write the it out to physical media; I want to keep it as an iso file so I can mount it via:
$ sudo mount -o loop /path/to/foo.iso /mnt/fake_cd
It's like I need cdrdao to support a null device or image writing mode which I can't find documented
Last edited by graysky (2012-07-03 00:56:04)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I'm confused. You can't mount an AudioCD, not sure if it's possible with an "AudioCD image".
What exactly are you trying to do?
Offline
I want to mount the image as a virtual CD for the wife to get the files into iTunes for her damn iPod. There is software for windows that allows mounting in this fashion.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
OK... your suggestion worked. Now how can I automate this on a per-directory basis? In other words, starting in /path/to/music go into each directory and execute each of the following commands.
bincue() {
shntool cue *.flac > foo.cue
shntool join *.flac
}
I was thinking something like the following but it doesn't work:
$ find /path/to/music -type d | parallel cd {} && bincue
EDIT: Seems like daemontools can mount a wav/cue as a drive such that itunes can then access it to encode. A pure Linux solution would be preferred, but opensource aac encoders are inferior to the codec itunes uses per my reading.
Last edited by graysky (2012-11-06 21:04:25)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
graysky,
to my limited knowledge ISO files are not capable of dealing with multiple audio tracks inside the image. Bin / cue is the way to go here.
If you know a bit python you might want to check out the two script I posted a few days ago.
Simply check out:
https://bbs.archlinux.org/viewtopic.php?id=56646&p=74
My posting is #1939
On script generates M3U files based on recursive MP3 search inside each subdirectory while the other shows parallel MP3 encoding in multiple ffmpeg processes. I guess you could easily modify my recurseM3U script to do your per-directory stuff.
While I know that it is cool to do stuff with one or two simple bash commands inside one line, it is often more effective to use a few more lines Python or Perl.
Just my two cents,
D$
P.S.: Let me know if I can help...
Last edited by Darksoul71 (2012-07-05 12:17:02)
My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick
Offline
https://bbs.archlinux.org/viewtopic.php?id=56646&p=74
My posting is #1939
It's #1839: https://bbs.archlinux.org/viewtopic.php … 9#p1123189
The link to a specific post is "hidden" under time/date of the post - move your mouse over it to get the url to copy, bookmark etc.
Offline
Ah ! Thanks, you never stop to learn things
I have no clue why I mentioned the wrong number though....
Thanks karol...
Last edited by Darksoul71 (2012-07-05 12:22:25)
My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick
Offline
graysky,
this is how a simplified single process script could look like:
#!/usr/bin/python
import os
# Grab all subdirectories within the current directory
search_sub ="find ./* -type d"
dirlist = []
for subdir in os.popen (search_sub):
dirlist.append(os.getcwd() + subdir[1:-1] + '/')
for cur_dir in dirlist:
os.chdir (cur_dir)
os.popen ("shntool cue *.flac > foo.cue")
os.popen ("shntool join *.flac")
You might want to give it a shot at a trial copy of your audio directories.
Edit:
A quick prototype for multiple encoding processes:
#!/usr/bin/python
import os
import multiprocessing
def bincue ():
while not q.empty():
cur_dir = q.get()
os.chdir (cur_dir)
os.popen ("shntool cue *.flac > foo.cue")
os.popen ("shntool join *.flac")
# Init Queue for found sudirectories
q = multiprocessing.Queue()
# Grab all subdirectories within the current directory
search_sub ="find ./* -type d"
for subdir in os.popen (search_sub):
q.put (os.getcwd() + subdir[1:-1] + '/')
cores=multiprocessing.cpu_count()
for i in range (cores):
process = multiprocessing.Process(target=bincue, args=())
process.start()
Last edited by Darksoul71 (2012-07-05 14:47:54)
My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick
Offline
Thanks for the offer, ds. Makes me wanna learn python.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
You are welcome ! Python is really easy to learn. A bit of OOP knowledge will not hurt though.
Just drop me a PM if I can help. I tested the script so far to tell that it changes into the found sub-directory.
I did not test the part with the shmtool though.
My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick
Offline