play avi using c++ - c++

i want to play an avi file using c++ and direct X with a mfc interface

Your question is not very clear. To get AVI frames you could use Video for Windows, Windows Media or Direct Show. To render it with DirectX you should create texture and update it on each frame.
Here you can find sample project that could be helpful.

Related

Qt5 extracting audio from video

I have a task: user chooses a video file, I need to get an audio track from it and give an opportunity to play it with equalizer and then save this audio in mp3.
I found an example of media player in Qt. Playing video with Qt is very easy as the example has shown so I'd like to realize this task only with Qt API. The only way I know to get audio track from video is to use libAV or similar libraries. Is there an opportunity to get audio from video with Qt API? Also I haven't found the way to save an audio in a specific format with Qt. Is it possible?
Thanks a lot.

OpenGL - Display video a stream of the desktop on Windows

So I am trying to figure out how get a video feed (or screenshot feed if I must) of the Desktop using OpenGL in Windows and display that in a 3D environment. I plan to integrate this with ARToolkit to make essentially a virtual screen. The only issue is that I have tried manually getting the pixels in OpenGl, but I have been unable to properly display them in a 3D environment?
I apologize in advance that I do not have minimum runnable code, but due to all the dependencies and whatnot trying to get an ARToolkit code running would be far from minimal. How would I capture the desktop on Windows and display it in ARToolkit?
BONUS: If you can grab each desktop from the 'virtual' desktops in Windows 10, that would be an excellent bonus!
Alternative: If you know another AR library that renders differently, or allows me to achieve the same effect, I would be grateful.
There are 2 different problems here:
a) Make an augmentation that plays video
b) Stream the desktop to somewhere else
For playing video on an augmentation you basically need to have a texture that gets updated on each frame. I recall that ARToolkit for Unity has an example that plays video.However.
Streaming the desktop to the other device is a problem of its own. There are tools that do screen recording, but you probably don't want that.
It sounds to me that what you want to do it to make a VLC viewer and put that into an augmentation. If I am correct, I suggest you to start by looking at existing open source VLC viewers.

Windows media foundation use raw image to encode video

I'm working on a project that requires me to record webcam, microphone, and the screen. I have webcam recording, audio is a work in progress, and I stumbled across CMonitor wrapper (which I did some minor modifications to) to grab RGB images of the desktop on a specified monitor (if there are multiple monitors).
How do I go about pushing my raw RGB frames into windows media foundation to encode into a video file? My current video encoding is using a slightly modified version of this msdn sample, if that's easier to modify than it is to write a new class handler.
Or, perhaps there is some sort of media foundation route to recording the screen that I don't know of (which is possible, I'm not that great of a win32 programmer)?
Found PushSource in the Windows SDK samples, which does this.
Check Desktop Duplication API for capture desktop. Media Foundation provides two solution for encoding, MF Sink Writer for simple encoding, Media Session for a more flexible control of the media pipeline. Read this overview page first.

Loading MPEG-4 H264 with SDL or Open Media Layer on Windows, is this possible?

I want to programmatically load the MPEG-4 H264 video format. I want to know if anyone has tried it or knows if it is possible with SDL or Open Media Layer APIs on Windows.
Sounds like you want something like this tutorial about using SDL and ffmpeg.

simpest way to get audio/video data from directshow

I compiled the DirectShow sample player (from the Windows SDK's "Samples\multimedia\directshow\players\dshowplayer" folder).
Everything works well but it renders directly to the screen and the audio goes directly to directsound. I need to be able to grab the data and write out images to BMPs and write out the audio to .wav.
Am I using the wrong sample as a starting point? If not, what is the easiest way to modify the sample so I can get access to the video and audio data?
Thanks!
You can insert a SampleGrabber filter before the renderer, and use the ISampleGrabberCB Interface to access the data. You can still render the video to the screen, and output the audio. If you don't want that, use a NullRenderer instead. See also this example on codeproject.