ffmpeg给出文本未找到错误

时间:2012-06-16 12:24:46

标签: ffmpeg quicktime

arial.ttf存在于C:\ Windows \ Fonts文件夹中。运行

ffmpeg.exe -i D:\ imagesequence \ test.mov -vf drawtext =“arial.ttf =':text ='TEST'”D:\ imagesequence \ testo.mov

ffmpeg.exe -i D:\ imagesequence \ test。%04d.jpg -vf drawtext =“arial.ttf =':text ='TEST'”D:\ imagesequence \ testo.mov

结果

ffmpeg.exe -i D:\imagesequence\test.%04d.jpg -vf drawtext=fontf
ile="arial.ttf=':text='TEST'" D:\imagesequence\testo.mov
ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  6 2011 22:02:08 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 24. 0 / 51. 24. 0
  libavcodec   53. 28. 0 / 53. 28. 0
  libavformat  53. 19. 0 / 53. 19. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 47. 0 /  2. 47. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from 'D:\imagesequence\test.%04d.jpg':
  Duration: 00:00:01.24, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p, 768x576 [SAR 1:1 DAR 4:3], 25 fps, 25 t
br, 25 tbn, 25 tbc
File 'D:\imagesequence\testo.mov' already exists. Overwrite ? [y/N] y
w:768 h:576 pixfmt:yuvj420p tb:1/1000000 sar:1/1 sws_param:
[drawtext @ 01C80260] Could not load fontface from file 'arial.ttf=': cannot ope
n resource
Error initializing filter 'drawtext' with args 'fontfile=arial.ttf=:text=TEST'
Error opening filters!

1 个答案:

答案 0 :(得分:1)

LordNeckbeard是正确的,您需要指定您尝试使用“fontfile”的字体的完整路径。此外,如果您的输入和输出文件位于同一目录中,则无需指定其各自的目录(保存命令行麻烦)。在你的情况下,这应该工作:

ffmpeg.exe -i test.mov -vf drawtext=fontfile=/Windows/Fonts/arial.ttf:text="TEST" testo.mov