Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd April 2002, 21:22   #1  |  Link
DeXT
Registered User
 
Join Date: Mar 2002
Location: Spain
Posts: 307
Request: Help with MCF-CD DShow filter

Hi again. I think most of you already know what's the MCF-CD project about, and the benefit this may bring for all the community. This post is focused at the Developers, specifically those with some DirectShow programming knowledge.

The MCF-CD is a reality. The only problem is, for it to be usable, a special DirectShow filter must be developed. This is needed because of the way Windows access M2F2 discs. It adds a RIFF/CDXA header to every file written this way and reads the file in RAW mode.

Althought this may sound complex, for anyone with minimal DS programming skills this is a very simple task. What we need is a File Source filter, or a Transform filter, that is able to bypass all this extra data and pass the useful data only to the next filter in the chain. This task is as simple as:

a) From the beggining of the file, discard the first 44 bytes (the RIFF header).
b) From here up to the end of the file, pass 2324 bytes of data out of every 2352 bytes in the file to the next filter. Each sector has the following structure:

struct sector {
char header[24];
char userdata[2324];
char edc[4];
}

What wee need is the userdata[] block only, the rest is discarded. This filter would only be used with movies because any other file would be written in Form1, which don't need any additional work.

As you can see, this is very simple. We (avih & me) have been playing with some sample DShow filters but seems we just don't have the skills to do such a thing. So any help on this matter would be greatly appreciated.

The main problems I currently have is:

¿How to implement a simple TransformFilter-based filter? (and NOT TransInPlaceFilter-based one as seen in the sample filters)

¿How do you know what amount of data is being requested from the next filter in the graph? So you can read the needed sectors from the file and pass the user data only.

Thanks in advance.
DeXT is offline   Reply With Quote
Old 22nd April 2002, 21:34   #2  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,454
I'm still a little reserved as it is called MCFCD.
I want to burn my OGG this way. So this format would be more or less EVCD (Enhanced [or Extended would suite as well] Video CD) instead of MCFCD.

Since not everybody is fixed and focused on MCF, you would get much more support if your focus wouldn't be just the one format that doesn't exist in "real world" yet.

Just my 2 cents,
Koepi
Koepi is offline   Reply With Quote
Old 22nd April 2002, 22:10   #3  |  Link
DeXT
Registered User
 
Join Date: Mar 2002
Location: Spain
Posts: 307
Hi again Koepi. Well MCF-CD is just a name. This is how it is known by the community. But MCF-CD is not subject in any way to a single format such as MCF, specially since MCF doesn't exist yet. I think I should have put this more clear.

Eventually, if I develop MCF-specific features for this format, I will split the project in two parts: one MCF-only and the other totally generic. Probably this would lead to a name change.

But anyways if changing the name is a condition for you or anyone else giving help to this, I will do it. If you prefer it to be called OGG-CD when coupled with OGG content, I have no problem with it, too. In fact as you know this is the first format likely to be supported with these CDs is OGG, since it's the most suitable one at this time.

But please help to make OGG-CD a reality! (as you seem very devoted to OGG )

P.S: I don't like much this "EVCD" thing. I should seek for a better one.
DeXT is offline   Reply With Quote
Old 22nd April 2002, 22:12   #4  |  Link
avih
Capture, Deinterlace
 
avih's Avatar
 
Join Date: Feb 2002
Location: Right there
Posts: 1,971
i'm sure u're aware of it koepi, but maybe others aren't.

it's just the name that is 'specific' because it originated by mcf related developers.

however, this 'project' is completely general. the target is a dshow filter to parse files on the fly.
the files are stored as mode2 form 2 (this is already achieved, and we can burn 800M files to a cd). the only problem is that when openning the file in windows, we get extra information as de_xt described (the RIFF header is artificially generated by windows, the other extra data is raw data from the cd itself).
avih is offline   Reply With Quote
Old 22nd April 2002, 22:41   #5  |  Link
Gawen
Registered User
 
Join Date: Apr 2002
Posts: 52
Hope this is not redundant, otherwise smile about silly me.

