Jump to content

New Buffering and Stuttering Issue w/ Emby Server


Recommended Posts

Posted

Hello all,

I have a computer running an Emby Server in my living room running TrueNAS-13.0-U6.3 with an Emby jail, latest version of Emby (4.9.0.32). I've had this server since 2020 and it's worked pretty flawlessly. I have gigabit internet, and this Emby server is connected to both the LAN and can also be accessed remotely from anywhere with internet access. The problem I started having recently I only started noticing in October. I was streaming a movie from my Emby server in October. A movie I have streamed before on this exact same TV (Coraline). This is all at my home,  For some reason, the movie would randomly stop during playback, buffer for a bit, then studder and skip a bunch of scenes, and then continue doing that. I've tried restarting the server, doesn't help. I've tried playing other videos, same problem. I've tried on my brother's TV. He also has a Samsung SmartTV, but of a completely different model. I've tried playing other movies aside from Coraline. I've tried 3 other movies on both TVs and in all cases they had the same issue. Buffering into studdering and skipping scenes without volume and very slowly. I have no idea what could possibly be causing this issue. I attached two log files from earlier this evening when I tried playing the movie "Twisters". Same issue. Could someone help me identify what the problem is and fix this?

Thanks.

ffmpeg-remux-7097192c-2981-485a-b4f1-534c656bc9a1_1.txt ffmpeg-remux-8c2f4c0d-a976-4d0b-bba1-fa5315ab2e0d_1.txt

FrostByte
Posted (edited)

According your log:

Quote

TranscodeReasons=AudioCodecNotSupported

Try preselecting an audio track that is compatible with your Samsung (such as AC3 or EAC3) before clicking play.  Tizen doesn't deal with transcoding HD audio very well for some reason which causes buffering, and it gets worse the higher the bitrate of the input.

There is a chart in the back of your manual with compatible audio codecs and will look something like this:

https://developer.samsung.com/smarttv/develop/specifications/media-specifications/2024-tv-video-specifications.html

 

Same goes with PGS subs, always choose a format compatible with Tizen such as SRT before clicking Play to avoid transcoding which often leads to buffering.

Edited by FrostByte
Posted
17 minutes ago, FrostByte said:

According your log:

Try preselecting an audio track that is compatible with your Samsung (such as AC3 or EAC3) before clicking play.  Tizen doesn't deal with transcoding HD audio very well for some reason which causes buffering. 

There is a chart in the back of your manual with compatible audio codecs and will look something like this:

https://developer.samsung.com/smarttv/develop/specifications/media-specifications/2024-tv-video-specifications.html

 

Same goes with PGS subs, always choose a format compatible with Tizen such as SRT before clicking Play to avoid transcoding which often leads to buffering.

But what I first don't understand is, what's changed over time? I've had the exact same Samsung SmartTV for years, and I already previously streamed this exact same movie (Coraline) without issue in the past. I didn't change the file or anything else... it just seems odd that this started so randomly out of the blue and now I can't play any video file when before it was all working fine...

FrostByte
Posted

Not sure, maybe Luke or SamES can answer that.   

However, I would avoid transcoding if possible because it will always be smoother if direct playing even if it appears to be working fine and keeping up.

Also, if you do have an alternate audio track it's going to probably be better quality too then the one converted on the fly from Emby.  If you look at the log Emby transcodes all audio to 384kbps AC3 5.1 and it looks like your Twister movie has both a EAC3 7.1 1280 kbps and AC3 5.1 640 kbps track you can choose from.

  • Like 1
Posted
2 minutes ago, FrostByte said:

Not sure, maybe Luke or SamES can answer that.   

However, I would avoid transcoding if possible because it will always be smoother if direct playing even if it appears to be working fine and keeping up.

Also, if you do have an alternate audio track it's going to probably be better quality too then the one converted on the fly from Emby.  If you look at the log Emby transcodes all audio to 384kbps AC3 5.1 and it looks like your Twister movie has both a EAC3 7.1 1280 kbps and AC3 5.1 640 kbps track you can choose from.

Wait, you said the movie DOES use EAC3 and AC3 which you said was compatible with my TV... so is it compatible or is it not?

FrostByte
Posted

EAC3 and AC3 are compatible.  You will need to check your user's manual to be sure, but things haven't changed much over the years and should pretty much look like the link I posted earlier.  Those are the ones you want to preselect.

The track you were trying to play and which was transcoding in the log I saw was a TrueHD track.  That is not compatible as the only lossless audio codec Tizen supports is PCM 2.0

