Hi,
I was looking for a way to play a video plus sound when entering a trigger box, pause it when leaving and resume both when reentering. For the media-texture that was easy via level blueprint, but the media sound wave crashed everything. Because I read about some similar problems, I thought I post my workaround - perhaps it will safe some time for someone else:
I extracted the sound of the video with vlc and imported it as a normal soundwave (wav). No crashing here.
I added a class blueprint with a trigger box and placed it over the trigger volume which activates the mediatexture via level blueprint.
Then I realized that there is no pause function for audio - just start, stopp, fade in and fade out. But you can build your own little pause function by saving the entry and leaving time of the trigger box and calculating the delta. this delta ist the starttime for the next reentering.
Thanks for sharing this. However, I am using this with 4.6.1 engine version and I am not able to run this. I am pretty new to UE4 and hence I am not sure how to run this actually. Can you please let me know how this can be used?
I would like to do the following
Provide user selection of movies that can be played out while in game
Take user input and perform the operations like creating the texture to play the movie.
Play the user selected movie.
All this is required to be done in the game. Please do let me know if there is a way to do this from Blueprint or do I need to do this from C++? Some sample implementations would be very helpful. Thank you.
Startup movies work in 4.7 Preview for Android. Place your MP4’s in the Content/Movies folder and select them in the Project Settings->Movie tab. Wait for Movies to Complete and Movies are Skippable checkboxes also work properly in 4.7. Note that without Wait for Movies to Complete checked, the movie(s) will stop as soon as loading completes.
That’s great news! What is the typical way to play fullscreen videos otherwise? Also, is there any recommendations on codecs for the MP4 container on mobile?
I’m very interested in the capture hardware implementation - is any of this in the source on github right now? I’m quite keen to buy some kind of blackmagic capture card - i know this will sound a bit irritating but is this the kind of capture device i’ll be able to use? Are there any particular types of card I should be looking at instead? Multiple simultaneous captures would be particularly up my street.
I wonder if you could pack an alpha channel into say the blue or red channel? you could perhaps quantize the blue so it goes from 8 bits to 4 bits, then use the other four bits to make a mask and use the shader to unpack it. It should be quite simple to set up an effect in an NLE to ‘encode’ the channel this way. Or easier would be to make the blue channel a side by side dual image with the blue on the left and the alpha on the right - the blue channel would have a lower horizontal resolution but I reckon it would be fine. A similar quantisation happens when you record video anyway, like 4:2:2 sources - If you had a 4:4:4 codec then you wouldn’t even notice the difference.
Video capture hardware support would be great! Ideally, being able to open a video capture session with the back-facing camera on Android would be amazing, particularly GearVR. Please keep us posted about this.
In the meantime, do you or any other developers know of any native code snippets, plugins, libs or extensions that could work for accessing the back-facing camera in GearVR?
When using a 2048x2048 video mapped to a sphere (For top bottom stereoscopic video) it’s getting huge amounts of FPS lag. Is there a setting i’m missing or what not. Wouldnt think playing a video would affect it this much! 2x Xeon5680 and Quadro K5000 with 32gb ram!
I would like to report MASSIVE fps drops and cpu usage when i enable my media textures inside my game. I am so happy that i found the Dev responsible for this feature because you are probably the only one out there that might be able figure out what is going on.
questions/175500/extremely-bad-performance-in-a-paper2d-project-tha.html
To follow up on this post, it turned out that AutoPlay and Looping was enabled for 14 videos, which were then all decoding simultaneously while the Editor/game was running. The fix was to turn off AutoPlay and play the videos on demand using Blueprints.
I will probably remove the AutoPlay feature altogether, because it seems rather dangerous and is probably not very useful now that MediaPlayer is fully integrated with Blueprints.