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

fetch_audio_duration is not working properly #192

Open
grossir opened this issue Jun 7, 2024 · 1 comment
Open

fetch_audio_duration is not working properly #192

grossir opened this issue Jun 7, 2024 · 1 comment

Comments

@grossir
Copy link
Contributor

grossir commented Jun 7, 2024

I am copying this graph from freelawproject/courtlistener#440 which shows that for the same duration, we get different file sizes when querying the actual bucket (and checking the length of the downloaded bytes)

image
Another more colorful graph that takes the year from the date_created shows that the problem is from late 2019 to the present
image

Examples of wrong and correct durations:

  • one created in 2023 with duration 3028 (3028/60=50.46), but lasts 58:46 on the audio player

  • a correct one created in 2014 with duration 3029 that lasts 50:25 on the audio player (which roughly matches 3029/60 = 50.48)

  • one created in 2023 with duration 2000 (2000/60=33.33) but lasts 38:49 on the audio player.

  • a correct one created in 2014 with duration 2001 that lasts 33:18 minutes in the audio player

Code that needs correcting:

def fetch_audio_duration(request) -> HttpResponse:

@mlissner
Copy link
Member

mlissner commented Jun 7, 2024

Delightful. I wonder what happened in late 2019? Maybe a new version of eyed3? Hm. I'm not sure I really care about this being wrong, because it doesn't really affect much, but it would be nice if it were more accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants