cheofusi / just_playback

A small library for playing audio files in python, with essential playback functionality.
MIT License
70 stars 7 forks source link

Some files have the wrong duration #16

Closed nhansendev closed 2 years ago

nhansendev commented 2 years ago

I've noticed that the reported duration from playback.duration of some files will unexpectedly be ~1/2 the real duration. All files that I'm testing are .mp3 format and so far I have not found an obvious correlation between which are correct and which are short. The value reported by playback.curr_pos is always correct.

Any thoughts on what I can check to give you more meaningful feedback?

System: Linux Mint 19.3 (Ubuntu 18.04) Python 3.9.5 just_playback 0.1.6

cheofusi commented 2 years ago

Hi Obliman,

just_playback uses TinyTag to fill playback.duration, so the whole audio file isn't decoded and loaded into memory simply because we asked for its duration.

I would suggest you open an issue and share one of your audio files with the TinyTag devs.

nhansendev commented 2 years ago

I checked with the tinytag devs and I was just using the 1.8.0 version instead of 1.8.1. Updating fixed the issue. Thanks for the suggestion.