Jump to content

Long pause in video playback before subtitle display


rexerm

Recommended Posts

Before the very first subtitle in a movie, video playback pauses for an inordinately long time. After that, no matter how long the gap is between subtitles, the issue does not happen for the rest of the video. This happens in both Chrome and the Samsung TV app.

Checking or unchecking "Allow subtitle extraction on the fly" in the transcoding menu doesn't seem to affect anything. This seems to be a new issue, as I previously had no troubles with the same video files with the same embedded subitltes. However, I can't say exactly when the change occurred, as it has been a while since I've watched a show that required subs.  I'm currently running 4.7.6.0.

Logs and a sample video file are here (forced BD subtitle starts at about 00:00:12):

https://mega.nz/folder/26gxEarB#Oos87XEBK27hSt0NBdHiyQ

Link to comment
Share on other sites

  • 2 weeks later...

Doing more testing, it appears that only PGSSUB subs (that is, subtitles embedded in a BD rip) are having this pause issue.  Tested movies with these types and they played fine:

DVDSUB
SUBRIP
ASS

Have you seen anything in the logs that might indicate the trouble?

Edited by rexerm
Link to comment
Share on other sites

52 minutes ago, Luke said:

Those have to be burned in with transcoding, so the delay is probably just due to the additional time that takes.

 

Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks!

 

Once again, logs and a sample video file that demonstrates the issue (forced BD subtitle starts at about 00:00:12): can be found in:

https://mega.nz/folder/26gxEarB#Oos87XEBK27hSt0NBdHiyQ

Additionally, the dashboard reports "Converting subtitles directly into video / Burning in Subtitles" for both PGSSUB and DVDSUB when playing in Chrome, for example, but only the Blu-ray rip has the delay.

Edit: also, transcoding, while generally not completely finished by the time a Blu-ray rip gets to the first subtitle, is well, well ahead of that point in the movie. Should not it have already burned the subtitle into that part?

Edited by rexerm
Link to comment
Share on other sites

I grabbed the transcoded TS files from server's temp folder, and it's looking like the pause is getting baked into the transcoded video (FFMPEG issue?).  I've uploaded the two associated TS files and the logs from when I played them into the same folder as before. I've also remuxed the TS files to MKV for better playback in VLC:

https://mega.nz/folder/26gxEarB#Oos87XEBK27hSt0NBdHiyQ

Link to comment
Share on other sites

  • 2 weeks later...

@rexerm - Thanks for the files and the explanation.

The reason why this hangs is that Emby did not know the nominal target size of the subtitle stream, and so it couldn't provide it in the command line.
As the first subtitle frame is encountered, this information becomes finally known. When hat happens, filtering needs to be re-initialized with the new information. The consequence is that some decoded frames get lost which in turn makes the video appear to be hanging for a moment.

How long did it "hang" for you? With our latest ffmpeg from the beta, it's rather short (about 0.5 seconds) - when I use the exact same command line from your log file.

But of course we do not want to reduce the "hang", we don't want any kind of hang, and that's what we get when Emby knows the subtitle size before starting the video.

In the beta, we have made changes to the probing process. I'm not sure what happens in your version, but you should either "Refresh Metadata" on the video or rename the file (like by one letter) and see whether Emby gets the subtitle size:

image.png.cd170fd6968057e2b05583279d6dd450.png

 

Link to comment
Share on other sites

rexerm

@softworkz

Thank you for taking a look, I appreciate it!  Testing just now, still on the stable release, it's near 2 seconds of frozen video before it moves on.  Neither refreshing the metadata on the video nor making a duplicate with a different name and re-scanning the library results in it finding the subtitle resolution in either copy.

Is there a way to embed the resolution into the MKV's metadata? I'm not seeing anything obvious when I throw a video into MKVtoolnix for this, but I'm certainly no expert and this may be something the command line version can do that the GUI version cannot...

Edit: or, possibly, inserting the resolution into NFO files (which I use)?

Edited by rexerm
Link to comment
Share on other sites

11 minutes ago, rexerm said:

Is there a way to embed the resolution into the MKV's metadata?

Who do you think would put the information there?

12 minutes ago, rexerm said:

or, possibly, inserting the resolution into NFO files

Again: who will put the information there?

But even more important: none of such solutions can be trusted.

Link to comment
Share on other sites

rexerm
2 hours ago, softworkz said:

Who do you think would put the information there?

Again: who will put the information there?

But even more important: none of such solutions can be trusted.

I would do it myself, of course, if it would work.  As far as I can tell, the issue only affects PGSSUBs, of which I only have a couple hundred. But, obviously, a fix from the dev team would be better than editing 200 NFO files.

Edit: Ah well, adding <width>1920</width> and <height>1080</height> to the subtitle section of the NFO file didn't stick. Library scan didn't notice it and a refresh metadata removed it. 

Edited by rexerm
Link to comment
Share on other sites

28 minutes ago, rexerm said:

I would do it myself, of course, if it would work.  As far as I can tell, the issue only affects PGSSUBs, of which I only have a couple hundred. But, obviously, a fix from the dev team would be better than editing 200 NFO files.

That's definitely Emby's job.. 😉 

Normally it should use the video size when no subtitle size is available (even though this can sometimes lead to distortions). I need to find out why it doesn't do that in your case.

Link to comment
Share on other sites

  • 4 weeks later...
On 10/4/2022 at 12:50 AM, softworkz said:

That's definitely Emby's job.. 😉 

Normally it should use the video size when no subtitle size is available (even though this can sometimes lead to distortions). I need to find out why it doesn't do that in your case.

Hi softworkz - Just checking to see if there are any updates on this?

Link to comment
Share on other sites

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