PDA

View Full Version : [WIP] The ultimate dshow application :)


riksa
21st April 2004, 18:39
1st time poster here in doom9, but this seemed like a perfect place to announce this project...

<hype>
Project page here (http://blues.medialab.sonera.fi/~riksa/recoder/)

Currently works well enough for converting AVI to MPEG-4 container using Nero Digital AVC and AAC codecs.

Unfortunately I can't release anything to public yet, so it will be vaporware for a few more days at least.
</hype>

opsis81
22nd April 2004, 04:52
Welcome riksa at Doom9's Forum!
This is a very interesting software!
Please release it as soon as possible:D

stax76
3rd May 2004, 18:44
I'm struggling with DS in .NET, I want to use the 3ivx MP4 muxer, first I wanted to build a graph manually but couldn't marshal a IPin array as out parameter from COM. Then I wanted as alternative pass a GRF file to IGraphBuilder::RenderFile like described in the GraphEdit help but this doesn't work :o . I'll use C++ now (when I'm done with my tutorials :o )

DaveEL
4th May 2004, 12:38
http://www.codeproject.com/cs/media/directshownet.asp might be some help.

DaveEL

bond
4th May 2004, 12:49
holy shit, wow! thats the sort of tool i have waited for :)

can you please add support for other filters too?

as encoders there are available:
audio:
- mp3 (via the lame dshow encoder filter)
- aac (via nero)
- aac (via 3ivx)
- vorbis (via tobias dshow encoder)
video:
- mpeg-4 (via suxendrols xvid encoder)
- mpeg-4 (via neros encoder, as you use already)
- mpeg-4 (via 3ivx' dshow encoder)

and maybe you could also support the available dshow muxers?
- ogg/ogm muxer (available from tobias)
- mp4 muxer (available from 3ivx, is better than nero)
- mp4 muxer (available from nero)
- matroska (available from gabest)
- avi-mux (of course by default installed on windows)

i think its possible to list all dshow encoders for example, like we know it from the vfw encoder list in virtualdub

damn such a tool has such a great potential!

btw neros video encoder is not mpeg-4 avc, but mpeg-4 asp (or part2) as xvid and divx5 are too

about the legal issues: there shouldnt be one as long as you dont offer the filters yourself for downloading
if you simply offer your tool, there should be nothing wrong with it

stax76
4th May 2004, 15:25
@DaveEL

thanks, actually I was using that code for a long time before I removed it with plain using the avifile api because of some strange bug I couldn't track down. There is a sample in the SDK how to render a GRF file, the info in the GraphEdit help was wrong :o

@Bond

looks like DirectShow is becoming more and more popular, maybe I'll have to rethink my current approach with a more generic one...

SeeMoreDigital
4th May 2004, 16:04
What a great idea!

But I'm curious.... speaking as an newbie to GraphEdit, why is it that there don't seem to be any 'front end' GUI's that use GraphEdit in the back ground.

True, GraphEdit can look a little daunting and complicated to use, especially when adding all the required filters.

Take a tool like MP4UI for instance, it works OK but it is not perfect. However if we had a tool that had a GUI that looked and functioned like MP4UI but used GraphEdit running in the background selecting and de-selecting the necessary filters (provided we have them installed in the first place) then this would be perfect.

So I have to ask, would such applications be possible or am I over simplifying things and talking out of my a**?

Cheers

bond
4th May 2004, 17:08
there are of course already guis for directshow filters available!

for example koepis oggmux is a gui for the ogg/ogm dshow filters from tobias
the whole nero recode2 tool is basically a gui for their dshow filters (which shows what all is possible with dshow)

all we need now is something like an overall video app based on dshow (not on vfw like virtualdub) :D

Originally posted by Dolemite
looks like DirectShow is becoming more and more popular, maybe I'll have to rethink my current approach with a more generic one...huh another encoding tool based on dshow? :)

DaveEL
4th May 2004, 18:22
Originally posted by bond
holy shit, wow! thats the sort of tool i have waited for :)

Ive just been using Graphedit rename it to recode.exe to access the nero digital codecs :)

- avi-mux (of course by default installed on windows)

