Jump to content

Bug Report - Incorrect Subtitle Language Selection during Transcoding in Emby


Recommended Posts

jacksen168
Posted

Subject: Bug Report - Incorrect Subtitle Language Selection during Transcoding in Emby

 

Dear Emby Team,

I am writing to report a bug I encountered while using Emby. When transcoding a HEVC MKV file with multiple language subtitles (including Simplified Chinese and Traditional Chinese) into an AVC MP4 format on the Emby server, the extracted subtitle is not in my preferred language. I prefer Simplified Chinese, but after transcoding, only Traditional Chinese is provided.

This issue affects my viewing experience, and I believe it would be beneficial to have the option to select the desired subtitle language during the transcoding process.

Thank you for your attention to this matter. I look forward to a resolution in future updates.

 

server log and ffmpeg log is here.

Check the log, Both Chinese Simplified Chinese subtitles and Chinese Traditional Chinese subtitles seem to be named chi.vtt, and I think that's why.

 

 

Best regards,

jacksen168

 

 

 

 

 

 

 

Original (Chinese):

 

主题:错误报告 - Emby 转码期间字幕语言选择不正确

 

我写信是为了报告我在使用 Emby 时遇到的一个问题。当在 Emby 服务器上将内封有多国语言字幕(包括简体中文和繁体中文)的 HEVC MKV 文件转码为 AVC MP4 格式时,提取出来的字幕不是我喜欢的语言。我更喜欢简体中文,但转码后只提供了繁体中文。

这个问题影响了我的观看体验,我认为在转码过程中增加选择所需字幕语言的选项会很有帮助。

感谢您对此事的关注。我期待在未来的更新中能解决这个问题。

日志在这里,检查日志。貌似简体中文和繁体中文都被命名为了chi.vtt,我觉得这可能就是原因。

embyserver.txt ffmpeg-transcode-90618fd4-b8a5-465c-9f4b-7a1cd8018d59_1.txt

Posted

Hi, how are the language codes embedded into the tracks?

jacksen168
Posted
15 minutes ago, Luke said:

Hi, how are the language codes embedded into the tracks?

@Luke

don't understand what you are talking about. I think as long as MKV video contains simplified Chinese subtitle and traditional Chinese subtitle, both vtt and ass can easily reproduce the problem. I have encountered two subtitles before, both of which were named xxx.chi.ass

Posted

 How does ffmpeg interpret their language codes?

 How do the languages look prior to conversion?

jacksen168
Posted
8 minutes ago, Luke said:

 How does ffmpeg interpret their language codes?

 How do the languages look prior to conversion?

@Luke Thank you for your reply.

I don't think this might be related to FFmpeg. The relevant logs are in the embyserver.txt file. Before the conversion, the MKV video file had Simplified Chinese subtitles (chs) and Traditional Chinese subtitles (cht) embedded in it. After checking the logs, it was found that both were correctly extracted to the cache folder. However, when they were copied, both subtitles were named with the same file name (xxx.chi.vtt), which caused the previous Simplified Chinese subtitles to be overwritten by the later Traditional Chinese subtitles, leaving only one set of Traditional Chinese subtitles in the end.

embyserver.txt

Posted

Hi, actually it is correct to extract both.

 It’s supposed to save the file though using the two character language code though rather than three.

so that might be the issue but it still could come down to how the languages are tagged in the file.

 The server has to first be aware of the language of each track before it can put them in the right place.

jacksen168
Posted
52 minutes ago, Luke said:

Hi, actually it is correct to extract both.

 It’s supposed to save the file though using the two character language code though rather than three.

so that might be the issue but it still could come down to how the languages are tagged in the file.

 The server has to first be aware of the language of each track before it can put them in the right place.

@LukeThank you again for your reply.

Both subtitles are named "Chinese" in the video:

Track 1 - [Chinese]

Track 2 - [Chinese]

Although I don't know whether you will make modifications for this problem or not, I think that even if the two subtitles have the same name, there shouldn't be only one left when they are copied. There must be a reason for the existence of two subtitles in the same language in the video, so I hope that they can exist simultaneously.

Only in this way can the problem of stuttering during my playback be solved. My device supports playing HEVC H265 videos, but the playback is very stuttering. It seems that the Emby APP can't use the real-time transcoding function while the device supports the HEVC decoder. The original HEVC 2mbps can only be transcoded into a lower bit rate to trigger the real-time transcoding conditions.

I hope again that it can be set through the APP that this device doesn't use its own decoder.

Posted

Can you run the video through ffprobe to see what it reports as the language codes?

jacksen168
Posted (edited)
31 minutes ago, Luke said:

Can you run the video through ffprobe to see what it reports as the language codes?

@Luke

This one?

Screenshot_20250109_103153.thumb.jpg.ac99038a6a19967da405117ae5273739.jpg

It has nothing to do with this. Even if the video is shown as in Figure 2:

Screenshot_20250109_104902.thumb.jpg.a0fc280cbe23c22f532b21ef55ae62d2.jpg
If the language codes of the two subtitles are different, only one xxx.chi.vtt will be left in the end for the two subtitles.
I think that even if the language codes of the two subtitles are the same, there shouldn't be just one left when they are extracted and copied. Obviously, as shown in the log, the first subtitle was overwritten by the second one. Could the second subtitle be named something like xxx.chi.2.vtt or xxx.chi2.vtt?

Edited by jacksen168
Posted

We're talking about two different things. If you want the server to be able to tell the difference between the different variations of Chinese then please answer the questions that I'm asking (or try to).

Quote

Could the second subtitle be named something like xxx.chi.2.vtt or xxx.chi2.vtt?

This is the second thing and it's currently an open issue. The conversion process will currently only do one per language code.

jacksen168
Posted (edited)
17 minutes ago, Luke said:

We're talking about two different things. If you want the server to be able to tell the difference between the different variations of Chinese then please answer the questions that I'm asking (or try to).

This is the second thing and it's currently an open issue. The conversion process will currently only do one per language code.

@Luke

Screenshot_20250109_104902.thumb.jpg.439d51bba077fbe32376524a90894e51.jpgOK,I tested the second video, but there was still only one subtitle left in my folder after the conversion.

embyserver.txt

After checking the log, I found that the server still extracted both subtitles into the cache folder, but when copying them, the server still named the two subtitles with the same name.

Edited by jacksen168
Posted

OK I"m not positive but I think this is improved on the 4.9 beta channel.

jacksen168
Posted (edited)
37 minutes ago, Luke said:

OK I"m not positive but I think this is improved on the 4.9 beta channel.

@Luke

Okay, thank you for taking my suggestions.

Excuse me, when there are multiple subtitles in the same language/language code in a video, can all the subtitles be retained after the transcoding is completed? Could this suggestion also be added to future versions?

Edited by jacksen168
Posted
8 minutes ago, jacksen168 said:

@Luke

 

Excuse me, when there are multiple subtitles in the same language/language code in a video, can all the subtitles be retained after the transcoding is completed? Could this suggestion also be added to future versions?

Hi, yes this is an open issue that we will be looking at. Thanks.

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