View Full Version : To Doom9
ReferenceDivx
13th April 2002, 07:49
I was really excited that you linked to my site on your new article. I have really enjoyed your site and all your guides.
how to create ISO MP4 files containing AAC audio.
The only thing is that on 9th March 2002 11:01 I posted the details on how to do it.
I'm now working on a process to put a 800meg avi file on a 700meg disc. I'm having pretty good progess.
Anyways.
Have fun
Doom9
13th April 2002, 12:46
well.. as in the 800mb thread on this very forum it seems avi is not really suited for mode2. As a matter of fact I'm rather critical towards efforts to create something non standard (assuming mcf and ogm support mode2.. you need special disc access drivers so that you can even access the discs). Not so long ago (before XP) not being able to read SVCDs was quite common.
ppera2
13th April 2002, 14:35
I think that it is possible to make mcf driver for mode 2 CD's. For example, we have CD-I driver for Win9x, what works well. But I think that we will not have full 800 MB capacity, something will waste because of sector structure.
However I'm in doubt is it worth of effort. Looking for quality of average CD's, we will have lot of troubles with mode 2 disks. I have some movies, recorded before some 15 months, and they are barely readable (no cratches on disks).
Fortunatelly quality of encoding software and codecs is in fast progress, so we can now store not 13 % but perhaps 50 % more in same quality than year before.
ChristianHJW
15th April 2002, 00:51
ingo from the MCF dev team wanted to reply here, but he had cancelled his account a few weeks ago and had to reregister .... so he cant post because he is Newbie :D .... he replied to the MCF mailing list :
I can't post to the Doom9 forum, so I post here. I do prefer comunication
here anyway.
Windows CD driver exposes CD-XA tracks as normal files wrapped into a RIFF
structure. The MPEG 1 splitter filter is capable of parsing the RIFF-CDXA
structure. There's also a DirectShow filter, that does the same in the
MediaXW CVS. I won't make binary releases now! This is a work in progress
and nothing for users to play around with. If some one wants to help I can
assume that he has a compiler and is capable of installing a Platform SDK
and downloading my sources from CVS. For more information he should show up
on #mcf or here on this mailing list.
Some research has to be done to get a readable spec of the ISO/XA CDs, like
Video CD. A good starting point is to read the vcdimager sources, as already
someone suggested. So, if you want to help, grab the sources and try to
extract as much information as possible. Write that down into the text file
(or Word or TeX or whatever), so that we have a draft to work with. I
certainly don't have the time to do this now.
It not a good idea to put an AVI into a XA form 2 or mode 2 track. The
minimum requirement is some sort of checksum in the file, like for Ogg or
MCF. Additionally the header needs special protection from errors. A
solution to this could be to use form 1 sectors at the beginning and for the
rest of the file to use form 2 sectors.
There are two options: Either use mode 2 tracks (which contain 2336 bytes of
data) or xa form 2 sectos (with 2324 bytes). Video CD is xa, which means the
latter, and it is very likely, that an ISO/XA combo, like VideoCD, is
readable with the normal CD driver installed on Windows. If this is the
case, we just have to read the RIFF/CDXA files on the CD. Things, we need to
know here are:
- What has an ISO file have to look like to point to an XA track, which
means, what do we have to do to create an ISO/XA CD and have the Windows
driver expose the XA form 2 track as a RIFF/CDXA file.
- Does this only work with XA form 2 tracks or also with mode 2 tracks.
- If the WIndows driver does not expose the data track we have to read the
CD directly. On NT this can be done with the DeviceControl API function (See
the sources below). I don't know how to do this on Windows 9x, so someone
has to find out.
- Can we mix form 1 and form 2 sectors in one track. (Of course we are, but
is this track still exposed as a RIFF/CDXA)
Resources:
- The vcdimager project
- The cdrdao project
- The cdrecord project (Search for all these on www.freshmeat.net)
- Sources for DirectShow filters here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Base/Mode
2CDReaderFilter.hpp?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Base/Mode
2CDReaderFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/AVI/RIFFC
DXAReaderFilter.hpp?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/AVI/RIFFC
DXAReaderFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup
- Some test programs
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Test/Apps
/TestCDRawRead.cpp?rev=1.3&content-type=text/vnd.viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Test/Apps
/CreateRawCD.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup
Regards,
Ingo
Doom9
15th April 2002, 17:36
ingo can post now
DeXT
15th April 2002, 20:16
The links were broken. Here you have the fixed links:
Sources:
Mode2CDReaderFilter.hpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Base/Mode2CDReaderFilter.hpp?rev=1.1&content-type=text/vnd.viewcvs-markup)
Mode2CDReaderFilter.cpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Base/Mode2CDReaderFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup)
RIFFCDXAReaderFilter.hpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/AVI/RIFFCDXAReaderFilter.hpp?rev=1.1&content-type=text/vnd.viewcvs-markup)
RIFFCDXAReaderFilter.cpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/AVI/RIFFCDXAReaderFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup)
Test programs:
TestCDRawRead.cpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Test/Apps/TestCDRawRead.cpp?rev=1.3&content-type=text/vnd.viewcvs-markup)
CreateRawCD.cpp (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mediaxw/Src/MediaXW/Test/Apps/CreateRawCD.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup)
Related links:
MCF main page: http://mcf.sourceforge.net
MCF SourceForge page: http://sourceforge.net/projects/mcf
MediaXW main page: http://mediaxw.sourceforge.net
MediaXW SourceForge page http://sourceforge.net/projects/mediaxw
vcdimager: http://www.vcdimager.org
cdrdao: http://cdrdao.sourceforge.net
cdregord: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
DeXT
15th April 2002, 23:50
To answer some of Ingo's questions (with my little knowledge):
1. From what I've read elsewere, an ISO file pointing to a CD/XA track should be marked with "M" flag (Multimedia? probably some XA flag), and the start LBA pointed from it is the same start LBA for the M2F2 track. The file name is not hardcoded within Windows CDFS, it can be anything (VCDs use DAT, SVCDs use MPG). The file is actually in the ISO structure, just like any other file.
2. This probably only works with M2F2/XA tracks (2324 b/s) since the ISO track also has some XA extensions (i.e. we are talking about CD-ROM/XA format here, so everything should be XA I think).
3. I think Windows should be able to read it fine provided it follows the CD-ROM/XA standard. SVCDs are also Bridge type CDs and are also being properly recognized by Windows (and I'm sure there is no specific "VCD" and "SVCD" support, just CD-ROM/XA-Bridge support).
4. I don't think this is allowed by the CD/XA standard, merging two different Form type sectors in a single track, at least within a single file. This could be allowed for different files, though.
(I haven't read the Philips' XA standard, just some guessing and personal research)
[Edited]
Well, seems I did it... I've found out this "M" flag and also the RIFF-CDXA format tag:
RIFF-CDXA format (c-like structure):
uint8 riff[4] // 'RIFF'
uint8 rlng[4] // riff_length
uint8 cdxa[4] // 'CDXA'
uint8 fmt_[4] // 'fmt '
uint8 flng[4] // 0x10 (fmt_length)
uint8 nul1[4] // 0
uint8 xasg[4] // xa_signature = { 0x15, 0x55, 'X', 'A' } // more on this later
uint8 xatr[4] // xa_track_number
uint8 nul2[4] // 0
uint8 data[4] // 'data'
uint8 dlng[4] // data_length
uint8 rawd[ ] // track raw data
The xa_track_number is the absolute CD track number starting with 0 (so the second track, i.e. the first XA one, is number 1)
The RIFF-CDXA header is hardcoded at CDFS.SYS. The CD is being recognized as CD-ROM/XA format by the "CD-XA001" signature in the ISO track, block no. 16 (i.e. PVD), user data offset 0x400.
About this "M" flag... well every file record in the ISO structure has a "XA" signature, with the form { xx, xx, 'X', 'A' }, the first two numbers are the file type. From what I've seen this is:
0x15, 0x55 = Form2 file (2324)
0x0D, 0x55 = Form1 file (2048)
0x8D, 0x55 = Directory Record (I have to verify this)
In the VCD ISO structure there are only 2 files which needs to be recorded as Mode2/Form2:
MPEGAV\AVSEQxx.DAT (as you already know)
CDI\CDI_IMAG.RTF
Both files have the "0x15, 0x55" XA signature. The other files has the "0x0D, 0x55" signature.
Interestingly enough, the CDI_IMAG.RTF actual data is inside the first ISO track, and not as a separate track. So yes, you can have Form1 and Form2 data mixed in a single track, provided they are linked as different files with the right XA flags.
I think this info should be useful for you. All found out only with ISObuster and a hex viewer... not bad :)
Christian, would you be kind enough of posting this in mcf-dev ml... I'm sure you are, as you previously did it ;)
Tronic
16th April 2002, 01:31
Trying to gather all relevant MCF-CD info here:
http://mcf.sourceforge.net/mcf-cd.htm
DeXT
16th April 2002, 14:07
Ingo, I've found much more complete information about this subject, I've posted it here:
http://forum.doom9.org/showthread.php?s=&threadid=23033
Of course my RIFF/CDXA format tag description was incomplete, the complete XA signature format is described there. Since the fmt tag is 16 bytes long, seems the xa signature is padded with 2 zero bytes.
Hope you may find it useful...
DeXT
16th April 2002, 16:58
Sorry, my mistake :) Here is the good link:
http://forum.doom9.org/showthread.php?s=&threadid=23254
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.