chatwoot / chatwoot

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
https://www.chatwoot.com/help-center
Other
19.61k stars 3.12k forks source link

[CW-1654] Videos sent over WA (with WhatsApp Business API) do not arrive at recipient #5367

Open jochenstu opened 1 year ago

jochenstu commented 1 year ago

Describe the bug

Using the Chatwoot Cloud, WhatsApp Business API and either, the Chatwoot web client or android app, a test video (.mp4, 3MB, recorded with the stock Camera App on a Pixel 4a, Android 13) will not arrive at the WA client, while images and text both work.

There is no error message. The video upload to chatwoot works (i.e. when I use the chatwoot app to send the video, I can download it via the chatwoot web interface, and vice versa). Neither interface suggest that the transmission to the WA recipient failed.

To Reproduce

Well, I have to assume that this not a general problem. For me it is a simple as:

  1. Send a video using either the chatwoot (cloud) web interface or android app, using the WA Business API

I am aware that this probably not super useful, but, right now, I don't know what is. I am happy to provide additional information.

Expected behavior

The video should arrive at the recipient. It does not.

Environment

Chatwood Cloud

Desktop (please complete the following information): MacOS, current Chrome

Smartphone (please complete the following information): Pixel 4a, Android 13, App

CW-1654

jochenstu commented 1 year ago

Yesterday, I managed to send an .mp4.

So now I have two files, one of which is working, consistently, and one of which isn't.

Working: https://user-images.githubusercontent.com/1176036/190846000-418aba7b-a86d-45ea-a31f-0277124729df.mp4

Not working: https://user-images.githubusercontent.com/1176036/190846001-53ad73e5-14ed-4ecb-ae6c-759a5850846b.mp4

The most obvious differences:

Currently this is what trying to send both looks like in the chatwoot web app:

image

"Not working" will not be displayed immediately, but can be downloaded and played back. The audio can be played back in the browser and immediately (which I assumed is expected behaviour with some kind of processing still happening). As far as I can tell, I am not hitting any rate limits ("Not working" is 3,7MB), neither on the WA nor the chatwoot side of things.

jochenstu commented 1 year ago

This issue arises when trying to send H.265/HEVC videos, which is not supported by the WA Cloud API (but, confusingly, is supported by the WA consumer app, maybe by doing conversion somewhere)

(See https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media – "Only H.264 video codec and AAC audio codec is supported")

On my Pixel 4a running Android 13, the video format used for Android video recording (which will also be honoured when initiated through the chatwoot app) can be configured in the advanced Android camera settings. Videos recorded after turning H.265 off are being delivered to personal WA when sent through chatwoot.

Since reasonable options from here seem to range from shrugging it off to offering a warning or doing automatic conversion on the chatwoot side of things, I'll leave the ticket open for you to decide what to do with it.

jochenstu commented 1 year ago

To add on to this, I just confirmed that H.265/HEVC is the default setting on Android 13 (at least with a Pixel 4a)

sojan-official commented 1 year ago

@jochenstu Thanks for the investigation. We will disable the video format in upcoming releases and look into the conversation in the future.