Media Framework Documentation for 4.5 Preview

Here is my workflow for this.

  1. Grab a MPEG4 encoded WMV

  2. Copy it to {your_project}/Content/Movies

  3. Drag the movie to your asset destination to create “Media Player” object

  4. Create a Media Texture by right clicking the “Media Player” object

  5. Assign media texture to the screen area in the TV material. Use TexCoord to adjust the texture size to fit the TV screen

  6. For soundtrack, you are supposed to use “Media Sound Wave” object.

However, the current support of it is not ready to use. I tried it and the game freezes half second whenever the track gets played.

6.1 I used a workaround for this. I extract the sound and use regular sound cue. It works for my case since the video and audio don’t have to be synced.

That’s it… Hope that get you started.

If you need screenshot, I can write a short blog on it if I have time this or next week.

Are there any plans to write a VLC Plugin using libVLC (libVLC - VideoLAN Wiki)?

This would solve issues with playback of certain files as VLC plays everything under the sun and can be used on multiple platforms.

That would be perfect!! Vlc is da bomb!

Does this mean still no way for live webcam streaming yet? My goal is to pipe two live feeds for stereo reasons.

Adding VLC or using VLC might not be possible due to licensing issues. It’s the same reason the official Linux editor release is being held up.

If using VLC isn’t an issue I would be more than happy to help implement the support.

EDIT: It looks like because VLC is under LGPL it is compatible with Unreal’s UE4. Can anyone confirm this?

libVLC (the video playback engine used by VLC) is licensed under LGPL. VLC (the video player) is licensed under GPL but that is all the GUI stuff which is not necessary for video playback.

The Unreal Engine FAQ (Häufig gestellte Fragen - Unreal Engine) says that LGPL code is allowed.

So as long as you link libVLC dynamically and not statically, it is allowed.
And by linking dynamically, you wouldn’t even need to include libVLC with your own software if you don’t want to, as long as VLC is installed in the computer you could just use the libVLC from the VLC install.

Hello amazing people, i need report a little bug here, i have 4 movies on my scene, one por each level, all works perfectly but with a little problem, when i restart the editor and play some first movie this not play, just remain black, and the other movies in the other levels works, its funny just the first one to be play simply not work but the other yes, i have no idea about, but i solve tricky, i just made a fake movie with nothing, and i reserve this for the first play, then the other movies work =), anywhy i like someone fix this, MR gmpreussner i count with your powerfull skills.

greeting !!!

Are you playing your movies from the lvl blueprint?

I dont know you could do something like

On begin play rewind movie_x then delay for .1 then play movie_x

Simple but this should work

I tend to create and manage my movies in a blueprint tho!

I don’t know if this has been answered, but I have a question. I know the implementation of the Media Framework in Unreal is still not at it’s final stage, so I did expect a few bugs here and there. But has anyone else tried packaging a game with a media texture and tried running it on a different machine/PC?

The reason I’m asking is because apparently the packaged build still reads the media files(WMV in my case) from the Project folder’s /Content/Movies directory. I’m using the 4.5.1 via Unreal Launcher and tried a test game project with media playback and went to packaging it with both Shipping/Development but same result. I can run it on the development PC fine, but running it on another PC via transferring the WindowsNoEditor folder will cause media playback to not start.

What I did as a workaround was create a new Content/Movies directory exactly the same as my Project folder(D:/UnrealProjects/Test1/Content/Movies) and copied the same movie assets there. It worked which told me that the built game was still referencing the media files from the project directory despite packing the same media files in the WindowsNoEditor/Test1/Content/Movies as well. Not sure if this has been reported so I thought I would mention it here to help those with the same issues.

It’s probably because the URL is absolute. You can check the URL your movie player is using by double clicking the movie player asset, and check the URL field.

I realize that it’s absolute and it’s the reason why I used the workaround stated when running on a different PC. It still doesn’t answer the question of why it packed the videos in the Build Package but keeps referencing URL in the ProjectName/Content/Movies folder instead of the packed Content/Movies folder.

I’m having the same problems as Eduren. The map doesn’t show up, and I can’t get the movies to play within UE4.

Also, if I drag + drop a .wmv or .mp4 i get a “failed to import …] Unknown extension”

Should I be using the latest preview build from github? I’m currently on 4.5.1-2336687

edit: downloaded latest preview (shows up as 4.6.0 in help>about) - still doesn’t work.

Any ideas anyone?

OK- If the Packaged build is still referencing the absolute URL - Workaround- change the file URL to the final(shipping) URL worked for me

What do you mean exactly? Do I set the path to where it will probably be build, ala /content/videos? You mind expanding a bit more on this please?

Edit: I saw earlier the proper context, you simply put …/…/Content/Movies/Test.mp4 into the URL path. It will not work in editor but once you package the project the video will work appropriately.

Yes set the URL path to where the exe will be built[e.g C/Game/WindowsNoEditor/Game/Content/Movie/Test.mp4]

Android support is working in the Master branch now, but didn’t make it into 4.6. We’ve had two videos playing in a level at the same time on a Nexus 5 without problems. One video was 320x480, the other 480x320. We haven’t tried three videos. It really comes down to what devices you wish to support. Some Android devices are considerably slower than others.

Hey RaidX, I’m not sure if I fully understand what you’re suggesting. Would you like to represent a media player asset as an Actor in the level?

Also, you can use a media player from a Level Blueprint. In your Blueprint, simply create a variable that holds a reference to the media player asset and use that to call media related functions on it.

Edit: Just noticed that you already figured this out on your own :slight_smile:

MKV is not supported by any of the available player plug-ins right now.

I agree, a VLC plug-in would be great, but we cannot provide this out of the box in UE4 due to the license that VLC comes with. Someone in the community will have to make this plug-in.

Is this available on Mobile yet? I tried messing about with it on Android last night but no luck! :>