libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] Re: Retrieving DATA session from multisession audio


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] Re: Retrieving DATA session from multisession audio disc
Date: Thu, 18 Feb 2010 04:22:29 -0500

libcdio is a library which has some command-line utilities. The initial
purpose of the command-line utilities were to show off the libraries and
give some measure on whether the library was doing the right thing. And the
command-line utilities are useful in testing to see if things work.

Of course, changes to both library and command-line utilities are welcome.
Generally if folks are willing to dig in and suggest changes things will go
faster. I don't really have any need or use for any of this. I'm happy to
help others though.

So now let's see how we might be able to get closer to addressing the
problems encountered. From the example shown, it looks like there is an ISO
9660 file system located at a track other than the first track, and
libcdio's iso-info seems to only be able to handle reading when this
filesystem in the first track.

One suggestion was to allow iso-info to take some sort of sector offset
correction as an option.  It sounds though that also adding an option to
allow feeding in a track number would be helpful too.

Adding these new features to iso-info is fine, but it looks like there is a
more fundamental deficiency in the library which assumes a fixed block
location of the "Primary Volume Descriptor" or PVD. So in order to
accomplish this I think there will need to be a library change. That's okay
too -- with the same caveats above.

Also, what would help in developing such changes would be to have a *small*
CD image and/or extracted ISO 9660 filesystem. See for example
test/data/copying.iso (this is the location in the current git sources) for
an example of a small ISO 9660 filesystem. See test/data/cdda.{bin,toc,cue}
for an example of a small CD image.

Thanks


On Thu, Feb 18, 2010 at 3:21 AM, Eric Shattow <address@hidden> wrote:

> I've read the responses, thanks guys.
>
> I want to do all these things using libcdio:
>
> A) Extract a DATA track from a multi-session audio disc, output to ISO file
> format. Duplicate the functionality of 'extricate'.
>
> B) Interact with the ISO file that has strange offsets (in the case of
> dumping data track 11 from the 10 track audio disc).  List contents of ISO,
> extract contents.
>
> C) Tool to modify in-place the "offset" of an ISO file sector references,
> transforming the ISO file that has strange offsets into an ISO file that
> existing tools can understand. Also to take a "normal" ISO and change the
> offsets so that it is valid to burn as 2nd session and make your own
> CD-EXTRA disc.
>
> On Wed, Feb 17, 2010 at 8:24 AM, Thomas Schmitt <address@hidden> wrote:
>
> > Hi,
> >
> > Eric Shattow wrote:
> > > How to extract the data session from a multi-session audio cd and
> > interact
> > > with the resulting "offset" ISO using libcdio tools?
> > > $ extricate /dev/sr0 8mm-songs_to_love_and_die_by.iso
> > > ...
> > > Remember, the path table and directory structure of the iso reflect
> > > the fact that the ISO filesystem starts on sector 222145 (49:23:70)
> > > of the CD.
> >
> > Robert William Fuller wrote:
> > > modprobe loop
> > > mount -o loop,sbsector=somenumber foo.iso /mnt
> >
> > -o sbsector=  points to the start block of the
> > desired track if it is at the original position.
> > But Eric's is displaced by 222145 blocks of 2 kB.
> >
> > Adventurous testers could try losetup option -o
> > with a negative value or mount option "offset".
> >
> >
> > I'd rather propose to put the ISO image onto a
> > CD sized podium.
> > First create a placeholder of 222145 blocks
> > by writing one block to address 222144:
> >
> >  dd if=/dev/zero \
> >     bs=2K count=1 seek=222144 \
> >     of=cd_dummy.iso
> >
> > Then append the ISO 9660 track content
> >
> >  cat 8mm-songs_to_love_and_die_by.iso >>cd_dummy.iso
> >
> > This image should be mountable on GNU/Linux by
> >
> >  mount -t iso9660 -o loop,sbsector=222145 \
> >        cd_dummy.iso /mnt
> >
> >
> > Hopefully the placeholder becomes a sparse file
> > which consumes only a few KB of disk space. Be
> > aware that it might consume its full size when
> > being copied.
> >
> >
> > ------------------------------------------------
> > For the first part of Eric's question:
> >
> > It should be possible to read the data track
> > by normal shell commands. One needs to know
> > where it begins. Nice to know is the size
> > (can be tricky to evaluate, though).
> >
> > >  11: 49:23:70  222145 data   false  no
> > > 170: 49:44:24  223674 leadout (501 MB raw, 501 MB formatted)
> >
> > Try:
> >
> >  dd if=/dev/sr0 bs=2K \
> >     skip=222145 count=1529 \
> >     of=8mm-songs_to_love_and_die_by.iso
> >
> >
> > Have a nice day :)
> >
> > Thomas
> >
> >
> >
> >
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]