How to play movies with mac

I am in trouble because I can’t find a way to play a movie in Mac environment. I have tried to use a movieplayer control, loading a mp4 file directly inside the project App, or as a FolderItem, or as OpenURL… All of these methods work with Windows, but none with Mac. I’m clearly missing something and I was not able to find an answer in the web. What is the right way for simply playing movies with Mac? Thank you in advance.

i think apple use .mov QuickTime

I play a .mp4 in a moviePlayer control on both Windows and Mac. Works fine. Here is a code snippet of how I load and play the movie:

dim themovie as Movie = movieFile.openAsMovie()  //movieFile is a folderItem, .mp4 format
mainWindow.MoviePlayerContainer.TheMoviePlayer.Movie = theMovie  //MoviePlayerContainer is a container control, but is not necessary. TheMoviePlayer is an instance of MoviePlayer

wiki wrote .mp4 could be
MPEG-H Part 2 (HEVC/H.265), MPEG-4 Part 10 (AVC/H.264), MPEG-4 Part 2, MPEG-2 Video, MPEG-1 Video
MPEG-4 Part 3, AAC, MP3, MP2, MP1

If anything, I would expect this to be the other way around (works on macOS but not Windows) if it were an issue with the MoviePlayer control. As I understand it, the built in platform native control for macOS just handles video far better.

At this point, I would think it’s the file loading code which is the second most likely thing to differ between macOS and Windows with what little information we’ve been presented.

An example project bundled with the problematic MP4 would be the best way for us to debug the problem.

Edit: Reorganized thought flow to make more sense.

1 Like

I made a very simple project to allow you to reproduce the problem and this is the link:

The mp4 file is embedded in the App and also attached in the zip file. It works fine on Windows but not on Mac, even if the same file was converted to mov.

Works fine here:

Monterey M1
Xojo 2021r3.1

Your sample project is working here as well.

Big Sur 11.6.4 / M1
Xojo 2021r3.1

Have you tried with a different user account on the same Mac? This could indicate whether the issue is with your user account settings or at the macOS system level.

Ok, I don’t actually own a Mac but have encountered this problem with some students running my program on their mac. I will try to get them to tell me what version of macOS they have and investigate their user account details.Thank you both for the moment.

IF you look for an alternative on macOS, you can always try things in MBS Xojo AVFoundation Plugin plugin.

Like the AVPlayerViewControlMBS may help to play a video on macOS.