Troubles with showing .SRT subtitles

View previous topic View next topic Go down

Troubles with showing .SRT subtitles

Post by vramor on Wed Sep 03, 2014 7:10 am

I've got an .MKV file. There are no subtitles in it. I've got an .SRT file with the proper subtitles. When I play this pair with the last versions of MPC-HC, I can see the wrong subtitles. For example:

It takes place despite of the correct .SRT file:

In the same time, when I play the same .MKV file in which I've embedded this .SRT (with MKVToolNix), everything is OK:

It seems to me that earlier versions of MPC-HC worked correctly.

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Wed Sep 03, 2014 8:48 am

Can you give me a link to that .srt file?

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Wed Sep 03, 2014 5:58 pm

Here you are!

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Thu Sep 04, 2014 5:52 am

Here it displays the subtitles the same in MPC-HC as it does in Notepad (and other text editors). The only strange thing is that every letter c is displayed as a ñ.

I can make it display correctly if I change the code page setting.
MPC-HC options > Subtitles > Default Style > change "DEFAULT (1)" to "RUSSIAN (204)".

Behavior is the same with old versions of MPC-HC.

The problem is in how the file was created. If the creator properly saved it with UTF-8 encoding, then it would be displayed correctly with default settings.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Thu Sep 04, 2014 8:51 am

You are right, the problem is in the creator inserted Cyrillic character "с" (hexadecimal=F1) instead of Latin "c" (hexadecimal=63). MPC-HC with its default style could not read anything farther when met F1. I did the replacement and the problem disappeared. BTW all the text editors show the content of this .srt file pseudo correctly because of the images F1 and 63 are identical. But why does MPC-HC stop when run into F1 and MKVToolNix works correctly?

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Thu Sep 04, 2014 11:20 am

The file lacks a header that specifies the correct code page. So the text editor will use the system default one. That is why it shows a different character on your Russian system than on my English Windows.

MKVToolNix probably converts the text to proper UTF-8. Although I suspect it still uses the Cyrillic C.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Thu Sep 04, 2014 4:57 pm

My Windows is English as well, but Formats=Russian and Location=Russia in Control Panel >Region and Languages.

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Fri Sep 05, 2014 1:14 am

The Formats settings most likely affect the default code page.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Fri Sep 05, 2014 6:06 am

The Formats and Location settings do not play any role as well as some header. I created .srt file with two words in Latin and Cyrillic characters.


Everything's OK!


This trouble takes place only if Cyrillic "c" is placed in the middle of the word with Latin characters. This is passing with 10.6.9 and 10.7.0 KLCP versions. But! There is not this problem at all with 10.7.1 version! Thanks KLCP team!
P.S. I left the default settings for Perform preferred language configuration: Primary=Russian, Secondary=English, Tertiary=-

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Fri Sep 05, 2014 9:46 am

I am able to reproduce the square symbol now. It only happens when I use xy-VSFilter, not with the internal subtitle renderer of MPC-HC.

In addition to the character to be displayed as a square symbol, the next three characters that are supposed to follow are missing as well.

It seems to be a bug in the text parsing.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Fri Sep 05, 2014 10:12 am

This bug takes place only for 32-bit MPC 10.7.1 KLCP version as well. Everything's OK with MPC-HC64.

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Fri Sep 05, 2014 10:20 am

Only the 32-bit version of xy-VSFilter is used. Regular VSFilter is used for x64 for stability reasons.

After some more testing the problem only occurs if I save the file with ANSI/ASCII encoding. No problem when using UTF-8.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Fri Sep 05, 2014 8:05 pm

Now it would be the best to formulate the problem fairly. It seems to me the mistake appears when there are characters of two different code pages in the same word. Like Cyrillic and Latin "c" for example. Maybe it should be checked more carefully.

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Admin on Sat Sep 06, 2014 12:19 am

It will be fixed in next version.

For now, you can just save the files with UTF-8 or Unicode encoding to avoid the problem.

Admin
Admin

Posts : 2982
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Sat Sep 06, 2014 1:53 am

I tried to do it first of all. The result was "?" instead of Cyrillic "c" in the file Smile
I don't know why the creator of .srt file did it with such weird character substitution. But this replacement brings to light this problem. For me the easiest solution is to replace Cyrillic "c" by Latin "c" with Notepad (Edit > copy "c" > Ctrl-H > paste > replace with Latin "c" etc.)

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by vramor on Sun Sep 14, 2014 1:24 am

There is no such problem with KLCP 10.7.2 anymore! Thanks!

vramor

Posts : 127
Join date : 2011-07-29

View user profile

Back to top Go down

Re: Troubles with showing .SRT subtitles

Post by Sponsored content Today at 11:47 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum