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"

Media Framework - WmfMedia audio lag

We are experiencing a persistent audio lag (about 0.5 to 1.0 second delay of audio track compared to video track) when playing any mp4 video using the Media Player. This happens even when opening the Media Player asset in the editor and playing any of the Media Source from there (without actually going into play mode).

UE version is 4.20.1. We were able to reproduce this on 3 different PCs and using several different videos, including this one: https://dnnrz1gqa.blob.core.windows.net/portals/attachments/Engine/MediaFramework/HowTo/StreamMediaSource/Infiltrator%20Demo.mp4?sr=b&si=DNNFileManagerPolicy&sig=F%2BBpnYueeQTUTSW0nCRSrXEfr35LIawe7C3MQoe2%2FPI%3D

Using File Media Source instead of Stream Media Source (after downloading video on disk) doesn't change anything.

I tried every setting I could find with no success. The only setting that made a difference is "Native Audio Out" in the WmfMedia plugin project settings. It did eliminate the lag, but prevent Pause from working (using "Pause" BP node on the Media Player returns false and video continues to play) so this is not a solution for us unfortunately.

For reference, here is our setup for using Media Player in play mode (though I doubt it has any relevance):

  • Media Player asset

  • A Media Texture points to Media Player asset

  • UMG Widget has an Image that displays the Media Texture above

  • On scene there is an Actor with MediaSoundComponent that points to the same Media Player

  • In play mode user interacts with UMG widget and initiates video playback by clicking

Lag is the same no matter if it's in actual standalone built game, in the MediaPlayer window in Editor or in PIE.

Has anyone else experienced this? Is there any solution other than writing custom Decoder Plugin?

Edit: tried using the current master of VlcMedia plugin with no success. The lag remains but with this decoder videos appear to be distorted now. Looks like this issue may be related to some core UE4 code for playing the audio and not the decoders.

Product Version: UE 4.20
Tags:
more ▼

asked Aug 15 '18 at 05:19 AM in Using UE4

avatar image

vlad_saritasa
21 2 4

avatar image rotacak Sep 06 '18 at 11:12 PM

Same here, 4.20.2. And even that "Native Audio Out" is not usable because it not work in shipping build at all.

I recommend you to use this: https://epicsupport.force.com/unrealengine/s/

avatar image martin_vr Dec 13 '18 at 01:19 PM

have you found a solution for this? I'm experiencing the same on 4.20.3. WmfMedia. If native out selected there is no latency but unfortunately that does apply to a shipping build.

avatar image rotacak Dec 13 '18 at 02:38 PM

If I remember correctly then I found no soulution how to fix that. I had to play movie without sound and at the same time start playing wav with movie sound (previously separated from movie). Not ideal, but usable.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Here's a potential solution.

I had a terrible lag that got worse as the video progressed. So I tried a different video format. I found that when I switched from H264 MP4 to H265 (HEVC), the audio lag disappeared and everything was nicely synched.

more ▼

answered Apr 02 '19 at 11:53 PM

avatar image

G_t_Pianoman
3 1 3

(comments are locked)
10|2000 characters needed characters left
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