Did you check the source of Multiple_MPEG2_Source.ax ?
(A file reader ax, in nimo codec pack for instance.) Its
officially source only on http://fysx.acwu.com/Code/Code.html
and downloadable from Dooms Source page.

LIBRARY Multiple_MPEG2_Source.ax
DESCRIPTION 'I-Media Multiple MPEG2 Source Filter'

It should be able to show you what you asked for, or?
Gawen is offline   Reply With Quote
Old 22nd April 2002, 23:04   #6  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,454
Hell, now you got me really wrong!

I just wanted to explain why there might be a lack of developer feedback.

As I wrote already, I'm stuck in some projects and can't afford the time to help in another one.

And: I'm not fixed on OGG. I just like it, it works, it is the best we have until now.

Until MCF becomes working reality it can take very long.

So don't misinterpret my lack of time with me not liking MCF.

Regards,
Koepi
Koepi is offline   Reply With Quote
Old 23rd April 2002, 05:10   #7  |  Link
int 21h
Still Laughing
 
int 21h's Avatar
 
Join Date: Oct 2001
Location: Around
Posts: 1,312
Quote:
Originally posted by Gawen
Hope this is not redundant, otherwise smile about silly me.

Did you check the source of Multiple_MPEG2_Source.ax ?
(A file reader ax, in nimo codec pack for instance.) Its
officially source only on http://fysx.acwu.com/Code/Code.html
and downloadable from Dooms Source page.

LIBRARY Multiple_MPEG2_Source.ax
DESCRIPTION 'I-Media Multiple MPEG2 Source Filter'

It should be able to show you what you asked for, or?
Nah, this isn't what they need. They need something that does some file parsing. Similar to the Mpeg-1 Demultiplexxer for Windows.
int 21h is offline   Reply With Quote
Old 23rd April 2002, 05:19   #8  |  Link
Neo Neko
Registered User
 
Neo Neko's Avatar
 
Join Date: Mar 2002
Location: Kansas City, Missouri
Posts: 1,812
Nic has not put any visable time in on his AAC filter for a while and he has done such a good job on the Xvid filter maybey he might be a good person for this. I would jump on it in a heart beat if I could, but my programming knowledge tends to stear clear of OS specific issues. That and it is extreamly basic.
Neo Neko is offline   Reply With Quote
Old 23rd April 2002, 06:25   #9  |  Link
Gawen
Registered User
 
Join Date: Apr 2002
Posts: 52
@INT 21H
Silly, silly me,

and i thought the problem was reading a file stream from a M2F2 ISO layer 2 formated CD track, parsing the leading 44 RIFF/CDXA header bytes to a fitting DS output pin definition on file open, buffering the input data after stripping block header and EDC and sending data from the buffer to a DS output pin on demand of (for instance) the OGG DS splitter.

But i am shure you are right, its impossible. Demuxing must shurely happen bevore the OGG splitter. And silly me tought this was the demuxer. I am so sorry. :-)

P.S.: There is another, imho even better DS file reader source example in avienc 0.20 available from http://www.geocities.com/ej_999/avienc_src020.zip

Last edited by Gawen; 23rd April 2002 at 06:58.
Gawen is offline   Reply With Quote
Old 23rd April 2002, 07:03   #10  |  Link
ingoralfblum
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 11
Quote:
Originally posted by Koepi
I'm still a little reserved as it is called MCFCD.
I want to burn my OGG this way. So this format would be more or less EVCD (Enhanced [or Extended would suite as well] Video CD) instead of MCFCD.

Since not everybody is fixed and focused on MCF, you would get much more support if your focus wouldn't be just the one format that doesn't exist in "real world" yet.
I fully agree here. MCF-CD isn't a good choice for the name.

Regards,

Ingo
ingoralfblum is offline   Reply With Quote
Old 23rd April 2002, 07:09   #11  |  Link
ingoralfblum
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 11
Re: Request: Help with MCF-CD DShow filter

Quote:
struct sector {
char header[24];
char userdata[2324];
char edc[4];
}
Sorry for my unsuitable comment here. I don't know much about DirectShow, but don't do these

