Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos sent via WhatsApp bot don't show thumbnails. #541

Open
imding opened this issue Aug 8, 2022 · 2 comments
Open

Videos sent via WhatsApp bot don't show thumbnails. #541

imding opened this issue Aug 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@imding
Copy link

imding commented Aug 8, 2022

Hi, I set up Synapse v1.64.0 and mautrix/whatsapp v0.6.0 with Kubernetes and after inspecting the logs, I noticed that the thumbnail_info field isn't sent by the WhatsApp bot with the m.video event (link), which results in videos having blank thumbnails in the Element app.

Video attachments that do not go through the bot show thumbnails just fine.

@imding imding added the bug Something isn't working label Aug 8, 2022
@kinduff
Copy link

kinduff commented Aug 16, 2022

Would love to contribute but I don't know where to start, can you point me to the right direction?

@itsthejb
Copy link

itsthejb commented Jan 7, 2025

This is such a noticeable bug. No attempt to fix it in years?

Here's some extra context from me: Two videos sent, one with the bridge through Element-X iOS:

{
  "type": "m.room.message",
  "sender": "@<>:<redacted>",
  "content": {
    "msgtype": "m.video",
    "body": "<redacted> ",
    "format": "org.matrix.custom.html",
    "formatted_body": "<redacted>",
    "filename": "94B6E60C-45D6-4114-A1D5-342841CE349B.mp4",
    "url": "mxc://<redacted>/REsrKiRAiCuRbrfTLkSUFIrS",
    "info": {
      "duration": 26370,
      "h": 720,
      "w": 1280,
      "mimetype": "video/mp4",
      "size": 34728286,
      "thumbnail_info": {
        "h": 450,
        "w": 800,
        "mimetype": "image/jpeg",
        "size": 135285
      },
      "thumbnail_url": "mxc://<redacted>/EFOWLRrwsLtYTYIHTmYBpGnq",
      "xyz.amorgan.blurhash": "KQGu?lIoM|?KWBM{.7R%t6"
    }
  },
  "origin_server_ts": 1736240406650,
  "unsigned": {
    "membership": "join",
    "age": 2877522
  },
  "event_id": "$3A9vmWM6AxnqSL9HYqDycpmPpBbrQ1f1wKbZ-iyLLA4",
  "room_id": "!vvAqySpsGiHYNgxulG:<redacted>"
}

And the second sent directly using Whatsapp iOS and then bridged via this:

{
  "type": "m.room.message",
  "sender": "@jc:<redacted>",
  "content": {
    "msgtype": "m.video",
    "body": "<redacted>",
    "filename": "video.mp4",
    "url": "mxc://<redacted>/OHpDpeKcjGQjhXWBuyatsoms",
    "info": {
      "duration": 49000,
      "h": 848,
      "w": 480,
      "mimetype": "video/mp4",
      "size": 8952788
    }
  },
  "origin_server_ts": 1736240524742,
  "unsigned": {
    "membership": "join",
    "age": 2759430
  },
  "event_id": "$08ni8pKv70YvOU4FuFF9BA1gGQKKn1FsnxUIYKpVx9c",
  "room_id": "!vvAqySpsGiHYNgxulG:<redacted>"
}

Considerably less info with the bridged version.

Note: The same applies to all messages sent over WhatsApp from others, meaning no thumbnail data for received video messages.

I notice that the original Element client handles this better than Element-X right now. I believe it generates its own thumbnail. However, I think the underlying issue is with the bridge here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants