gpt4 book ai didi

ffmpeg给出文本未找到错误

转载 作者:行者123 更新时间:2023-12-04 23:17:34 28 4
gpt4 key购买 nike

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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com