RIFFCDXAReaderFilter.hpp
RIFFCDXAReaderFilter.cpp

do exactly what you want. Perhaps they lack some functionality, but they should suffice at least for information purposes.

Kind regards,

Ingo
ingoralfblum is offline   Reply With Quote
Old 23rd April 2002, 08:01   #12  |  Link
Gawen
Registered User
 
Join Date: Apr 2002
Posts: 52
Re: Re: Request: Help with MCF-CD DShow filter

Quote:
I don't know much about DirectShow, but don't do these ... do exactly what you want.
And i thought understatement was British, not German, Mr. Free Codec Pack.
Gawen is offline   Reply With Quote
Old 23rd April 2002, 09:38   #13  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 1,264
What is surprising me is the lack of takeup from any developers on making a DS filter for this format. Nobody appears to be leaping for the spec and trying to make one. I am sure everyone would love an extra 100 megs of available data on their 80 min CD-R's without sacrificing error protection (which should not be an issue with OGM etc). From what I have read it looks like it should be a simple enough task for anyone with DS filter programming knowledge. I may be wrong however as I cannot program to save my life (Well perhaps a little crappy basic)

Those last example files are from Ingo. Where can I find out more on what he is up to?
oddball is offline   Reply With Quote
Old 23rd April 2002, 11:27   #14  |  Link
robUx4
Matroska Team
 
robUx4's Avatar
 
Join Date: Dec 2001
Location: Paris, France
Posts: 421
Yeah, the MCF dev team welcomes any skilled developpers to help us.

I'm also a bit disappointed to see that, even though many people are interrested in both our current projects (MCF and MCF-CD) we get more attention, but nobody working on it.

Hopefully this is an initial situation since everything is in alpha state. So when it becomes beta much more people will have access to it and might be willing to add their knowledge on it

As for the MCF-CD name, I don't think it's a problem. As it was created by the MCF-CD team. Maybe MCD (something like VCD) could be used. But, in my opinion, MCF still deserves credit for that (and mostly Tronic and Ingo)
robUx4 is offline   Reply With Quote
Old 23rd April 2002, 11:48   #15  |  Link
DeXT
Registered User
 
Join Date: Mar 2002
Location: Spain
Posts: 307
@Gawen: thank you a lot for your help. I'm sure these sample filters will help us to understand a bit more how things works.

@Neko Neko: may God hear you... or is it Nic?

@Ingo:
Quote:
I fully agree here. MCF-CD isn't a good choice for the name.
surprisingly enough, since you are the "creator" of this format

Anyways I think I should search a more-generic name, at least for the non-MCF related content. The problem is, it must be short and auto-explicative. CD/XA Bridge? Or just Mode2 CD? Or...
Quote:
I don't know much about DirectShow
I assume you are just kidding here
Quote:
but don't do these

RIFFCDXAReaderFilter.hpp
RIFFCDXAReaderFilter.cpp

do exactly what you want. Perhaps they lack some functionality, but they should suffice at least for information purposes.
Yes they should. The problem is, I can't understand a single line Seems this is part of a much larger project (with its own file reader and most DShow functions wrapped into your own ones -- at least this is how it appears to me). Anyways I wasn't able to make it work in its current form (sorry if I appear too dense; in fact I am ). And since you said you were too busy to work on it I thought this was not suitable for us.

@oddball: Ingo's project is at http://mediaxw.sourceforge.net

Last edited by DeXT; 23rd April 2002 at 12:00.
DeXT is offline   Reply With Quote
Old 23rd April 2002, 12:06   #16  |  Link
ingoralfblum
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 11
Quote:
Yes they should. The problem is, I can't understand a line Seems this is part of a much larger project (with its own file reader and most DShow functions wrapped into your own ones -- at least this is how it appears to me). Anyways I wasn't able to make it work in its current form (sorry if I appear too dense; in fact I am ). And since you said you were too busy to work on it I thought this was not suitable for us.
Yes it replaces the MS DirectShow classes and the MFC. The only thing that is much different is the media type negotiation. Since Nic is quite experienced with DirectShow, this shouldn't be the problem for him. Ask him if he can take a look at it.

