PDA

View Full Version : Playing Video file using Qt



sarode
26th March 2007, 12:34
Hello Everyone..

Can anybody help me how to run a video file using Qt. Does qt comes with video library builtin / need to add additionally..

Thanks in advance

high_flyer
26th March 2007, 13:07
Qt does not come with built in video abilties.
What kind of video input do you have?
Is the video stream decoded?
Does it have to be cross platform?
You might what to have a look in this thread (http://www.qtcentre.org/forum/f-qt-programming-2/t-simulating-video-on-qlabel-or-qgraphicsview-6188.html/?highlight=QVideo)

hayati
26th March 2007, 17:52
What you need is changes whether if it uses specific codes like h264.
but vlc is very powerfull as well.
you can also display vlc within QWidgets with the latest version.
But if you want a simple player than vlc you may use mplayer. It accept command line arguments to be reparented by QWidgets with window id parameter.
in second state( mplayer usage ) you will use QProcess to initiate.
If you want to use vlc you need to take a look at vlc's api.
Both works perfectly.

ToddAtWSU
26th March 2007, 18:35
I used DirectShow for a video player and here is the link to a lot of the code required to do this: http://www.qtcentre.org/forum/f-qt-programming-2/t-solved-directshow-video-player-inside-qt-1612.html

Hope that helps.