[FFmpeg-trac] #3165(FFmpeg:new): Kannada language sub-titles are not rendered correctly.

FFmpeg trac at avcodec.org
Sun Nov 24 20:03:38 CET 2013


#3165: Kannada language sub-titles are not rendered correctly.
-------------------------------------+-------------------------------------
             Reporter:  nagesh       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  FFmpeg       |                  Version:
             Keywords:  subtitles,   |  unspecified
  India, utf8                        |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Ubuntu 13.10, 64-bit.

 I have a mp4 movie file and .srt sub-titles file in Kannada language. My
 intention is to merge them into an output mp4 file that could be then
 burnt to a DVD. The output mp4 file does show the sub-titles but the
 rendering is wrong. That is, the conjugation of vowels and consonants are
 not rendered the way as seen in the sub-titles file.

 To transcode mp4 and srt files into mp4 file, I ran this command as
 described
 [[https://its.ffmpeg.org/wiki/How%20to%20burn%20subtitles%20into%20the%20video|here]].
 {{{
 ./ffmpeg -y -i movie.mp4 -vf subtitles=kn.srt movie_kn.mp4
 }}}
 The console output of running this command is shown below.
 {{{
 user at dabba:~/expt$ ./ffmpeg -y -i movie.mp4 -vf subtitles=kn.srt -codec:v
 libx264 -crf 23 -preset medium -codec:a copy movie_kn.mp4
 ffmpeg version N-58311-gf0f75df Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Nov 21 2013 05:33:07 with gcc 4.6 (Debian 4.6.3-1)
   configuration: --prefix=/root/ffmpeg-static/64bit --extra-
 cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-
 ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2
 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver
 --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-
 runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora
 --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass
 --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-
 libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
   libavutil      52. 53.100 / 52. 53.100
   libavcodec     55. 44.100 / 55. 44.100
   libavformat    55. 21.100 / 55. 21.100
   libavdevice    55.  5.100 / 55.  5.100
   libavfilter     3. 91.100 /  3. 91.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2010-11-23 20:08:54
   Duration: 00:11:11.60, start: 0.000000, bitrate: 244 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x720 [SAR 1:1 DAR 16:9], 163 kb/s, 15 fps, 15 tbr, 1k tbn, 30 tbc
 (default)
     Metadata:
       creation_time   : 1970-01-01 00:00:00
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono,
 fltp, 75 kb/s (default)
     Metadata:
       creation_time   : 2010-11-23 20:08:57
       handler_name    : (C) 2007 Google Inc. v08.13.2007.
 Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
 non-double matrix element
 Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
 non-double matrix element
 Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line
 78: saw unknown, expected number
 [libx264 @ 0x3f17500] using SAR=1/1
 [libx264 @ 0x3f17500] using cpu capabilities: MMX2 SSE2Fast SSSE3
 FastShuffle SSE4.2 AVX
 [libx264 @ 0x3f17500] profile High, level 3.1
 [libx264 @ 0x3f17500] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC
 codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options:
 cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to 'movie_kn.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     encoder         : Lavf55.21.100
     Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
 yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 15360 tbn, 15 tbc (default)
     Metadata:
       creation_time   : 1970-01-01 00:00:00
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, mono,
 75 kb/s (default)
     Metadata:
       creation_time   : 2010-11-23 20:08:57
       handler_name    : (C) 2007 Google Inc. v08.13.2007.
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> libx264)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [Parsed_subtitles_0 @ 0x3f7bf60] Neither PlayResX nor PlayResY defined.
 Assuming 384x288
 [Parsed_subtitles_0 @ 0x3f7bf60] fontconfig: Selected font is not the
 requested one: 'Liberation Sans' != 'Arial'
 [Parsed_subtitles_0 @ 0x3f7bf60] Glyph 0xC85 not found, selecting one more
 font for (Arial, 80, 0)
 [Parsed_subtitles_0 @ 0x3f7bf60] fontconfig: Selected font is not the
 requested one: 'Lohit Kannada' != 'Arial'
 frame=10074 fps=148 q=-1.0 Lsize=   11250kB time=00:11:11.54 bitrate=
 137.2kbits/s
 video:4507kB audio:6228kB subtitle:0 global headers:0kB muxing overhead
 4.803402%
 [libx264 @ 0x3f17500] frame I:51    Avg QP:14.85  size: 39167
 [libx264 @ 0x3f17500] frame P:2730  Avg QP:18.45  size:   626
 [libx264 @ 0x3f17500] frame B:7293  Avg QP:19.14  size:   125
 [libx264 @ 0x3f17500] consecutive B-frames:  3.2%  0.4%  1.0% 95.4%
 [libx264 @ 0x3f17500] mb I  I16..4: 86.2%  0.9% 12.9%
 [libx264 @ 0x3f17500] mb P  I16..4:  0.1%  0.0%  0.2%  P16..4:  0.2%  0.0%
 0.0%  0.0%  0.0%    skip:99.4%
 [libx264 @ 0x3f17500] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  0.7%  0.0%
 0.0%  direct: 0.0%  skip:99.1%  L0:61.4% L1:38.4% BI: 0.2%
 [libx264 @ 0x3f17500] 8x8 transform intra:3.4% inter:5.3%
 [libx264 @ 0x3f17500] coded y,uvDC,uvAC intra: 11.2% 8.9% 8.3% inter: 0.0%
 0.0% 0.0%
 [libx264 @ 0x3f17500] i16 v,h,dc,p: 93%  5%  3%  0%
 [libx264 @ 0x3f17500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7%  5% 85%  1%  0%
 0%  1%  0%  1%
 [libx264 @ 0x3f17500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 22% 26%  3%  4%
 4%  4%  3%  5%
 [libx264 @ 0x3f17500] i8c dc,h,v,p: 89%  7%  4%  0%
 [libx264 @ 0x3f17500] Weighted P-Frames: Y:0.1% UV:0.0%
 [libx264 @ 0x3f17500] ref P L0: 76.0%  3.5% 14.9%  5.6%  0.0%
 [libx264 @ 0x3f17500] ref B L0: 53.9% 42.1%  4.0%
 [libx264 @ 0x3f17500] ref B L1: 97.0%  3.0%
 [libx264 @ 0x3f17500] kb/s:54.97
 }}}

 While following up on this error, I was asked a couple of questions and
 came across couple of hints too. I am mentioning them here just so that
 some of the possibilities are 'covered'.

 The .srt file is utf-8.
 {{{
 user at dabba:~/expt$ file -i kn.srt
 kn.srt: text/plain; charset=utf-8
 }}}

 The file is correctly rendered in gEdit even after selecting language
 specific font type, Lohit Kannada. This font is available.
 {{{
 user at dabba:~/expt$ fc-list | grep Kannada
 /usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf: Lohit
 Kannada:style=Regular
 }}}

 The coverage of this font is complete.
 {{{
 user at dabba:~/expt$ fc-validate -l kan /usr/share/fonts/truetype/ttf-
 kannada-fonts/lohit_kn.ttf
 /usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf:0 Satisfy the
 coverage for kan language
 user at dabba:~/expt$ fc-validate -l kn /usr/share/fonts/truetype/ttf-
 kannada-fonts/lohit_kn.ttf
 /usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf:0 Satisfy the
 coverage for kn language
 }}}

 The version of fontconfig is greater than 2.10.92. This version was
 considered to have a [[https://github.com/mpv-player/mpv/issues/63|bug]]
 around reading fonts from memory and thereby, affecting rendering.
 {{{
 user at dabba:~/expt$ fc-list --version
 fontconfig version 2.10.93
 }}}

 Some additional information.

 {{{
 user at dabba:~/expt$ ldd $(which ffmpeg)
         linux-vdso.so.1 =>  (0x00007fff62dfe000)
         libavdevice.so.53 => /usr/lib/x86_64-linux-gnu/libavdevice.so.53
 (0x00007f63c26b1000)
         libavfilter.so.2 => /usr/lib/x86_64-linux-gnu/libavfilter.so.2
 (0x00007f63c2420000)
         libavformat.so.53 => /usr/lib/x86_64-linux-gnu/libavformat.so.53
 (0x00007f63c2100000)
         libavcodec.so.53 => /usr/lib/x86_64-linux-gnu/libavcodec.so.53
 (0x00007f63c1309000)
         libpostproc.so.52 => /usr/lib/x86_64-linux-gnu/libpostproc.so.52
 (0x00007f63c10ef000)
         libswresample.so.0 => /usr/lib/x86_64-linux-gnu/libswresample.so.0
 (0x00007f63c0ee4000)
         libswscale.so.2 => /usr/lib/x86_64-linux-gnu/libswscale.so.2
 (0x00007f63c0c9d000)
         libavutil.so.51 => /usr/lib/x86_64-linux-gnu/libavutil.so.51
 (0x00007f63c0a79000)
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f63c0774000)
         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
 (0x00007f63c0557000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f63c018f000)
         libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6
 (0x00007f63bfe59000)
         libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6
 (0x00007f63bfc47000)
         libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3
 (0x00007f63bfa41000)
         libcdio_paranoia.so.1 => /usr/lib/libcdio_paranoia.so.1
 (0x00007f63bf838000)
         libcdio_cdda.so.1 => /usr/lib/libcdio_cdda.so.1
 (0x00007f63bf630000)
         libjack.so.0 => /usr/lib/x86_64-linux-gnu/libjack.so.0
 (0x00007f63bf3d7000)
         libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2
 (0x00007f63bf0e6000)
         libSDL-1.2.so.0 => /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
 (0x00007f63bee4f000)
         libpulse-simple.so.0 => /usr/lib/x86_64-linux-gnu/libpulse-
 simple.so.0 (0x00007f63bec4b000)
         libpulse.so.0 => /usr/lib/x86_64-linux-gnu/libpulse.so.0
 (0x00007f63bea01000)
         libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22
 (0x00007f63be78d000)
         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
 (0x00007f63be589000)
         libopencv_core.so.2.4 => /usr/lib/libopencv_core.so.2.4
 (0x00007f63be160000)
         libopencv_imgproc.so.2.4 => /usr/lib/libopencv_imgproc.so.2.4
 (0x00007f63bdcba000)
         libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
 (0x00007f63bda18000)
         librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0
 (0x00007f63bd7fd000)
         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f63bd5e4000)
         libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26
 (0x00007f63bd326000)
         libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0
 (0x00007f63bd115000)
         libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1
 (0x00007f63bceff000)
         libx264.so.123 => /usr/lib/x86_64-linux-gnu/libx264.so.123
 (0x00007f63bcb9a000)
         libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1
 (0x00007f63bc905000)
         libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2
 (0x00007f63bc436000)
         libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0
 (0x00007f63bc209000)
         libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1
 (0x00007f63bbfc7000)
         libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1
 (0x00007f63bbdab000)
         libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1
 (0x00007f63bbb92000)
         libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-
 gnu/libschroedinger-1.0.so.0 (0x00007f63bb8c3000)
         libopenjpeg.so.2 => /usr/lib/x86_64-linux-gnu/libopenjpeg.so.2
 (0x00007f63bb6a1000)
         libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0
 (0x00007f63bb414000)
         libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1
 (0x00007f63bb205000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f63c28dc000)
         libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1
 (0x00007f63bafe7000)
         libcdio.so.13 => /usr/lib/libcdio.so.13 (0x00007f63badc0000)
         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
 (0x00007f63babb8000)
         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 (0x00007f63ba8b4000)
         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
 (0x00007f63ba69d000)
         libcaca.so.0 => /usr/lib/x86_64-linux-gnu/libcaca.so.0
 (0x00007f63ba3d0000)
         libpulsecommon-4.0.so => /usr/lib/x86_64-linux-
 gnu/pulseaudio/libpulsecommon-4.0.so (0x00007f63ba168000)
         libjson-c.so.2 => /lib/x86_64-linux-gnu/libjson-c.so.2
 (0x00007f63b9f5e000)
         libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3
 (0x00007f63b9d19000)
         libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11
 (0x00007f63b9b0a000)
         libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0
 (0x00007f63b98f4000)
         libtbb.so.2 => /usr/lib/libtbb.so.2 (0x00007f63b96c0000)
         libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11
 (0x00007f63b9441000)
         libtasn1.so.3 => /usr/lib/x86_64-linux-gnu/libtasn1.so.3
 (0x00007f63b9230000)
         libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
 (0x00007f63b900f000)
         libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0
 (0x00007f63b8e06000)
         liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0
 (0x00007f63b8b87000)
         libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
 (0x00007f63b8982000)
         libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
 (0x00007f63b877c000)
         libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2
 (0x00007f63b83ec000)
         libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5
 (0x00007f63b81b7000)
         libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
 (0x00007f63b7f8e000)
         libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0
 (0x00007f63b7d84000)
         libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1
 (0x00007f63b7b1b000)
         libasyncns.so.0 => /usr/lib/x86_64-linux-gnu/libasyncns.so.0
 (0x00007f63b7915000)
         libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1
 (0x00007f63b7704000)
         libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0
 (0x00007f63b74fe000)
         libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1
 (0x00007f63b72e4000)
         libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8
 (0x00007f63b70b2000)
         libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
 (0x00007f63b6e98000)
 }}}

 {{{
 user at dabba:~/expt$ ldd $(which fc-list)
         linux-vdso.so.1 =>  (0x00007fff83ffe000)
         libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
 (0x00007f02a59eb000)
         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
 (0x00007f02a57ce000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f02a5405000)
         libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
 (0x00007f02a5163000)
         libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
 (0x00007f02a4f39000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f02a5c3d000)
         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f02a4d1f000)
 }}}

 If you would like to test at your end, the video is on
 [[http://www.youtube.com/watch/?v=1V9wVmO0Tfg|YouTube]] and the .srt has
 been attached here. I did not upload the file because of its size and
 because of the fact that it may mess up the synchronisation between the
 video and timestamps in the sub-titles file.

 Thanks to FakeOutdoorsman and SeijeiSensei for
 [[http://ubuntuforums.org/showthread.php?t=2130696|helping me]] get this
 far.

 Please let me know how to get around this problem. It would be terribly
 disappointing to abandon my non-profit work !

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3165>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list