x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Bug Report Media Player Playback Rate

Hi guys, I've seen another post with the exact same problem but the guy never responded so it was completed as solved but there was no solution so thought I would re-post.

Basically i have some .mp4 files saved on my hard drive imported in to my project, I have created a media file from it, with a playback rate of 1.0 which is controlled in the media file. it is then turned into a media texture to be used in a material (I am making some animated buttons in the UMG)... unfortunately every-time I save and close the project and re-open the project the playback rate reverts back to 0.00, all my materials then do not work because of this and I have to manually change the playback rate again, this is fine when I have a few textures, but as I want to set up many textures like this it would become a bigger problem. So this is the error report.

Product Version: UE 4.11
Tags:
more ▼

asked May 03 '16 at 08:27 AM in Using UE4

avatar image

THINKTANK
11 1 4 4

avatar image gmpreussner STAFF Aug 10 '16 at 04:22 PM

To specify the play rate when starting playback, use the SetRate function instead of the Play function. Play is actually just a shortcut for SetRate(1.0)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello THINKTANK,

This is the default and expected behavior for the Media Player files. This was not originally the case when we first implemented the feature, but users were experiencing widespread crashes due to their Media Player files auto-playing when loading up the project. As you can imagine, the more textures you have referencing a single video on load, the longer the load times will take, and the more dangerous the project becomes when working with these files.

In order to control or set the rate of the Media Player file, you need to add some blueprint functionality, and call the 'Set Rate' node. Once you have done this, your videos will play as you expect while in game. If you need to preview the file, you can set the rate within the Media Player Asset. We try to let users know in our documentation not to rely too much on this feature as it is not production ready at this point.

If you have further questions or need additional assistance, please let me know.

Thank you,

Andrew Hurley

more ▼

answered May 03 '16 at 02:58 PM

avatar image THINKTANK Jul 27 '16 at 02:49 PM

Ah ok I see thank you for your response! So my question to you is this, will there be a set rate to multiple files or am I doing this the best way? creating a "set rate" for every one of my buttons will take ages! Same with a rewind as I want them all to be in sync since half are video alphas that work with there diffused counterparts :)

alt text

avatar image AndrewHurley Jul 28 '16 at 01:55 PM

Take a look over an answer one of our developers provided when calling multiple media files to play. Getting everything to play in sync is not going to be easy since the files need to be loaded into memory before playing. Also calling a media player to seek and rewind multiple times can cause the media files to break due to overflow.

https://answers.unrealengine.com/questions/449033/media-player-not-working-on-packaged-project-in-41.html

Let me know if you have further questions.

Cheers,

Andrew Hurley

avatar image THINKTANK Aug 09 '16 at 03:17 PM

Thanks Andrew, maybe If I just explain what I am trying to do- I basically have a material, a diffuse and a opacity (alpha) they are both video files. what I want them to do is both be in sync so the alpha works seamlessly with the diffuse. I am using several of these for buttons in the UMG (hopefully the 3D widget at some point when it works a bit better)... and then i'll have like 6 video files for one button (standard, hovered and clicked)... It all kind of connects in with my other thread I have set up on working with 3d Widgets (https://forums.unrealengine.com/showthread.php?117506-Best-way-to-create-Information-flags&highlight=THINKTANK) any help would be very much appreciated!

avatar image AndrewHurley Aug 09 '16 at 05:04 PM

In all honestly, you would be better off using a SubUV animation for your pulsating circles and not an actual video. This allows you control the custom time dilation of your animations as well as the exact size and shape of your circles as well.

It is going to be more work to get all of your videos to playback with alphas in sync which will achieve the same effect as using a SubUV/Flipbook animation of circles..

Let me know if you have further questions or need additional assistance.

Cheers,

Andrew Hurley

avatar image THINKTANK Aug 10 '16 at 09:26 AM

Thanks Andrew, the thing is it's not just a pulsating circle, there are serveral types I will want to show as animated. Since I'm working with graphics / motion graphics department they are creating all the UI imagery to speed things up, if I take up that role as well things will get too much and will grind to a halt.

In my mind getting two videos to play at the same time should be a relatively simple thing to do? I'm sure there is more behind the scenes but I have noticed a lot of simple tasks in Unreal require a lot of work to play out correctly!

For the task I want to do then, is it at all possible? I will have 6 buttons, 3 states for each button so 36 video (pairs of two that will need syncing) and like I mentioned before, I will want them to float in 3D space (and follow the camera) so will the video / hoover interaction even work with the experimental 3d Widget? currently I can't even get that to work but I guess that is separate from my main question, How can i get the videos to sync correctly?

avatar image AndrewHurley Aug 10 '16 at 02:03 PM

When you are dealing with Media Files, getting them to play synchronously is not easy because the engine is running other processes which can cause frame times to vary.

It would take 2 players, one for each movie. It is much better to put alpha in RGB to the side and do 2 texture samples with offset to get the alpha from same frame.

Thanks,

Andrew Hurley

avatar image THINKTANK Aug 15 '16 at 02:55 PM

Thanks Andrew, ok going down your route so instead of having a separate video for diffuse and another for alpha I should what generate an alpha using the diffuse colour?

avatar image THINKTANK Aug 15 '16 at 03:24 PM

This works pretty well, I wonder with more complicated videos how well it'll work but thanks for now!

alt text

one lpaha.jpg (80.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question