LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2005, 02:16 AM   #1
Simoncifer
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0 Official Edition
Posts: 8

Rep: Reputation: 0
DVD Media Code


Hi, does anyone know which program can read and show the DVD's media code? You know, kind of like the ATIP of the CDR, DVD has the code on the disk showing the manufacturer and info "RICOHJPNW11".

I mean, when I use K3b, the debug window shows that cdrecord display the ATIP code, but when I burn DVD using K3b or growisofs, they don't show the media code.

Thanks in advance.
 
Old 01-07-2005, 05:21 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
cdrecord dev=x,x,x -atip

You could also try:
cdrecord -dummy

Cool
 
Old 01-08-2005, 02:40 AM   #3
Simoncifer
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0 Official Edition
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks. Didn't know that cdrecord works for DVD also. But when I tried the command, it gives me information on CD-R, but for DVD-R or DVD+R, cdrecord would always said unknown dye:
Code:
Disk type:    unknown dye (reserved id code)
Manuf. index: -1
Manufacturer: unknown (not in table)
I guess it is trying to look up a table of the existing manufacturer and disk type. Is there some way to make cdrecord print the original code, like how people post the result from DVDInfoPro/DVDIdentifier (both Windows programs) on videohelp.com? Example:
Code:
08 02 00 00 01 0F 02 00 00 03 00 00 00 26 05 3F .............&.?
00 00 00 00 00 00 01 52 49 43 4F 48 4A 50 4E 52 .......RICOHJPNR
30 31 02 38 23 54 37 09 00 3C 67 00 AC 62 16 18 01.8#T7...g..b..
0B 0B 0A 0B 01 19 1B 0B 0B 0E 0F 01 00 00 00 00 ................
Thanks.
 
Old 01-08-2005, 03:48 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Not off the top of my head, but you may be able to grab different info using different dvd-writing applications (growisofs, dvdrecord..).

Cool
 
Old 01-16-2005, 05:52 AM   #5
Simoncifer
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0 Official Edition
Posts: 8

Original Poster
Rep: Reputation: 0
I am including the following information in case someone else is interested:

After many days/weeks of search, when I stopped looking for the answer, I stumbled upon it. The package dvd+rw-tools comes with a program called "dvd+rw-mediainfo", which print out some information about the DVD media code, although not in the raw format.
 
Old 01-16-2005, 05:58 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Cool but it's more info than cdrecord provides then? Was it enough?

Cool
 
Old 01-22-2005, 04:16 AM   #7
ivanova
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
With some media dvd+rw-mediainfo returns the media code, but with some cheap media it doesn't. It would help if the raw text could be extracted somehow.
 
Old 01-22-2005, 05:24 AM   #8
ivanova
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Isn't there some device or file that you can use something like
'dd if=/dev/whatever of=tmp.txt bs=16 count=4' with?
 
Old 01-22-2005, 03:29 PM   #9
ivanova
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Looking at the source code for dvd+rw-mediainfo - If you pass more than one argument it will print all the raw data in hex.

I wrote a small script to make it more readable:
Code:
#!/usr/bin/python

import re, sys, codecs

data = sys.stdin.read()
rep_data = re.sub(r'( [0-9a-fA-F][0-9a-fA-F])\s*\n\s*([0-9a-fA-F][0-9a-fA-F] )',r'\1 \2',data)
lines = rep_data.split('\n')
for s in lines:
    r = re.compile('(.*:[^0-9a-fA-F]*)(([0-9a-fA-F][0-9a-fA-F]\s+)+)',re.DOTALL).search(s)
    if r:
        hex = re.sub(r'([0-9a-fA-F][0-9a-fA-F])\s*',r'\x\1',r.group(2))
	hex_dec = hex.rstrip().decode("string_escape")
	sys.stdout.write(r.group(1)+'\n\033[1;37m')
	for x in range((len(hex_dec)/16)+1):
	    sys.stdout.write(' %08x ' %(x*16))
	    for i in range(16):
		try: sys.stdout.write('%02X '%ord(hex_dec[(x*16)+i]))
		except: sys.stdout.write('   ')
	    for i in range(16):
		try:
		    if ord(hex_dec[(x*16)+i]) < 16:
			sys.stdout.write('.')
		    else:
			sys.stdout.write(hex_dec[(x*16)+i])
		except: sys.stdout.write(' ')
	    sys.stdout.write('\n')
	sys.stdout.write('\033[0m')
    else:
	sys.stdout.write(s+'\n')
Just pipe the output of dvd+rw-mediainfo into the script like so:
# dvd+rw-mediainfo /dev/hdb anotherargument | /path/to/decodescript
 
Old 01-31-2005, 05:46 AM   #10
Simoncifer
LQ Newbie
 
Registered: Jan 2005
Distribution: Mandrake 10.0 Official Edition
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks. That will come in handy
 
  


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
DVD media error sun.silver Linux - Hardware 4 11-23-2005 08:02 AM
SuSE 9.2 and DVD-RW media littlejimmy4x4 SUSE / openSUSE 0 07-04-2005 04:52 PM
DVD Media error... stormwolf Linux - Laptop and Netbook 3 06-24-2004 11:24 PM
Where can I find source code for CPRM (content protection for recordable media)? George2 Linux - Security 2 02-26-2004 01:02 AM
How to burn a DVD-9 on a DVD-5 media yktang Linux - Software 1 07-15-2003 05:50 AM


All times are GMT -5. The time now is 06:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration