View Full Version : CD/XA Mode 2 under linux ?
brunooo
10th February 2005, 14:47
Hi,
I burned a XVid movie on a CD using CD/XA Mode 2 Form 2 ISO bridge type (this is similar to VCD but open to any content and not just MPEG files). I used Mode2CDMaker for that (http://es.geocities.com/dextstuff/mode2cdmaker.html).
Under Win Xp, I have no problem to read this CD, using "Riff CD/XA" DirectShow filter.
Under linux, I cannot read it, using MPlayer or Xine.
I tried to mount the CD using cdfs driver, but I cannot have the movie played anyway.
Does anybody know how to process ?
Thanks
echo
11th February 2005, 16:33
In the same page you posted (http://es.geocities.com/dextstuff/mode2cdmaker.html) there is a "Driver to read VCDs/Mode2 CDs under Linux" link. I guess that should work, and you could also use the dat2file program that comes with the linux build of mode2cdmaker (link also in the same page) to copy the movie to you HD and play it from there...
KpeX
11th February 2005, 17:56
mplayer vcd://2
works for every XCD I've ever made.
brunooo
12th February 2005, 12:57
Thanks Echo and KpeX for your replies.
1) KpeX, mplayer vcd://2 returns an error ! I think this is because there is only a single track on the CD. Here is the returned message:
-----------------------------------------------------------
Playing vcd://2.
track 01: adr=1 ctrl=4 format=2 00:02:00 mode: 0
ioctl dif1: Argument invalide
Error selecting VCD track. (seek)
Failed to open vcd://2
------------------------------------------------------------
I tried: mplayer vcd://1. It can find the track on the CD. It starts to read but cannot play the movie anyway. I think this is because mplayer cannot manage with the dshow RIFF CD/XA header (?). By the way, the movie container is OGM, the sound is OGG and the video Codec is XviD. Here is the output:
------------------------------------------------------------
Playing vcd://1.
track 01: adr=1 ctrl=4 format=2 00:02:00 mode: 0
Cache fill: 19,29% (1617504 bytes)
Cache fill: 19,29% (1617504 bytes) RAWDV file format detected.
==========================================================================
Opening audio decoder: [libdv] Raw DV Audio Decoder
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Cannot find codec 'dvaudio' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x56444152.
Read DOCS/HTML/en/codecs.html!
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 480 (preferred csp: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x480 => 720x480 Packed YUY2
Selected video codec: [qdv] vfm:dshow (Sony Digital Video (DV))
==========================================================================
Audio: no sound
Starting playback...
V: 0,0 0 0% 0% 0,0% 0 0 0%
Exiting... (End of file)
------------------------------------------------------------------
I think maybe I have to import the dshow RIFF CD/XA Window Codec to use it with mplayer ? Sounds tricky on http://www.mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html#codec-importing...
Echo, "Driver to read VCDs/Mode2 CDs under Linux" is the cdfs driver.
It allows to mount the CD in a special way:
mount -t cdfs -o ro /dev/cdrom /mnt/cdfs
This driver doesn t change anything anyway. I can have access to the file but mplayer fails to play the movie... Seems to me it is related to the unability to decode the RIFF header.
Any idea ?
echo
12th February 2005, 22:21
mplayer vcd://2 never worked for me either...
And I never really tried that cdfs driver either. I have a very small number of XCDs and since I always copy the movies to the HD and then play (I hate the CD spinning noises), XCD or not, I always use dat2file which works fine for me. Have you tried it yet?
brunooo
13th February 2005, 11:29
dat2file worked fine for me under Windows.
But is there any version for linux ?
echo
16th February 2005, 10:57
Download the static build of "Mode2 CD Maker 1.5a Linux build" (same page as above)
edit: poage -> page :rolleyes:
brunooo
17th February 2005, 15:26
Thanks Echo for your message.
Following your indication, I installed dat2file under linux but it doesn t work...
I got the error message : "unknown chunk id [] encountered".
My file has a ogm container. It is encoded with the xvid video codec and the ogg audio codec. Maybe it is not handled by dat2file ? The document about VCD tools for linux only refers to MPEG format...
What have you converted using dat2File ?
echo
18th February 2005, 12:08
The few XCDs I have are all the same as yours. ogm container with xvid video and ogg audio. And they work fine here. I just tried one in case I was wrong and the copied file played perfectly with mplayer...
I think I remember the XCD format was subject to constant change, so maybe yours was created with an old version of mode2cdmaker that doesn't work with the current tools anymore? I don't remember what version I used to create my XCDs so I don't really know, I could be talking nonsense here...
brunooo
18th February 2005, 14:41
My version of Mode2CdMaker under Windows is a recent one too, so it seems that dat2file should work for me too. Why doesn it work yet ?
As far as I understand, CD/XA has two encoding forms, as defined by the Extended Yellow Book:
In Form 1, only 2048 bytes out of the 3234 available bytes of each sector are available for writing information. Other bytes are used mainly for the Error Correction Code (ECC).
In Form 2, 2328 bytes are available. Less bytes are reserved for the ECC.
My file, film.ogm, is about 800 Mb. It was burned on a 700 Mb CD-ROM as film.ogm.dat, using of course Mode2CdMaker. When mounted under Windows XP, the size of film.ogm.dat which appears using the Explorer is 800 Mb as expected. But when mounted under linux, using cdfs or whatever, the size which appears is only 700 Mb...
So, because 700 Mb = 800 Mb * 2048/2328, I suspect that the OS reads the CD using Form 1 !
Do you have the correct size ?
brunooo
18th February 2005, 15:00
I ll be more precise.
The CD is mounted using cdfs driver:
>mount -t cdfs -o ro /dev/hdc /mnt/cdfs
The command:
>less /proc/cdfs
returns:
>[cdfs 2.6.3a]
>
>CD (discid=02123901) contains 1 track:
>Track 1: data track (sessions_1-1.iso), [0-23/349934], length=683 MB
> type: 1 info: CD001 version: 1
> date: 09/01/2004 time: 19:50:51
> system: CD-RTOS CD-BRIDGE
> volume: KAENA
> publisher:
> preparer:
> application:
> length: 0 MB / 683 MB / 0 MB / 683 MB
So at the stage, it seems that TYPE 1 is considered, not TYPE 2 ! Size is nor correct, too.
Then I can mount loopback:
>mount -t iso9660 -o loop /mnt/cdfs/sessions_1-1.iso /mnt/loop
>ls -all /mnt/loop
Returns:
>-r-xr-xr-x 1 root root 716615680 jan 9 2004 kaena.ogm.dat
The size is about 700 Mb, and not 800 Mb as it should be ! And dat2file will crash...
brunooo
18th February 2005, 15:47
OK, I think I got the answer.
When looking at my version of Mode2CdMaker (actually it is 1.5.1), I had also a look on the README file. When option -s is used (by default when using Ubik's gui), it creates a single track image.
I quoted:
"As a disadvantage, these CDs are currently unusable from Linux since the software currently available under Linux that can read XCDs works in a track-basis and not in a filesystem-basis, so it needs each Form2 file to lie on a separate track. Examples of this are mplayer as well as the vcdfs and cdfs drivers. Unfortunately, seems Linux can't read XCDs the same way as Windows due to a lack of support for Form2 files in the iso9660 driver (they are readed as Form1 files)."
That explains a lot !
The funny thing about this is that I have only one file on the CD, so there should be only one track. Anyway, the file is readed as Form 1.
I will try next without the -s option, just to be sure.
brunooo
18th February 2005, 16:58
OK, that s it !
For those concerned : DO NOT specify -s option when using Mode2CdMaker.
Even when you burn only one file, then you will end up with a 2-tracks CD. The first track will keep the ISO info and the second track will have the movie. The iso9660 driver can read it very well, no need to use cdfs. When using mplayer, try:
>mplayer -cache 2048 vcd://2
Of course, I suppose that you will have to use track //3 or more if you burned more than one movie...
If you mount the CD using cdfs:
>mount -t cdfs -o ro /dev/hdc /mnt/cdfs
>ls /mnt/cdfs
sessions_1-1.iso videocd-1.mpeg
To see the movie:
>mplayer /mnt/cdfs/videocd-1.mpeg
The first track has just the info on the CD:
>mount -t iso9660 -o loop /mnt/cdfs/sessions_1-1.iso /mnt/loop
>ls /mnt/loop
film.ogm.dat
>less /proc/cdfs
[cdfs 2.6.3a]
CD (discid=0A123F02) contains 2 tracks:
Track 1: data track (sessions_1-1.iso), [0-302/451], length=0 MB
type: 1 info: CD001 version: 1
date: 18/02/2005 time: 15:01:43
system: CD-RTOS CD-BRIDGE
volume: KAENA
publisher:
preparer:
application:
length: 0 MB / 0 MB / 0 MB / 0 MB
Track 2: data track (videocd-1.mpeg), [452-350363], length=794133 kB
type:
title:
framesize: 2324 B
echo
20th February 2005, 21:08
Nice to see that you solved it! And thanks for the info... :)
brunooo
21st February 2005, 16:36
Thanks for your help, too !
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.