FrostByte
Posted (edited)

The second audio should work and not transcode. 

18:02:26.433   Stream #0:2(eng): Audio: eac3, 48000 Hz, 7.1, fltp, 1280 kb/s
18:02:26.433     Metadata:
18:02:26.433       title           : Surround 7.1
18:02:26.433       BPS             : 1280000
18:02:26.433       DURATION        : 02:02:23.968000000
18:02:26.433       NUMBER_OF_FRAMES: 229499
18:02:26.433       NUMBER_OF_BYTES : 1175034880

 

Also, if you bring up Stats for Nerds (select the cog wheel on the OSD) it should bring up a box and show you why it's transcoding.

Edited by FrostByte
Posted
4 hours ago, FrostByte said:

The second audio should work and not transcode. 

18:02:26.433   Stream #0:2(eng): Audio: eac3, 48000 Hz, 7.1, fltp, 1280 kb/s
18:02:26.433     Metadata:
18:02:26.433       title           : Surround 7.1
18:02:26.433       BPS             : 1280000
18:02:26.433       DURATION        : 02:02:23.968000000
18:02:26.433       NUMBER_OF_FRAMES: 229499
18:02:26.433       NUMBER_OF_BYTES : 1175034880

 

Also, if you bring up Stats for Nerds (select the cog wheel on the OSD) it should bring up a box and show you why it's transcoding.

It being 7.1 and from an app on the TV is most likely why it's transcoding.

EAC3 5.1 should be direct play supported but not 7.1.

FrostByte
Posted (edited)

EAC3 7.1 shouldn't force a transcode of audio either, all my remuxes have an EAC3 7.1 alternate track.   Tizen will fold the extra 2 channels if not passed through.

Log looks like g07h4xf00 was playing TrueHD and I haven't seen a new log using the EAC3 track.  If EAC3 7.1 is now transcoding, then something has changed as g07h4xf00 mentioned.

Edited by FrostByte
Posted

For me when an app on the TV it self and playing any 7.1 audio source it gets downmixed to 2 channel on the TV before being handed on to the surround receiver. .
Only way i can do anything about that is to have Emby transcode it to 5.1 first, then it gets passed on as 5.1 by the TV.

Any in app on TV 7.1 audio just won't work, only when i use an external device like a Nvidia Shield or a PC can i get 7.1 with EARC to work without transcode.
If the audio track is in 5.1 to begin with it just gets direct played no problem.

Googling the issue shows two things that might be wrong.
In app on TVs just not allowed by license to allow 7.1 and uncompressed audio tracks to pass through.
Just Exoplayer not being able to do it and not transcoding when it should.

At least, thats the reason for me thinking that 7.1 and in TV app might be the reason.
Not trying to hijack the thread but if i'm wrong then please explain me what's happening so i can save my money and not use money on a shield for my self. ;)

  • Like 1
FrostByte
Posted

An external device plugged into a soundbar/audio system is definitely the way to go.  If you spend all that money on a nice TV to watch 4K remuxes you might as well enjoy TrueHD Atmos, DTSX, etc. also in my opinion.  Just can't get that playing movies using the Tizen player.  

Posted

FrostByte is correct in his comments, but I would expect that your server shouldn't be having any issues transcoding TrueHD audio (and DirectPlaying the video)

image.png.c1ebef30095b43cfa004f94b1f681f1e.png

What model is your TV?

Generally, I would say that if it's stuttering, then segments aren't being sent to the TV fast enough.  This is likely network, server or disk related. At 32Mbit/s, these aren't particularly big files.

You didn't mention if you were playing this locally or remotely.

Assuming it's local playback, try checking/rebooting any network switches, routers and wifi devices.  I've seen this cause issues in the past.

If this all checks out and doesn't resolve it, then I would check the jail config in case anything has changed.

How full are your TrueNAS disks? 

Just remember that when any file conversion occurs, the server needs to read the original file from disk, write the segments to disk, then read the segments and send them to the TV, so for a 30Mbit/s file, this requires 60Mbit/s read and 30Mbit/s writes as a minimum.  If your zfs disks are getting full or you have a disk that is playing up, then this will impact preformance.  Have you replaced any disks recently?  I hope they are not SMR disks as this can cause problems for zfs.

Start with networking and make sure that checks out, then look at the jail network config, but if any of my statements regarding disks sound like a possibility to you, then that is probably your prime suspect.

Posted
On 12/10/2024 at 1:19 PM, SamES said:

