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

Wrong media length in media viewer #1126

Closed
CatPlanet opened this issue Apr 21, 2022 · 2 comments
Closed

Wrong media length in media viewer #1126

CatPlanet opened this issue Apr 21, 2022 · 2 comments
Labels

Comments

@CatPlanet
Copy link

Hydrus version

482

Operating system

Windows other (specify in comments)

Install method

Installer

Install and OS comments

Windows 7

Bug description and reproduction

Imported file from gelbooru ( https://gelbooru.com/index.php?id=4791898&page=post&s=view )
Shows it's 160millis (2 frames, 12fps) while playing media for much longer.

putting this file in ffmpeg (version n4.4.1-20211029):

ffmpeg -i "C:\Hydrus Network\db\client_files\ff3\f3aeccbd9fa4904bec16d25e5d81f9049503895a150c20949e4d7736a7a8e7b1.gif"
Input #0, gif, from 'C:\Hydrus Network\db\client_files\ff3\f3aeccbd9fa4904bec16d25e5d81f9049503895a150c20949e4d7736a7a8e7b1.gif': Duration: 00:00:03.60, start: 0.000000, bitrate: 3224 kb/s Stream #0:0: Video: gif, bgra, 600x600, 12.50 fps, 12.50 tbr, 100 tbn, 100 tbc

ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 -i "C:\Hydrus Network\db\client_files\ff3\f3aeccbd9fa4904bec16d25e5d81f9049503895a150c20949e4d7736a7a8e7b1.gif"
45

ffprobe -v error -select_streams v:0 -count_frames -show_entries stream=nb_read_frames -of csv=p=0 -i "C:\Hydrus Network\db\client_files\ff3\f3aeccbd9fa4904bec16d25e5d81f9049503895a150c20949e4d7736a7a8e7b1.gif"
45

To clarify: I imported this file using v477 but it's still showing incorrect length in newest version (no idea if these values are cached or not)

Log output

No response

@CatPlanet CatPlanet added the bug label Apr 21, 2022
@ghost
Copy link

ghost commented Apr 21, 2022

This was caused by a bug with Pillow that was recently fixed as of the latest release which was 20 days ago (I suspect python-pillow/Pillow#6077 resolved it). The last few releases of Hydrus have had this fix, so right-clicking the file and navigating to manage -> regenerate -> file metadata should update the duration to the correct one.

@CatPlanet
Copy link
Author

Regenerating metadata works so problem shouldn't occur for new files.
Thanks for your detective work @stysmmaker, it was a good read. Have a nice day!

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

No branches or pull requests

1 participant