Video playback on Windows and Mac



  • I am building a program that needs to play video. I have the advantage that it is not a media player, per se, but rather a program that will play very specific video files. This gives me the simplification of building a player that can only play 1 type of file format. The various documentation and examples make the coding side of video playback look ridiculously easy, however I am left with 3 questions:

    1. Should I use phonon or mobility multimedia? I don't want to use a soon-to-be-deprecated library, but I also don't want to put the time into a library that is not featured enough.

    2. How are you supposed to get different video formats to play in the example video programs? The documentation for both phonon and mobility multimedia seem to suggest it is as simple as installing the appropriate codec. I installed the divx codec, but I still can't get the example video players to play divx video files.

    3. Which video file format would be best for to play videos on both windows and mac? Obviously I want to keep decent video quality while minimizing file size, but the most important criteria is one file format to play on both platforms.



  • Good question! Gilgrum,

    1. AFAIK, Phonon and MultiMediaKit(i think that's what's your mean mobility multimedia) use different backend. As we know, GStreamer for Phonon, and MultiMediaKit i can't remember right now, but it's different from GStreamer. And the soon-to-be-deprecated Phonon is still works for Desktop, while MultiMediaKit is main target for Mobile devices.

    2. I'm not sure what's the problem. But the Phonon is know as a good multimedia framework, and you can find various plugin for supported format.

    3. mp4? I'm not sure. Maybe someone know, but for me, mp4, avi and also some main video format is ok to play, since they're just different video container.

    Anyone know more detailed ? :D



  • Thank you for the post Chuck! Which codec would you suggest for mp4? (sorry if this is a very noob-ish question, I am very new to all things video related)

    I decided at this stage it is best to go with MultiMediaKit. I don't really want to invest the time into a library that is about to be deprecated, and MultiMediaKit doesn't involve as large a time investment as I first thought.

    I did some further testing with the divx codec and the code sample shown "here":http://doc.qt.nokia.com/qtmobility-1.1/qmediaplayer.html#details. For this test note that I have 2 windows XP computers setup with Qt. The short version of the test results is that the divx codec allows me to play .avi videos (this is verified against a computer without the divx codec and by a divx watermark that appears for the first few seconds of playback). However I still cannot play divx files using the MultiMediaKit. When I try to do so, I get an error "DirectShowPlayerService::doRender unresolved error code 80040218". I was unable to step through the code to find this error, but may try again later.

    The next experiment I would like to try is continually polling the backend for supported mimetypes while systematically installing new codecs. I am hoping to see a predictable increase in codec support. I am trying the following code:
    @
    QStringList mimes = QMediaPlayer::supportedMimeTypes();
    for (int i=0; i<mimes.count(); i++)
    ui->mimeList->addItem(mimes.at(i)); // mimeList is a combo box
    @
    Unfortunately I never get any elements in the mimes QStringList. So I cannot run this test.

    Ultimately I would like to identify a video format that uses a nice safe codec. When the program runs, it will poll the end user's system to see if it supports that specific video format. If that format is not supported it will display a link instructing the user to install the correct codec. This would be easily done using the call:
    @
    QtMultimediaKit::SupportEstimate QMediaPlayer::hasSupport ( const QString & mimeType, const QStringList & codecs, ... )
    @
    However, since the supportedMimeTypes call isn't working I really don't know what I would pass into this second call.

    Any suggestions on "safe" codecs I could use, or on what could be preventing the above code from working?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.