Skip to main content

In WordPress or any website, it is important to compress the video file size to some specific size to maintain the site speed. Fast loading is one of the most important aspects of a quality website. So before uploading the video, it is better to reduce the size without losing its video quality. Reducing the video resolution can make the size of the video smaller but it might also affect the video quality. To overcome these issues, you can embed the video by uploading it on various video streaming platforms like YouTube, Vimeo, DailyMotion, etc. If you wish to upload it on your website, then you can compress video files without losing quality with the below methods:

Some Common Technique

1. Use more efficient Codec

There are a few codecs that might help you compress your video files without breaking the quality.

  1. H.264 – It is one of the most widely used codecs. It provides good quality at a lower bit rate.
  2. H.265 (HEVC) – It offers better compression than H.264 and maintains similar quality as well.
  3. VP9 – It is a format created by Google. It is open-source and you can use it to compress your video without losing the quality.

2. Adjust Bitrate

You can try adjusting the bitrate to reduce the file size of your video. The crucial thing is to find a balance to maintain that quality. With high-quality settings, you can still reduce the file size with good visual fidelity.

3. Resolution and Frame Rate

Lowering the resolution and frame rate will reduce the file size. Ensure lowering to a good quality.

For example, lowering the resolution from 4K to 1080p will reduce the file size and the 1080p is an excellent quality. Also, reducing the frame rate from 60 fps to 30 fps will help as well.

4. Remove Unnecessary Audio Tracks and Subtitles

This will work only if you have unwanted audio tracks and subtitles. You can reduce the size by removing these tracks if not needed.

5. Use Software Tools:

The most used tools to reduce video sizes are

  1. Handbrake
  2. FFmpeg
  3. Adobe Media Encoder

You can use these tools to compress videos without losing the quality.

Why Handbrake?

There are three main reasons to use Handbrake. Here are the reasons:

  • Handbrake is a free and open-source software
  • It can convert videos from any formats
  • Handbrake is available for all the major platforms (Windows, Linux and Mac)

How to use Handbrake to Compress Video Files without losing quality?

Follow the steps below to compress your video file without losing its quality or resolution.

1. Download and install Handbrake from the official website.

Handbrake

2. After installation, launch the app on your PC.

Source - How to Compress Video Files without Losing Quality

3. Click on Source >> Open File and select the video file from your PC.

Open video file - How to Compress Video Files without Losing Quality

4. Set the compressed file destination in the File tab.

Browse and set destination location

5. In Output settings, choose the Container as MP4 from the drop-down menu.

Output settings

6. Also, check the Web Optimized check box.

7. Click on the Video tab and choose the Video Codec as “H.264 (X264)“.

Video Codec, quality, and FPS

8. You can also adjust the video’s framerate (FPS) and quality.

Note: Adjusting FPS and quality based on the video requirement. If the value exceeds the limit then it affects the output.

9. Finally, click on Start on the top to begin the compression.

Start compression - How to Compress Video Files without Losing Quality

10. Once the compression is done, you will find the compressed video in the provided destination location.

Once compressed, you can upload the video file to your website. This way of uploading video has less impact on site speed compared to the original video size. You can even compress your video from GB to MB or KB within a short period with the help of the handbrake tool.

How to Use FFmpeg to Compress Video Files?

1. Download FFmpeg from the official website.

2. Extract the downloaded file to C:\ffmpeg.

FFmpeg to Compress Video Files

3. Navigate the below step:

Windows icon → Search Edit the System Environmental Variables → Environmental Variables → Select Path and click Edit → Click New → Add “C:\ffmpeg\bin” → Click OK.

4. Run the below command:

ffmpeg -i input.mp4 -vcodec libx265 -crf 28 -preset slow -acodec aac -b:a 128k output.mp4
    • -vcodec libx265” – Uses H.265 codec
    • -crf 28” – Sets the quality level (lower means better quality but larger file size)
    • -preset slow” – This sets the encoding speed (slower means better compression)
    • -acodec aac” – Uses AAC codec for audio
    • -b:a 128k” – Audio bitrate
    • -i input.mp4” – Video you need to convert. Change the name from input.mp4 to your file name. The

    The input.mp4 video is taken from C:\user\admin. You can place your video in this folder. The output is also saved in the same folder (C:\user\admin).

    We tried using this method and were able to compress a file size from 35 MB to 5 MB. You can also try and share your experience in the comment section.

    Is there WordPress Plugin to Compress Video Files?

    There are a few plugins available to compress video files. Most plugins are only available to compress image files. Compressing a video takes more time and hence, it is better to shrink the size of the video before uploading it to your website.

    Leave a Reply