Ffmpeg - whatsapp: video format not supported

I have two video files (.mp4). One is loaded into whatsapp, and the other is not.

using ffmpeg, I checked their properties:

a) Downloadable video properties:

Duration: 00:00:56.45, start: 0.148000, bitrate: 1404 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x1080, 1359 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 47 kb/s (default) Metadata: handler_name : SoundHandler At least one output file must be specified 

b) video that does not load in whatsapp (because its format is not supported)

  Duration: 00:00:56.10, start: 0.000000, bitrate: 543 kb/s Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 1080x1080 [SAR 1:1 DAR 1:1], 464 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 47.95 tbc Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 56 kb/s 

The difference in the video that I noticed:

(avc1 / 0x31637661) vs (H264 / 0x34363248)

1359 kb/s vs 464 kb/s

90k tbn vs 23.98 tbn

What could be the reason

Also, the second video does not play on Android.

Link for video

https://drive.google.com/open?id=0B4UM6vTHw4pyMExQQ1lxZGp0N2c

+5
source share
2 answers

There are several options for better compatibility:

ffmpeg -i broken.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p working.mp4

With -profile:v baseline -level 3.0 you make the file more compatible with most older players, including WhatsApp;). Although this disables some additional features.

-pix_fmt yuv420p must be compiled to the base level (YUV color space with a 4: 2: 0 color region of color).

In addition, you can configure other parameters as bit rate, frame rate, sound, etc.

Source: H.264 Documents

+5
source

Copied from https://www.reddit.com/r/ffmpeg/comments/564kyc/ffmpeg_whatsapp_video_format_not_supported/?st=ivjxdi0v&sh=848ce7eb

 ffmpeg -i brokenvideo.mp4 -c:v libx264 -c:a aac fixedvideo.mp4 

It was also necessary to apply this fix: FFMPEG (libx264) "height is not divisible by 2"

+4
source

Source: https://habr.com/ru/post/1257769/


All Articles