HA
C:\ Windows \ Fontsなどの二重コロン「:」が分割として機能していたことが判明したため、フォントのフルパスを入力しているときにffmpegは次のようにコマンドを読み取っていました
元のコマンド
" -vf drawtext=fontfile='C:\\Windows\\fonts\\arial.ttf'|text='test' "
ffmpegの解釈
-vf drawtext= # command
fontfile='C # C is the font file because the : comes after it signalling the next key
arial.ttf' # is the next key after fontfile = C (because the C is followed by a : signalling the next key)
:text # is the value the key "arial.tff" is pointing to
='test' # is some arb piece of information put in by that silly user
したがって、これを修正するには、フォントファイルパスの:を削除する必要があります。
私の最終的な作業コード:
import subprocess
ffmpeg = "C:\\ffmpeg_10_6_11.exe"
inVid = "C:\\test_in.avi"
outVid = "C:\\test_out.avi"
subprocess.Popen(ffmpeg + " -i " + inVid + ''' -vf drawtext=fontfile=/Windows/Fonts/arial.ttf:text=test ''' + outVid , shell=True)