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

[BUG] MP3 audio not playing on telegram web #398

Open
Axoluther opened this issue Feb 1, 2025 · 1 comment
Open

[BUG] MP3 audio not playing on telegram web #398

Axoluther opened this issue Feb 1, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Axoluther
Copy link

Describe the bug
When sending an MP3 audio file via the bot using the send_audio method, the audio plays for only about 10 seconds on Telegram WebK. The file plays without issues on Telegram Android and Telegram WebA

await context.bot.send_audio(
 chat_id=update.message.chat_id,
 audio=open(pathMP3, 'rb'),
 thumbnail=open(pathThumb, 'rb'),
 title=titulo
)

I noticed that if I reduce the bitrate of the MP3 file from 320 kbps to 192 kbps, 124 kbps, or lower, the audio's duration increases from around 10 seconds to approximately 20 seconds.

To Reproduce
Steps to reproduce the behavior:

  1. Send an MP3 audio file via bot using the send_audio method.
  2. Open the file in Telegram WebK.
  3. Attempt to play the audio.
  4. Observe that the audio stops after approximately 10 seconds.

Expected behavior
The audio file should play entirely without cutting off, similar to how it behaves on Telegram Android and Telegram WebA.

Desktop:

  • OS: Windows 10
  • Browser Microsoft Edge
  • Version 132.0.2957.127 64 bits

Additional context
The issue only appears on Telegram WebK, and altering the MP3 file's bitrate seems to impact the playback duration.
The average durations of the MP3 is about 3-5 min
The file MP3 have 320kbps or less
Other mp3 audio files have the same problem, files coming from others bots
If i pick up a MP3 and upload manually to the chat, it work fine and play until the end of duration

@Axoluther Axoluther added the bug Something isn't working label Feb 1, 2025
@andyhan13
Copy link

hi

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

2 participants