- Home /
Media Formats and Licensing in Unity
Hi Unity Community
I am working on a project that requires importing a variety of media, including audio and video formats, at runtime. I have video and audio import functionality working fine, however these currently only account for the open format .ogg (used for both video and audio).
How may I extend this to account for more standardised video formats (i.e. .mp4/.avi) and audio formats (i.e. .mp3/.aif)? I have read previous posts stating that the .mp3 issue is due to .mp3 licensing restrictions, is this an issue in general when accounting for these file formats? And if so what is the best practice for implementing this?
The docs suggest that components such as Raw Image/Audio Source etc should be able to account for these formats, however I have thus far been unable to import and stream them at runtime using the WWW class. Simply using converting media to .ogg isn’t really an option for my use case.
Many thanks in advance,
Ryan
Just to clarify the Simply using converting media to .ogg isn’t really an option for my use case:
I was hoping that I would be able to retain the original media to avoid having to subject it to further compression or changing its encoding as well as to avoid wait time while media is being converted (although this would be passable as a background process).
However, in the interest of keeping this as open as possible and to avoid licensing restrictions, using .ogg might be the best practice. It has been suggested that I could potentially leverage conversion servers/API's to achieve during runtime; does anyone know of any precedents for dong so? It would be great to get some community feedback on this matter