Code Monkey home page Code Monkey logo

Comments (14)

lunainvictum avatar lunainvictum commented on June 8, 2024 1

Sry, but this didnt make sense. Because with every Client, Browser, iOS, Android and other except the Kodi one, have the feature to "force" transcoding.

For example in Android, you can choose resolution and mbps from 360p to 4k from 1mbps to 120mbps.

And i like to have the same on Kodi.

The issue is, that the rpi4 is simply to slow (or libreelec cant it) to play 4k Material, its stutters heavy. So i wanted to do the same like in any other client for jellyfin, to select 1080p for example.

i searched already the whole internet because of that. And a lot of guys suggest to reduce the bitrate in jellyfin for kodi self to so low, untils jellyfin sends a 1080p material. That works, for 80% of Videos. The other 20% stays at 4k, until i go further down like 5mbs.

But that isnt a proper solution.

from jellyfin-kodi.

lunainvictum avatar lunainvictum commented on June 8, 2024 1

no problem. HLS didnt play a role. Because i tried already with and without hls. and many other options and combinations.

The only "solution" until now, is simply to set the bitrate in the kodi addon below or equal 10mbps. And if sometimes a video occurs that is still 4k, to reduce the bitrate even lower as 10mbps only for that video.

from jellyfin-kodi.

ebb-earl-co avatar ebb-earl-co commented on June 8, 2024

@lunainvictum at least from my reading and perusing the Jellyfin subreddit, I don't think that this is an option right now. The logic for transcoding is that the server tries the following:

  1. Direct play
  2. If that's not possible, change the container (e.g. mkv -> mp4) but leave the video and audio (and subtitle, possibly) alone
  3. If that's not sufficient, transcode the audio but leave the video alone
  4. If that's not sufficient, transcode audio and video

However, you say that there are no errors in the logs and everything works so... what is the issue here?

from jellyfin-kodi.

ebb-earl-co avatar ebb-earl-co commented on June 8, 2024

Ah, I see what you're saying: to force the selected quality definitely is a feature on clients. Sorry for that confusion.

I don't know of a way to get that other 20% to transcode 4K -> 1080p, unfortunately. On the other hand, there might be a way to get Kodi to use the Raspberry Pi's hardware encoding (can decode the H.265 codec at up to 4K, 60 frames per second as well as the H.264 codec at 1080p, 60 frames per second) to render without stuttering.

The issue is, that the rpi4 is simply to slow (or libreelec cant it) to play 4k Material, its stutters heavy.

The change notes for version 19 specify that the RPi4 can do hardware decoding for the codecs that I mentioned above which leads me to believe that Libreelec can play 4k media without a sweat, as long as it is encoded as H.265.

from jellyfin-kodi.

lunainvictum avatar lunainvictum commented on June 8, 2024

Ah, I see what you're saying: to force the selected quality definitely is a feature on clients. Sorry for that confusion.

I don't know of a way to get that other 20% to transcode 4K -> 1080p, unfortunately. On the other hand, there might be a way to get Kodi to use the Raspberry Pi's hardware encoding (can decode the H.265 codec at up to 4K, 60 frames per second as well as the H.264 codec at 1080p, 60 frames per second) to render without stuttering.

The issue is, that the rpi4 is simply to slow (or libreelec cant it) to play 4k Material, its stutters heavy.

The change notes for version 19 specify that the RPi4 can do hardware decoding for the codecs that I mentioned above which leads me to believe that Libreelec can play 4k media without a sweat, as long as it is encoded as H.265.

Ok... But the new libreelec with new kodi wouldnt be released until it is stable and everything is working. that is possible next year because of the stupid driver support of the chips on the raspberry pi 4. i didnt understand anyway why the company wich builds the raspberry pi4 choose hardware/chips, where no driver exist for. community is already since release 2 years ago waiting for proper working driver...

I didnt know where i can make suggestion here on github for jellyfin, but for me it would be the easiest solution if in the admin panel under the option for transcoding, would exist three options:

1: Transcode everytime? yes/no
2: Wich resolution wanted? 360p/480p/720p/1080p/2160p
3: Transcode to wich codec? h264/h265

I could implement this with php. But i dont know the code of jellyfin and would take me months to study.

Because i already found out, that the jellyfin server simply builds his commandline for ffmpeg with variables (wich hardware encoder, what video, what to transcode exactly).

It would be a huge improvment for the user who didnt have a 4k display in possesion, but have 4k material.

Plz jellyfin gods, make this wish true! :-)

from jellyfin-kodi.

lunainvictum avatar lunainvictum commented on June 8, 2024