FrostByte is correct in his comments, but I would expect that your server shouldn't be having any issues transcoding TrueHD audio (and DirectPlaying the video)

image.png.c1ebef30095b43cfa004f94b1f681f1e.png

What model is your TV?

Generally, I would say that if it's stuttering, then segments aren't being sent to the TV fast enough.  This is likely network, server or disk related. At 32Mbit/s, these aren't particularly big files.

You didn't mention if you were playing this locally or remotely.

Assuming it's local playback, try checking/rebooting any network switches, routers and wifi devices.  I've seen this cause issues in the past.

If this all checks out and doesn't resolve it, then I would check the jail config in case anything has changed.

How full are your TrueNAS disks? 

Just remember that when any file conversion occurs, the server needs to read the original file from disk, write the segments to disk, then read the segments and send them to the TV, so for a 30Mbit/s file, this requires 60Mbit/s read and 30Mbit/s writes as a minimum.  If your zfs disks are getting full or you have a disk that is playing up, then this will impact preformance.  Have you replaced any disks recently?  I hope they are not SMR disks as this can cause problems for zfs.

Start with networking and make sure that checks out, then look at the jail network config, but if any of my statements regarding disks sound like a possibility to you, then that is probably your prime suspect.

1. My TV is a Samsung QN65Q70RAFXZA  Q70 QLED 4K 65 inch. 

2. I do wonder if it is disk related because like I said I've streamed this specific movie Coraline in the past without any issue this was years ago on the same TV. However, now that I check, in learning that my TrueNAS server is at 99% storage capacity and only has about 327 GB available. Could the problem be somehow related to the low remaining storage? Though, tbf 327 GB is nothing to scoff at. 

3. Yes, this is local playback. I've also tried remote playback on my brother's TV 

4. I have no issues streaming the exact same movies on my PC via web browser or on my android phone via the Emby app. No stuttering or skipping issues that I can observe on those.

5. See above for my comment on my available disk space. I wonder if this is the issue since this was the case the last time I played the Coraline movie years ago.

6. My hard drives are all NAS drives and no SMR.

Posted

Hi, have you tried rebooting your router?

Posted
2 hours ago, g07h4xf00 said:

1. My TV is a Samsung QN65Q70RAFXZA  Q70 QLED 4K 65 inch. 

2. I do wonder if it is disk related because like I said I've streamed this specific movie Coraline in the past without any issue this was years ago on the same TV. However, now that I check, in learning that my TrueNAS server is at 99% storage capacity and only has about 327 GB available. Could the problem be somehow related to the low remaining storage? Though, tbf 327 GB is nothing to scoff at. 

3. Yes, this is local playback. I've also tried remote playback on my brother's TV 

4. I have no issues streaming the exact same movies on my PC via web browser or on my android phone via the Emby app. No stuttering or skipping issues that I can observe on those.

5. See above for my comment on my available disk space. I wonder if this is the issue since this was the case the last time I played the Coraline movie years ago.

6. My hard drives are all NAS drives and no SMR.

Looking at the log it looks like the video has a TrueHD audio tracks, Samsung doesn't support that afaik so looking in the logs it transcodes it to AC3, maybe it can't keep up and that might be the reason?
Can you try one of the videos AC3 tracks instead?

It also seems to have some problems with subtitles:

18:02:26.432 [matroska,webm @ 0x805686000] Could not find codec parameters for stream 18 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

And there are loads of other errors about subtitles in the log as well.
Maybe that's something to look into.

Just for a test you can disable subtitles completely on the server with the diagnostic plugin.

I'm no expert or anything, this are just what i can see in the logs and where i would start based on that.

 

FrostByte
Posted
33 minutes ago, yocker said:

Looking at the log it looks like the video has a TrueHD audio tracks, Samsung doesn't support that afaik so looking in the logs it transcodes it to AC3, maybe it can't keep up and that might be the reason?
Can you try one of the videos AC3 tracks instead?

It also seems to have some problems with subtitles:

18:02:26.432 [matroska,webm @ 0x805686000] Could not find codec parameters for stream 18 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

And there are loads of other errors about subtitles in the log as well.
Maybe that's something to look into.

Just for a test you can disable subtitles completely on the server with the diagnostic plugin.

I'm no expert or anything, this are just what i can see in the logs and where i would start based on that.

 

I already suggested alternate audio tracks and not using PGS tracks in my first post to eliminate transcoding :) 

