LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-07-2008, 01:10 AM   #1
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Rep: Reputation: 16
I have an image file (.iso) made from an audio CD. How can I listen to the music?


I have an image file (.iso) made from an audio CD. How can I listen to the music in the image?
 
Old 11-07-2008, 01:40 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
burn it to a CD and play it.

how did you get the iso?
what happens if you try to mount the iso?

Have a look through:
http://lalists.stanford.edu/lau/2002/12/0144.html
 
Old 11-07-2008, 02:16 AM   #3
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Orleans, 120 km south of Paris
Distribution: Mandrake, Freeduc (the one I'm making), Slackware, MacOS X
Posts: 115

Rep: Reputation: 20
Question

Quote:
Originally Posted by lawrence_lee_lee View Post
I have an image file (.iso) made from an audio CD. How can I listen to the music in the image?
I don't think it possible, unless you find a CD-Player software able to read directly from disc images.
 
Old 11-07-2008, 04:32 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
An audio CD doesn't have a real filesystem. So you can't mount it. I would expect that an audio cd image would have an .img extension. Look at the file with "file <filename>". If it says that is is an iso9660 image, then maybe your ripping software converted the cd to an iso9660 image made up of cda or wav files. If that is the case, you can mount the file:
sudo mount -t iso9660 <filename> <mountpoint> -o ro,loop

Last edited by jschiwal; 11-07-2008 at 04:40 AM.
 
Old 11-07-2008, 05:55 AM   #5
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Original Poster
Rep: Reputation: 16
I use the command "file" to look at the image. It said that it is "data"

I cannot mount it. There is no filesystem in the image... What should I do? By the way, I cannot believe that there is no way listen to the music in an CD image. Even MS Windows has software to do this! How come there is no way for Linux?

By the way, the image extension ".iso" is added by me. So it does not mean that the image contain a ISO9660 file system...
 
Old 11-07-2008, 05:58 AM   #6
FredGSanford
Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia Cauldron & Salix 14
Posts: 943
Blog Entries: 5

Rep: Reputation: 88
When you created it, did you choose 'data' or 'image' during the process? Have you tried burning it to a cd disc as Simon Bridge mention?

Also see if the program xarchiver will let you extract the songs.

Last edited by FredGSanford; 11-07-2008 at 06:03 AM.
 
Old 11-07-2008, 09:55 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
a few options.

Burn it to a cdrom

mount it (might not work these days, but used to iirc)

cdda2wav -device file.iso

xmms file.iso

In theory most media apps should be able to treat the file like a device. And read it accordingly. You might have to enable digital extraction since there's no audio cable connecting the file to the soundcard. Although a lot of modern computers don't have that cable anymore anyway.

CD audio is 2 channels of 16 bit 44.1kHz audio. The format on the cd is big endian. The playable wav version is little endian. AFAIK, the file format is the same, except for the byte order.
 
Old 11-07-2008, 02:02 PM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by Shadow_7 View Post
a few options.

Burn it to a cdrom

mount it (might not work these days, but used to iirc)
No, it didn't use to, at least with a stock kernel (unless that feature existed in 2.2 or early 2.4 and it was removed at a later stage, which I highly doubt). As said, audio cds lack a file system, and the only fs's that I know of that are supported for a cdrom in a stock kernel are iso9660 and udf, none of which is related to audio cds. The cdda format as described in the handbook doesn't have any fs-like structure behind it. There are external projects that might help you though. Try cdfs.

http://users.elis.ugent.be/~mronsse/cdfs/

You might be able to use cdfs to mount your iso in loopback mode. It's long since the last time I tested cdfs and I don't know if it's still maintained and if it will work against the newer kernels. But it's worth a try.

There was also an audiofs project, but I can't seem to find it anymore. I think it just died.

Some players might as well be able to play it without problems. Mplayer might play it. However I don't think you can change tracks and things like that unless there's some specific support that allows treating the file as a device as you said.

Last edited by i92guboj; 11-07-2008 at 02:04 PM.
 
Old 11-07-2008, 04:06 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
Quote:
Originally Posted by i92guboj View Post
No, it didn't use to, at least with a stock kernel (unless that feature existed in 2.2 or early 2.4 and it was removed at a later stage, which I highly doubt).
It was a 2.4.x kernel. Custom compile, but shouldn't be that different from most stock kernels. Back in the 2.4.14-ish days. It used to mount, I swear it did, and used to show some sort of track01.cda type files. This was long before DRM measures and other man made limits. And is no longer an option afaik. It's all bits and bytes, so there has to be some sort of implied filesystem. Otherwise CD-Text and stuff would be handled very oddly. It's all bits and bytes to some degree. But that doesn't mean that it's an iso9660 filesystem.
 
Old 11-07-2008, 05:24 PM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by Shadow_7 View Post
It was a 2.4.x kernel. Custom compile, but shouldn't be that different from most stock kernels. Back in the 2.4.14-ish days. It used to mount, I swear it did, and used to show some sort of track01.cda type files. This was long before DRM measures and other man made limits. And is no longer an option afaik.
Well, that's possible. By the time of 2.4 I rarely built a kernel since I was not that knowledgeable about linux by that time, and compiling a kernel was nothing that could be done in a breeze in a classic 133mhz pentium cpu. It could take a lot of hours to do so. It's perfectly possible that I bypassed that option, though it seems odd to me that such capability existed on a stock kernel and was then removed (admittedly, it's not impossible).

It's also possible that it was your distro adding the audiofs patch or something like that... Some distros add patches to the vanilla kernel so we can't discard that. I am more inclined to think that this was the case, because, in first place, if there were builtin support in the kernel to do this, then why would anyone design a 3rd party patch to do the same?

In any case, the cdfs seems as the way to go right now.

Quote:
It's all bits and bytes, so there has to be some sort of implied filesystem. Otherwise CD-Text and stuff would be handled very oddly. It's all bits and bytes to some degree. But that doesn't mean that it's an iso9660 filesystem.
Well, the affirmation that an audio cd doesn't have a fs has more to do with the fact that the red book (which defines this standard) has nothing on it specifying such a thing like a file system. However, as you say, it's all bits and bytes. If you have a driver to handle it on an fs-like fashion, then, to all effects you can consider that you have a file system. cds certainly can be accessed on a random fashion, and you know where a track begins and end, so, it's perfectly possible to manage this like if they were files. It's just a matter of interfacing it correctly using a driver, which is what the cdfs does.

As you see, the line about what has a fs and what hasn't is very thin. Conceptually, you can do an fs-like handler for almost anything, from databases to remote shares or even the whole web if we wanted.
 
Old 11-09-2008, 04:28 AM   #11
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by lawrence_lee_lee View Post
I use the command "file" to look at the image. It said that it is "data"

I cannot mount it. There is no filesystem in the image... What should I do? By the way, I cannot believe that there is no way listen to the music in an CD image. Even MS Windows has software to do this! How come there is no way for Linux?

By the way, the image extension ".iso" is added by me. So it does not mean that the image contain a ISO9660 file system...
Well - you didn't answer my questions. How did you make the image?

MS can play CUE/BIN images - I don't thing they can just play a bitwise captured datastream. Which is why the type of image is important. Which software are you thinking of?

Note - your on-disk collection will benifit from being converted from raw images to a collection on FLAC files. No quality loss, and smaller size. Same portability.
 
Old 11-10-2008, 09:52 AM   #12
lawrence_lee_lee
Member
 
Registered: May 2007
Posts: 141

Original Poster
Rep: Reputation: 16
The way I made the image is like the following,

Quote:
cdrdao read-cd --read-raw --datafile /home/image.iso --device /dev/hdb -v 2 /home/image.iso.toc
So, what is the next thing to do in order to play the music in the image?
 
Old 11-10-2008, 10:35 AM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Did you try cdfs already?
 
Old 11-11-2008, 12:47 PM   #14
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,773

Rep: Reputation: 197Reputation: 197
Saved this from a couple years back. Is this what you are trying to do?

Code:
So, the first thing you need to do is read the CD to a temporary file on the hard drive. To do that, pop the "protected" cd in your drive, and run this command (all on one line):

cdrdao read-cd --source-device /dev/sg0 --device /dev/sg0 --driver generic-mmc --datafile /tmp/my_cd.dat /tmp/my_cd.toc

This will read the disc from device /dev/sg0 and create two files: /tmp/my_cd.dat and /tmp/my_cd.toc. 

The next step is to create a new CD from your temp files. Run this command (all on one line):

cdrdao write --device /dev/sg0 --driver generic-mmc /tmp/my_cd.toc

With luck, you will now have a copy of your disc, minus the annoying copy protection. Use grip to rip the newly created disc.

Occasionally, this will result in a disc with tracks that have blank space at the beginning/end. You can either edit the blank space after ripping, or tell grip to adjust the start/end sectors.
Substitute your own drive parameters.
 
  


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
can't mount the iso image file gbstack Linux - Newbie 3 09-06-2008 11:16 AM
Help in generating an audio iso image using genisoimage. jaepi Linux - Software 4 11-10-2007 04:57 AM
mount .iso (image) file and read *.avi file smartdragonfly Linux - Software 2 12-21-2006 05:48 AM
How may I add a file to an ISO image? geraldomanaus Linux - Newbie 6 04-24-2003 06:27 PM
Installation from iso image file? carboncopy Slackware 1 04-17-2003 11:45 PM


All times are GMT -5. The time now is 11:47 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration