Jump to content


Photo

Mediaplayer Subtitles Issue (works only with 3 leters extension)

mediaplayer subtitles extension utf-8

  • Please log in to reply
34 replies to this topic

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #21 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 28 October 2012 - 20:12

The patch also only selects a correct srt in a non standard way with non standard language code something usually will not be used a lot... (then at least start to begin to use the standard iso language tags... - and do not use a subtable....


The language code it is stored in config.autolanguage.subtitle_autoselectX in this way.

<td>Subtitle language selection 1</td>
<td>
	<select id="config.autolanguage.subtitle_autoselect1" onchange="saveConfig('config.autolanguage.subtitle_autoselect1', this.value);">
   <option value="---">Κaνένa</option>
   <option value="ara">Aρabικά</option>
   <option value="eus baq">Baσκικά</option>		  
   ...
   <option value=""tur Audio_TUR">Τούρκικa</option>
   </select>
</td>
</tr>

Is UTF-8 issue still present (havent tested for a long time?)? Enigma should also handle ANSI .srt subtitles not only UTF-8.


Yes that is the root of the problem. I have .srt files in iso-8859-7 format, and iso subtitles dont work.

Maybe someone else will came up with a better solution.

Thanks.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #22 TheMystery

  • Senior Member
  • 395 posts

+2
Neutral

Posted 29 October 2012 - 10:10

I agree with Littlesat. This wont be used alot because first you need to have multiple .srt files with different languages (i usually have only one .srt file beside video file, this scenario for sure happens in 95% of cases) and naming needs to be done correctly, otherwise enigma wont detect language. Kinda useless in my opinion.

Is UTF-8 issue still present (havent tested for a long time?)? Enigma should also handle ANSI .srt subtitles not only UTF-8.


For me it would be a nice function, i download series and subtiltes automaticaly.
Because englisch subtitles come out first these are downloaded first, but if dutch subtitles come out the next day they can be downloaded too. this is a multisub option.
If i set this option on then i have to rename te subtiles from en.srt or nl.srt to srt.
Now i have disabled this option so englisch subs are downloaded but if i haven't wached a serie and dutch subtitles came out in the mean time i must manualy download them.
And i think that more people use this, so it would be nice if it could be implemented.

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #23 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 29 October 2012 - 23:10

The following property is also interesting:

g_object_set (decodebin, "subtitle-encoding", encoding, NULL);

"subtitle-encoding"

Encoding to assume if input subtitles are not in UTF-8 encoding.
If not set, the GST_SUBTITLE_ENCODING environment variable will be checked for an encoding to use.
If that is not set either, ISO-8859-15 will be assumed.

I will try to export GST_SUBTITLE_ENCODING variable on eniga2 boot and see if non utf-8 encodings are working!


It Works! The GST_SUBTITLE_ENCODING Works!

First i did try to export GST_SUBTITLE_ENCODING.

In order to export a variable we must create a script under /etc/prodile.d, name it gst_subtitle_encoding.sh and upload it to /etc/profile.d and give read access

gst_subtitle_encoding.sh must contain the following (ISO-8859-7 is ISO Greek)

GST_SUBTITLE_ENCODING="ISO-8859-7"
export GST_SUBTITLE_ENCODING

Reboot the box and GST_SUBTITLE_ENCODING will be exported.

root@dm800se:~# set | grep GST
GST_SUBTITLE_ENCODING='ISO-8859-7'

But Enigma2, although the GST_SUBTITLE_ENCODING was exported it does not use it! This can be seen from environ file (/proc/PID_OF_ENIGMA2/environ)

root@dm800se:~# ps w | grep enigma2
  484 root	  3244 S	/bin/sh /usr/bin/enigma2.sh
  489 root	 74664 S	/usr/bin/enigma2
  567 root	  3308 S	grep enigma2
root@dm800se:~# cat /proc/489/environ | tr "\000" "\n"
CONSOLE=/dev/console
OLDPWD=/
HOME=/
INIT_VERSION=sysvinit-2.86
TERM=linux
PATH=/bin:/usr/bin:/sbin:/usr/sbin
RUNLEVEL=3
PREVLEVEL=N
LD_PRELOAD=/usr/lib/libopen.so.0.0.0
PWD=/home/root

After this i did an init 4 and manually run enigma2

root@dm800se:~# init 4
root@dm800se:~# enigma2
...
...
#From another session
root@dm800se:~# ps w | grep enigma2
  578 root	 74284 S	enigma2
  613 root	  3308 S	grep enigma2
root@dm800se:~# cat /proc/578/environ | tr '\000' '\n'
USER=root
HOME=/home/root
PS1=\u@\h:\w\$
LOGNAME=root
TERM=xterm
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
SHELL=/bin/sh
PWD=/home/root
GST_SUBTITLE_ENCODING=ISO-8859-7
EDITOR=/bin/vi

But now although the GST_SUBTITLE_ENCODING was set the subtitles didn't display correct :(

Then i though to install the package eglibc-gconv-iso8859-7

On the main session stopped the enigma2 (CTRL+C) and then installed the eglibc-gconv-iso8859-7

root@dm800se:~# opkg install eglibc-gconv-iso8859-7
root@dm800se:~# enigma2
....

And Finally Success! Επιτυχίa! Successo! Erfolgreich! :D


In order to make enigma2 read the GST_SUBTITLE_ENCODING we must change enigma2 start script (/usr/bin/enigma2.sh)

One way is to hardcode the encoding inside the script (i don't like this way).

sync
-LD_PRELOAD=$LIBS /usr/bin/enigma2
+LD_PRELOAD=$LIBS GST_SUBTITLE_ENCODING="ISO-8859-7" /usr/bin/enigma2

Another way is to include the /etc/profile (maybe better this way)

#!/bin/sh

+. /etc/profile

The perfect way would be to have GST_SUBTITLE_ENCODING set according to the user language. Need code changes. But we can discuss on this.

Have a nice day,
athoik
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #24 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 2 November 2012 - 09:40

Just my $0.02...

SRT sub files are not designed to be used in muliples, there are no language or encoding tags, so one media file one srt file, that's the design.

SRT sub files were an invention to solve the problem of the braindead avi container not supporting subtitles.

"Modern" containers like mpeg ts, mkv and mp4 have embedded subtitles and they are tagged with a language code, so you can have multiple. If you want multiple subtitle tracks for a single media file, that's really the way to go and enigma/gstreamer supports that just fine.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #25 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 2 November 2012 - 18:38

SRT sub files are not designed to be used in muliples, there are no language or encoding tags, so one media file one srt file, that's the design.


That's why developers redesign. :D

SRT sub files were an invention to solve the problem of the braindead avi container not supporting subtitles.


Also is the perfect invention to add subtitles (although container has subtitles) without the need to remux.

"Modern" containers like mpeg ts, mkv and mp4 have embedded subtitles and they are tagged with a language code, so you can have multiple. If you want multiple subtitle tracks for a single media file, that's really the way to go and enigma/gstreamer supports that just fine.


I totaly agree with you, although having more options won't hurt right?

Currently, using "single" SRT ISO subtitles is supported (always supported but nobody knew how, i am Greek and i want my ISO SRT files decoded as ISO-8859-7 not the assumed ISO-8859-15, now i can). That's enouph for me.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #26 Taykun345

  • Senior Member
  • 1,297 posts

+41
Good

Posted 26 November 2018 - 08:55

Old stuff sorry.

 

Is there some interest to fix E2 being able to display ANSI subtitles without converting to UTF-8?

I know, ANSI is not correct but every subtitle for Slovenian language is in ANSI. Podnapisi.net which is the largest site does not demand Slovenian subtitles to be in UTF-8, and now we have a problem.


Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #27 littlesat

  • PLi® Core member
  • 56,260 posts

+691
Excellent

Posted 26 November 2018 - 10:06

How do you obtain the subtitle? Via the UI? If so I suggest the ANSI file should be 'transfered' to UTF-8 after it is downloaded by the UI...

Please also note that the plugin that downloads subtitles is somehow illegal... as (in the Netherlands) the subtitles are copyright protected.


Edited by littlesat, 26 November 2018 - 10:06.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #28 Taykun345

  • Senior Member
  • 1,297 posts

+41
Good

Posted 26 November 2018 - 15:57

They usually come together with movie.


Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #29 littlesat

  • PLi® Core member
  • 56,260 posts

+691
Excellent

Posted 26 November 2018 - 16:36

When they come with the movie included in the MKV... then it is a 'pain'....


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #30 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 26 November 2018 - 18:42

And how should e2 know how the subtitles are encoded? Only way would be to add a config to change it. But then you may need to change it for every file you watch.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #31 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 26 November 2018 - 18:55

There is no such thing as "ANSI" encoding. What encoding do you mean? I bet you mean some Windows code page.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #32 Taykun345

  • Senior Member
  • 1,297 posts

+41
Good

Posted 26 November 2018 - 19:23

When they come with the movie included in the MKV... then it is a 'pain'....

 

Sorry, not in mkv but as seperate .srt file. Can I post an example?


Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #33 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 26 November 2018 - 19:29

Upload an example as sample.srt (don't mention the movie).

Also what's your language in e2 UI?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #34 littlesat

  • PLi® Core member
  • 56,260 posts

+691
Excellent

Posted 26 November 2018 - 20:14

When it is a srt it might be converted to UTF-8....


Edited by littlesat, 26 November 2018 - 20:14.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Mediaplayer Subtitles Issue (works only with 3 leters extension) #35 Taykun345

  • Senior Member
  • 1,297 posts

+41
Good

Posted 26 November 2018 - 20:42

When it is a srt it might be converted to UTF-8....

I know, but sometimes i am lazy. :)

Sent from my HTC U11 using Tapatalk
Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi



Also tagged with one or more of these keywords: mediaplayer, subtitles, extension, utf-8

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users