jellyfin / jellyfin-vue

A modern web client for Jellyfin based on Vue
https://jellyfin.org
GNU General Public License v3.0
1.29k stars 229 forks source link

SD videos not scaled correctly #569

Open AlfHou opened 3 years ago

AlfHou commented 3 years ago

Running master branch of jellyfin-vue and jellyfin-server Tested on both chrome and firefox

When viewing SD videos they are scaled incorrectly (see fig. 1). This does not happen on HD movies (fig. 2)

The SD video is an AVC @ 480 x 360 video The HD video is an AVC @ 1920 x 816 video

image Fig. 1: SD Image

image Fig.2: HD Image

ThibaultNocchi commented 3 years ago

I think there are not even scaled, that could be why.

AlfHou commented 3 years ago

Just tested in jellyfin-web and you're right, it isn't scaled image

It is a little larger than in the vue client tho, which I think looks a little more natural.

heyhippari commented 3 years ago

We likely just need to add object-fit to the video element. I don't have anything to reproduce this issue, though :/

AlfHou commented 3 years ago

I'll try it out! I have some different sized videos.

Terrance commented 1 month ago

I've just set up Jellyfin Vue (using an AUR package for Arch, Jellyfin Vue 7198fcb and Jellyfin Server 10.9.11) and was about to report this again -- it seems like the scaling (or lack of) may have regressed at some point?

image

Full screen or not, the video player seems to only take the size of the media itself (e.g. 360p here).

Terrance commented 3 weeks ago

From a quick peek at the code, there seems to be a conditional class uno-object-fill on the video element itself:

https://github.com/jellyfin/jellyfin-vue/blob/0c52dd94471e7979c75abc587617c92d4c132b0e/frontend/src/components/Playback/PlayerElement.vue#L17

Manually adding that class to the <video> element seems to allow it to scale up and fill the window, so I'm not sure what circumstances we expect the player to not be filling it.