Avimux dshow filter sucks it is only good enough to use as output to later run via vdub or avimuxgui it probably b0rks on a lot of stuff too certainly a lot of advanced stuff you can do with dshow will be a nogo with avi-mux (vbr mp3, limited codec support no vfr support (which it turns into cfr based on the times of the first 2 frames) etc).

i think its possible to list all dshow encoders for example, like we know it from the vfw encoder list in virtualdub


Certainly it is media player classic capture mode is one example of a program which does this.

DaveEL

stax76
4th May 2004, 20:22
huh another encoding tool based on dshow?


I'm planning to add another muxing backend to DVX in addition to the mkvmerge backend. The user will simply select one of various GRF files. Technically I'm gonna replace the filepaths in the GRF files with macros that will later be replaced with the actual paths of the current project. DVX also has a generic encoding interface (currently VD/VDM/WMV native) where new encoders like real video or a DirectShow graph can be pluged in. Except the Direct Show things all is finished but not released yet. In Direct Show however I think you cannot retrieve the state of an encoder and you cannot config a encoder so tools like DVX cannot setup the bitrate, save the encoder state for a joblist etc. without the usual encoder specific workarounds if at all, similar ugly situation like with VFW. The WMV API btw. is fairly rich, Microsoft must have thrown a lot resources to it...

bond
4th May 2004, 22:17
sounds very powerful :)

riksa
5th May 2004, 12:31
Originally posted by bond
can you please add support for other filters too?

as encoders there are available:
audio:
- mp3 (via the lame dshow encoder filter)
- aac (via nero)
- aac (via 3ivx)
- vorbis (via tobias dshow encoder)
video:
- mpeg-4 (via suxendrols xvid encoder)
- mpeg-4 (via neros encoder, as you use already)
- mpeg-4 (via 3ivx' dshow encoder)

and maybe you could also support the available dshow muxers?
- ogg/ogm muxer (available from tobias)
- mp4 muxer (available from 3ivx, is better than nero)
- mp4 muxer (available from nero)
- matroska (available from gabest)
- avi-mux (of course by default installed on windows)

Yes, you can already use *ANY* dshow filter you have installed. I might need to add a support for VFW stuff and maybe add a few built-in muxers/splitters if there aren't any Dshow filters for some specific purpose. You can build any sort of dshow graph for any purpose, configure all the filters and run the graph (running means encoding if it's an encoding graph, or playback if it's a playback graph).

What I'm currently working is a method for drawing the actual filter in some window/container and add some sort of graph editing/designing support. Once these features are finished I'm going to make the first release. It's just surprisingly difficult to come up with an algorith that organises the filters in the fraph for drawing and draws the connecting lines between the filters (Graphedit does this fairly well). I already figured a way to organize the filters so that the "source" filter(s) is(are) located in the left, and target filters in the right part of the screen (remember, I'm making a general solution where I can't assume anythign about the graph. For example the source/target filter types are not known. They might me files or rtp packets or whatever). The challenge now is to draw the connecting lines between filters without crossing the filters and minimizing the amount the lines cross each other (Gprahedit does this fairly well).


Originally posted by bond
i think its possible to list all dshow encoders for example, like we know it from the vfw encoder list in virtualdub

Yes that's possible, but not all encoders are registered as video (or audio) encoders. Some are registered as just dshow filters (legacy). For example Nero AAC encoder is not registered as an Audio Encoder. Besides, I'm making a general solution that doesn't assume anything. I want to present all the filters to user and let him choose what ever filters he wants (filters have to be catogorized in some way though), and try for himself if they can be connected or not.

Most (all?) encoding tools (Mine is not just an encoding tool) make the fair assumption that you have a file source, 0 or 1 video codecs, 0 or 1 audio codecs and a file target (muxer and splitter are there ofcourse, but they are usually transparant to the user). I don't even want to make that assumption. I want to allow the user to make a graph that has only file source and file target filters. He can use this graph to copy an AVI from C:\ to D:\ :) I want to allow the user to make filter that has direct sound and video capture filters as input and direct sound and direct show filters as output. He can use this graph to sing karaoke :)

Yes, I know those examples were retarded, but I want to make a general filter graph simulator, the ultimate dshow application, that doesn't limit the user in any way : If it can be done with dshow, it can be done with my software :)

I know I might be dreaming here, but this is my goal :)

