# How to play an OGG file at runtime without having to import it?

**URL:** <https://forums.unrealengine.com/t/how-to-play-an-ogg-file-at-runtime-without-having-to-import-it/509323>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint\
**Created:** [March 24, 2022, 1:54am UTC](https://forums.unrealengine.com/t/how-to-play-an-ogg-file-at-runtime-without-having-to-import-it/509323 "2022-03-24T01:54:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![midgunner66](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/midgunner66/32/466711_2.png) [@midgunner66](https://forums.unrealengine.com/u/midgunner66)\
**Post date:** [March 24, 2022, 4:47am UTC](https://forums.unrealengine.com/t/how-to-play-an-ogg-file-at-runtime-without-having-to-import-it/509323/3 "2022-03-24T04:47:00Z")

</div>

This works perfectly! Didn’t know the media player could play sound files! Even works for URLs!

To play local files that the user can choose at runtime, use [Open File](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Media/MediaPlayer/OpenFile/). [Open Url](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Media/MediaPlayer/OpenUrl/) works at runtime, too. You’ll probably also want to bind [On Media Opened](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Media/MediaPlayer/OnMediaOpened/) & [On Media Open Failed](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Media/MediaPlayer/OnMediaOpenFailed/) so you know when the media is opened.

Though, I tested it on a few ogg files, and it didn’t work (it did for mp3 & wav). I’m on 4.20. If you can’t get it to work for you, [Rama’s plugin](https://forums.unrealengine.com/t/39-ramas-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448) and [RuntimeAudioImporter](https://forums.unrealengine.com/t/run-time-import-of-ogg-files-anyone-got-this-working/228887/6) can play ogg.

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-play-an-ogg-file-at-runtime-without-having-to-import-it/509323)._