The next thing is, that it uses the class ingo::InputStream for file access. First for the underlying file and second to expose the content to the base class. But this is exactly the same as the mcf::IOCallback. The next missing is the class for the registry key, but you can either copy it to the MCF library, because it should work the fine without many modifications, or you use another class. But the basic thing is that you create a filter with the IAsyncreader interface on the output pin. The current implementation reads the underlying file directly. Instead you should have an input pin, that connects to another IAsyncReader. This is simple. There's already a wrapper class that exposes a InputStream interface for a given IAsyncReader. So that probably takes about 20 lines.

Tip: You should use http://sf.net/projects/mediaxw instead.

Regards,

Ingo

Last edited by ingoralfblum; 23rd April 2002 at 12:09.
ingoralfblum is offline   Reply With Quote
Old 23rd April 2002, 12:45   #17  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Ingo you're better than me at DShow I personally hate it, too much of a pain to debug but I always get asked to help with it....

But this should be a relatively simple to do....Don't think I have the time right now though

I heard you'd given up a bit Ingo....I hope you'll be back coding with us soon/one day

Cheers,
-Nic
Nic is offline   Reply With Quote
Old 23rd April 2002, 13:08   #18  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,454
sorry for the off-topic again,

but:

robux,

this isn't about someone deserving the credits or anything like that. I dislike this "protektoristische scheuklappen" attitude (don't know any translation for that).
MCF-CD simply is a very special name that should forbid any further usage.
So even the name should be more generic.
That's what I'm talking about. Some OGG developers could be attracted as well as other DShow "gurus" if it wasn't for "MCF only".

I hope now the point gets a little clearer.

And Ingo, I too hope that you won't give up your efforts, I know how bad this work can be sometimes, but in the end there is some new, usable programs/codecs/... which do move/change things for the future.

Best regards,
Koepi
Koepi is offline   Reply With Quote
Old 23rd April 2002, 17:15   #19  |  Link
avih
Capture, Deinterlace
 
avih's Avatar
 
Join Date: Feb 2002
Location: Right there
Posts: 1,971
alpha version working :)

ok guys, 1st version of riff/cdxa is working.

sample usage:

0. register the filter asyncflt.ax (showed as 'Sample File Source (asynch)')
1. create a RIFF/CDXA cd image using de_xt's tool that is containing at least one mp3 file. (the tool is attached)
2. burn the image (or use deamon tools to mount it)
3. open graphedit, render a standard mp3 file from your HD.
4. insert the sample filter, select one of the AVSEQxx.DAT files from the cd (that was created from a mp3 file).
5. diconnect the original source file in the graph, and connect the output of the sample filter instead.
(you'll also have to reconnect the MPEG1 splitter output to the mp3 decoder).
6. press 'PLAY'

known issues: it won't work with avi or ogg files ... yet , something to do with media types.
still have a lot of dshow stuff to learn. any help is welcome.

the only modified file from the sdk sample if asyncflt.h, which is attached.

the source and compiled filter + de_xt tool are attached. hope a moderator will approve it soon.


avi
avih is offline   Reply With Quote
Old 23rd April 2002, 19:11   #20  |  Link
Gawen
Registered User
 
Join Date: Apr 2002
Posts: 52
@DeXT Was a pleasure for me, even if i am not a c coder, i know how to google. I like this project.

@robUx4 OT: I read on hydrogenaudio you offered help building an aac DS encoder. Any news?

@all
Naming: What do you think of MoreCD, files saved as *.mcd.iso?

Would sound neutral, reflect the benefit and would fit into your (the mcf dev team) name portfolio.

MoreCD.org is available:
Whois Server Version 1.3

Domain names in the .com, .net, and .org domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

No match for domain "MORECD.ORG".

>>> Last update of whois database: Tue, 23 Apr 2002 04:59:53 EDT <<<

The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and
Registrars.




Last edited by Gawen; 23rd April 2002 at 20:43.
Gawen is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.