I created a media texture from a .wmv file located on the Content/Movies directory. My video/animated texture is applied to a material in the diffuse/emissive channel and everything works fine. But when I publish the project and move the published directory to another computer the video disappears.
I saw that the problem is that the animated texture always point to the working project directory (project/content/movies/), it has been embedded inside the published assets ( gamename/content/movies/ ) but the media texture is still pointing to the project file.
Is it a bug or is there a way to make my .wmv file to be embedded in the project?
We are having the same problem with movie textures. When playing from the editor in any format, the texture works fine. It also works fine when playing a game build on the same machine. However, when you give that EXE to another developer, the textures no longer work. Hopefully Epic fixes this soon. This feature is a big part of what we are currently doing for a client.
Hey antoniobosi and bzundel,
We are sorry to hear you are experiencing an issue with this feature.
The Media Framework is not quite production ready yet and is still in the experimental stages. Some features may not work as expected, however we are currently working hard to resolve those issues as well as add addition features and support. Because this is such a new feature, I would not suggest making this a very important part of your projects yet as it is still in the works and under development.
Look in the upcoming hotfixes and releases for updates on this feature.
Media Framework Documentation
I’m having this issue as well. It seems like the build process is not replacing the paths of media player actors so that they actually point to the build directory contents folder. Like has already been said the movies get packaged in the build but the path doesn’t get correctly changed. This is extremely annoying. I’m looking for a solution right now and will update if I find one.
It appears that the problem is with relative vs absolute paths. In 4.5 you cannot set a relative path to your movie file within the media Player. Basically this means you are out of luck. In 4.6 you can set a relative path and the movie file works correctly when built.
Thank you for the investigatory update. We always appreciate users trying to troubleshoot and find solutions to their issue. I will keep the version change-over in mind, and notify any other users who are having a similar issue about the change.
In that case the official answer for this question would be to update to version 4.6 to be able to package your movie files.
For me, UE4 shuts down when trying to make relative paths.
When I go into the media player settings I take the option to load the video ‘from memory’ needs to be on in order to get a relative path that works in a packaged game?
- UE4 tells me the video texture needs to be placed in the content>movies directory
- The movies folder does not exist when creating a blank first person project
- A media and mediatexture folder does exist
- When I import my video file from the media or mediatexture folder (in content folder of UE4 project), UE4 shuts down when I activate ‘load from memory’
- Running UE4 as administrator does not change this
- When I create a movies folder in the content folder and import the media file from there, it does not crash and will let me activate the ‘load from memory’ option. However the movies file is not exported when I package + UE4 shuts down when I try to open the projectfile in editor after packaging.
What am I doing wrong?
So I ran some tests with the Media Player asset and was able to reproduce most of what you were saying. I will give you a small list of my steps as well so we can compare what each of us did.
Steps to Reproduce
- Create a new Blueprint First Person Project without Starter Content in 4.6.1
- Save the Project and Close the Editor.
- Go into the Project’s Content Folder and Create a new Folder called ‘Movies.’
- Move/Copy the .WMV movie file inside of the ‘Movies’ folder.
- Re-open the Project and Import the movie file from the ‘Movies’ folder just created.
- This will automatically create a ‘Media Player Asset’
- Double click the ‘Media Player Asset’ and check the ‘Auto-Play’ and ‘Looping’ boxes.
- In the Content Browser, right-click the ‘Media Player Asset’ and choose the ‘Create Media Texture’
- Right click on the ‘Media Texture’ and choose ‘Create Material’
- Connect the texture sample to the ‘Diffuse Color’ input and ‘Save All’
- Now package your product for Windows.
- Attempt to launch the Game via the Packaged product.
- Observe the how the game attempts to load, but closes the window shortly after launch.
- Project will also not open.
If you have any further information about this issue that would be very helpful. We always appreciate these reports because it helps us improve our current features and makes other users aware of the issue.
Hi Andrew, thanks for the effort!
I tried multiple different ways to get in working.
- When I load the media player asset
(your step 6-7), and set it do ‘load
from memory’ ,no auto-play and no loop.
- UE4 crashes if I use the save ‘floppy’ icon, but it does not crash when I use the ‘save all’ option at the top taskbar menu.
- After this I add a control (letter p) to play and stop the media texture in-game.
- Package project
- When loading, the project does start and open, but texture is black and nothing is playing
- ‘From memory’ link is not working I guess?
Is it possible to make a workaround for this? My current project requires me to package multiple video’s, and it is quite a big problem (I guess for more people / any video file you want to use)
PS: there is no way to load the video file location after making the package? via blueprint for instance
Hi Andrew. Do you know if 4.7 will have some fixes regarding the media plugin? Like having the media sound wave to load correctly after restarting unreal, and also having the media sound wave able to be packaged?
The thing is I have implemented a lot of features : synchronize sound and image in movies, playing mp4 and various codec, playing from a webcam, from capture cards like (http://www.datapath.co.uk/products/video-capture-cards/capture-card-features), optimize lot of stuffs to be able to playback 4k videos at a reasonable frame rate.
All of it works well in the editor as well as in packaged games, except the sound. I cannot make it work in a package.
Hey again Tim,
No problem. I am going to run one more test using four separate variations to see if this issue is related specifically to a certain stream mode. It was reported that videos with the resolution of 1920x1080 on Windows, renders black in a packaged product.
Let me know if the video you tested with was at this resolution. This could be part of your issue. I will check mine as well and report back here with what I uncover after testing. I appreciate your patience with as I am trying to gather all the appropriate information for the bug report so the fix can be found and implemented efficiently.
They videos I am using have been provided to me, they are part of a lighting projection design. They are windows media player files of different non-standard sizes, 800x800 / 400x800, 23fps
I added one such video for you to download via wetransfer: http://we.tl/E1Th2evqYD
So after a good few hours of testing I narrowed down the issue to being related to the ‘From Memory’ as you suggested.
If you are applying the movie via media texture material using the ‘Default Lit’ mode, you will want to rebuild your lighting for the changes to take affect. The workaround I suggest would be to keep the streaming mode to ‘From URL’.
I created a bug report for this issue and will keep this post marked as unresolved for tracking purposes if anyone else is experiencing a similar issue. We always appreciate users taking the time to report bugs or issues found as it helps us improve upon the users experience with the Engine.
Thanks for the feedback! It’s quite a big thing, hope it can get resolved in UE4.7! It actually makes all media texture uses in UE4 impossible (as usually your goal will be to be able to play it on other PC’s)
So I think the only way to succesfully get media textures to work in a packaged game on a different computer is to place the corresponding media files in the exact same directory name as the PC the game was packaged on?
My current scene is fully dynamic, so is a light rebuild needed then?
That’s right. I have the same issue. Movies have to be in the same absolute directory on all machines. And they have to be dragged in the editor, because relative paths are buggy.
Sounds extracted from movies also have a lot of bugs.
Will this be resolved in 4.7? Have many 1920 by 1080 videos I plan on using.
We are working hard to have this fixed as soon as possible. Currently this is not on the roadmap to be fixed by final 4.7, but this is a priority to have fixed in the future.
Can we get an update on this issue? Thanks!
This issue is currently in progress for testing and a fix will be upcoming. As for a time-frame I cannot say as I do not know what the fix requires, but we appreciate your patience while we get one implemented.
Is this working in 4.8? I’m having issues getting the video textures to work in my packaged project.