Mix Two or more videos with DirectShow

June 30, 2007 at 12:02 am | In DirectShow, GraphEdit | Leave a Comment

Hi Chicos/chicas !!

Many students and some researchers need from time to time to show results. For example, what I wanted to do is to show two videos one next to the other in a very simple way. You can par example use the software from medialooks forvideo

http://medialooks-video-mixer.medialooks.qarchive.org/_download2.html

1.- Install the directshow filter

2.- open GraphEdit

3.- Load your videos( DirectShow Filters -> File source asynchronize most of the time)

4.- Render the pins to generate the decoding step (use the same decoder as for example DivX Decoder Filter)

5.- Insert the MediaLooks Video Mixer and put the output pins of your videos as the output for this filter.

6.- Render the video to the screen or to a file (DirectShow Filters-> FileWriter).

Good luck and if you have other ways to do it, please comment them !

Bye bye

Marcelo

BaseClasses bugs

June 1, 2007 at 12:59 am | In DirectShow | Leave a Comment

Hi there,

Well if you are reading this article, you might be having some problems with DirectShow and Visual Studio. In my case, I was migrating from Visual Studio 2003 to 2005, and there were some bugs in Microsoft code. A very useful link to fix these bugs is:

https://blogs.msdn.com/mikewasson/archive/2005/05/23/421116.aspx

However, do not forget to recompile the BaseClasses libraries in debug and release mode (strmbasd.lib and STRMBASE.lib )  and to include them in your project.

Hope it helps,

Marcelo

3D projections using Direct3D

May 7, 2007 at 8:45 pm | In direct3D | Leave a Comment

Hi,

It is actually quite easy to do 3D projections using D3D, and it is even easier to do the inverse transform using D3DX10 (which I think it replaces the D3DMath library used in DirectX 7…. but I am not sure at all!)

To do this you can multiply the vectors in this way:

screen = mWorld * mView * mProj * point3D

an for this you can use the D3DXVec3Project method (and to undo this, use the D3DXVec3Unproject )

It is really straight forward and very very easy (if I could, then anyone can do it).

See you

Marcelo

PS: Though, be careful. If your window is not square, then you might be interested to read some articles about “window to viewport mapping”

http://medialab.di.unipi.it/web/IUM/Waterloo/node14.html

GraphEdit Capture and Preview

April 24, 2007 at 5:05 pm | In GraphEdit | Leave a Comment

Hi,

It is actually possible to capture and preview transform filters with GraphEdit. This is really easy (I was so happy because I am a real newbie).

Steps to follow:

1.- Insert your capture device (webcam or other) . Graph->Insert Filters ->Video Capture Sources-> (Choose what you want, e.g. Logitech QuickCam Ultra Vision).

2.- Insert your Transform Filter (make sure that it is registered)

3.- Connect them by cliking right on the video capture filter pin. Select “Render pin” and GraphEdit makes all the work for you.

4.- Delete the Video Renderer (because we will split the output of your filter) .

5.- Insert the DirectShow filter called Smart Tee. Connect your transform filter with it.

6.- Insert the AVI Mux Filter  (DirectShow folder) and connect its input with the output pin (capture) of the Smart Tee filter.

7.- Insert the DirectShow filter called File writer (give a name to it when it asked for) . Connect it to the AVI Mux filter

8.-  Insert the Video Renderer (click right on the output pin of the Smart Tee and select the option “Render Pin”).

And That’s it !!!

You will save the output to an AVI file while you see a preview

PS: You can download GraphEdit from this site (you do not need to download Platform SDK to get this application)

http://www.videohelp.com/tools/graphedit

Short keys in visual studio 2005

April 20, 2007 at 5:09 pm | In visual studio 8 | Leave a Comment

I have just found this page for the very useful short keys in visual studio (Btw, supra nice web page of shortcuts….)

http://geeks.ms/blogs/jorge/archive/2006/09/02/Caminos-cortos-de-teclado-para-Visual-Studio.aspx

Visual Studio 2003(short keys)

Visual Studio 2005 (short keys)

Bye !

Marcelo

PS: Gracias Jorge !!!

Blog about .NET tips

cxcore100d.dll or cxcore100.dll not found

April 20, 2007 at 1:14 am | In OpenCV | 4 Comments

Hi !

Well, check if you have correctly installed openCV :

http://opencvlibrary.sourceforge.net/VisualC%2B%2B

Do not forget to put the CV headers after the Visual Studio ones (sounds stupid but it was my problem). However, be careful because if you are using different versions of OpenCV, then this is clearly NOT  a solution. In this case I would suggest to use OpenCV static libraries.

See you!

Marcelo

PS: Otherwise, use the brute force approach : copy all the openCV dll to the project directory…. (try not to do it)

DirectShow and OpenCV (Transform Filter)

April 19, 2007 at 11:09 pm | In DirectShow | Leave a Comment

Hi,

There are some sources that might be useful for newbies like me.

An old guide version of DirectShow and OpenCV

http://www.cs.ucf.edu/~lspencer/vid_app.pdf

Another site (slightly more complicated but with sources! )

http://www.ifp.uiuc.edu/~chenyq/research/Utils/DShowFilterWiz/DShowFilterWiz.html

DirectShow Wizard

April 19, 2007 at 8:46 pm | In DirectShow | 2 Comments

Having trouble with the DirectShow wizard for visual c++ 6.0 when you
are using visual studio 8 ?

Well try the following link for the “new Wizard” :

http://tmhare.mvps.org/downloads.htm

Now, it may happen to you, too, that this doesn’t work because your this
version has been done for visual studio 7. In this case, you should
change the file DSWizard.vsz

I have something like this

VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.8.0
Param=”WIZARD_NAME = DSWizard”
Param=”RELATIVE_PATH = VCWizards”
Param=”WIZARD_UI = TRUE”

You may need to change the relative path to something else (or using the
ABSOLUTE_PATH for the correct address) .

It worked for me, at least for now. Verify that your ‘DSWizard’ folder is in ‘C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards’ and that your files. vsz .ico and .vsdir soient dans ‘C:\Program Files\Microsoft Visual Studio 8\VC\vcprojects’.

I do not know if you can start this wizard in your templates. If you have some information about it, please make a comment.

I hope this helps.

Marcelo

PS: if you are using visual studio 7, check this post:

http://www.codeguru.com/forum/showthread.php?t=306032

A migration guide from MSDN:

http://support.microsoft.com/kb/810455

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.