Opened 10 years ago

Closed 10 years ago

Last modified 4 years ago

#3165 closed defect (invalid)

Kannada language sub-titles are not rendered correctly.

Reported by: Nagesh Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: sub srt
Cc: nfxjfg@googlemail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

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 here.

./ffmpeg -y -i movie.mp4 -vf subtitles=kn.srt movie_kn.mp4

The console output of running this command is shown below.

user@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@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@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@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@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 bug around reading fonts from memory and thereby, affecting rendering.

user@dabba:~/expt$ fc-list --version
fontconfig version 2.10.93

Some additional information.

user@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@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 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 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 !

Attachments (6)

kn.srt (35.7 KB ) - added by Nagesh 10 years ago.
Kannada language subtitles file.
out.jpg (27.1 KB ) - added by Carl Eugen Hoyos 10 years ago.
temp_kn.srt (1.3 KB ) - added by Nagesh 10 years ago.
Temporary sub-title file
Selection_001.png (29.3 KB ) - added by Nagesh 10 years ago.
Image version of the text
outharfbuzz.jpg (24.8 KB ) - added by Carl Eugen Hoyos 10 years ago.
installNotes (2.4 KB ) - added by Nagesh 10 years ago.
Installation notes for libass with harfbuzz support

Download all attachments as: .zip

Change History (30)

by Nagesh, 10 years ago

Attachment: kn.srt added

Kannada language subtitles file.

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: FFmpegundetermined
Keywords: sub srt added; subtitles India utf8 removed
Version: unspecifiedgit-master

Is the problem also reproducible with the following command line?

$ ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 out.mp4

comment:2 by gjdfgh, 10 years ago

Wild guess: you have to compile libass with harfbuzz support.

in reply to:  1 ; comment:3 by Nagesh, 10 years ago

Replying to cehoyos:

Is the problem also reproducible with the following command line?

$ ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 out.mp4

How come your command does not explicitly mention the input movie file name (with the -i switch) ?

The input file is around 20 MB and with command mentioned above, the size of the output file reached around 150MB and kept growing. I killed the process because it just didn't make sense. Nevertheless, I played this output file in smplayer and the rendering problem is still there.

The duration of the video is shown to be around 57 minutes ! This is simply not correct as the original video is around 12 minutes or so.

in reply to:  1 comment:4 by Nagesh, 10 years ago

Replying to cehoyos:

Is the problem also reproducible with the following command line?

$ ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 out.mp4

Here is the console output of running the command.

user@dabba:~/expt$ ./ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 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, lavfi, from 'color=s=1280x720':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
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
Output #0, mp4, to 'movie_kn.mp4':
  Metadata:
    encoder         : Lavf55.21.100
    Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
[Parsed_subtitles_0 @ 0x3770100] Neither PlayResX nor PlayResY defined. Assuming 384x288
[Parsed_subtitles_0 @ 0x3770100] fontconfig: Selected font is not the requested one: 'Liberation Sans' != 'Arial'
[Parsed_subtitles_0 @ 0x3770100] Glyph 0xC85 not found, selecting one more font for (Arial, 80, 0)
[Parsed_subtitles_0 @ 0x3770100] fontconfig: Selected font is not the requested one: 'Lohit Kannada' != 'Arial'
frame=86282 fps=169 q=2.0 Lsize=  131662kB time=00:57:31.28 bitrate= 312.5kbits/s    
video:131295kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.279474%

in reply to:  3 ; comment:5 by Carl Eugen Hoyos, 10 years ago

Replying to nagesh:

Replying to cehoyos:

Is the problem also reproducible with the following command line?

$ ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 out.mp4

How come your command does not explicitly mention the input movie file name (with the -i switch) ?

The input is the color filter, its default colour is black.

The input file is around 20 MB and with command mentioned above, the size of the output file reached around 150MB and kept growing.

Sorry, I forgot to add -t to the command line

I killed the process because it just didn't make sense.

