PDA

View Full Version : Phonon Media Format Support



somnathbanik
9th November 2010, 13:44
Hi,
I am checked and found that Phonon can't play all types of media files. It can't play mp4 and flv. will we get the fix in the next release of Qt SDK, or is there any other way to fix it.

Talei
9th November 2010, 17:34
Phonon is only a back-end, that means everything what can play Your OS native vide player can play Phonon. See doc for more details. (and yes phonon plays mp4 and flv's with correct codec installed).

somnathbanik
10th November 2010, 06:31
Phonon is only a back-end, that means everything what can play Your OS native vide player can play Phonon. See doc for more details. (and yes phonon plays mp4 and flv's with correct codec installed).

If that is the case then my app should play mp4 files, cause I am running the app on Windows7 and the default WMP can play the mp4 file but not my app can play the same mp4 file. Could you please put some llight on it.

tbscope
10th November 2010, 06:49
How do you open the file?

somnathbanik
10th November 2010, 07:03
How do you open the file?

I double click on the MP4 file and it opens on windows Media Player.

tbscope
10th November 2010, 07:19
With Phonon I mean.

This can be a couple of things:
1. You do not have the correct codec installed. Media Player might use a different codec (even internal code). Check the capabilities of the backend.
2. There's something wrong with the backend. In your case that would be the DS backend I think.
3. You did not create the correct Phonon/Qt code to play the video. Hence the question, how do you open the file.

somnathbanik
10th November 2010, 07:53
this is the code I used

3.


void HelloMeego::on_pushButton_4_clicked()

{

//video



// display video in same window

Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);



// Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, this);

Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);

Phonon::createPath(mediaObject, videoWidget);

ui->verticalLayout->addWidget(videoWidget);



Phonon::AudioOutput *audioOutput =

new Phonon::AudioOutput(Phonon::VideoCategory, this);

Phonon::createPath(mediaObject, audioOutput);

QString urlVideo ="TV.mp4";

Phonon::MediaSource source = Phonon::MediaSource(urlVideo);

mediaObject->setCurrentSource(source);



Phonon::SeekSlider *slider = new Phonon::SeekSlider;

slider->setMediaObject(mediaObject);

ui->horizontalLayout_2->addWidget(slider);

slider->show();



mediaObject->play();

}
and its running on Linux
1. how to check the backend capabilities. Are you talking about the media file support by phonon?this I have this
("application/vnd.ms-wpl", "application/x-mplayer2", "application/x-ms-wmd", "application/x-ms-wmz", "audio/aiff", "audio/basic", "audio/mid", "audio/midi", "audio/mp3", "audio/mpeg", "audio/mpegurl", "audio/mpg", "audio/wav", "audio/x-aiff", "audio/x-mid", "audio/x-midi", "audio/x-mp3", "audio/x-mpeg", "audio/x-mpegurl", "audio/x-mpg", "audio/x-ms-wax", "audio/x-ms-wma", "audio/x-wav", "midi/mid", "unknown", "video/avi", "video/mpeg", "video/mpg", "video/msvideo", "video/x-mpeg", "video/x-mpeg2a", "video/x-ms-asf", "video/x-ms-asf-plugin", "video/x-ms-wm", "video/x-ms-wmv", "video/x-ms-wmx", "video/x-ms-wvx", "video/x-msvideo")
2. what is DS backend ?

v-6
10th November 2010, 08:30
Hi,
i have the same kind of issue, i can play mp4 but not flv.

somnathbanik
10th November 2010, 08:31
Hi,
i have the same kind of issue, i can play mp4 but not flv.

It seems to a problem with the codex, you can try running the app on linux or even try to install a codec pack like K-Lite (for me it didn't work)

v-6
10th November 2010, 08:45
It seems to a problem with the codex, you can try running the app on linux or even try to install a codec pack like K-Lite (for me it didn't work)

Yes I installed K-Lite and it worked for me. thank you.

Talei
12th November 2010, 07:03
If that is the case then my app should play mp4 files, cause I am running the app on Windows7 and the default WMP can play the mp4 file but not my app can play the same mp4 file. Could you please put some llight on it.
Sorry for late reply. I miss this thread by accident.
You can play MP4 files in WMP and not in Phonon because You are probably using ffdshow base codec/pack. K-Lite use DS codecs that are supported by Phonon. It's in doc (http://doc.qt.nokia.com/4.7/phonon-overview.html#backends).

asmncl
2nd February 2011, 06:52
how did u played mp4 file