Results 1 to 12 of 12

Thread: Phonon Media Format Support

  1. #1
    Join Date
    Nov 2010
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Phonon Media Format Support

    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.

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Phonon Media Format Support

    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).
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  3. #3
    Join Date
    Nov 2010
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    Quote Originally Posted by Talei View Post
    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Phonon Media Format Support

    How do you open the file?

  5. #5
    Join Date
    Nov 2010
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    Quote Originally Posted by tbscope View Post
    How do you open the file?
    I double click on the MP4 file and it opens on windows Media Player.

  6. #6
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Phonon Media Format Support

    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.

  7. #7
    Join Date
    Nov 2010
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    this is the code I used

    3.
    Qt Code:
    1. void HelloMeego::on_pushButton_4_clicked()
    2.  
    3. {
    4.  
    5. //video
    6.  
    7.  
    8.  
    9. // display video in same window
    10.  
    11. Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
    12.  
    13.  
    14.  
    15. // Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, this);
    16.  
    17. Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
    18.  
    19. Phonon::createPath(mediaObject, videoWidget);
    20.  
    21. ui->verticalLayout->addWidget(videoWidget);
    22.  
    23.  
    24.  
    25. Phonon::AudioOutput *audioOutput =
    26.  
    27. new Phonon::AudioOutput(Phonon::VideoCategory, this);
    28.  
    29. Phonon::createPath(mediaObject, audioOutput);
    30.  
    31. QString urlVideo ="TV.mp4";
    32.  
    33. Phonon::MediaSource source = Phonon::MediaSource(urlVideo);
    34.  
    35. mediaObject->setCurrentSource(source);
    36.  
    37.  
    38.  
    39. Phonon::SeekSlider *slider = new Phonon::SeekSlider;
    40.  
    41. slider->setMediaObject(mediaObject);
    42.  
    43. ui->horizontalLayout_2->addWidget(slider);
    44.  
    45. slider->show();
    46.  
    47.  
    48.  
    49. mediaObject->play();
    50.  
    51. }
    To copy to clipboard, switch view to plain text mode 
    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 ?

  8. #8
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    Hi,
    i have the same kind of issue, i can play mp4 but not flv.

  9. #9
    Join Date
    Nov 2010
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    Quote Originally Posted by v-6 View Post
    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)

  10. The following user says thank you to somnathbanik for this useful post:

    v-6 (10th November 2010)

  11. #10
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon Media Format Support

    Quote Originally Posted by somnathbanik View Post
    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.

  12. #11
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Phonon Media Format Support

    Quote Originally Posted by somnathbanik View Post
    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.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  13. #12
    Join Date
    Dec 2010
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Phonon Media Format Support

    how did u played mp4 file

Similar Threads

  1. working with Windows Media Format 11 SDK
    By Baasie in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2011, 13:45
  2. Replies: 0
    Last Post: 8th April 2010, 02:39
  3. Phonon: how to recognize a media file?
    By YaK in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2009, 08:03
  4. Phonon + custom media source
    By wysota in forum What's New in Qt 4.4
    Replies: 2
    Last Post: 18th July 2008, 17:41
  5. Phonon Media Object blocking on play()
    By traetox in forum Qt Programming
    Replies: 0
    Last Post: 21st May 2008, 05:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.