jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
999 stars 79 forks source link

Media won't play smoothly unless it is transcoded #203

Open ghost opened 1 year ago

ghost commented 1 year ago

Hey!

First of all, loving Jellyfin and all the work you guys have been doing, hopefully this issue can lead to more improvements. I mainly use jellyfin for my own personal use through the web player via Firefox and everything so far has played great. I will probably be moving to the proper Desktop Jellyfin player so it can direct play most things.

Moving on to the tv, I'm visiting family for the summer and they have an old Samsung TV (UN65KU6500F) which I believe has Tizen 2.4? Was looking for ways to use Jellyfin on the tv and encountered this app so thought it was great! To make the installation easier I installed it with Georift/install-jellyfin-tizen.

This is some of the hiccups that I've encountered along the way.

Like I said above there's barely if any hiccups occurring when using Firefox on my laptop or the Jellyfin Media Player so I doubt it's the internet connection.

Would love to provide more details so let me know what you need!

kraM1tt commented 1 year ago

Go to fast.com on the TV's internet browser and just double check what speeds it's pulling to rule out bandwidth issue. TV Wifi antennas are notoriously crap compared to phones/laptops.

Also make sure the subtitles are .srt format, PGS/ASS will always require a transcode. Try disabling them completely and see if playback is fixed

ghost commented 1 year ago

Go to fast.com on the TV's internet browser and just double check what speeds it's pulling to rule out bandwidth issue. TV Wifi antennas are notoriously crap compared to phones/laptops.

Also make sure the subtitles are .srt format, PGS/ASS will always require a transcode. Try disabling them completely and see if playback is fixed

Alright so I had time to test out of a few things. Here goes.

Internet Connection Test The results from fast.com from the tv are indeed a bit worse than my laptop and phone but not by much. I'm getting about 80% of the speed I get from my phone and laptop.

Anime I tried playing some anime episodes without any subtitles and it seemed to work fine doing direct playing or remuxing. When I toggle the subtitles back on (ASS) using Auto Burn it always plays for a bit then I'll get a black screen, play for a bit and then eventually I get a playback error. I tried extracting the subtitles and converting them to SRT and that seemed to work except that you lose the formatting that comes with ASS so the subs were all over the place lol. Lines were repeating, {\an5} {\an8} {} showing up everywhere.

Movies/TV Of course when I start testing things again stuff starts to go smoother lol. Tested a couple of movies and tv shows. (Not the whole thing just the first few minutes)

Without any subtitles everything seemed to go well whether it was direct playing or direct streaming, no stutters or getting stuck anywhere.

With subtitles it was the same thing, subs loaded pretty quickly and the first few minutes seemed to play fine.

One interesting thing was that I tested a movie that had ASS subtitles and It said it was Direct Playing and the subs were there and working. So why does Anime freak out?

The only hiccup I ran into was yesterday watching a movie with my family...everything was going fine (It was direct streaming if I remember correctly) and then 1 hour in it started stuttering and getting stuck so I switch the Burn Subs to All and it was smooth sailing from there.

kraM1tt commented 1 year ago

Yeah that's very strange how it would be playing fine suddenly out of no where it errors or stops.

Instead of extracting subs from your current files, I'd recommend heading over to somewhere like subscene.com and grabbing fresh .srt subs for the media. From there you can go to the episode/movie on Jellyfin on your computer, press the episode, 3 vertical dots for settings, Edit Subtitles, Press the + button and add those new subs.

What actual speeds were you getting in Mbps from the speedtests? Depending how high the bitrate of a file is you could still be bottlenecked by it

ghost commented 1 year ago

Yeah that's very strange how it would be playing fine suddenly out of no where it errors or stops.

Instead of extracting subs from your current files, I'd recommend heading over to somewhere like subscene.com and grabbing fresh .srt subs for the media. From there you can go to the episode/movie on Jellyfin on your computer, press the episode, 3 vertical dots for settings, Edit Subtitles, Press the + button and add those new subs.

What actual speeds were you getting in Mbps from the speedtests? Depending how high the bitrate of a file is you could still be bottlenecked by it

On my laptop/phone I'm getting around 40Mbps and on the tv I get around 30Mbps. That's with no one downloading anything or anyone else using the internet. Obviously it'll go down a bit if someone is. (Yeah the internet is not the greatest over haha)

