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-7On 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! 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