Qt phonon video player example C++ or python - c++

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)

Related

Displaying multiple video streams in one winform in c++

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

Detect if video has no audio in C++, preferable using Qt Phonon

I am creating a video player if Phonon and Qt. everything is working fine, but when I have a video in my playlist that does not have audio I wish to play another audio.
how can I do that? I mean, how can I detect that the video has no audio?
EDIT: By no audio I meant "no audio channel"
Qt 5 might help you out. Check out Phonon::Gstreamer::MediaObject. The API is similar to the ordinary MediaObject, but with some additional functions. The one you want is audioAvailable().

C++: FFMPEG and SDL resources

I'm looking for resources (preferably books, but websites are fine too) for using FFmpeg and/or SDL with C++.
Stuff I'd like to be able to do (eventually):
Decode and play videos in realtime to a QT widget (the QT part isn't a problem)
Overlay text and images on the video (in realtime)
Loop video
Cross-fade from one video to another (in realtime)
Some kind of DVD functionality
LIVE sources? (i.e. webcam, stream, etc.)
So far I've looked at (and consider helpful) the following resources:
FFmpeg and SDL Tutorial by Dranger (extremely helpful)
Stack Overflow: ffmpeg C API documentation/tutorial (not a duplicate, btw)
Sample code bundled with FFMPEG libraries
(I'll try and update this list with anything helpful below)
Thanks for any help...
Also: Operating System is Windows (but maybe one day cross-platform)
Also 2: Resources using alternatives are welcome too... i.e. DirectShow, VFW, etc.
If all you need is to decode and play videos and require overlays I would consider using the Phonon framework, and use QT Graphics View by using a Phonon::VideoWidget inside a QGraphicsProxyWidget. That way you can easily get overlays, cross-fading, animations etc. Phonon in Windows uses DirectShow as a back-end. You can install FFDShow and get the same codecs ffmpeg has to play videos.
There is an FFMPEG C++ wrapper library : FOBS. It is quite simple to use, but what you gain in simplicity you lose in fine grained configuration. It works great but is always a bit outdated.
m2c

video player with qt phonon (using python)

I am working on Windows xp and am trying to get a simple video player running.
I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as
connect(self.player,SIGNAL("finished()"),self.player.deleteLater)
and then , when the Play button is pressed, it makes the following call:
self.player.play(Phonon.MediaSource("C:\\vid.mp4"))
But, this doesn't display the video in the video player widget. Neither can I hear audio. Can anyone help??
I tried using different video file formats but no luck.
Try writing
self.player.play(Phonon.MediaSource("C:\\vid.mp4"))
to escape the \
Phonon::MediaSource mediaSource= Phonon::MediaSource("C:\\vid.mp4");
Try creating media sources like this and also other Phonon objects..

play video clip in windows c++ app

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.