Pressing "q" should have been enough...

Nevertheless, I played this output file in smplayer and the rendering problem is still there.

Thank you for testing.

The duration of the video is shown to be around 57 minutes !

frame=86282 fps=169 q=2.0 Lsize=  131662kB time=00:57:31.28 bitrate= 312.5kbits/s    

You stopped the encoding after encoding time reached 57 minutes...

This is simply not correct as the original video is around 12 minutes or so.

The "original video" is not used.

in reply to:  5 comment:6 by Nagesh, 10 years ago

Replying to cehoyos:

Replying to nagesh:

Replying to cehoyos:

Is the problem also reproducible with the following command line?

$ ffmpeg -f lavfi -i color=s=1280x720 -vf subtitles=kn.srt -qscale 2 -vcodec mpeg4 out.mp4

How come your command does not explicitly mention the input movie file name (with the -i switch) ?

The input is the color filter, its default colour is black.

The input file is around 20 MB and with command mentioned above, the size of the output file reached around 150MB and kept growing.

Sorry, I forgot to add -t to the command line

I killed the process because it just didn't make sense.

Pressing "q" should have been enough...

Nevertheless, I played this output file in smplayer and the rendering problem is still there.

Thank you for testing.

The duration of the video is shown to be around 57 minutes !

frame=86282 fps=169 q=2.0 Lsize=  131662kB time=00:57:31.28 bitrate= 312.5kbits/s    

You stopped the encoding after encoding time reached 57 minutes...

This is simply not correct as the original video is around 12 minutes or so.

The "original video" is not used.

So do you want me to rerun the test.? Or is it sufficient?

comment:7 by Carl Eugen Hoyos, 10 years ago

Which font do I need to reproduce / see any subtitles?

in reply to:  7 comment:8 by Timothy Gu, 10 years ago

Replying to cehoyos:

Which font do I need to reproduce / see any subtitles?

Of course "Lohit Kannada" from original ticket. Does subtitle filter support font specification for SRT?

comment:9 by Carl Eugen Hoyos, 10 years ago

I can now see the subtitles, which frames are wrong / how are they supposed to look like?

in reply to:  9 comment:10 by Nagesh, 10 years ago

Replying to cehoyos:

I can now see the subtitles, which frames are wrong / how are they supposed to look like?

It is wrong throughout !

For example, just scroll over to 2:31 of the video and compare with sub-title number 54 in the .srt file. The 'real' line numbers in the .srt would be 213 to 215.

I am unable to upload more attachments.

comment:11 by Nagesh, 10 years ago

So is the bug confirmed? Or is some more information required?

in reply to:  11 ; comment:12 by Carl Eugen Hoyos, 10 years ago

Replying to nagesh:

So is the bug confirmed?

I hope you agree that the issue is difficult to reproduce for somebody who doesn't know the Kannada alphabet...

I tested the following and will attach the output. Does it allow to reproduce the issue? If yes, how is the output supposed to look like?

$ ffmpeg -f lavfi -i color=s=hd720 -vf subtitles=kn.srt -ss 2 -vframes 1 out.jpg
Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

by Carl Eugen Hoyos, 10 years ago

Attachment: out.jpg added

by Nagesh, 10 years ago

Attachment: temp_kn.srt added

Temporary sub-title file

in reply to:  12 comment:13 by Nagesh, 10 years ago

Replying to cehoyos:

Replying to nagesh:

So is the bug confirmed?

I hope you agree that the issue is difficult to reproduce for somebody who doesn't know the Kannada alphabet...

Agreed.

I tested the following and will attach the output. Does it allow to reproduce the issue? If yes, how is the output supposed to look like?

$ ffmpeg -f lavfi -i color=s=hd720 -vf subtitles=kn.srt -ss 2 -vframes 1 out.jpg

It is supposed to look like this:

