How can we Help?

Video Encoding Process

 

Introduction

Encoding Process

Encoding Bitrate Ladder

Introduction

Once you map a video to content, then the encoding process automatically starts in the server. During the encoding process, we convert the original video formats (i.e. if the original video formats are movflvvob, m4vmkvavi3gp & mpg) to .mp4 (video codec - H264) format using FFMPEG. As .mp4 video format is supported by multiple platforms (i,e, Android, iOS, Web, etc.). So your end-users can play the encoded video on multiple platforms and devices. We also store the videos in different resolutions on the server after encoding.

Note: We recommend uploading .mp4 videos to your Video Library to make the encoding process faster.

Encoding Process

  • During the encoding process, we convert all video formats to .mp4 (video codec - H264) format using FFMPEG.
  • As per video resolution, we convert the video into multiple resolutions for different devices.
  • For conversion, we use a high-end ec2 server, where conversion is done faster than the normal server.
  • Muvi recommends uploading MP4 videos having video codec H.264. (If you upload videos with another codec, then your users may experience difficulty while playing the videos on a mobile app or website, as every codec behaves differently.)
  • The file size of one hour of HD video is around  2 GB and a Standard Definition video is 500 MB to 1 GB.
  • We use HTML5 video player & video.js for video streaming.

Once the video is encoded, it is stored in the server from the lowest resolution to the original resolution. For example, if you upload a video with 1080p resolution, then after encoding the videos are stored in the lowest to the original video resolution i.e. in this case from 144p to 1080p. So the best resolution for the video in this scenario is 1080p. When the video is played in the player and the end-users click on the gear icon to select the resolution, they can view the highest or the original resolution of the video named "Best" (see below screenshot).

 

 

Original Video Resolution Encoded Video Resolution Video Size (Video Duration 1 Hour)
2160 2160 (Best), 1440, 1080, 720, 480 7910 MB
1440 1440 (Best), 1080, 720, 480 4394 MB
1080 1080 (Best), 720, 480, 360 2636 MB
720 720 (Best), 480, 240, 144 1318 MB
480 480 (Best), 360, 240, 144 690 MB
360 360 (Best), 240, 144 439 MB
240 240 (Best), 144 263 MB
144 144 (Best), 144 175 MB

 

Note:

  • During the encoding process, the server cannot encode a video to a higher resolution than the maximum resolution available in the original video. For example, the server cannot convert a 720p video to a 1080p video.
  • Video resolutions are calculated based on the vertical resolution instead of the horizontal resolution. Videos are normally presented as Horizontal resolution x Vertical resolution. For example, if a video is of resolution 1280 x 720  size, it means it has a resolution of 720p as 720 is the vertical resolution of this video.
  • Video bitrate may differ from video to video. For example, a high-quality video having 2160p resolution will have a higher video bitrate for 360p after encoding. However, a video having 480p resolution will have a lower video bitrate for 360p after encoding.

 

Encoding Bitrate Ladder

Bitrate can describe the quality of an audio or video file. The quality of a video or audio file is measured by the bitrate just like the quality of an image is measured in resolution. During the encoding process, the video file gets compressed but it doesn't affect the bitrate/quality of the video. For example, when a 1 GB of 4K video file is encoded, the size of the file after encoding is 700 MB. But the bitrate remains the same. The below table shows the bitrate for different video resolutions after encoding.

Video Dimension Video Resolution  Video's Frame Rate/ Second H264/AVC1 Compatible Audio
Bitrate
Avg Video Bitrate Avg. Size for 1 GB Original Video
3840x2160 4K 29.97 fps Yes 128 kb/s *8500 kb/s 700MB
2560x1440 QHD 29.97 fps Yes 128 kb/s 3854 kb/s 500MB
1920x1080 1080p 29.97 fps Yes 128 kb/s 2236 kb/s 400MB
1280x720 720p 29.97 fps Yes 128 kb/s 1000 kb/s 300MB
554x480 480p 29.97 fps Yes 128 kb/s 543 kb/s 210MB
640x360 360p 29.97 fps Yes 128 kb/s 400 kb/s 170MB
426x240 240p 29.97 fps Yes 128 kb/s 329 kb/s 140MB
144x144 144p 29.97 fps Yes 128 kb/s 270 kb/s 100MB

 

*Note: Regarding the Video bitrate, we use FFmpeg's CRF value 23, which best compress the video without losing quality