I was able to overcome the problem by exporting the frames of the video to png images. I used VLC for that:
https://www.raymond.cc/blog/extract-video-frames-to-images-using-vlc-media-player/
Number 2 is for the VLC instructions of how to do it.
I did not export every frame, only every 3rd frame, so out of 30 FPS, 10 frames for every second were exported.
At first I tried loading the images and adding animation frames to one sprite, however with over 600 HD images, that resulted in a memory error of some sort. The max it could handle was about 140, but for performance sake I stack to 100 images per sprite animation.
I used 7 sprites in total. The longest is the loading of images, so that needs to be done first, then you add the images to the sprite as animation frames in turn 1-100, then PlaySprite() and once that is finished, I used if statements to add next set of images to the sprite and before that I would delete the previous sprite to free up memory and so on until all images have been played and then logic to restart the entire process.
An example code, though I am sure there are more efficient ways to do this:
if GetSpritePlaying(100+g)=0
playanim = checkanim(100+g)
PlaySprite(playanim,15,0)
if g=6
g=-1
endif
inc g
endif
And the function that handles it:
Function checkanim(sprite)
DeleteSprite(sprite)
if sprite=106
for i=0 to 6
Createsprite(100+i,0)
next
sprite=99
endif
inc sprite
if sprite=100
for i=1 to 100
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=101
for i=101 to 200
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=102
for i=201 to 300
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=103
for i=301 to 400
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=104
for i=401 to 500
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=105
for i=501 to 600
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
elseif sprite=106
for i=601 to 672
//LoadImage(i,"video_anim/"+str(i)+".png")
AddSpriteAnimationFrame(sprite,i)
next
setspritevisible(sprite,1)
endif
endfunction sprite
And reset when all images have been played:
if GetSpriteExists(100)=0
for i=0 to 6
Createsprite(100+i,0)
SetSpritePosition(100+i,-100,0)
setspritevisible(100+i,0)
next
for i=1 to 100
AddSpriteAnimationFrame(100,i)
next
endif
At present, this is one possible way to play a video behind sprites and text on Mac computers as far as my testing and the effect is pretty interesting, maybe even better than the actual video, a bit trippy I would say. I played the frames at 15FPS, despite they are 10FPS exported images.
Also, I found that for Mac computers AppGameKit Classic functions much better than AppGameKit Studio. Basically in AppGameKit Studio, a lot of stuff didn't work, like the text for "PLEASE WAIT" kinda thing whilst loading video images did not even display in AppGameKit Studio, in AppGameKit Classic, no problem. Then after all images were loaded, the Sprite animation played correctly in AppGameKit Classsic, failed to display anything in AppGameKit Studio.
It seems like, AppGameKit Studio is not much updated for Mac OS. I do prefer to use the Classic version, so doesn't bother me that much, only means that when my project will get more involved in the Studio version, I might have more problems to solve on the Mac to make things work.
Also to use that image animation method to play a video, will use more memory in the exported exe for Mac. The actual mp4 video is about 50MB, the exported images of the video take up in total about 200MB and that is just 1/3 of all the video frames, so to export the lot would be like 600MB.
All in all, I think this kinda method makes pretty visually interesting dynamic backgrounds for anyone interested to use such for their games.
Still, this is not the actual solution to the PROBLEM, but it is a good temporary solution for the time being, atleast for me.