ಅನೇಕ ವೀಡಿಯೊಗಳ ಮೇಲೆ ಈಗ ನಾವು ಪ್ರತಿ ಅಂತರತಾರಾ ವಸ್ತುವಾಗಿದೆ ಬಗ್ಗೆ ಮಾತಾಡುತ್ತಿದ್ದಾರೆ ಬಂದಿದೆ

We can simplify this as follows. I have attached a 'dummy' srt file that has just one word - ನಾಗೇಶ್ - my name in Kannada language. This srt is 1:10 long. This srt could be added to the raw video to see output and compared.

comment:14 by gjdfgh, 10 years ago

nagesh, why are you assuming most people's browsers can render this correctly?

And did you try compiling with harfbuzz yet?

comment:15 by gjdfgh, 10 years ago

Cc: nfxjfg@googlemail.com added

by Nagesh, 10 years ago

Attachment: Selection_001.png added

Image version of the text

in reply to:  14 comment:16 by Nagesh, 10 years ago

Replying to gjdfgh:

nagesh, why are you assuming most people's browsers can render this correctly?

I am not. That is why the first post in this ticket has an image uploaded. Anyway, I have uploaded an image format so that it is clearer.

And did you try compiling with harfbuzz yet?

I do not recall seeing an instruction in FFmpeg documentation that mentions the need for this compilation for Indian languages. Is it confirmed that harfbuzz is required ?

comment:17 by gjdfgh, 10 years ago

I do not recall seeing an instruction in FFmpeg documentation that mentions the need for this compilation for Indian languages.

Why would the FFmpeg documentation care about this? libass is a third-party library, and libass itself does indeed make clear that harfbuzz is required for scripts which require complex text layout.

Is it confirmed that harfbuzz is required ?

I don't know. Try it.

by Carl Eugen Hoyos, 10 years ago

Attachment: outharfbuzz.jpg added

comment:18 by Carl Eugen Hoyos, 10 years ago

Reproduced by developer: set
Resolution: invalid
Status: newclosed

I can confirm that using harfbuzz in libass fixes this issue, output attached.

in reply to:  18 ; comment:19 by Nagesh, 10 years ago

Replying to cehoyos:

I can confirm that using harfbuzz in libass fixes this issue, output attached.

This is terrific news ! Many thanks !!

One last question. Were you required to do anything 'special' while compiling libass with harfbuzz ? The reason I am asking is, I would like to create an automated script so that the latest FFmpeg source can be easily compiled with a current version of libass and harfbuzz.

in reply to:  19 comment:20 by Carl Eugen Hoyos, 10 years ago

Replying to nagesh:

One last question. Were you required to do anything 'special' while compiling libass with harfbuzz ?

Yes, I had to install harfbuzz before compiling libass.

The reason I am asking is, I would like to create an automated script so that the latest FFmpeg source can be easily compiled with a current version of libass and harfbuzz.

I would suggest you get in touch with the various people who already provide such binaries.

comment:21 by Nagesh, 10 years ago

Ok. Thanks a lot!

by Nagesh, 10 years ago

Attachment: installNotes added

Installation notes for libass with harfbuzz support

comment:22 by Nagesh, 10 years ago

I am also able to confirm that, with harfbuzz support in libass, I am able to see the rendering correctly. I have attached my 'notes' when trying to add this support. These notes are an extension of the Ubuntu compilation guide in the wiki. Just in case, some one else is interested in replicating the same.

Once again, many thanks for your help !

comment:23 by 0x42h, 4 years ago

Hello everybody. Why isn't harfbuzz the default then, with libass? I suppose I'm going to have to ask that question at libass, don't I?

Last edited 4 years ago by 0x42h (previous) (diff)

comment:24 by Cigaes, 4 years ago

FFmpeg's policy is to not enable external non-system libraries by default.

But in this particular case, it is not FFmpeg's fault, ask the people who distributed your version of libass.

But there is a very good reason for libass to lack harfbuzz: if harfbuzz was not present when libass was built, libass could not invent it.

Note: See TracTickets for help on using tickets.