# Movie playing upside down and backwards

**URL:** <https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, bug-report, question\
**Created:** [October 18, 2016, 10:05pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715 "2016-10-18T22:05:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [October 18, 2016, 10:05pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/1 "2016-10-18T22:05:46Z")

</div>

When I play some movie files through with the new media framework they render upside down and backwards: Compare

 ![111474-movie.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/0/a603276aff1611a678f983a972f0452b351969a5.png)

to [the original movie file.][2]

It seems to be related to either the file type or the codec, we’ve only found the issue with AVIs so far.

---

<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:** [October 18, 2016, 11:03pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/2 "2016-10-18T23:03:24Z")

</div>

Thanks, I’ll take a look.

---

<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:** [October 19, 2016, 5:34am UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/3 "2016-10-19T05:34:31Z")

</div>

Added UE-37505

---

<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:** [October 19, 2016, 5:39am UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/4 "2016-10-19T05:39:35Z")

</div>

So, something seems very broken in WmfMedia with playback of RGB32 encoded videos. As you already figured out, the video renders upside-down. It is also way too bright. I’m not sure why this happens, especially since we don’t even require conversion (it goes from RGB32 to RGB32).

Until I know more, I checked in a temporary workaround in CL# 3167029 for 4.15. In the meantime, I suggest that you use a different video format, i.e. H.264 encoded .mp4 files. If you’re compiling your own Engine, you can also apply my changes in your local build:

1. Open _/Engine/Plugins/Media/WmfMedia/Source/WmfMedia/Private/Player/WmfMediaTracks.cpp_
2. Find the line: _const bool OutputRgba =_
3. Add the following check to the end of the list: _(SubType != MFVideoFormat\_RGB32)_

This will basically tell WMF to convert your RGB32 to YUY2, which we then convert back to RGB32 in the Engine. Very inefficient, but it works.

---

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [October 19, 2016, 4:05pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/5 "2016-10-19T16:05:17Z")

</div>

Yeah, we had already settled on using a different format, I just figured I should report this bug. We tried with a few different AVIs and they all had the same problem, so it might not be a problem with the codec but the file format. The one I uploaded uses digifex (it was created through Maya) but some of the other AVIs we tried used G723 ADPCM (created using this program [https://screentogif.codeplex.com/](https://screentogif.codeplex.com/)).

We also ran into a problem with MP4s with a width that isn’t a multiple of 8. Seems to be similar to this question [Media player error on Mac - the file plays stretched - Cinematics & Media - Unreal Engine Forums](https://answers.unrealengine.com/questions/261893/media-player-error-on-mac-the-file-plays-stretched.html), though we’re on Windows. Should I make another question for that?

---

<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:** [October 19, 2016, 8:44pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/6 "2016-10-19T20:44:01Z")

</div>

It looks like that question was removed. Yeah, please add a new one, so we can track it, thanks!

I think that for 4.15 I need to modify the handling of buffer sizes vs. display sizes of videos. There are similar problems in other players, i.e. MfMedia expects multiples of 16.

---

<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:** [October 19, 2016, 8:56pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/7 "2016-10-19T20:56:29Z")

</div>

> The one I uploaded uses digifex […] we tried used G723 ADPCM

Those are audio codecs though. I think the problem is that the videos are encoded as RGB. I have an MP4V encoded AVI that plays fine, but the few RGB encoded ones I have (including yours) are all upside-down and too bright.

The brightness issue also occurs when using WMF’s RGB conversion for H.264, H.264ES, M4S2, WMV2, and WMV3, and possibly others, so I think that there’s something wrong with WMF’s RGB pipeline in general. I have added special cases for all those and do the conversion in the Engine now.

---

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [October 19, 2016, 9:24pm UTC](https://forums.unrealengine.com/t/movie-playing-upside-down-and-backwards/373715/8 "2016-10-19T21:24:29Z")

</div>

Looks like it included the comma I added at the end of the URL.

Posted a new question at [https://answers.unrealengine.com/questions/510185/media-player-incorrectly-renders-videos-with-width.html](https://answers.unrealengine.com/questions/510185/media-player-incorrectly-renders-videos-with-width.html) which also has the correct link to the question I referenced.