kraM1tt commented 1 year ago

Ye that's pretty low, could be the root of the problem, bitrate is usually below that unless you are watching 4K content which consistently burst above 30Mbps, but you can have spikes even on 1080p content that high if it's high quality material like a REMUX.

Also combine that with family scrolling tiktok and other things and it can quickly be consumed, especially as video streaming is very "bursty" with all platforms, so it really kicks the bandwidth hard to begin with then evens out

Maybe explains why transcoding to a lower bitrate (like 8Mbps) is working so well, much lower load on the network

ghost commented 1 year ago

Ye that's pretty low, could be the root of the problem, bitrate is usually below that unless you are watching 4K content which consistently burst above 30Mbps, but you can have spikes even on 1080p content that high if it's high quality material like a REMUX.

Also combine that with family scrolling tiktok and other things and it can quickly be consumed, especially as video streaming is very "bursty" with all platforms, so it really kicks the bandwidth hard to begin with then evens out

Maybe explains why transcoding to a lower bitrate (like 8Mbps) is working so well, much lower load on the network

Yeah that makes sense. We don't do any 4K or Remux. It's usually Bluray 1080p or WEB 1080p. I'll have to keep an eye out over the next few days and weeks and note down the behaviour.

But then why is it that setting the Burn Subtitles to All (Therefore transcoding when subs are selected) without changing the bitrate usually makes it so it's pretty smooth.

There's also the weird playback error issue with Anime and ASS subtitles that didn't happen with that particular movie I tested with ASS subtitles as well (At least not in the first few minutes)

ghost commented 1 year ago

Update:

After a few days of watching movies and shows:

A lot of media played fine with no stuttering using Direct Play, Direct Streaming, Remuxing and Transcoding. I checked the Video Bitrate of each file and on average it was about 7-10 Mbps.

ASS Subtitles cause a lot of trouble when the Burning Subtitles option is on "Auto" so I have to force transcoding in that case or get a compatible subtitle codec somewhere else.

There's a couple of shows that I've been having trouble with (Direct Playing). It stutters, gets pixelated, stops, etc... I checked the Video Bitrate and they were higher in the 10+ range so I thought maybe it was that. I then put on a movie that had a higher bitrate (Around 18 ish Mbps) and it played fine?

We also increased the internet but the TV's speed didn't increase by much, like you said the hardware is pretty crap lol. I even tried using an ethernet cable and played some of the shows I mentioned above and still same problems on the same spot. (These things play fine on my laptop and phone).

I also tried the TVs browser and same issues.

I'll leave the media info below:

The shows that get stuck

Silo

Video

Video Title: 1080p H264 SDR Codec: H264 AVC: Yes Profile: High Level: 40 Resolution: 1920x960 Aspect ratio: 2:1 Interlaced: No Framerate: 23.976025 Bitrate: 10813 kbps Bit depth: 8 bit Video range: SDR Video range type: SDR Color space: bt709 Color transfer: bt709 Color primaries: bt709 Pixel format: yuv420p Ref frames: 1 NAL: 4

Audio

Audio Title: English - Dolby Digital+ - 5.1 - Default Language: eng Codec: EAC3 Layout: 5.1 Channels: 6 ch Bitrate: 768 kbps Sample rate: 48000 Hz Default: Yes Forced: No External: No

Crowded Room

Video

Video Title: 1080p H264 SDR Codec: H264 AVC: Yes Profile: High Level: 40 Resolution: 1920x1080 Aspect ratio: 16:9 Interlaced: No Framerate: 23.976025 Bitrate: 10990 kbps Bit depth: 8 bit Video range: SDR Video range type: SDR Color space: bt709 Color transfer: bt709 Color primaries: bt709 Pixel format: yuv420p Ref frames: 1 NAL: 4

Audio

Audio Title: English - Dolby Digital+ - 5.1 - Default Language: eng Codec: EAC3 Layout: 5.1 Channels: 6 ch Bitrate: 768 kbps Sample rate: 48000 Hz Default: Yes Forced: No External: No

Movie that didn't get stuck with higher bitrate

Mario

Video

Video Title: [BDRip by SOFCJ] - 1080p - H264 - SDR Codec: H264 AVC: Yes Profile: High Level: 41 Resolution: 1920x800 Aspect ratio: 2.40:1 Interlaced: No Framerate: 23.976025 Bitrate: 18366 kbps Bit depth: 8 bit Video range: SDR Video range type: SDR Pixel format: yuv420p Ref frames: 1 NAL: 4

