[FFmpeg-trac] #8301(ffmpeg:reopened): Burning in Thai subtitles has errors
FFmpeg
trac at avcodec.org
Fri Oct 18 12:41:38 EEST 2019
#8301: Burning in Thai subtitles has errors
-------------------------------------+-------------------------------------
Reporter: 0x42h | Owner:
Type: defect | Status: reopened
Priority: normal | Component: ffmpeg
Version: unspecified | Resolution:
Keywords: thai, | Blocked By:
subtitles, burn in, fails |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by 0x42h):
* keywords: => thai, subtitles, burn in, fails
* resolution: needs_more_info =>
* status: closed => reopened
* component: undetermined => ffmpeg
Comment:
When burning in subtitles with -vf subtitles=sub.srt that is in the Thai
language, the subtitle renderer fails to correct accent the right symbols.
As per example: this:
"คนขี้เกียจทำไม่ได้
รับความช่วยเหลือ (ตัวเอง)"
Comes out as:
[[Image(https://damngood.one/burnfail.png)]]
SRT used is:
{{{
1
00:00:00,000 --> 00:03:10,422
คนขี้เกียจทำไม่ได้
รับความช่วยเหลือ (ตัวเอง)
}}}
Simple command to reproduce:
{{{
ffmpeg -y -f lavfi -i color=c=black:s=320x240:d=5 -c:v h264 -vf
subtitles=sub.srt output.mp4
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-
avresample --cc=clang --host-
cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin'
--host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-
libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-
librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype
--enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex
--enable-videotoolbox --disable-libjack --disable-indev=jack --enable-
libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, lavfi, from 'color=c=black:s=320x240:d=5':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[Parsed_subtitles_0 @ 0x7f96a552ee80] Shaper: FriBidi 1.0.5 (SIMPLE)
HarfBuzz-ng 2.5.3 (COMPLEX)
[Parsed_subtitles_0 @ 0x7f96a552ee80] Using font provider coretext
[Parsed_subtitles_0 @ 0x7f96a552ee80] fontselect: (Arial, 400, 0) ->
/Library/Fonts/Arial.ttf, -1, ArialMT
[Parsed_subtitles_0 @ 0x7f96a552ee80] Glyph 0xE04 not found, selecting one
more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x7f96a552ee80] fontselect: (Arial, 400, 0) ->
/System/Library/Fonts/Thonburi.ttc, -1, Thonburi
[libx264 @ 0x7f96a580e600] using SAR=1/1
[libx264 @ 0x7f96a580e600] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f96a580e600] profile High, level 1.3
[libx264 @ 0x7f96a580e600] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2018 - 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=7
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=25
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 'output.mp4':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.35.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[Parsed_color_0 @ 0x7f96a552a600] EOF timestamp not reliable
frame= 125 fps=0.0 q=-1.0 Lsize= 7kB time=00:00:04.88 bitrate=
11.4kbits/s speed=42.7x
video:5kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 50.898075%
[libx264 @ 0x7f96a580e600] frame I:1 Avg QP:11.29 size: 1854
[libx264 @ 0x7f96a580e600] frame P:31 Avg QP: 9.24 size: 23
[libx264 @ 0x7f96a580e600] frame B:93 Avg QP:12.67 size: 15
[libx264 @ 0x7f96a580e600] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x7f96a580e600] mb I I16..4: 82.3% 8.7% 9.0%
[libx264 @ 0x7f96a580e600] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0%
0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x7f96a580e600] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0%
0.0% 0.0% direct: 0.0% skip:100.0%
[libx264 @ 0x7f96a580e600] 8x8 transform intra:8.7% inter:0.0%
[libx264 @ 0x7f96a580e600] coded y,uvDC,uvAC intra: 5.2% 0.0% 0.0% inter:
0.0% 0.0% 0.0%
[libx264 @ 0x7f96a580e600] i16 v,h,dc,p: 92% 0% 8% 0%
[libx264 @ 0x7f96a580e600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 0% 62% 0%
0% 0% 0% 0% 0%
[libx264 @ 0x7f96a580e600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 27% 36% 2%
2% 3% 5% 2% 5%
[libx264 @ 0x7f96a580e600] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x7f96a580e600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f96a580e600] kb/s:6.29
}}}
Did I forget something? Please don't hesitate to request me for more info
in the same manner you would like me to kindly supply with the most
informed information. (also) Thank you (for your help), brother or sister
(although the latter still rare in this field)! :)
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8301#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list