Is there a way to code an Raspberry Pi desktop app that will play an MP4 video file, or another type of video file from an SD card or streamed via the web?
I play MP4 files from my Xojo application by shelling to OMXPlayer. I then control the OMXPlayer via DBus commands.
You can download my Comvette Project code from here:
You should be able to extract the relevant code to accomplish what you want to do.
Thank you Wes. Is there not a way to do this with the XoJo API?
Have you tried adding a Movie Player to a Desktop app and then feeding it with the source movie?
I didn’t think the Media Player was compatible with Raspberry Pi OS . I’ll try.
As it is under GPL would that not require him to release his software under GPL too?
I’ve tested the following code on my Raspberry Pi 4 B and there is no display and no exception is thrown.
MoviePlayer1.Movie = Movie.OpenURL(“https://www.[domain].com/[filename].mp4”)
Catch e As RunTimeException
If e IsA EndException Or e IsA ThreadEndException Then
Raise e // Re-raise the exception for the framework
Only if you include it’s actual source. If it’s just another app that you ask the user to install and then launch it as it’s own separate thing then no. Whether or not you can embed it into another app or not as is and still not open source your app seems to be a contentious issue. But just saying that in order to play video you must also have this other app installed does not apply the license to your app.
Wait… or did you mean the comvett project and not the video player? If so then yes, if you just included it then you would need to. If you learned how to do it from the source and then implemented something similar yourself then no.
It’s about taking part of the code for his project - in my understanding GPL would require him to release his project as GPL unless he only dynamically links to the code.
Maybe it would be better to release the code under the less restrictive LGPL …
Have you thought about using an HTMLViewer?
No, but I shall. Thank you @Greg_O_Lone
Is this applicable to this thread? I’m I missing something?
There’s no API for the OMXPlayer as far as I know. Since OMXPlayer is a stand-alone program it can run in its own process space. The official way to control OMXPlayer is by issuing DBus commands.
OMXPlayer is included with Raspbian so it is available for anyone to use. The Comvette Project is mine but you are free to use it. So I’m not sure why the GPL issue has come up.