Audio (I used the russian audio so that it direct plays)

Audio Title: MVO [TVShows] - Russian - Dolby Digital+ - 5.1 - Default Language: rus Codec: EAC3 Layout: 5.1 Channels: 6 ch Bitrate: 768 kbps Sample rate: 48000 Hz Default: Yes Forced: No External: No

English Audio but then it Direct Streams it

Audio Title: English - DTS - 5.1 Language: eng Codec: DTS Profile: DTS Layout: 5.1 Channels: 6 ch Bitrate: 1536 kbps Sample rate: 48000 Hz Default: No Forced: No External: No

scottf007 commented 1 year ago

Hi @lyonelz96 etc,

I have similar issues with some tv shows. Silo and Slow horses stutter on my TV UA65NU8000, I think Tizen4. Almost everything works perfectly, when I was looking at parts of the video info, when the color space bt709 seems to be common. I also wondered about Audio EAC3??

When I play these same videos on my laptop through browser they transcode - and work perfectly. image image

There seems to be something in the file that causes the TV to either not keep up with the stream or not be able to interpret it. The fact I can play the same thing on other devices perfectly indicates to me that my server and network are capable.

hmmmmm.... is there a way to force transcode, or perhaps have an option in the app on the tv to choose transcode if direct play is unreliable.

Klathra commented 1 year ago

I have what might be the same issue. I've found that videos with a large number of subtitle streams have playback issues and have observed this about a dozen times with videos from different sources. This is with subtitles turned off. It's not unusual for a video to have 40 subtitle streams and in my experience videos with this many subtitle streams will always have playback issues for me. Removing all or all but one subtitle stream has, so far, always fixed the problem for me. I usually use "ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -c copy output.mkv" to strip the extra subtitle streams.

Arthlec commented 9 months ago

I have what might be the same issue. I've found that videos with a large number of subtitle streams have playback issues and have observed this about a dozen times with videos from different sources. This is with subtitles turned off. It's not unusual for a video to have 40 subtitle streams and in my experience videos with this many subtitle streams will always have playback issues for me. Removing all or all but one subtitle stream has, so far, always fixed the problem for me. I usually use "ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -c copy output.mkv" to strip the extra subtitle streams.

Thank you! I had the same playback problem (mkv file with a large number of subtitles) and this fixes the issue.

scottf007 commented 9 months ago

@Klathra @Arthlec

is there a way to delete the additional subtitles? On the video I had trouble with about 20-30 subtitles. There are no files, and. Few other forums seem to indicate it is in a database somewhere, deleting would surely be an answer, or an only subtitles in English or whatever language?

scottf007 commented 9 months ago

Check this thread out

https://emby.media/community/index.php?/topic/112411-sub-killer-plugin-remove-unwanted-subs-samsung-friendly/page/3/

a lot of people complaining about the same thing. There is a sub killer plugin

mrkesu commented 9 months ago

a lot of people complaining about the same thing. There is a sub killer plugin

Emby plugins can be installed in Jellyfin?

Arthlec commented 9 months ago

@Klathra @Arthlec

is there a way to delete the additional subtitles? On the video I had trouble with about 20-30 subtitles. There are no files, and. Few other forums seem to indicate it is in a database somewhere, deleting would surely be an answer, or an only subtitles in English or whatever language?

In my case, I only ran the following command to get rid of the unnecessary subtitles

ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -c copy output.mkv

I didn't use any extra plugin.

scottf007 commented 9 months ago

Hi sorry for confusion. Jellyfin was forked from Emby.

The fact that there are people there complaining about the same thing is interesting - and their resolution was also to remove subtitles, no idea if a plugin can work on Jellyfin.

You can use MKV toolbox to remove them. When I did this, I can finally play that video.

mkvmerge -o output.mkv -S input.mkv

it had 41 language tracks.

I also read that this effects older samsung TVs but not the newest, one guy said he had 5 different samsung TVs, and the number of subs made it glitchy apart from the newest 8K tv.

So I will be stripping subs from a fair bit of my library.

thornbill commented 9 months ago

no idea if a plugin can work on Jellyfin

They cannot.