Opened 6 years ago

Closed 4 years ago

#6281 closed defect (needs_more_info)

drawtext- limitation on number of drawtext filters used in a single command?

Reported by: akhil Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: drawtext
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I am using multiple draw text filter in a single command.These filters are generated at run time.If the number of draw text filters increases , (>600), processing fails. Error is:

[Parsed_drawtext_509 @ 0000000003bba440] Cannot find a valid font for the family Sans
[AVFilterGraph @ 000000000047bce0] Error initializing filter 'drawtext' with args 'enable=between(n,0,0):fontsize=40 :fontcolor=black:fontfile=Chn_Prop_Arial_Normal.ttf:text=Hello John!:x=100:y=100-th:shadowcolor=blue:shadowx=1:shadowy=1'
Error initializing complex filters.
No such file or directory

ffmpeg version: 3.4.2

Change History (3)

comment:1 by Carl Eugen Hoyos, 6 years ago

To make this a valid ticket, please test current FFmpeg git head and provide the failing command line you tested together with the complete, uncut console output.
Your operating system or your shell likely limits the length of the command line, I don't think this can be fixed within FFmpeg.

comment:2 by akhil, 5 years ago

Hi. I have tested with latest ffmpeg version- 3.3.1.
The problem still exists. It is not able to open more than 512 drawtext filters after that ffmpeg writes that it cannot find default "Sans" font.
PFB complete console output:

D:\psv\node-ffmpeg-try\frame annotation test>ffmpeg -f concat -i input.txt -y -r 10 -filter_complex_script fc.txt -crf 22 -threads 2 -preset ultrafast
ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-a
visynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable
-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --en
able-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspe
ex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-
libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, concat, from 'input.txt':
  Duration: 00:00:02.75, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Fontconfig error: Cannot load default config file
[Parsed_drawtext_0 @ 000000000064de80] Cannot find a valid font for the family Sans
[AVFilterGraph @ 00000000006cfec0] Error initializing filter 'drawtext' with args 'enable=between(n,0,0):fontsize=40 :fontcolor=black:text=Hello John!
Error initializing complex filters.
No such file or directory
Last edited 5 years ago by akhil (previous) (diff)

comment:3 by Elon Musk, 4 years ago

Resolution: needs_more_info
Status: newclosed

Please provide fc.txt and reopen bug.

Note: See TracTickets for help on using tickets.