Best Practices for Playing Videos Inside Xojo App?

What is the current best way (best being defined as smoothest user experience) to play a video inside a xojo-built application?

Is the MoviePlayer control still viable cross-platform? I seem to recall it had some issues when quicktime lost windows support.

Is it better to embed a browser control and have it load/play a .mp4 or whatever?

My media department will be producing the video, so I can control the format, size, bitrate, framerate, codec, etc.

(Desktop app, targeting Windows and Mac OS X)

We use avfoundation on macos and vlc on windows as you can direct the video outputs to a calayer, or and area on screen on windows or maybe a canvas.
100% MBS functionally. Might not be smallest footprint but we need to get frames during playback for rendering to metal and OpenGL.

MoviePlayer may just work for most users.

Otherwise check the MBS Xojo Plugins.

Can anyone tell me the system requirements for MoviePlayer to work on Windows? Do I have to have a certain windows update installed? Does it require quicktime? Does it have any dependencies other than core libraries of the OS?

I started with a simple MoviePlayer-based approach yesterday, and it worked fine - but my windows test machines are all fully updated and relatively recent hardware. My customer base is large and runs all kinds of outdated, unpatched, and poorly updated Windows - I routinely find Windows 7 users who have not installed windows updates in several months, for example.

Will I be better off using an MBS approach? (I have a license for the plugins already, but I’m looking for a balance between simple to implement and dead reliable for my users).


Definitely doesn’t require QuickTime.

Your installer should included the Windows C++ runtime installer that ships with Xojo. Other than that we’ve not had many issues with movies playing in Windows. If you need fine control of a movie it can be a bit of a pain but reach out if you need some help/advice/shoulder to cry on. :slight_smile:

I haven’t run this in a while, but it may work for you:

It used to use the VLC Library (when the license stopped being GPL, so it can be used in projects) and has the advantage of the absurdly large support VLC has for formats and variants.

I remember there was also an MPV lib out there that could be called as a cocoa surface but I can’t find the reference.

I’ve switched over entirely to doing all movie playback using Javascript inside an HTMLViewer.

Pros: both MS and Apple have put a ton of effort into making browser-based playback be efficient, and even though old OSs are no longer being updated (OS X 10.11, Windows 7), the rendering engine (Safari/WebKit and IE11) are still receiving updates.

Cons: simple tasks such as “get the video frame at 2.1 seconds” become much more difficult.

Sounds like a good idea for an xDev article … :wink:

I’m already doing this, so I’m crossing my fingers and hoping for the best with the native MoviePlayer control.

Thanks, everyone!