taniey

ffmpeg drawtext use font parameter

Sep 2nd, 2015
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ask a drawtext filters question.
  2. I import windows fonts to linux ,and draw text on video.
  3. The text file drawtext.txt content is encoded by utf-8 no bom , the content of the textfile contain :Arabic ,Chinese, English, Korean and Japanese and etc.
  4. When I play the result , only the Arabic and English can display normally, other text only display with some squares symbol.
  5.  
  6. ./ffmpeg -y -i /data/mediadata/source/Fast.\&.Furious.7.2015.HD720P.X264.AAC.English.CHS.Mp4Ba.mp4 -filter_complex "drawtext=font=Arial:fontcolor=00ffff:x=100:y=250:textfile=drawtext.txt:fontsize=48" -t 00:02:00 out.mp4
  7. ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  8. built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
  9. configuration: --enable-gnutls --enable-fontconfig --enable-libass --enable-frei0r --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libfaac --enable-libnut --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-gray --disable-shared --extra-libs= --extra-cflags=-I/usr/local/ssl/include --extra-ldflags=-L/usr/local/ssl/lib --pkg-config-flags=--static
  10. libavutil 54. 27.100 / 54. 27.100
  11. libavcodec 56. 41.100 / 56. 41.100
  12. libavformat 56. 36.100 / 56. 36.100
  13. libavdevice 56. 4.100 / 56. 4.100
  14. libavfilter 5. 16.101 / 5. 16.101
  15. libswscale 3. 1.101 / 3. 1.101
  16. libswresample 1. 2.100 / 1. 2.100
  17. libpostproc 53. 3.100 / 53. 3.100
  18. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/mediadata/source/Fast.&.Furious.7.2015.HD720P.X264.AAC.English.CHS.Mp4Ba.mp4':
  19. Metadata:
  20. major_brand : isom
  21. minor_version : 1
  22. compatible_brands: isomavc1
  23. creation_time : 2015-05-10 11:21:22
  24. Duration: 02:17:13.07, start: 0.000000, bitrate: 2971 kb/s
  25. Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2775 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
  26. Metadata:
  27. creation_time : 2015-05-10 11:21:22
  28. handler_name : GPAC ISO Video Handler
  29. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
  30. Metadata:
  31. creation_time : 2015-05-10 11:23:06
  32. handler_name : GPAC ISO Audio Handler
  33. [Parsed_drawtext_0 @ 0x33b0400] Could not load font "(null)": invalid argument
  34. Fontconfig error: Cannot load default config file
  35. [Parsed_drawtext_0 @ 0x33b0400] Using "/usr/share/fonts/win-fonts/arial.ttf"
  36. [libx264 @ 0x373f5c0] using SAR=1/1
  37. [libx264 @ 0x373f5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
  38. [libx264 @ 0x373f5c0] profile High, level 3.1
  39. [libx264 @ 0x373f5c0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=12 lookahead_threads=2 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=23 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
  40. Output #0, mp4, to 'out.mp4':
  41. Metadata:
  42. major_brand : isom
  43. minor_version : 1
  44. compatible_brands: isomavc1
  45. encoder : Lavf56.36.100
  46. Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc (default)
  47. Metadata:
  48. encoder : Lavc56.41.100 libx264
  49. Stream #0:1(und): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s (default)
  50. Metadata:
  51. creation_time : 2015-05-10 11:23:06
  52. handler_name : GPAC ISO Audio Handler
  53. encoder : Lavc56.41.100 libfaac
  54. Stream mapping:
  55. Stream #0:0 (h264) -> drawtext (graph 0)
  56. drawtext (graph 0) -> Stream #0:0 (libx264)
  57. Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
  58. Press [q] to stop, [?] for help
  59. frame= 2878 fps= 92 q=-1.0 Lsize= 20023kB time=00:02:00.00 bitrate=1366.9kbits/s dup=2 drop=0
  60. video:18070kB audio:1875kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.393551%
  61. [libx264 @ 0x373f5c0] frame I:14 Avg QP:16.29 size: 45914
  62. [libx264 @ 0x373f5c0] frame P:1338 Avg QP:21.18 size: 10968
  63. [libx264 @ 0x373f5c0] frame B:1526 Avg QP:21.86 size: 2087
  64. [libx264 @ 0x373f5c0] consecutive B-frames: 21.4% 22.2% 4.3% 52.1%
  65. [libx264 @ 0x373f5c0] mb I I16..4: 36.8% 46.5% 16.6%
  66. [libx264 @ 0x373f5c0] mb P I16..4: 5.1% 9.1% 0.8% P16..4: 25.8% 8.0% 3.5% 0.0% 0.0% skip:47.6%
  67. [libx264 @ 0x373f5c0] mb B I16..4: 0.3% 0.3% 0.0% B16..8: 20.4% 1.7% 0.3% direct: 0.6% skip:76.5% L0:40.2% L1:54.9% BI: 4.9%
  68. [libx264 @ 0x373f5c0] 8x8 transform intra:59.2% inter:80.2%
  69. [libx264 @ 0x373f5c0] coded y,uvDC,uvAC intra: 34.6% 63.6% 16.9% inter: 7.8% 11.7% 0.9%
  70. [libx264 @ 0x373f5c0] i16 v,h,dc,p: 35% 31% 7% 26%
  71. [libx264 @ 0x373f5c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 22% 24% 3% 5% 5% 5% 3% 4%
  72. [libx264 @ 0x373f5c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 28% 17% 3% 6% 6% 6% 3% 3%
  73. [libx264 @ 0x373f5c0] i8c dc,h,v,p: 48% 25% 23% 4%
  74. [libx264 @ 0x373f5c0] Weighted P-Frames: Y:1.3% UV:1.0%
  75. [libx264 @ 0x373f5c0] ref P L0: 70.0% 12.9% 12.5% 4.5% 0.0%
  76. [libx264 @ 0x373f5c0] ref B L0: 91.7% 7.4% 0.8%
  77. [libx264 @ 0x373f5c0] ref B L1: 97.8% 2.2%
  78. [libx264 @ 0x373f5c0] kb/s:1233.13
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×