Finding out if the problem still exists once it direct plays will help troubleshoot.

 

Posted
1 hour ago, FrostByte said:

I already suggested alternate audio tracks and not using PGS tracks in my first post to eliminate transcoding :) 

Finding out if the problem still exists once it direct plays will help troubleshoot.

 

Sorry didn't see that, was looking on my mobile while bored waiting for my mom and sister getting done Christmas shopping ;)

  • Like 1
FrostByte
Posted

All good :)

This is a very common complaint about the Samsung app and there are numerous posts on the subject.  It's notoriously bad when converting HD audio and PGS subs and the higher the bitrate of the video the worse the problem.  

Preselecting a compatible audio and subtitle track (if there are any) will always give you a better experience (better bitrate, etc)

I'm hardwired with everything 2ft away from each other and I can't convert audio and PGS subs on the fly without it constantly buffering.  Any other client I have no issues.

  • Like 2
Posted
9 hours ago, g07h4xf00 said:

2. I do wonder if it is disk related because like I said I've streamed this specific movie Coraline in the past without any issue this was years ago on the same TV. However, now that I check, in learning that my TrueNAS server is at 99% storage capacity and only has about 327 GB available. Could the problem be somehow related to the low remaining storage? Though, tbf 327 GB is nothing to scoff at. 

This is quite probably the issue.  The recommended max usage for TrueNAS / zfs storage is 80%.  It's not about the GB available; it's about the disk have a percentage of space available in the zpool to manage metadata, snapshots, contiguous space, etc.  Above 80%, efficiency drops, and into the 90's it becomes far more noticeable, particularly as there is a point where zfs starts changing its allocation algorithms.  One article suggests that after 95% capacity, performance resembles that of floppy disks!

Here is a recent discussion : https://forums.truenas.com/t/is-the-80-problem-in-zfs-still-relevant/26490

I would suggest planning on upgrading storage or reducing your current storage needs.

  • 1 month later...
Posted (edited)
On 12/13/2024 at 1:49 PM, SamES said:

This is quite probably the issue.  The recommended max usage for TrueNAS / zfs storage is 80%.  It's not about the GB available; it's about the disk have a percentage of space available in the zpool to manage metadata, snapshots, contiguous space, etc.  Above 80%, efficiency drops, and into the 90's it becomes far more noticeable, particularly as there is a point where zfs starts changing its allocation algorithms.  One article suggests that after 95% capacity, performance resembles that of floppy disks!

Here is a recent discussion : https://forums.truenas.com/t/is-the-80-problem-in-zfs-still-relevant/26490

I would suggest planning on upgrading storage or reducing your current storage needs.

I finally got around to upgrading my storage so now I have many more TB available I'm nowhere near capacity now. However, this buffering issue is still happening sometimes. Here is the most recent one:

image.png.b9ba7dd59065d54998cea3a1c9902772.png

I've also attached the most recent log. The video file I'm streaming in this case is for the movie "Anora".

Do you see any reason why this problem might still be persisting or what the issue may be?

embyserver.txt

Edited by g07h4xf00
Posted (edited)

This is gonna sound really silly, but I tried switching from Ethernet (on the TV) to Wi-Fi (5GHz) and suddenly the buffering went away instantly and it's now playing smoothly.

I investigated this little bit. So apparently the video file I was trying to play has a bit rate of about 16 MBps. I looked it up and apparently my Samsung model of TV ethernet port is only up to 100 Mbps. Hence the buffering. That is wild that Samsung SmartTVs cap their Ethernet port at 100Mbps... 🤯

Edited by g07h4xf00
  • Like 1
Posted
3 hours ago, g07h4xf00 said:

This is gonna sound really silly, but I tried switching from Ethernet (on the TV) to Wi-Fi (5GHz) and suddenly the buffering went away instantly and it's now playing smoothly.

I investigated this little bit. So apparently the video file I was trying to play has a bit rate of about 16 MBps. I looked it up and apparently my Samsung model of TV ethernet port is only up to 100 Mbps. Hence the buffering. That is wild that Samsung SmartTVs cap their Ethernet port at 100Mbps... 🤯

Thanks for the feedback.

When DirectPlaying, it's either network or server/disk latency.  Great that you resolved the issue, but I can say that I happily play 80Mb/s content on my 2017 Samsung TV with 100Mb/s ethernet port and no stuttering.  It's possible that the switch/router at the other end of the cable is playing up, or you have a bad/damaged cable, connector or port somewhere.  But nothing wrong with WiFi either.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...