If you are just calling OS libraries you should be fine. The libraries are there to be used and are licensed, and I know Apple are pretty straightforward about this.
I don't know the legality of using ffmpeg or videolan. They are both free to use but are not public domain, so have licences you need to abide by when using them. They also operate in a bit of a legal grey area WRT to some patented technologies.
If there no support in Windows or Android? According to Wikipedia Windows 10, Android 9 and later support the format. You could either require these, or fall back to not supporting the format on earlier versions of these OSes (with a note encouraging people to upgrade to unlock support).