Azure Media Services encoded mp4 file size is 10x the original

727 Views Asked by At

I uploaded a 15MB mp4 file and chose the "Playback via HTML5" option for encoding. It created a new mp4 file that is now 158MB! This is 10x larger in size, why does this happen? In fact, every encoding preset that I choose makes the file size much larger than the original 15MB for the source mp4 file. I need to deliver the video to PC clients that have low bandwidth, so having the file size increase to this magnitude is counter productive. Any advice or insight is really appreciated.

1

There are 1 best solutions below

2
On BEST ANSWER

Your original input file was almost certainly encoded with very low quality settings. The "Playback via HTML5" preset is a very high quality level because with the previous-generation "HTML5 streaming" technology you can only present one quality level to users so the Microsoft presets make this a fairly good quality level (720p @ 4500 Kbps).

Generally, for streaming over the internet to end-users in the 1st world, I would use an adaptive streaming format (e.g. DASH) with the following quality levels:

  • 288p @ 400 Kbps
  • 360p @ 900 Kbps
  • 480p @ 1500 Kbps
  • 720p @ 3000 Kbps
  • 1080p @ 6000 Kbps

If we ignore audio entirely and compare against your 15 MB input file, even the lowest of these settings (at quite atrocious quality) would encode only 5 minutes of video with the highest quality level encoding only 20 seconds!

If you wish to provide the best end-user experience, you should use an adaptive streaming technology such as DASH. This will enable you to serve each user with a quality level that their network connection can best cope with. The dash.js player is capable of playing such videos in modern browsers.

Alternatively, you can provide custom presets to Azure Media Services to encode videos for a lower quality level.