All pastes #545759 Raw Edit

Stuff

public text v1 · immutable
#545759 ·published 2007-06-06 21:15 UTC
rendered paste body
Status: With srt subtitles, arabic is only rendered adequately (i.e. from right to left, arabic letters joined) when loaded with the video. 
.ass subtitles are not rendered correctly, whether embedded in MKV files or loaded with video. .ass arabic subs are rendered from left to right, with letters disjoint.

my .mplayer/config:

monitoraspect=16:10
ass=1
embeddedfonts=1
subcp=utf8
fontconfig=1
flip-hebrew=1
fribidi-charset=UTF-8
subfont-encoding=unicode
utf8=1

1) SubRip Subtitles (.SRT):

Conclusion: Arabic is not rendered correctly when .srt files is embedded in MKV file. (1A)
            Arabic is rendered adequately (i.e. from right to left, arabic letters joined) when file is loaded with video. (1B)

1A) MKV Embedded:

Picture: http://img260.imageshack.us/my.php?image=srtmkvax1.jpg

Command Line:  mplayer -vo gl *.mkv

Output:

MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Babel x264 eng ara sub.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[mkv] Track ID 3: subtitles (S_TEXT/UTF8), -sid 0, -slang eng
[mkv] Track ID 4: subtitles (S_TEXT/UTF8), -sid 1, -slang ara
[mkv] Will play video track 1
Matroska file format detected.
VIDEO:  [avc1]  720x480  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [scale]
Couldn't open video filter 'ass'.
ASS: cannot add video filter
[ass] Init
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.80:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> rgb32 special converter
VO: [gl] 720x480 => 864x480 BGRA 
fontconfig: selected font family is not the requested one: 'DejaVu Sans' != 'Sans'
A: 168.4 V: 168.4 A-V:  0.012 ct: -0.087 323/323 29% 21%  0.9% 0 0 
A: 169.3 V: 169.3 A-V: -0.006 ct: -0.092 345/345 28% 23%  1.0% 7 0 
A: 170.1 V: 169.9 A-V:  0.157 ct: -0.094 359/359 29% 26%  1.1% 18 0 
Exiting... (Quit)



1B) Loaded with SRT:

Picture: http://img514.imageshack.us/my.php?image=srtloadedhv7.jpg

Command Line: mplayer -vo gl *.mkv -sub *.srt

Output:

MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Babel x264 eng ara sub.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[mkv] Track ID 3: subtitles (S_TEXT/UTF8), -sid 0, -slang eng
[mkv] Track ID 4: subtitles (S_TEXT/UTF8), -sid 1, -slang ara
[mkv] Will play video track 1
Matroska file format detected.
VIDEO:  [avc1]  720x480  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
SUB: Detected subtitle file format: subviewer
SUB: Read 806 subtitles.
SUB: Adjusted 253 subtitle(s).
SUB: Added subtitle file (1): Babel arabic.srt
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [scale]
Couldn't open video filter 'ass'.
ASS: cannot add video filter
[ass] Init
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.80:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> rgb32 special converter
VO: [gl] 720x480 => 864x480 BGRA 
fontconfig: selected font family is not the requested one: 'DejaVu Sans' != 'Sans'
A: 164.9 V: 165.0 A-V: -0.014 ct: -0.115 305/305 24% 20%  0.9% 0 0 
A: 166.2 V: 166.2 A-V:  0.016 ct: -0.130 334/334 26% 17%  1.0% 6 0 
A: 167.3 V: 167.3 A-V:  0.001 ct: -0.125 362/362 28% 16%  1.0% 12 0 
A: 168.7 V: 168.7 A-V:  0.016 ct: -0.126 395/395 28% 16%  1.0% 18 0 
A: 169.5 V: 169.5 A-V:  0.042 ct: -0.128 414/414 29% 17%  1.1% 30 0 
Exiting... (Quit)



2) Advanced Substation Alpha Subtitles (ASS):

Conclusion: Arabic doesn't work with .ass files whether embedded in MKV files or loaded with video. (2A, 2B)

2A) MKV Embedded:

Picture : http://img248.imageshack.us/my.php?image=assmkvlx5.jpg

Command Line: mplayer -vo gl *.mkv

Output:

MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing [S^M] ONE PIECE 312 [HDTV] RAW.mkv.
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_MPEG/L3), -aid 0, -alang und
[mkv] Track ID 3: subtitles (S_TEXT/ASS), -sid 0, -slang und
[mkv] Will play video track 1
Matroska file format detected.
VIDEO:  [WMV3]  1280x720  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [scale]
Couldn't open video filter 'ass'.
ASS: cannot add video filter
[ass] Init
==========================================================================
Opening video decoder: [dmo] DMO video codecs
DMO dll supports VO Optimizations 0 1
DMO dll might use previous sample when requested
GetOutput r=0x0   size:2764800  align:1
StreamCount r=0x0  1  1
Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555 RGB565 RGB24 RGB32 
Decoder is capable of YUV output (flags 0x1b)
VDec: vo config request - 1280 x 720 (preferred colorspace: Packed YUY2)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> rgb32 special converter
VO: [gl] 1280x720 => 1280x720 BGRA 
Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Neither PlayResX nor PlayResY defined. Assuming 384x288.  2.2% 0 0 
A:   9.9 V:   9.9 A-V:  0.026 ct:  0.011 238/238 20% 59%  1.5% 0 0 
A:  10.6 V:  10.5 A-V:  0.143 ct:  0.009 252/252 20% 59%  1.6% 10 0 
A:  11.7 V:  11.5 A-V:  0.228 ct:  0.010 276/276 19% 59%  1.7% 29 0 
A:  12.1 V:  11.6 A-V:  0.508 ct:  0.012 280/280 20% 59%  1.7% 32 0 
A:  12.8 V:  11.8 A-V:  0.935 ct:  0.013 285/285 20% 60%  1.8% 37 0 
Exiting... (Quit)



2B) Loaded with AVI:

Picture: http://img231.imageshack.us/my.php?image=assloadedql4.jpg

command line: mplayer -vo gl *.avi -sub mod.ass 
 
MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing [S^M] ONE PIECE 312 [HDTV] RAW.avi.
AVI file format detected.
VIDEO:  [WMV3]  1280x720  24bpp  23.976 fps  2110.2 kbps (257.6 kbyte/s)
Clip info:
 Source: D-CX(D3Cap)
 Creation Date: 07/06/03
 Genre: anime
 Software: aviutl98d
SUB: Detected subtitle file format: ssa
SUB: Read 372 subtitles.
LIBASS: added subtitle file: mod.ass (9 styles, 372 events)
SUB: Added subtitle file (1): mod.ass
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [scale]
Couldn't open video filter 'ass'.
ASS: cannot add video filter
[ass] Init
==========================================================================
Opening video decoder: [dmo] DMO video codecs
DMO dll supports VO Optimizations 0 1
DMO dll might use previous sample when requested
GetOutput r=0x0   size:2764800  align:1
StreamCount r=0x0  1  1
Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555 RGB565 RGB24 RGB32 
Decoder is capable of YUV output (flags 0x1b)
VDec: vo config request - 1280 x 720 (preferred colorspace: Packed YUY2)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled yuv420p -> rgb32 special converter
VO: [gl] 1280x720 => 1280x720 BGRA 
Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Neither PlayResX nor PlayResY defined. Assuming 384x288.  
A:  12.2 V:  12.1 A-V:  0.014 ct:  0.010 292/292 20% 56%  2.4% 2 0 
A:  13.3 V:  13.2 A-V:  0.070 ct:  0.007 318/318 21% 55%  2.4% 18 0 
Exiting... (Quit)