Jump to content

Playback issues with x265 10bit media and subtitles


Go to solution Solved by SamES,

Recommended Posts

fragtrance
Posted

Hello,

I have two separate issues:

1. Independent of the media format, very often (almost always), subtitles don't start showing until the first 1-1.5 minute of the media. Sometimes they won't show at all, until I manually disable them and re-enable them from the player CC menu.

2. The more important issue I have is with the playback of x265 10bit media. The playback will start stuttering (stops, then jumps a few seconds ahead) and subtitles going out of sync (because of the playback hiccup). Often, the player will freeze entirely, leaving the TV unresponsive for maybe 1-2 minutes, then the app crashes.

 

Samsung model number: UE55NU7102

Samsung firmware version: FW : T-KTM2LDEUC-1341.2 (FC : SWU-OU_T-KTM2LDEUC_1341_240112)

Samsung Emby client version: 1.9.8 (but I had this for a long time and I do update frequently)

Emby server version: 4.8.11.0 (same as above, I update frequently, had this issue for a long time)

 

Log and media info attached.

2025-04-01T16:29:10,061613362+03:00.png

embyserver.txt

visproduction
Posted (edited)

Frag,

I think another log might be useful.  I 'll let someone else, who knows the logs much better, respond.

I've noticed that .ass subtitles embedded in .mkv media originating from blu-ray has a "short cut" time stamp for each line.  Obviously, it works fine on blu-ray, but it does not seem to always open properly for HTML media playback or TV app.  Unfortunately, you would have to extract the subtitle from .mkv file in order to fix this.  You should be able to preview the subtitle in browser playback, by clicking on the .ass data box and choosing preview.  You should be able to see the timeline individual lines.  Also check there that the .ass file actually has the missing early subtitles you expected.  Perhpas that is part of the problem.

Have a look at my entry in a related post.
 https://emby.media/community/index.php?/topic/137265-media-subtitle-ass-format-playback/#comment-1433426

If you fix the .ass file, your subtitle issue may start working.

As far as number 2 above, the player stopping;  well, both the video h.264 HEVC and the audio AC3 would need transcoding for browser playback on workstations and many TV's.  The fact that Samsung TV may handle both is nice, but it doesn't always get communicated perfectly.  I don't know the code well enough to say for sure.  I think, if you pause and click forward or back on the timeline, it may require that all the steps to confirm that the TV connection can play direct have to reinitialize and clicking multiple times, pause, go, new position on the timeline may screw up that data stream connection enough that direct playback stutters or even stops.  I would guess if you had tested codecs that never need transcoding and play direct on everything like a similar bitrate demo video in h.264 .mp4 and AAC audio with separate correctly formated .ass subtitle, that everything would playback fine without any issues and you could jump around the timeline all you want.  

I am not saying you have to convert your media, but if the basic codecs that never need transcoding work, then it would point to the issue that syncing direct play on h.265 and AC3 audio may not work flawlessly when there is any interruption in playback.  No one likes to run these types of tests, but I think testing demo media that has no metadata or stream errors is helpful to see where the problem really is in your system and / or there is something needing a fix with the Emby direct play process.

Hope that makes some sense.

Edited by visproduction
  • Thanks 1
fragtrance
Posted

It does kinda make sense and thanks for taking the time to response, however, I'm not entirely sure how to help with testing and/or provide more logs. That was all I could find on the server.

 

From my understanding, not much transcoding seem to go on during playback, am I correct in understanding that I should enable transcoding for HEVC?

  • Solution
Posted
6 hours ago, fragtrance said:

1. Independent of the media format, very often (almost always), subtitles don't start showing until the first 1-1.5 minute of the media. Sometimes they won't show at all, until I manually disable them and re-enable them from the player CC menu.

What subtitle types are you referring to?  Your image shows ASS.  If it is the case that it is always ASS subtitles that take a while to start then that is due to the age of the TV.  The ASS subtitle renderer is quite complex and can take up to a minute in some cases to load.  Ensuring that the subtitle stream has the correct language included (ie: Language: English in your example) as this will ensure it only loads the minimally required fonts which can make it a bit quicker to start.

If it is other subtitle types, not ASS then please provide some examples

6 hours ago, fragtrance said:

2. The more important issue I have is with the playback of x265 10bit media. The playback will start stuttering (stops, then jumps a few seconds ahead) and subtitles going out of sync (because of the playback hiccup). Often, the player will freeze entirely, leaving the TV unresponsive for maybe 1-2 minutes, then the app crashes.

 

You would need to provide some specific examples,  Please try and determine the playback type (DirectPlay, transcode, etc) from Stats for Nerds during playback or from the server so that we can narrow down the cause and note what the stream formats are.  The file in your image should have no problem playing smoothly without stuttering.

Is the server located on the same local lan as the TV or are you playing remotely?  Stuttering/sync issues can be caused by network issues, server performance if transcoding or overloaded, very high bitrate files, incompatible formats or badly format video files.  Make sure you are avoiding PGS subtitles as they will always cause transcoding which your server may not handle well.

  • Like 1
  • Thanks 1
