ffmpeg给出文本未找到错误

标签 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!

最佳答案

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

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

关于ffmpeg给出文本未找到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11063394/

相关文章:

ios - iOS平台编译FFmpeg框架时出错

FFMPEG:如何将 h264 流包装到 FLV 容器中?

c# - 用 C# 确定 quicktime 版本

windows - 如何在 Windows 版 QuickTime 中进行高分辨率离屏渲染?

image-processing - 将 EXR 图像序列转换为 .MOV

c - 如何在 QuickTime SDK for Windows 中使用 CoreFoundation?

node.js - 我怎样才能增加我的fps输出? (ffmpeg,nodejs)

python - 在python中管道输入和输出ffmpeg

video - 无法将流元数据插入 MP4?

ios - Xcode 在通过 QuickTime 录制屏幕时失去与 iPad 的连接