LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-31-2006, 05:47 PM   #1
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Rep: Reputation: 15
Detecting Burnable Media


Does anyone know how to detect the type and capacity of an arbitrary burnable disc inserted into a disc writing drive? I have used cdrecord -atip to no avail. Essentially, what I need is a program that will simply output the type and capacity of the disc in the drive. The capacity can be in any format so long as I can use the information provided to establish an approximate number of bytes.

I am writing a program which uses a bash script to perform a backup of a large file. The end user may have various types of writable media to use and my software needs to be able to correctly establish how big the media is and whether to use wodim/cdrecord or growisofs.

Anyone have any suggestions?

Cheers!
 
Old 10-31-2006, 09:20 PM   #2
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
What your looking for a libcdio which has to prog cdinfo and a few other helpful tools
 
Old 11-01-2006, 04:39 AM   #3
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
Hi! Thanks for the reply.

Can you elaborate on cdinfo? I found a program named "cdinfo" in relationship to "cdtool", but it seems to be intended to collect information about audio CDs; it doesn't produce any useful information for me regarding data size of writable media. Is there a specific program or command you have in mind?

Thanks again.
 
Old 11-01-2006, 04:48 AM   #4
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
I think I may have found something of interest... the Debian package libcdio6 (as well as libcdio3) does not contain the program "cd-info" (which is apparently different from cdinfo; go fig). I have no idea why it doesn't but there you go. As a matter of fact, I can't find any Debian packages in either the AMD64 or IA32 repositories that contains cd-info. I suppose I can compile it myself, but it seems a little strange.

Well, here goes.
 
Old 11-01-2006, 05:25 AM   #5
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
Update: I have been unable to get "cd-info" or any of the other test programs that come with libcdio to produce any meaningful information about the media. "cd-info" particularly is quite good and describing the drive, the media's track information, and so forth, but it has not specified anything about the medium's capacity.

I know that this is possible because K3b has a dialog which provides disc information; among other things, it lists the capacity of the medium. However, I am not sure I have the proficiency necessary to read K3b's source with any kind of speed. Hence, I post here.
 
Old 11-05-2006, 08:26 AM   #6
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
I managed to get satisfactory results out of a combination of the programs "dvd+rw-mediainfo" and "cdrdao" (using the "disk-info" parameter). Through observing the output and failure of executing these programs, I can determine the media type and size to a reasonable degree of certainty.

Cheers, all!
 
  


Reply



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
A Media Management Sytem (Windows Media Centre) for linux? carl0ski Linux - Software 5 12-07-2005 07:52 PM
Text to Speech to Mp3 ( Or any other CD Burnable Format) hubs99 Linux - Software 3 06-26-2005 12:40 PM
Cannot read package data from installation media. Media error? </m0r1arty> SUSE / openSUSE 2 01-26-2005 07:57 PM
Detecting write-protection on DVD-RAM media SMes Linux - Software 0 11-24-2004 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:23 AM.

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
Open Source Consulting | Domain Registration