jellyfin-web icon indicating copy to clipboard operation
jellyfin-web copied to clipboard

"Playback Info"-Widget does not show full information about framerate.

Open marissa999 opened this issue 4 months ago • 0 comments

Describe The Bug After digging into the code for some other reason (I considered adding the original framerate of the movie file to the widget) I realised, that getDisplayTranscodeFps is actually supposed to provide you a number of how many transcodings it could currently support (at least I think that is what the number is for). However I can not see that number in Jellyfin-Web (see last screenshot)

https://github.com/jellyfin/jellyfin-web/blob/39ec804a5ae787ad47161ab6ddd9150b93a8751c/src/components/playerstats/playerstats.js#L199-L211 The "full" information about how much faster/how many transcodings the server could support is only returned, if originalFramerate is defined. I could not figure out looking at the code in both jellyfin-web and jellyfin-server how videoStream.AverageFrameRate is actually determined. (Idea: Maybe the jellyfin-server could always set the AverageFrameRate to the OriginalFrameRate if the AverageFrameRate can not be determined?)

It seems like a different part of the code of the webui uses stream.AverageFrameRate || stream.RealFrameRate for getting the FrameRate. https://github.com/jellyfin/jellyfin-web/blob/39ec804a5ae787ad47161ab6ddd9150b93a8751c/src/components/itemMediaInfo/itemMediaInfo.js#L131-L133

Potential Fix

I would assume the code in the file playerstats.js L203 would have to be changed from https://github.com/jellyfin/jellyfin-web/blob/39ec804a5ae787ad47161ab6ddd9150b93a8751c/src/components/playerstats/playerstats.js#L203 to

    const originalFramerate = videoStream.AverageFrameRate || videoStream.RealFrameRate;

After changing this locally and rebuilding jellyfin-web, I was able to get the output to work as expected: image

I made a PR, in case the change i suggest is correct: https://github.com/jellyfin/jellyfin-web/pull/6199

(I also believe that maybe it might be useful in general to add the framerate as its own line/information to https://github.com/jellyfin/jellyfin-web/blob/c4d0c428fb9e2c461c44751de105788d7558e940/src/components/playerstats/playerstats.js#L223

Steps To Reproduce

  1. Go to a video file, and click "Media Info"
  2. The Framerate appears, as expected
  3. Start watching that video file
  4. (Potentially) Change quality to force transcoding
  5. Open the "Playback Info"-Widget
  6. Transcoding Framerate does not show how many streams it could support

Expected Behavior In Step 5 in Transcoding Framerate you should see something like 200 FPS (8.33)

Screenshots image

System (please complete the following information):

  • Platform: Linux
  • Browser: Firefox
  • Server version: 10.9.11
  • Web version: 10.9.11
  • Build version: Release

marissa999 avatar Oct 14 '24 12:10 marissa999