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

Update fluent-ffmpeg dependency to fix compatibility issues with ffmpeg v7 #3151

Open
1 task done
totallynotdavid opened this issue Jun 30, 2024 · 3 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@totallynotdavid
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The current version of whatsapp-web.js (1.23.1-alpha.5 from webpack-exodus branch & 1.24.0) uses fluent-ffmpeg version 2.1.2, which has regex compatibility issues with ffmpeg versions 7 and above. This affects media file transformations (conversions from videos or GIFs to stickers) that rely on ffmpeg.

The error message received is:

Error: Output format <format> is not available

Expected behavior

An animated sticker is being sent when the user send the message '#sticker' with a GIF or video.

Steps to Reproduce the Bug or Issue

I have created a sample repository that demonstrates the issue: https://github.com/totallynotdavid/ffmpeg-issue-whatsapp-web.js

  1. Clone https://github.com/totallynotdavid/ffmpeg-issue-whatsapp-web.js
  2. Update the Chrome path to your own, change this line: https://github.com/totallynotdavid/ffmpeg-issue-whatsapp-web.js/blob/5553154bcc12a063148527f240bad3e4d526073b/index.js#L8
  3. Run npm run start
  4. Send a GIF and include the #sticker message body or answer to a message containing a GIF or a video. You'll find the issue described above.

Relevant Code

This issue is due to a regex compatibility problem between fluent-ffmpeg 2.1.2 and the latest versions of ffmpeg. The problem has been fixed in fluent-ffmpeg version 2.1.3, see this pull request. The changes introduced in this PR are minor and are unlikely to break things in the whatsapp-web.js project.

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows 11 24H2
PhoneOS: Android 12
whatsapp-web.js version: 1.23.1-alpha.5
WhatsApp Web version: 2.3000.1014583617
Node.js Version: v20.12.2

Additional context

No response

@totallynotdavid totallynotdavid added the bug Something isn't working label Jun 30, 2024
@totallynotdavid
Copy link
Author

This issue was also showed here #2914 and #2912 by @MikeyA-yo but both issues where closed.

I can confirm that using v2.1.3 fixes this issue.

@MikeyA-yo

This comment was marked as off-topic.

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

No branches or pull requests

3 participants
@totallynotdavid @MikeyA-yo and others