What's a good reliable works-anywhere multiplatform video format (OSX, iOS and Windows)?

  • I've recently being porting a QML (on QQuickView, with C++ plugins) app from OSX/iOS & Linux to Windows for the first time. Currently using Qt 5.6.1.

    Qt's multiplatform awesome-ness meant it all went went very smoothly (precisely one Windows-build-specific #ifdef needed; windeployqt Just Works)... except that the app includes some bundled videos in .mov format (these appear to have the codec used internally as h264, but the container format is "QuickTime / MOV"). These files have always played fine with QML's MediaPlayer+VideoOutput combo on OSX and iOS and on Linux too (when gstreamer is being well behaved anyway); however, on Windows, no joy.

    I am not a Windows expert, let alone a Windows multimedia expert. Googling around a bit suggests .mov on Windows is basically dead (see https://support.apple.com/kb/DL837 and things like http://www.bbc.com/news/technology-36053672 ). In any case installing the deprecated Apple download just got me the ability have .mov files open in Apple's QuickTime player... it didn't seem to help Qt play them.

    What I'm wondering is:

    • Is there any particular video format which is likely to work "out of the box" for Qt/QML apps on Windows? (If not "out of the box", with the addition of a minimal-hassle "codec pack"?)
    • Even better: are there any formats which are universal enough to work on all of iOS, OSX and Windows to save me the hassle of preparing and maintaining slightly different versions of my applications' "content" blob for Windows and the rest?

    If it makes any difference, the intention is to do an Android version after the Windows one is sorted...

    Come to think of it... is there anything in Qt/QML which will let me enumerate the video formats Qt thinks are available/supported on the platform? I don't see anything in the QML MediaPlayer or VideouOutput elements' APIs.

    Thanks for any advice

  • Lifetime Qt Champion


    I'd rather take a look at a library like VLC so you'll have a swiss army knife to read your videos on all platform. AFAIK, there's currently no format that is really available everywhere without having to install a codec.

    Hope it helps

  • @timday

    The QtAV is project is an interesting start, ffmpeg based and wrapped up into Qt compatible classes.

  • Actually, I have now seen the .mov files played by QML's MediaPlayer on Windows. I'm making things slightly difficult for myself by not having a Windows machine in the house, so this has all been on an AWS EC2 instance; that gives you a Server2012R2 session... but that seems to have no media player support at all until you enable "Windows Desktop Experience". I also installed a "K-Lite Codec Pack", but since I'd installed that before I enabled the "desktop experience" stuff, I'm not sure if it was needed or not (will try and remove the codec pack at some point, if it's uninstallable; strongly suspect it is needed though). Anyway, that's the existence proof the .mov files can work I was looking for.

    Thanks for the other suggestions...

    I'm not too keen on turning to other tools like VLC or ffmpeg if I can possibly avoid it. Stock Qt has so far served me remarkably well as a one-stop shop for multiplatform applications and I'm very reluctant to have to bring in something else too. Transcoding my video content to something that worked everywhere would have been a more attractive solution if needed.

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