nicknsy / jellyscrub

Smooth mouse-over video scrubbing previews for Jellyfin.
MIT License
660 stars 25 forks source link

Thumbnail aspect ratio is not based on DAR (display aspect ratio), rather on video resolution itself #128

Open Pavouk106 opened 8 months ago

Pavouk106 commented 8 months ago

Hello,

I have DVD rips that have resolution 720x576px and DAR (display aspect ratio = how player should interpret the aspect ratio in which to play the movie) of 16:9. Jellyscrub uses standard aspect ratio 1.25 (which is calculated from 720x576, original aspect of the format) for making previews, which results in tall and skinny face and other compressed things while Jellyfin plays the movie in correct 16:9 aspect ratio.

I have managed to find solution for this. This problem arises in ffmpeg's command for generating images, specifically here: scale=trunc(min(max(iw,ih*a),320)/2)*2:trunc(ow/a/2)*2 where "a" represents the aspect ratio (1.25 for those DVD rips). This command generates thumbnail like this: bs-a

If I change "a" for "dar", thus making the command look like this: scale=trunc(min(max(iw,ih*dar),320)/2)*2:trunc(ow/dar/2)*2 I can generate a thumbnail like this: bs-dar

You can see the problem on those two images.

I would like to suggest making change in the code to use "dar" instead of just "a".

I was looking into the code, but my poor programming skills restrict me from finding where to do the touch up. I couldn't find any "scale" anywhere in the code, so I'm stumped. If someone could point me in the right direction, I may try to change the code locally, let the PC make new thumbnails and if everything goes well I can even make a pull request. Or if there is somebody who is savvy enough, you can make the change/pull request yourself.

I'd like to solve this issue of mine, any help is greatly appreciated! I'm ready to provide more details or test new code if asked.

Thanks for this great piece of software!