Originally posted by bond
btw neros video encoder is not mpeg-4 avc, but mpeg-4 asp (or part2) as xvid and divx5 are too
Damn, so it seems. The AVC support in Nero Digital is announced, but not yet available.

http://www.ahead.de/en/632151365974751.html
Ahead Software have announced an upgrade to its renowned Nero Digital, taking AVC (Advanced Video Coding/H264) and AAC (Advanced Audio Coding) and to a level of performance not previously seen in any MPEG-4 audio and video compression technology.

bond
5th May 2004, 12:55
Originally posted by riksa
Yes that's possible, but not all encoders are registered as video (or audio) encoders. Some are registered as just dshow filters (legacy). For example Nero AAC encoder is not registered as an Audio Encoder. Besides, I'm making a general solution that doesn't assume anything. I want to present all the filters to user and let him choose what ever filters he wants (filters have to be catogorized in some way though)cateogrizing is surely necessary somehow (think about all the newbies which have not much clue ;) )
maybe you can list all encoders, like its done in virtualdub, and than also add a "list all" option which than shows all filters, if people are missing some (like the nero one)
this way there could be a cateogrization but also the possbility to choose all filters

can muxer filters also be differentiated somehow from encoders?

I know I might be dreaming here, but this is my goalgreat stuff :)
if you need some beta tester simply should at me ;)

riksa
5th May 2004, 13:23
Originally posted by bond
cateogrizing is surely necessary somehow (think about all the newbies which have not much clue ;) )
maybe you can list all encoders, like its done in virtualdub, and than also add a "list all" option which than shows all filters, if people are missing some (like the nero one)
this way there could be a cateogrization but also the possbility to choose all filters

I was thinking something like that. Maybe make a 3 different "levels" for special filters (at least audio and video decoders. Maybe muxers/splitters as well.). In first "level" we have the filters that have been registered to that particular task (e.g. Video compressors). On the second level we have in addition some filters that have been (via some method) seen as a possible filter for that task (e.g. string "Audio decoder" in the filter name/desription, certain name/behaviour of input/output pins). On third level we would have all filters.

Originally posted by bond
can muxer filters also be differentiated somehow from encoders?
Haven't really thought about that yet, but maybe something like this: Encoder has exactly 1 input pin muxer has initially one, but once a connection is made to that pin, another input pin appears -> Enumerate input pins of filters that have exactly one input and at least one output. Connect a temporary filter to that input pin and count the amount of input pins. If the amount is two the filter is a muxer.



Originally posted by bond
great stuff :)
if you need some beta tester simply should at me ;) When the time comes I think I'll shout here to everyone who's willing to listen :)

jcsston
6th May 2004, 06:18
I did something similar to this, but it was audio-only, it was mainly to normalize the audio from .avs files and encode it to Vorbis.
http://cvs.corecodec.org/cgi-bin/viewcvs.cgi/vfre/AudioDShowEncoder/
Feel free to reuse any useful parts of the code.

SeeMoreDigital
6th May 2004, 11:09
I've just remembered, the proposed new version of Gspot it supposed to be offering some nifty tools.

Maybe it would help provide some insperation... and might be worth a look: -

http://www.headbands.com/gspot/gspot25beta.html#main


Cheers

bond
11th July 2004, 12:32
any news on this? :/

fightdapopo
13th July 2004, 18:56
I had recently wondered myself and this is what the riksa guy emailed me back a couple days ago:

Hey, Unfortunately I haven't had time to work too much on the Recoder. I got stuck for a while figuring out how to manage the rendering of the graph. I had to study some graph theory, and I think I found the solution from a 3rd party GPL graph library. I haven't yet had time to implement it yet. I just came back from a holidays and I think I'll find more time for developing soon. It's just difficult to find the motivation for hacking during the summer, and I've been pretty busy with another project (a game), real life and work too.

I hope he doesn't mind me posting it.