0

I have a folder with a couple of short videos in, I would like to add the file names of the videos in the video in the bottom right corner while converting them from mov to mp4. I have tried using:

    @echo off
set "INPUT=E:\Users\Oli Shingfield\Documents\Projects\v1.3.1\downloads3"
for %%a in ("%INPUT%\*.mov") do (
    ffmpeg -i "%%~a" -vf drawtext=text="%%~na":x=105:y=120:fontfile="E:\Users\Oli Shingfield\Documents\Projects\v1.3.1\downloads3\impact.ttf":fontsize=25:fontcolor=white -b:v 1M -r 60 -b:a 320k -ar 48000 -crf 17 "%%~na.mp4"
)
pause

but I am getting the error:

[Parsed_drawtext_0 @ 000002548db70e00] Cannot find a valid font for the family Sans
[AVFilterGraph @ 000002548cd00a20] Error initializing filter 'drawtext' with args 'text=RP AS A WHOLE:x=105:y=120:fontfile=E:UsersOli_ShingfieldDocumentsProjectsv1.3.1downloads3impact.ttf:fontsize=25:fontcolor=white'
Error reinitializing filters!
Failed to inject frame into filter network: No such file or directory
Error while processing the decoded data for stream #0:0
[aac @ 000002548be61ae0] Qavg: 65536.000
[aac @ 000002548be61ae0] 2 frames left in the queue on closing
Conversion failed!

It seems as though it can't find the font file even though it's in the same location and I am specifying the exact file path.

Has anyone got any ideas? I'm baffled.

Thanks! Oli

0 Answers0