Best Practices for Playing Videos Inside Xojo App?

  1. 3 months ago

    Kimball L

    May 15 Pre-Release Testers, Xojo Pro Meridian, ID, USA
    Edited 3 months ago

    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)

  2. Graham B

    May 15 Pre-Release Testers, Xojo Pro The Canada's

    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.

  3. Christian S

    May 15 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    MoviePlayer may just work for most users.

    Otherwise check the MBS Xojo Plugins .

  4. Kimball L

    May 16 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    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).

    Thanks!

  5. Bob K

    May 16 Pre-Release Testers, Xojo Pro Kansas City

    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. :)

  6. Eduardo G

    May 16 Pre-Release Testers Europe (Madrid, Spain)

    I haven't run this in a while, but it may work for you: https://github.com/charonn0/RB-libvlc

    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.

  7. Michael D

    May 16 Pre-Release Testers, Xojo Pro
    Edited 3 months ago

    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.

  8. Markus W

    May 16 Pre-Release Testers #JeSuisHuman New Zealand, Auc...

    @Michael D I've switched over entirely to doing all movie playback using Javascript inside an HTMLViewer.

    Sounds like a good idea for an xDev article … ;)

  9. Kimball L

    May 21 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    @Bob K Your installer should included the Windows C++ runtime installer that ships with Xojo.

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

    Thanks, everyone!

or Sign Up to reply!