JathTyki 4 Posted November 2, 2025 Posted November 2, 2025 Hello, I seem to be experiencing an issue with media playback where audio and subtitles don't always line up with what's on screen. Sometimes it can be audio that's out of sync, sometimes subtitles, sometimes both at the same time. There wasn't anything specifically done to have this issue happen. The only things specifically were starting it, and possibly skipping parts of the video (intro). Sometimes the subtitles got out of sync, then fixed themselves. In this case, they didn't. I attached a screen shot of an example of this, but this is happening on multiple apps, so I'm not sure if it's strictly an app issue or a server issue. It has happened on both Chrome's web app, Roku TV app, and Samsung TV app. When attempting the exact same playback from Plex, everything looks absolutely fine. The interesting thing is it's a different sync "issue" for each app. On my Samsung TV, it was a bit later in presenting the subtitles. On Chrome, it's a bit sooner (earlier in the video). In the Emby screen shot, you can even see how the "Receipt" subtitle is in the middle of the screen, over the girl. In the Plex screen shot, you can see that it's in the exact location they need to be. The video is using ASS subtitles. Any help is greatly appreciated. Thank you for your time. embyserver.txt ffmpeg-remux-84f08a02-a0b9-4bef-a42a-d4897b4a538c_1.txt
visproduction 315 Posted November 2, 2025 Posted November 2, 2025 JT, You have a high resolution video running at 12.3 Mbit webm codec Two Flacs audio 5.1 and 2 channel A forced English subtitle in .ass and a full English subtitle also .ass Then 11 custom fonts Ok, the video and audio probably always needs to be transcoded. I would guess you don't have something that can play this large video directly and maybe you have something that can play the Flac audio, but probably not. The subtitles in embedded .ass is pretty easy to generate text, but .ass can also pull the custom fonts and that takes some processing. Finally, the actual timing for he subtitles might be off and not perfect. This can happen even with embedded subtitles, but they are probably correctly timed. It could be that he or browser playback, just doesn't like doing all the steps together and it's he player that cannot keep up. So where can the delay be? The answer is in any of the numbered issues above and most likely it's a combination of several. Probably not #3. So, how do you find which is causing your setup to not handle the timing correctly? Maybe the answer is in the log. I could not find it. You can start changing each of the possible issue numbers above until the subtitles start to be timed correctly. That will give you the answer. Test #7 and #3, by removing the subtiles and making them a separate file, naming the file correctly and putting it in the same directory as the new remuxed media that now has no subtitles. It the subtitles start to work, then the problem is not #7. If the subtitles fail still, then the problem is #7. Test #4 and 6, by removing all references to special fonts. Test #5 and #2 by converting the Flac to Mp3 and remuxing it into a new video copy. Test #1 and #8 by reencoding the high bit rate video into a universal lower bit rate codec like 2.4 Mbit h.264 in a .mp4 file and see if that helps. In any case, the problem might be one of the above issues. I don't think you can see this where out of sync playback is coming from. Another way to diagnose is to see if the similar problem pops up with other similar media from a different series and different source. If out of sync only happens with some media, then it's more likely that it's something to do with the media and one or more of the above issues. You could have a situation that your server and transcoder software / hardware combination is just not fast enough when all the above issues are happening at once. It can seem that something in Emby is wrong, but it's also likely if some media plays subtitles fine, then it's your media getting to complex to your server to handle in real time. If you want to avoid out of sync issues for good, you could pre convert your media to an acceptable bitrate, acceptable audio codec and separate subtitle files, so you won't have to push your server to the limit to handle a big complex combination. Then playback can possibly become smooth and in sync. I hope that make sense and that it might be the right answer. It's more of a guess.
JathTyki 4 Posted November 2, 2025 Author Posted November 2, 2025 1 hour ago, visproduction said: JT, You have a high resolution video running at 12.3 Mbit webm codec Two Flacs audio 5.1 and 2 channel A forced English subtitle in .ass and a full English subtitle also .ass Then 11 custom fonts Ok, the video and audio probably always needs to be transcoded. I would guess you don't have something that can play this large video directly and maybe you have something that can play the Flac audio, but probably not. The subtitles in embedded .ass is pretty easy to generate text, but .ass can also pull the custom fonts and that takes some processing. Finally, the actual timing for he subtitles might be off and not perfect. This can happen even with embedded subtitles, but they are probably correctly timed. It could be that he or browser playback, just doesn't like doing all the steps together and it's he player that cannot keep up. So where can the delay be? The answer is in any of the numbered issues above and most likely it's a combination of several. Probably not #3. So, how do you find which is causing your setup to not handle the timing correctly? Maybe the answer is in the log. I could not find it. You can start changing each of the possible issue numbers above until the subtitles start to be timed correctly. That will give you the answer. Test #7 and #3, by removing the subtiles and making them a separate file, naming the file correctly and putting it in the same directory as the new remuxed media that now has no subtitles. It the subtitles start to work, then the problem is not #7. If the subtitles fail still, then the problem is #7. Test #4 and 6, by removing all references to special fonts. Test #5 and #2 by converting the Flac to Mp3 and remuxing it into a new video copy. Test #1 and #8 by reencoding the high bit rate video into a universal lower bit rate codec like 2.4 Mbit h.264 in a .mp4 file and see if that helps. In any case, the problem might be one of the above issues. I don't think you can see this where out of sync playback is coming from. Another way to diagnose is to see if the similar problem pops up with other similar media from a different series and different source. If out of sync only happens with some media, then it's more likely that it's something to do with the media and one or more of the above issues. You could have a situation that your server and transcoder software / hardware combination is just not fast enough when all the above issues are happening at once. It can seem that something in Emby is wrong, but it's also likely if some media plays subtitles fine, then it's your media getting to complex to your server to handle in real time. If you want to avoid out of sync issues for good, you could pre convert your media to an acceptable bitrate, acceptable audio codec and separate subtitle files, so you won't have to push your server to the limit to handle a big complex combination. Then playback can possibly become smooth and in sync. I hope that make sense and that it might be the right answer. It's more of a guess. Good Afternoon visproduction, I will take a look at testing some of these items that you sent over. As a note, I do have a TrueNAS server with the iX Emby app installed. I have an Intel Ultra 5 265K, which should be plenty to transcode these without issue. Again, I am not entirely sure how Emby functions, but Plex is able to transcode the file and present without issue, so I am unsure if it is necessarily a file / subtitle / transcoder issue? I could absolutely be wrong here of course, but if it was one of those, I would think Plex should have an issue as well. In both Emby and Plex, I have the hardware transcoder setup specifically as the Intel Ultra 5 265K. I'll try and get to testing some of this tomorrow. Thank you for your time. 1 1
JathTyki 4 Posted November 3, 2025 Author Posted November 3, 2025 @visproduction, I apologize for such a stupid question. How do I go about doing the tests you mention? Any specific software? I know encoding with Handbrake, but not sure about actually Extracting subtitles from the files and testing in that way. Not sure if that would be the case as well, since Plex works.
visproduction 315 Posted November 3, 2025 Posted November 3, 2025 OK, I use MKVCleaver to pull out subtitles to get file copies of audio from .mkv files. Then I use AVIdemux to remove audio from media, if needed. It automatically removes all the subtitles if you are converting to mp4. You can use a text editor like edit+ or notepad to edit the .ass files and remove references to fonts. If you want to convert flac, use Audacity. If you want to convert DTS audio, VLC player can file convert to mp3. Then AVIdemux can put the mp3 back in to a remux or reencoded version of the media Of course ffmepg can do a lot of this, but it's command only and pretty picky. The GUI interfaces of the other apps are easier. Probably best to read up on all the controls earlier in the day after coffee... Ha! Hope that helps. 1
JathTyki 4 Posted November 4, 2025 Author Posted November 4, 2025 1 hour ago, visproduction said: OK, I use MKVCleaver to pull out subtitles to get file copies of audio from .mkv files. Then I use AVIdemux to remove audio from media, if needed. It automatically removes all the subtitles if you are converting to mp4. You can use a text editor like edit+ or notepad to edit the .ass files and remove references to fonts. If you want to convert flac, use Audacity. If you want to convert DTS audio, VLC player can file convert to mp3. Then AVIdemux can put the mp3 back in to a remux or reencoded version of the media Of course ffmepg can do a lot of this, but it's command only and pretty picky. The GUI interfaces of the other apps are easier. Probably best to read up on all the controls earlier in the day after coffee... Ha! Hope that helps. Oh boy. I work in IT so I understand a decent chunk, but being in IT, I know how complicated it can be sometimes. I'll take a look at doing something like this to test it out in Emby appreciate it. 1
JathTyki 4 Posted November 6, 2025 Author Posted November 6, 2025 (edited) On 11/3/2025 at 8:02 PM, JathTyki said: Oh boy. I work in IT so I understand a decent chunk, but being in IT, I know how complicated it can be sometimes. I'll take a look at doing something like this to test it out in Emby appreciate it. Okie dokie, so I got a few mixed results here. I utilized MKVCleaver to extract the subtitles out of the mkv. I then did two things: 1) Used MKVtoolnix to mux the video without the subtitles in it 2) Used Handbrake to encode the mkv to mp4 without subtitles as well (accidentally changed this to x265, so it was a mixed bag here) The MKV from MKVtoolnix experienced the exact same issue when playing the subtitle file directly next to it. The MP4 file did NOT experience an issue at all. Plex still played all scenarios without any issues as well. Edit: I did forget to mention that if I resume an episode, subtitles will take a while to appear and sometimes I need to actually rewind for them to start to appear in general. This is for all video files I use with subtitles. The scenario that I'm mentioning above with subtitles kinda messed up is happening with multiple files. Not ALL of them, but a decent chunk. Edited November 6, 2025 by JathTyki
visproduction 315 Posted November 6, 2025 Posted November 6, 2025 Hmm, mp4 version does not normally need transcoding unless there is audio still in flac or Ac3 Audio in aac plays directly on most systems, do mp4 h.264 and Aac audio is playing back subs without an issue, that would point probably to your server being taxed to convert h.264 .mkv at the media size of the original. If that pushes the limit of your server, then perhaps subs are delayed until the enough video is cached to allow subs to start showing in the video stream. This is a guess. .mkv continues to have issues when you have a separate subtitle file in text? You wrote, "playing the subtitle file directly next to it". Is it still .ass with references to fonts or did you try removing the font assignments inside the .ass file. Perhaps the fonts exist only in the original blu-ray disk. Since they are missing, the .ass file is trying to find them and fails, perhaps causing a delay. Hope that helps.
JathTyki 4 Posted November 6, 2025 Author Posted November 6, 2025 16 minutes ago, visproduction said: Hmm, mp4 version does not normally need transcoding unless there is audio still in flac or Ac3 Audio in aac plays directly on most systems, do mp4 h.264 and Aac audio is playing back subs without an issue, that would point probably to your server being taxed to convert h.264 .mkv at the media size of the original. If that pushes the limit of your server, then perhaps subs are delayed until the enough video is cached to allow subs to start showing in the video stream. This is a guess. .mkv continues to have issues when you have a separate subtitle file in text? You wrote, "playing the subtitle file directly next to it". Is it still .ass with references to fonts or did you try removing the font assignments inside the .ass file. Perhaps the fonts exist only in the original blu-ray disk. Since they are missing, the .ass file is trying to find them and fails, perhaps causing a delay. Hope that helps. In regards to the server being taxed, here's a screen shot of CPU usage while watching the same episode. Right when it started, one of the cores spiked to high usage, and the "average usage percentage" in the middle spiked to 6%, but then it all came back down. https://imgur.com/j43skpl It plateau'd very fast. For the subtitle file, yes. I very much apologize, I am new to troubleshooting video playback issues. Lol. The file is a .ass file, and editing it with Notepad++ shows this: https://pastebin.com/PaxTGucU I do see a reference in there for Ariel font. I can absolutely try removing the font assignment if you think that might be a good option to try?
visproduction 315 Posted November 6, 2025 Posted November 6, 2025 CPU watching can give you part of an answer. I wonder where exactly are the timeout limits for looking for fonts or checking if the audio can play directly or needs transcoding. If a player cannot playback video or audio, how is that discovered? Is there a software query that waits for a response or player error? That wouldn't show up on CPU stats. One code process is wating on other code to respond. If something takes too much time, then what happens? An obvious example is direct from blu-ray often has 30 subtitles and many are graphics instead of text, for Chinese and similar. Maybe one sub is designated as default. When the player opens the media, does it need to review every subtitle to check which is default? When a user gets rid of the 30 subs in a test, the media plays fine without buffering. Or so I've heard this result before. I never deal directly with these transcoding problems in Emby and I have never run these tests on .mkv files. Just to be clear, I pre convert everything to h.264 .mp4 and aac or mp3 audio that plays back directly for all users and all hardware. My library seems to play for every setup and every remote user, without any issues. My experience is more doing the actual transcoding and fixing video and audio problems. So, I think the combination of many issues can contribute to playback problems that may not show up at all with CPU monitoring. Hope that make sense... Again, this is just a guess. Can the log files show these type of errors? Does anyone know? You should have more info, if you run some more of the tests.
JathTyki 4 Posted November 6, 2025 Author Posted November 6, 2025 (edited) 1 hour ago, visproduction said: CPU watching can give you part of an answer. I wonder where exactly are the timeout limits for looking for fonts or checking if the audio can play directly or needs transcoding. If a player cannot playback video or audio, how is that discovered? Is there a software query that waits for a response or player error? That wouldn't show up on CPU stats. One code process is wating on other code to respond. If something takes too much time, then what happens? An obvious example is direct from blu-ray often has 30 subtitles and many are graphics instead of text, for Chinese and similar. Maybe one sub is designated as default. When the player opens the media, does it need to review every subtitle to check which is default? When a user gets rid of the 30 subs in a test, the media plays fine without buffering. Or so I've heard this result before. I never deal directly with these transcoding problems in Emby and I have never run these tests on .mkv files. Just to be clear, I pre convert everything to h.264 .mp4 and aac or mp3 audio that plays back directly for all users and all hardware. My library seems to play for every setup and every remote user, without any issues. My experience is more doing the actual transcoding and fixing video and audio problems. So, I think the combination of many issues can contribute to playback problems that may not show up at all with CPU monitoring. Hope that make sense... Again, this is just a guess. Can the log files show these type of errors? Does anyone know? You should have more info, if you run some more of the tests. So, from what I am seeing, it doesn't look like there's any buffering happening right now. At least that I can tell. I gave Emby some more CPU power as well (only gave it two cores before, doubled that right now). It plays back pretty fast. I don't notice any true delay with subtitles right now, but subtitle placement and all is still whacked. I'll continue through the tests you mentioned to see if there's anything I can figure out myself as well. @Luke, just an FYI, after the troubleshooting and all, I tried to clear up the logs a bit better so that it only reflected this specific scenario. I deleted all files under Emby / logs, started the server, then recreated the issue. The subtitles are still not in proper placement. I have attached those logs for your review, in case they will be helpful. Thank you for your time. Edit: Uploaded the wrong embyserver.txt file hardware_detection-63898022820.txt ffmpeg-remux-3180fd2f-7759-4dac-bb9f-e897bf5e361e_1.txt embyserver.txt Edited November 6, 2025 by JathTyki Uploaded wrong file
visproduction 315 Posted November 7, 2025 Posted November 7, 2025 Quote .... subtitle placement and all is still whacked. Does that mean in the wrong place on the screen or out of sync?
JathTyki 4 Posted November 7, 2025 Author Posted November 7, 2025 2 hours ago, visproduction said: Does that mean in the wrong place on the screen or out of sync? They're out of sync but also it looks like they're displaying funky. For example, I attached six images. Three from Emby, three from Plex, to show a comparison. In Subtitle1Emby, it's showing part of a text over the girl's face, where it doesn't belong. Then it shows them not really showing correctly over the Japanese text well in the first place in 2 and 3. In Subtitle1Plex, you can see that nothing is over the girl's face like it shouldn't be. In 2 and 3, you can see the Japanese text being covered appropriately. Disabling subtitles in Emby doesn't show any issue, and just shows the Japanese text that was originally drawn in the scenes appropriately. This is in a new file as well, the 6th episode of the series.
visproduction 315 Posted November 7, 2025 Posted November 7, 2025 I believe that only .ass or sup PGS graphics can change the backgrounds easily. I thought you only had a test file with .ass subtitles. FYI: You can find converters here: https://subtitletools.com/convert-sup-to-srt-online Can the .ass requesting fonts that are not available cause these results? Why are there also Japanese subtitles? They appear to be behind, so the Japanese subtitles might be burned into the media file and the overlays with .ass might be trying to mask he these burned in subtitles with new subtitles on top with a solid background. Maybe this combination only works for mobile playback and not for TV App, or the mix up mess is caused again because the fonts that will overlay correctly are not available and the TV app player substitutes a default font that has different spacing and therefore looks terrible. Ideally, find media without burned in subtitles and then add in stand alone files in .srt that work. I think you are dealing with burned in Japanese subtitles and .ass embedded files that only look good if you have the original fonts, which is probably only available on the blu-ray disk.
Solution pwhodges 2012 Posted November 13, 2025 Solution Posted November 13, 2025 In your transcoding settings, have you enable "Allow subtitle extraction on the fly"? If you have, try without. Paul 1
JathTyki 4 Posted November 14, 2025 Author Posted November 14, 2025 14 hours ago, pwhodges said: In your transcoding settings, have you enable "Allow subtitle extraction on the fly"? If you have, try without. Paul And, there we go. That was literally the issue. In the Transcoding section of the server, I had both "Allow subtitle extraction on the fly" and "Allow subtitle font extraction on the fly" enabled. I disabled both, and after doing so, the subtitles started working perfectly. No issues with them at all from what I can tell. Thank you so much, Paul!
Luke 42077 Posted November 14, 2025 Posted November 14, 2025 19 minutes ago, JathTyki said: And, there we go. That was literally the issue. In the Transcoding section of the server, I had both "Allow subtitle extraction on the fly" and "Allow subtitle font extraction on the fly" enabled. I disabled both, and after doing so, the subtitles started working perfectly. No issues with them at all from what I can tell. Thank you so much, Paul! Generally those should be enabled. It’s only if your system can’t extract on the fly quickly enough that you might want to disable them.
JathTyki 4 Posted November 14, 2025 Author Posted November 14, 2025 15 minutes ago, Luke said: Generally those should be enabled. It’s only if your system can’t extract on the fly quickly enough that you might want to disable them. Which is interesting because it's an Intel Ultra 7 265K processor. It's definitely got some power. And disabling those caused it to run without issue. I'll take a look at taking a video recording with them off / on. Do you want me to make a new thread, or just use this one?
Luke 42077 Posted November 17, 2025 Posted November 17, 2025 On 11/13/2025 at 8:10 PM, JathTyki said: Which is interesting because it's an Intel Ultra 7 265K processor. It's definitely got some power. It actually has more to do with the disk I/O performance than the CPU. So if it's a large video file, than trying to extract subs from it on the fly can be slow if the media is not on a fast drive.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now