I need to implement a simple video player application that plays two clips simultaneously and can fade between them. Another thing is to add subtitles to the clips? I have the video player that bazik have made, but it uses vfw, which is very crappy - it won't play a lot of lips, etc. I think I should make it trough DirectX, but from the DirectX SDK and the information on this board I couldn't determine whether it is possible or not trough the DirectX api. Any eamples or ideas are welcome!

Posted on 2004-10-19 08:39:35 by siddhartha
So, nobody here with some basic knowledge in DirectX? Anyone daring to help? I'm sure here are some people that definately understand the DirectX api, c'mon, help the poor man :)

Posted on 2004-10-21 03:01:02 by siddhartha
You see, siddhartha, nobody know (may be nobody read). I want to do the same: write a little video player, some program that can play videos and get information from them.
Posted on 2005-01-11 05:13:18 by Mike
I think I should make it trough DirectX, but from the DirectX SDK and the information on this board I couldn't determine whether it is possible or not trough the DirectX api.

DirectShow allows you to use lots of filters (i bet there is a 'fading effect' between them) in addition to -for example- direct access to each decoded frame.
unfortunately i never had the need to play with DirectShow, I just read the intro :-D
i think that -first- you should play with GraphEdit, which will familiarize you with DirectShow environment. then read the whole DShow SDK and start coding :P
Posted on 2005-01-11 07:07:00 by ti_mo_n
Thanks. You see, I never use DirectX, DirectShow or DirectPlay. So I have no any specific library or include files. Are everything in MASM 8.2 ? When can I see DShow help files, examples and so on? And what is GraphEdit?

Posted on 2005-01-11 07:24:32 by Mike
1) GraphEdit is a tool in DirectX SDK (since 8.0 i recall). I think that the MS made it for this purpose - to familiarize with the DShow env.

2) the include files i've made myself by manually translating .h files from the SDK. the ones i made are for TASM (borland's turbo assembler).

3) help files are within SDK

4) DirectPlay ? :? I thought you wanted to make VieoPlayer :? DirectPlay is used for network communication.

5) library files can be made by the tools that 'extract' exported functions' names from the PE (EXE, DLL). for TASM, they're called 'impdef' and 'implib'.

6) if you have never used DirectX, then make sure that you know basics of the Object Model used there.
Posted on 2005-01-11 12:22:48 by ti_mo_n
I don't know when exactly, but maybe a month or two ago I found a simplistic video player written in pure asm, using DirectShow. So you can search the board and find it - I think that bazik wrote it, but my memory may be wrong...

Posted on 2005-01-13 01:47:42 by siddhartha
I'm interested in it too! :-D
But since I prefer the easier way with COM, I'd make an ATC class to use these interfaces. I remember I made these classes as a request from somebody here, but since it's an attachment, it's lost. Probably the simple DirectShow player was attached - and it's lost.
I'll search for it :)
Posted on 2005-01-13 02:56:36 by Ultrano
Yeah, it was attached, but as I can recall it should be found in other places too - maybe bazik's site or whatever. Does anybody have an idea about the attachments? Why they removed this nice feature?

Posted on 2005-01-13 03:26:00 by siddhartha
It's not bazik's code :P
Here are the two related topics
(the player, by grv575)

(another player, by Andycar)

(IGraph ATC includes, not in attachment, lucky me)

I PM-ed grv575, asking for the file - when I get it, I'll put it on ultrano.com, and start converting it to ATC.
Posted on 2005-01-13 03:36:56 by Ultrano
K. That's great! Although I'm not so familiar with COM and ATC, I'm sure it will be a great help for me and other people I hope. God bless you :)

Posted on 2005-01-13 03:59:22 by siddhartha
Dont't you know about VirtualDub? Yesterday this program was downloaded by me... I dont see the sources yet. But I'm sure that it can't open wmv files neither avi files with mjpg codec.

Mjpg - is the format in which works digit cameras.
Wmv (with Windows Media Video V7 or V9) - the most compact formats.
Posted on 2005-01-13 07:43:43 by Mike
It would be obvious to me you haven't seen the sources, even if you didn't mention it - it's a whole jungle in there, the DirectShow is extremely unnoticeable. I'd stick to simpler sources to start studying from ;)
If grv575 doesn't reply soon enough, I'll search for simple C++ code to convert into oop asm. I've already converted an mp3 decoder that uses ACM, though I had posted it here in an attachment :oops:
Posted on 2005-01-13 09:13:24 by Ultrano
Of cource, I can rewrite programs from C++ to asm or VB too. But will it open the most popular video file formats?
Posted on 2005-01-13 10:17:37 by Mike
Mike: Vdub has internal support for several formats, and for what it can't handle - it uses DirectShow. But I think DShow is sufficient enough - it has support for all video I've ever had. Well, if you want the movies to run several percent faster, I'm cheering up on you to convert and optimize it into asm ;) . VDub's bottleneck code is in asm btw.
VDub uses classes a LOT, with lots of inheritance - it kind of scared me. Though I use classes a lot in my code too, converting the complete C++ code is not for me :P
Posted on 2005-01-13 14:00:54 by Ultrano
Ultrano, I write the programs because I need... When you can buy any digital camera you' ll describe for you that it write all movies in MJPG (Motion JPG) format and I can't reprogram chip inside the camera.

Then, what program open 75% of people to make their first movie? Of course Movie Maker in WindowsXP. This program write results as wmv files. A lot of people send me their movies in wmv format!

Yes, sometimes I use div3, write dvds but only sometimes! I know about more than 100 video and audio codecs, but I never use them. If you want I can send you avi file written with mjpg codec.

You see I am not only programmer, I am clipmaker too.
Posted on 2005-01-14 07:53:26 by Mike
Aha :)
my camera makes .mpg movies,
my mobile phone makes mpeg-4 movies ( .3gp and .mp4)
never seen the mjpg :P
Posted on 2005-01-14 10:57:41 by Ultrano