Open TVARecordings opened 3 months ago
Hello, @TVARecordings.
I've never used the sendStickerfromUrl()
function, but I've had this same problem with sendMp4AsSticker()
.
I solved the problem by adding endTime
to the processOptions?
parameter.
here is an example:
if (message.type === 'image' || message.type === 'video') {
const isType = message.type
if (message.caption === '!sticker') {
if (message.chat.isGroup) {
await bot.sendReplyWithMentions(message.chat.id, `\`\`\`[${timers}] - Solicitado por ${message.notifyName}\`\`\` \n\nAguarde...β`, message.id)
const decrypt = await decryptMedia(message)
const sticker = `data:${message.mimetype};base64,${decrypt.toString('base64')}`
if (isType === 'image') {
await bot.sendImageAsSticker(message.chat.id, sticker, {
author: `${message.notifyName}`,
keepScale: true,
pack: 'hubberBot',
})
await utils.saveLog(pathLog, `${timersLog}: [${author}] [INFO] Gerando sticker com imagem... '${message.chat.name}' => [ !sticker ]`)
return;
}
await bot.sendMp4AsSticker(message.chat.id, sticker, { endTime: '00:00:07.0' }, {
author: `${message.notifyName}`,
pack: 'hubberBot',
})
await utils.saveLog(pathLog, `${timersLog}: [${author}] [INFO] Gerando sticker com vΓdeo... '${message.chat.name}' => [ !sticker ]`)
return;
}
}
}
Based on this example, with several tests I did, wa-automate does not accept generating animated stickers longer than 8 seconds.
I hope it helps! :)
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag
What type of host account are you experiencing this issue on?
Business account
Mode
EASY API/CLI
Current Behavior
Dear,
Sometimes when users send in media or a url to be converted into a WA-Sticker, it returns the error _"Error processing media: STICKER_TOOLARGE: maxContentLength size of 1500000 exceeded".
However, i've inspected multiple of those errors and 9 out of 10 cases, it was NOT too big.
Usually it errors when media is 10+ seconds, even though the media is of low quality (FPS, resolution) and perhaps only 300kB's big.
Expected Behavior
Properly return the sent media as a sticker.
Steps To Reproduce
Code:
A link that does result in error: https://c.tenor.com/asuzYlr9bmAAAAAd/tenor.gif According program "MediaInfo" on my PC: Format: GIF Format/Info: Graphics Interchange Format Format profile: 89a (don't know what this means...) Width: 554 pixels Height: 640 pixels Compression Mode: Lossless
create() code OR full CLI command + CONFIG
DEBUG INFO
Environment
Screenshots/Logs
No response
Anything else?
Please, allow users to convert larger file sizes (Perhaps make it a paid feature :D )