# MediaPlayer stuttering on loop

**URL:** <https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140>\
**Category:** Character & Animation\
**Tags:** unreal-engine, bug-report, CPP, question\
**Created:** [January 17, 2017, 4:50pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140 "2017-01-17T16:50:22Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![C0dR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@C0dR](https://forums.unrealengine.com/u/C0dR)\
**Post date:** [January 17, 2017, 4:50pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/1 "2017-01-17T16:50:22Z")

</div>

Hello,

I am currently playing a video on an UMG image using mediaPlayer and mediaPlayertexture. Everything is working, but I have a looping video I wanted to play on the UMG widget and when the video is finished and just beginning to loop, it freezes for a short moment. So it results in an unperfect loop with stuttering at the loop point, which is very obvious.  
The Second problem is, when I change the widget to another one with a second mediaPlayer attached to it, the mediaPlayer shows the last frame for a short time and then begins from beginning, even tho I called Rewind(); before showing it.

My current logic is like this:

- Play mediaPlayerA on WidgetA in an endless loop (stuttering on loop point).
- On Trigger, wait for mediaPlayerA to finish the video and then remove WidgetA from Viewport, pause mediaPlayerA and Add WidgetB to Viewport. Then Start mediaPlayerB in endless Loop. (stuttering on changing mediaPlayer and widget).
- After 10 seconds, wait for mediaPlayerB to finish video, remove WidgetB from Viewport, pause mediaPlayerB and add WidgetA to Viewport again. Then rewind mediaPlayerA and start mediaPlayerA in endless Loop.

So how comes the videos are stuttering? They are only 4 seconds long, perfectly looping and only around 14 MB big. So I guess its not a HDD issue.

---

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [January 23, 2018, 7:16pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/2 "2018-01-23T19:16:30Z")

</div>

I actually noticed this behavior too! Have you found any solution yet?

---

<div class="post-metadata">

**Author:** ![gmpreussner\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gmpreussner\_1](https://forums.unrealengine.com/u/gmpreussner_1)\
**Post date:** [January 23, 2018, 7:19pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/3 "2018-01-23T19:19:39Z")

</div>

4.14 is an ancient version of UE4 that contains a very early version of media playback functionality. I strongly recommend upgrading to 4.18. It also has better looping support. Let me know if you keep having issues with newer versions of UE, thanks!

---

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [January 23, 2018, 7:48pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/4 "2018-01-23T19:48:17Z")

</div>

Totally fixed that loop issue, thanks!

---

<div class="post-metadata">

**Author:** ![Orkney](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Orkney](https://forums.unrealengine.com/u/Orkney)\
**Post date:** [January 24, 2018, 9:59am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/5 "2018-01-24T09:59:42Z")

</div>

I disagree, I am trying to create an interactive presentation using UE4.18.2 and the stutter on loop issue is still very present, more so after packaging. I was using a workaround previously which would set the visibility of a white frame over the video to visible before starting to switch file source, then setting invisibile after opening source. However this now doesnt work as the widget visibility feature is broken.

It is a shame as the presentation itself is pretty good, and will work well for my company, however we will not use it as a proffesional presentation with these issues. Using Unreal Engine to do this presentation was also a reccomendation of mine. Back to powerpoint slides…

---

<div class="post-metadata">

**Author:** ![Orkney](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Orkney](https://forums.unrealengine.com/u/Orkney)\
**Post date:** [January 24, 2018, 10:25am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/6 "2018-01-24T10:25:26Z")

</div>

I just want to say there is another work around where you can use FlipFlop node with two Media Players, when you want to switch to the next video without a stutter.

On begin, set media player 1 to play file source 1 and media player 2 to play file source 2. When you go to play video 2. swap the the image brush from media texture 1 to media texture 2, then have media player 1 open file source 3. This can be done with a FlipFlop node.

This will not fix the loop stutter problem however.

There is also an issue that when you switch to the next video. It will not start at the correct time as it has been playing since the last video started. You could rewind the source back to the start however I think this would also create a stutter. But I haven’t tried this.

---

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [January 24, 2018, 11:28pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/7 "2018-01-24T23:28:37Z")

</div>

I haven’t noticed this stuttering issue within 4.18, however there is a very noticeable black frame which flashes between plays. I am not sure if this is addressable, but it is better than the stutter issue which makes the video pretty much unwatchable after several plays. @gmpreussner is the black frame potentially just due to file format or file size? Do you see this behavior on your end? Thanks!

---

<div class="post-metadata">

**Author:** ![lwetzel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lwetzel](https://forums.unrealengine.com/u/lwetzel)\
**Post date:** [April 16, 2018, 10:27am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/8 "2018-04-16T10:27:22Z")

</div>

The black flash frame can be avoided by unchecking the “Auto Clear” box in the Media Texture.  
But also I am not finding a solution for the stutter of the media loop. i’m looping a very short video file (under 1MB)… also tried the “Precache File” box in the media source without any improvement.  
Unreal Version 4.18.3 btw

---

<div class="post-metadata">

**Author:** ![3dlight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3dlight](https://forums.unrealengine.com/u/3dlight)\
**Post date:** [May 23, 2018, 6:38pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/9 "2018-05-23T18:38:40Z")

</div>

I’m having a significant Hitch on loop in 4.19.1. Black frame is fixed, but the hitch is a problem still.

---

<div class="post-metadata">

**Author:** ![yasherka](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yasherka](https://forums.unrealengine.com/u/yasherka)\
**Post date:** [October 22, 2019, 11:21am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/10 "2019-10-22T11:21:27Z")

</div>

Still not work. 4.23. Auto clear don’t work on android as well

---

<div class="post-metadata">

**Author:** ![GatoDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gatodev/32/719915_2.png) [@GatoDev](https://forums.unrealengine.com/u/GatoDev)\
**Post date:** [June 1, 2022, 2:54pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/11 "2022-06-01T14:54:48Z")

</div>

I still have the loop slutter on Unreal 5.0.2 😕

---

<div class="post-metadata">

**Author:** ![hbasch](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hbasch/32/485434_2.png) [@hbasch](https://forums.unrealengine.com/u/hbasch)\
**Post date:** [May 2, 2023, 8:35am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/12 "2023-05-02T08:35:44Z")

</div>

same !

---

<div class="post-metadata">

**Author:** ![HISPlayerUnreal](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hisplayerunreal/32/712778_2.png) [@HISPlayerUnreal](https://forums.unrealengine.com/u/HISPlayerUnreal)\
**Post date:** [June 16, 2023, 9:27am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/13 "2023-06-16T09:27:30Z")

</div>

Have you tried it with [HISPlayer](https://forums.unrealengine.com/t/hisplayer-http-live-streaming-hls-and-dash-video-streaming-plugin-for-unreal-engine-games-and-metaverse/1135877) media player plugin?

---

<div class="post-metadata">

**Author:** ![Manula96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manula96](https://forums.unrealengine.com/u/Manula96)\
**Post date:** [September 25, 2023, 7:27am UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/14 "2023-09-25T07:27:53Z")

</div>

I got this stuttering in ue5.1 . It was fixed when i enabled the Electra video plugin. Also i saw in a tutorial that you must do this in ue5.

---

<div class="post-metadata">

**Author:** ![Max974](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max974](https://forums.unrealengine.com/u/Max974)\
**Post date:** [October 17, 2023, 2:29pm UTC](https://forums.unrealengine.com/t/mediaplayer-stuttering-on-loop/382140/15 "2023-10-17T14:29:25Z")

</div>

Worked for me! Thanks!
