i want to develop a windows application in c++ that could be draw multiple video streams that come from network in one window (like video conference applications).
in another words, i want to have one window and split this window into sections that each section show a video stream.(like what we see in video conference applications like oovoo or webex).
how i can start learning and witch subject important here i Google the net but can not find any article or example about this subject.
please guide me
thanks a lot
I did a similiar project, which shows 4 different videos in window. These videos were coming from network(TCP/IP) connection. I used VLC for encoding the videos. (Videos are in mp4 format.) Also I used QT for GUI design. Since QT has phonon framework after qt release 4.5, I guess you can use QT for both encoding videos and gui design.
You can check it here:
http://qt-project.org/doc/qt-4.8/phonon-overview.html
Related
I need your advice. I'd like to develop the app for audio/video splitting using Metro interface.
Usually I use DirectShow for it using the follow schema: create a grabber, add it to DS graph, capture by it the audio/video streams and pass them to my AVstream drivers for splitting. But in new program I want to use Media Foundation and insert it into UWP.
How I see my new app. It must have Metro interface for common control: choice of sources, adding parameters, changing modes and etc. I'd like to use MediaCapture class for capture of streams and rendering them too. Here I don't see any problems, MSDN has many samples for it. But I have no ideas how to insert a grabber between source and render.
Which operations a grabber will do:
Receive input stream from MediaCapture.
Stream converting : YUV -> RGB, adding effects and etc.
Send output stream for rendering (MediaCapture) and to my AVstream driver for splitting with any apps (Skype, Adobe Flash Player, Edge, ....).
How to make a grabber. In MSDN I found three ways:
Sample Grabber Sink (https://msdn.microsoft.com/en-us/library/windows/desktop/hh184779(v=vs.85).aspx). No problem to receive/control/send stream in MF dll. But I don't know how to link that dll with MediaCapture?
Source Reader (https://msdn.microsoft.com/en-us/library/windows/desktop/dd940436(v=vs.85).aspx). The same problems, plus the Source Reader doesn't work for playback.
Custom MFT? Any case MediaCapture allows to connect to MFT by AddEffectAsync().
My environment: MS Windows 10, MS Visual Studio Community 2015.
Thank you for any ideas.
This question and UWP are not actual for me at all. I found the following:
"Some apps can work intensively in background, for example it maybe video converting, online financial data processing and more.
Now UWP application will suspended when it go offscreen."
https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/9950598-exclude-suspending-in-desktop
So if the user minimizes the program window, then the program stops a video stream.
MPEG is a really nice format, specially because it really compress the file to unimaginable sizes. A 140Mb raw AVI is now only 4Mb and the quality is still very good. With the Animation Control Windows provides I can play only raw AVI but I would really like to play a MPEG instead, due to the the sizes of the video file.
Now, how would I do that with C++ and WINAPI? Do I have to use some ActiveX components? How do I make sure other users can run my application without being harassed about missing plug-ins/codecs/third-party programs? Can I use the Animation Control someway for displaying the MPEG video?
Thanks
I took a look at the MSDN documentation and it looks like you can not use the Animation Control to play MPEG video, you seem to have two choices:
1. DirectShow.
2 The newer Microsoft Media Foundation.
Both choices based on COM (and not ActiveX as I stated earlier).
As for making sure your users can run your application, see this page on Building DirectShow Applications which answers that questions for DirectShow. For Microsoft Media Foundation your users need to be running MS Vista or later.
I have some basic effect algorithms (i.e chrous, LP filtering..) which I would like to build a GUI application to be able to use these algorithms.
For example I want to be able to open an audio file, process the audio file in some way with my algorithms and playback the processed file.
Later on I would like to, if possible be able to see the waveforms of the original file and the processed file in the GUI application. This is my objective now.
In the future I want to be able to create a user interface through which users can be able to use my own audio processing algorithms on files of their own.
Is it possible to design such a GUI with the Qt programming framework? If so, could someone point me in the right direction to get started? Right now I have the Qt SDK 1.1 beta running on Windows 7 OS and also using Qt creator. I would really appreciate some guidance.
Qt is a very powerful application framework, but do not expect any extra help with DSP tasks from it. It contains API for some basic and common tasks, like playing an audio/video file, working with audio devices, creating audio effects (search QAudio and Phonon in the Qt's help) etc. You can use some ready-to-use widgets and create your own multimedia player in a few moments.
But in the DSP you are -mostly, on your own. There is, for instance, only a limited audio file format support, so if you want to work with more formats than .wav and .aiff, use some specialized library. I recommend libsndfile (http://www.mega-nerd.com/libsndfile/) which is most powerful free audio file library available. And if you plan your effects to be more universal, use rather VST technology by Steinberg - today's audio plug-in standard, but it is relatively complicated, not suitable for beginners.
There is no built-in widget which can show a waveform, you have to create it yourself, but it is not much complicated. Qt has a really cool drawing functions, brushes, texts, gradients, transformations, antialiasing, even OpenGL wrapper - everything ready and very simple to use.
So the answer is definitely yes. I use Qt in my multimedia applications for three years and now I can't see how I could live without it (using VST GUI and Windows APIs before).
Sure its possible, QT is a framework for writing applications, you can write any application you want using it, you'll probably end up needing to write some custom controls. As an example, here's an Open source QT based application that does pretty much everything you are talking about and much more:
http://qtractor.sourceforge.net/qtractor-index.html
Does anyone have a working example of a video player built using Qt phonon? (in C++ )
See my related question here . I am unable to build one using Python.
A working example of a video player built using Qt phonon: Dragon Player
And here you find the Mplayer created with Phonen too, including all the sources: Phonon MPlayer. You need to login, then you can browse the source code by clicking on "Source" and then "Browse".
EDIT: Oh, and of course the Media Player Example in the Qt Assistant, you should have a look at this, too. It plays both audio and video.
I have written a Simple Video Player using QT. The soure of the player is also hardcoded for this example. See here
Most qt and kde video players these days(not vlc).
Looking for phonon reverse dependencies on ubuntu I find
amarok(music player with videos
support)
minitube
kmplayer
bangarang
dragonplayer
non video players
okular(documents with embeded videos)
web browsers w/html5 video I think
libqtwebkit4
libkonq5
ktorrent(I think torrent film previews)
gwenview(play videos in picture viewer?)
dolphin(file preview)
Im currently using wxMediaCtrl to play videos in my app. The api is unfortunately a little buggy, and doesn't playback all media types i need to support (e.g. wmv).
I am wondering if there is an alternative c++ api, that will allow me to do this. I am currently just concerned with supporting windows.
What do people normally use to embedd video in their apps? Also i need to be in control, i.e. tell the video, where to play in time, pause/stop, i dont need any shuttle controls, as i have my own.
Thanks in advance.
wxMediaControl uses DirectShow on Windows, it should be able to play wmv files. If you can play a media file with GraphStudio, you should be able to play it with wxMediaControl.
If not, you need to install the proper video codecs. Have you tried installing FFDShow?
You can try Video Control, and here is a sample on how you can play a video file.
If you want something without DirectShow, you can take a look at VLC ActiveX.
As a word of caution regarding the use of GPL plugins (FFDShow or VLC ActiveX) in non-GPL applications you should read this.
Qt uses Phonon for cross-platform media playback. On Windows Phonon utilizes DirectShow, so it can play anything Windows can (.wmv). It has all the capability you mentioned. It's also very easy to implement and use. I recommend highly.