here is a example:

https://pastebin.com/raw/5BbSz3iF

Why the Hell is jellyfin transcoding to h264 instead to h265? I have sound without stutters, but no video.

from jellyfin-kodi.

ebb-earl-co avatar ebb-earl-co commented on June 8, 2024

I hear what you're saying, @lunainvictum. What I've seen others do is to transcode the 4K content to 1080p and then just have both files stored in different libraries. You'd then need to direct the client to the right library that has either the 4K version of 1080p version of the file.

In response to your pastebin, I see that it is transcoding using h264_nvenc which means that you have an NVIDIA graphics card that you are using. If it's older than a GTX 950, then the card doesn't support hevc_nvenc meaning that h264_nvenc would be the only option and you would not be able to decode the VP9 and encode with hevc_nvenc.
In any case, looking at this line here gives us a clue:

Output #0, hls, to '/var/lib/jellyfin/transcodes/ccd0a0131cafd915477c81417ab3069e.m3u8':

The Jellyfin server is using HLS (the hls near the beginning of the line) to stream the video, and according to the specification, HLS sends H.264-encoded video so that is why Jellyfin is automatically converting to H.264 in this situation.

from jellyfin-kodi.

lunainvictum avatar lunainvictum commented on June 8, 2024

Yeah, and it should transcode to h265.

Im using a Nvidia 1070ti as gpu. this gpu can transcode any format (execpt av1) to h265 without problem.

from jellyfin-kodi.

ebb-earl-co avatar ebb-earl-co commented on June 8, 2024

@lunainvictum I'm sorry that I cannot be of more assistance; from what I know, if you are streaming your content and it's not direct play, then as far as I know, Jellyfin will convert it to H.264 in order to transport it to your client via HLS. You will have to get someone more knowledgeable to assist you 😞

from jellyfin-kodi.

Hooloovoo avatar Hooloovoo commented on June 8, 2024

I also have a raspberry pi 4 acting as front-end to a backend that is good at hardware transcoding.

While the Raspberry Pi 4 can decode 1080p h.264 and 4k h.265 in hardware, it is not capable of playing 4k VP9 (and presumably other formats) in real time.

One of the things I love about Jellyfin is that I can throw all my media at it and not worry about codec support. I would therefore also like to manually set what the client can cope with Direct Playing (by both codec and resolution) and have Jellyfin transcode anything else.

From my testing, the Raspberry Pi 4 can cope with up to 1080p in vp9 even without hardware acceleration.

from jellyfin-kodi.

bzzbrr avatar bzzbrr commented on June 8, 2024

The only "solution" until now, is simply to set the bitrate in the kodi addon below or equal 10mbps. And if sometimes a video occurs that is still 4k, to reduce the bitrate even lower as 10mbps only for that video.

In the Jellyfin for Kodi addon there is an option to force transcode VP9 (add-on settings->playback). It won't change the resolution, but an rpi4 should be able to play 4k h264. @Hooloovoo as well, if you're using or willing to use kodi.

from jellyfin-kodi.

Hooloovoo avatar Hooloovoo commented on June 8, 2024

In the Jellyfin for Kodi addon there is an option to force transcode VP9 (add-on settings->playback). It won't change the resolution, but an rpi4 should be able to play 4k h264. @Hooloovoo as well, if you're using or willing to use kodi.

Thanks for the response, @bzzbrr. I actually gave up fighting the RPi in the end and just bought a Roku Streaming Stick+. It was a great decision for my limited front-end use case -- half the price, no more fighting Widevine issues and all the rest to play the streaming services and the Roku Jellyfin app works better than I could get Jellyfin working on the RPi. (Obviously Roku is not open source, though.)

from jellyfin-kodi.

abc123me avatar abc123me commented on June 8, 2024

I would like to post here to hopefully bump the issue, I have some older devices which I need to be able to watch Jellyfin on, unfortunately they cannot handle a 1080P HEVC, VP9, or AV1 stream. However they can handle a 1080p H264 stream fine, I've noticed some video files get transcoded due to incompatible subtitles however I am hoping there would be a way I can force all files viewed by the user to only play in H264 format. I am a luddite and will not even consider upgrading my Thinkpad T430 so that is not an option. I am running the TrueNAS Application form of Jellyfin (docker) on a Dell PE R720XD with infinite bandwidth and compute so neither of those are of any concern to me. I also am a decent programmer so if anyone has any pointers that could help me implement the feature myself that would be great!

from jellyfin-kodi.

jellyfin-bot avatar jellyfin-bot commented on June 8, 2024

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

from jellyfin-kodi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.