View previous topic :: View next topic |
Author |
Message |
Pryka l33t
Joined: 08 Jun 2007 Posts: 658 Location: /dev/null
|
Posted: Sat Feb 11, 2012 11:42 pm Post subject: [SOLVED]Japanese sub issue in mplayer |
|
|
Hello... At the beginning sorry for my poor English
How can I properly display Japanese subtitles in .SSA files? They are build in a .mkv container(standalone file), but I can only see bunch of squares when they are on in smplayer
PS. Firefox, text editors, etc. don't have problems with displaying Japanese.
Last edited by Pryka on Sun Feb 12, 2012 8:32 pm; edited 1 time in total |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Sun Feb 12, 2012 3:39 am Post subject: |
|
|
Teegrins!
Did some quick testing and indeed, I would not get any Hiragana show up when using mplayer or smplayer, with either mplayer or mplayer2 being used as the back-end.
However, mplayer2 does show them when used alone:
Code: | Starting playback...
A: 0.0 V: 0.0 A-V: 0.000 ct: 0.000 0/ 0 ??% ??% ??,?% 0 0
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 704x528 => 704x528 Planar YV12
A: 109.2 V: 109.2 A-V: -0.000 ct: 0.000 0/ 0 1% 2% 0.6% 0 0
[ass] Glyph 0x3066 not found, selecting one more font for (Arial, 200, 0)
[ass] fontconfig: Selected font is not the requested one: '文泉驛正黑' != 'Arial'
A: 112.3 V: 112.3 A-V: 0.000 ct: 0.000 0/ 0 1% 3% 0.5% 0 0
|
I tried playing with the ass-file a bit, changing the font but even if I change it to '文泉驛正黑' which mplayer2 seems to use there on-the-fly, mplayer does not seem to recognise it. It doesn't say anything in the terminal about it either, it just spews the subtitles out garbled.
I guess mplayer just doesn't have a suitable font for it?
Either way, for mplayer, using the -ass switch will make it use libass (which mplayer2 does by default if built with the support for it), and is thus able to render them correctly.
There are also the -utf8, -unicode, and -subfont-encoding <value> switches, but still the font needs to be changed, I'm assuming.
So something like:
Code: | mplayer videofile.mkv -fontconfig -font 'Kochi Mincho' -sub 'subtitle.ass' -subcp shift-jis |
works too.
For smplayer:
Code: | Options
Preferences
Subtitles
Encoding
Default subtitle encoding: UTH-8 (UTF-8) |
should do the trick.
The Japanese and the Chinese charsets work as well.
The 'issue' here being I guess is that smplayer (and mplayer) defaults to encoding that does not support such characters.
Just some quick thoughts.
I hope this helps~
Let us know if it doesn't. ^^ _________________ Kindest of regardses. |
|
Back to top |
|
|
Pryka l33t
Joined: 08 Jun 2007 Posts: 658 Location: /dev/null
|
Posted: Sun Feb 12, 2012 8:38 am Post subject: |
|
|
Thank U for this huge answer
I'm using mplayer+smplayer all the time so I done that trick with UTF-8 in smplayer, but with no luck still only squares...
Interesting is that smplayer under Windows is working out of the box with no changes in his configuration and default encoding. ASS is on by default.
PS. I don't try the command line because I want to do this automatic
U are trying to load a different file with subtitles "-sub 'subtitle.ass" mine are build in .mkv file(soft-subs). Dunno if this changing anything.
EDIT:
The cjk USE flag will change anything?
EDIT2:
Yep cjk don the job and im just dumb ^^
Anyway thank U Chiitoo |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Sun Feb 12, 2012 9:21 pm Post subject: |
|
|
Oh right, I did indeed forget to mention anything about the fact that I was playing with actual .ass files, instead of those within a container. Not sure if there would be a way to manipulate them like that without extracting them.
If a command-line thingy would be required to attain what you seek, I'm sure there would be a way to do it so that the required commands would be used automagically.
Glad to see you did manage to sort it out!
I think I may have been thinking too much into it as I oft do.
However, I'm a little bit puzzled as to why you would not get them to display properly at first, and without cjk.
What does
tell?
While I do have cjk enabled globally, only these packages seem to have been built with it:
Code: | * Searching for USE flag cjk ...
[IP-] [ ] app-text/poppler-0.16.7:0
[IP-] [ ] gnome-extra/gucharmap-2.32.1:0 |
Moreover only packages that depend on these are:
Code: | * These packages depend on poppler:
kde-base/okular-4.7.4 (pdf ? >=app-text/poppler-0.12.3-r3[lcms,qt4,-exceptions(-)])
media-gfx/gimp-2.6.12 (pdf ? >=app-text/poppler-0.12.3-r3[cairo])
net-print/cups-1.4.8-r1 (>=app-text/poppler-0.12.3-r3[utils])
* These packages depend on gucharmap:
app-i18n/libtomoe-gtk-0.6.0-r2 (gucharmap ? gnome-extra/gucharmap:0) |
_________________ Kindest of regardses. |
|
Back to top |
|
|
Pryka l33t
Joined: 08 Jun 2007 Posts: 658 Location: /dev/null
|
Posted: Wed Feb 15, 2012 9:05 am Post subject: |
|
|
Sorry for delay.
This is output of equery hasuse cjk
Code: | equery hasuse cjk
* Searching for USE flag cjk ...
[IP-] [ ] app-text/poppler-0.18.3:0
[IP-] [ ] dev-java/icedtea-7.2.0-r3:7
[IP-] [ ] gnome-extra/gucharmap-3.2.2:2.90
[IP-] [ ] sys-libs/slang-2.2.4:0 |
Code: | * These packages depend on poppler:
app-text/evince-3.2.1-r1 (>=app-text/poppler-0.16[cairo])
media-gfx/gimp-2.6.12 (pdf ? >=app-text/poppler-0.12.3-r3[cairo])
media-gfx/inkscape-0.48.2 (>=app-text/poppler-0.12.3-r3[cairo,xpdf-headers])
net-print/cups-1.5.2-r1 (>=app-text/poppler-0.12.3-r3[utils]) |
Code: | * These packages depend on slang:
app-editors/nano-2.3.1-r1 (slang ? sys-libs/slang)
app-misc/mc-4.8.1-r2 (slang ? >=sys-libs/slang-2)
sys-apps/util-linux-2.20.1-r1 (slang ? sys-libs/slang) |
CJK forced me to download and install couple of Jappanies fonts, probably this was it |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Wed Feb 15, 2012 1:44 pm Post subject: |
|
|
Pryka wrote: | CJK forced me to download and install couple of Jappanies fonts, probably this was it |
Aha, most likely indeed!
I should have thought of that...
It's been so long ago when I first installed my fonts, many, if not most of them, I learned of from here:
Thank you.
It was bugging me that I couldn't think of anything, heh. _________________ Kindest of regardses. |
|
Back to top |
|
|
Pryka l33t
Joined: 08 Jun 2007 Posts: 658 Location: /dev/null
|
Posted: Wed Feb 15, 2012 8:48 pm Post subject: |
|
|
Chiitoo wrote: | Thank you.
It was bugging me that I couldn't think of anything, heh. |
He, he
I should be thanking You ^^
So thx for solving this mystery with me |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Thu Feb 16, 2012 12:28 am Post subject: |
|
|
I learned new stuff, too, so thank you!
And you are most welcome.
I'm just glad I could be of help. ^^ _________________ Kindest of regardses. |
|
Back to top |
|
|
|