# Optimize Media Stream

**URL:** <https://forums.unrealengine.com/t/optimize-media-stream/410931>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** stats, fps, unreal-engine, question\
**Created:** [November 30, 2017, 12:26am UTC](https://forums.unrealengine.com/t/optimize-media-stream/410931 "2017-11-30T00:26:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinzay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jinzay](https://forums.unrealengine.com/u/jinzay)\
**Post date:** [November 30, 2017, 12:26am UTC](https://forums.unrealengine.com/t/optimize-media-stream/410931/1 "2017-11-30T00:26:09Z")

</div>

We are relying heavily on the use of the media stream. It works really well to stream mp4 files from webservers into the engine - buffers great and maintains good fps. Altough on slower pcs it really eats away performance.

So here is the question:  
A. How can you debug the media stream are there specific stats for it?  
B. What can we do to optimize the Workload for a streamed media so that slower pc do not suffer stutters and lags

Should we switch to another file format? Mp4 - H264 - no Audio

---

<div class="post-metadata">

**Author:** ![jinzay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jinzay](https://forums.unrealengine.com/u/jinzay)\
**Post date:** [December 6, 2017, 1:55am UTC](https://forums.unrealengine.com/t/optimize-media-stream/410931/2 "2017-12-06T01:55:34Z")

</div>

Insights:  
I tested many files ranging from MP4 (H265, H264) - WMV - MPG - VP9/VP8 & Many more.  
I can safely say stick with h264 as it is the best in overall performance.  
The FPS did not inherit a significant performance issue (24-30fps seems to be the same)  
The rResolution of the file is now served depending on the Pixeldensity ( helps alot! )  
Bandwith did the biggest impact. A variable bitrate helped maintaining a somewhat good quality.

Important is to encode it for streaming first with the “moov” atom at the beginning.

Will not put this as an answer because i think we still need tools and stats to debug the media engine.

---

<div class="post-metadata">

**Author:** ![jinzay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jinzay](https://forums.unrealengine.com/u/jinzay)\
**Post date:** [April 23, 2018, 1:15pm UTC](https://forums.unrealengine.com/t/optimize-media-stream/410931/3 "2018-04-23T13:15:37Z")

</div>

H264 files in a .mov container is also very performant + the only way for seamless loops!
