Home Command line utilities Convert Videos To WhatsApp Video Format With FFmpeg
Convert Videos To WhatsApp Video Format With FFmpeg In Linux

Convert Videos To WhatsApp Video Format With FFmpeg

By sk
1008 Views

Facebook-owned WhatsApp is the most popular messaging platform with over 2+ billion monthly active users worldwide. It allows us to send text and voice messages, share audios and videos, share documents, and even transfer money to other WhatsApp users. At times, I share some cool, funny and inspirational videos to all my WhatsApp contacts. I also set them as my WhatsApp status message. The other day I received the error "Video is not supported" when I tried to set a video as my WhatsApp status. After a bit of Google searching, I found that we can easily convert videos WhatsApp video format with FFmpeg.

If you don't know already, FFmpeg is one of the best multimedia framework which is used to encode, decode, transcode, mux, demux, record, stream, filter, and play any type of media files. It is completely free, open source and cross-platform multimedia framework, which supports Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc.

Of course, there are many video converters freely available on the Internet to convert videos to whatsapp supported format. However, converting videos to whatsapp supported format with FFmpeg is very easy and fast in my opinion.

Convert Videos To WhatsApp Video Format With FFmpeg

Convert Videos To WhatsApp Video Format With FFmpeg In Linux

I tried different container format (video codec + audio codec) videos with various resolutions as listed below.

  • MP4 MPEG4 480x360, 640x360
  • MP4 MPEG4 720P
  • MP4 MPEG4 + AAC
  • MP4 H264 + AAC
  • Matroska MPEG4 + AAC
  • AVI MPEG4 + AAC
  • AVI H264 + AAC
  • AVI 720P XVID
  • AVI 720P MPEG4
  • AVI 480x360 XVID
  • AVI 360P XVID
  • AVI 320x240 AVC

The following container format worked just fine.

  • MP4 (H264 + aac)

If you want to share a video to your contacts or set it as your WhatsApp status, convert it to the above container format.

Make sure you have installed FFmpeg on your Linux system. If haven't installed it yet, refer the following guide.

After installing FFmpeg, go to the location where the videos are stored and run the following command to convert videos to WhatsApp format:

$ ffmpeg -i ostechnix.webm -vcodec libx264 -acodec aac output.mp4

That's it. Now you can able to share the resulting output video via WhatsApp without any issues.

Here,

  • -i ostechnix.webm - the input file to be converted to whatsapp video format.
  • -vcodec libx264 - supported video codec format by whatsapp.
  • -acodec aac - supported audio codec format by whatsapp.
  • output.mp4 - the output file.

You can check the output media file details using Mediainfo program.

$ mediainfo output.mp4

I converted and shared many videos with this format in WhatsApp. All of them worked as expected. And also I could share videos with 1280x720 resolution. I guess any video resolution should work with this setting. If you have time and patience, you can check more combinations with different audio/video codecs, bit rate, resolution, aspect ratio etc., and choose which one works and which one does not.

WhatsApp has also reduced the status video time limit from 30 seconds to 15 seconds in India. You can no longer send videos to WhatsApp Status if they are longer than 16 seconds:. Even if you try to send videos longer than 16 seconds, the video will be trimmed to 15 seconds. This step is taken after the increasing WhatsApp usage in India due to the Cornovirus lockdown.

In a nutshell, if you want to share videos via WhatsApp, just make sure the video is;

  • converted to whatsapp supported video format as shown above,
  • trimmed to 15 seconds play time,
  • smaller than 16 MB in size.

More FFmpeg command examples are given in the following link.

Hope this helps.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More