gpt4 book ai didi

使用drawtext过滤器重新加载时,ffmpeg崩溃,因为文件正在使用

转载 作者:行者123 更新时间:2023-12-04 23:15:20 27 4
gpt4 key购买 nike

最近在 FFMPEG 内部工作时,我一直在尝试运行一个脚本,该脚本根据当前艺术家的文本文件显示当前艺术家。加载每一帧,但是文件也被写入,因此当被写入流时会崩溃..

The text file 'artist.txt' could not be read or is empty
Error while filtering
Failed to inject frame into filter network: Invalid argument

我用来将artist.txt写入内容的行如下..
-vf "drawtext=enable='gte(t,3)':fontfile=fonts/Dosis-Bold.ttf:textfile=artist.txt:reload=1:y=h-line_h-10:x=(W/tw)*n"

最佳答案

drawtext documentation对于 reload状态:

Be sure to update the file atomically, or it may be read partially, or even fail.



例如在 Linux 中,每次更新源文件后使用 mv覆盖 artist.txt .

关于使用drawtext过滤器重新加载时,ffmpeg崩溃,因为文件正在使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43908936/

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