fragtrance
Posted
19 hours ago, SamES said:

You would need to provide some specific examples,  Please try and determine the playback type (DirectPlay, transcode, etc) from Stats for Nerds during playback or from the server so that we can narrow down the cause and note what the stream formats are.  The file in your image should have no problem playing smoothly without stuttering.

Is the server located on the same local lan as the TV or are you playing remotely?  Stuttering/sync issues can be caused by network issues, server performance if transcoding or overloaded, very high bitrate files, incompatible formats or badly format video files.  Make sure you are avoiding PGS subtitles as they will always cause transcoding which your server may not handle well.

Thanks for the response,

Let's please ignore the subs issue for now, as I can live with that. If you want info for debugging purposes I can provide it.

I'm playing the exact video posted originally, my server is pretty chill while the TV is playing (2% CPU, little RAM usage). Both the server and TV are on the same LAN, all wired (1Gb ethernet). I don't believe the file I'm playing has PGS subs, nor do I remember seeing them before. Playback appears to be direct play. I have also attached a `mediainfo` of the media file, is there any more info I can provide?

2025-04-02T18:32:41,871394960+03:00.png

PXL_20250402_182739073_800.jpg

mediainfo.txt

Posted
3 hours ago, fragtrance said:

Thanks for the response,

Let's please ignore the subs issue for now, as I can live with that. If you want info for debugging purposes I can provide it.

I'm playing the exact video posted originally, my server is pretty chill while the TV is playing (2% CPU, little RAM usage). Both the server and TV are on the same LAN, all wired (1Gb ethernet). I don't believe the file I'm playing has PGS subs, nor do I remember seeing them before. Playback appears to be direct play. I have also attached a `mediainfo` of the media file, is there any more info I can provide?

2025-04-02T18:32:41,871394960+03:00.png

PXL_20250402_182739073_800.jpg

mediainfo.txt 9.16 kB · 2 downloads

And what is happening?

fragtrance
Posted
17 hours ago, Luke said:

And what is happening?

As mentioned initially, video starts to stutter (freezes then skips 1-2 secs and continues), then the Emby app on TV freezes (can't use my remote control), and after some time crashes and exits.

Posted
10 hours ago, fragtrance said:

As mentioned initially, video starts to stutter (freezes then skips 1-2 secs and continues), then the Emby app on TV freezes (can't use my remote control), and after some time crashes and exits.

Try completely removing the app, don’t just remove it from the home screen

Then turn the TV power off for a few minutes and reinstall. 
 

I wonder if the app is corrupted?

fragtrance
Posted

Thank you to all who have provided their insight. I managed to narrow down the issue. The issue was actually on the subtitles stream (ASS format) and not the video stream as I was assuming.

So it does seem that the TV is old/dieing as pointed out by @SamES.

As a temporary solution, I created a script to extract the ASS subtitles into plain SRT format. For anyone interested, or who may come across this post:

 

(replace fd with find)

 

#!/bin/bash
# shellcheck disable=SC2181

RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'

fd -e mkv | while read -r file; do
  subs_stream=$(ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 "${file}" | rg eng)
  if (($? != 0)); then
    echo -e "${RED}${file}${NC}: Failed to detect subtitle stream."
    continue
  fi
  stream_no=$(cut -d',' -f1 <<<"${subs_stream}")
  ffmpeg -nostdin -loglevel 24 -y -i "${file}" -map "0:${stream_no}" -c:s text -f srt "${file%.mkv}.en.srt"
  if (($? != 0)); then
    echo -e "${RED}${file}: Something went wrong. Existing.${NC}"
    exit 1
  fi
  echo -e "${GREEN}${file}${NC}: Subtitles extracted successfully."
done

 

  • Like 2
  • Thanks 2
Posted

How many subtitle streams does that file have?

Posted
7 minutes ago, fragtrance said:

Five!

OK, that shouldn't be an issue.  Thanks for confirming

  • Like 1
fragtrance
Posted
22 minutes ago, SamES said:

OK, that shouldn't be an issue.  Thanks for confirming

If it means anything, I have another mkv file with only one, and the same issue happens.

Posted

How do they play if you turn subtitles off before starting playback?

fragtrance
Posted

Both play just fine, this is exactly what I'm doing right now: select SRT sub before clicking play.

Posted
On 04/04/2025 at 10:05, SamES said:

Try completely removing the app, don’t just remove it from the home screen

Then turn the TV power off for a few minutes and reinstall. 
 

I wonder if the app is corrupted?

I would try this if you haven't already

  • Like 1
fragtrance
Posted
  1. Uninstalled app from TV and turned it off
  2. Loaded latest version (2.0.2) on USB
  3. Plugged USB into TV, turned it on, installed app
  4. Started playing video with ASS subs
  5. Playback crashed at 01:30 and TV is frozen.
Posted

It's strange that it crashes, I've never really seen that before

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...