0

This is where the problem Lies:

txt_clip = TextClip(author, font='/var/task/RubikVinyl.ttf', fontsize = 35, color='white') 

It does not use the font, despite me passing the entire font path. I've tried different formats, saving the font file to different paths, but I've had no success. I'm also almost certain you can pass a font path to moviepy as I've see other users do it with success.

Any help would be much appreciated!

Background for context:

I've deployed an AWS Lambda with the package type being an Image, it uses moviepy to edit clips together. I'm trying to pass in a custom font for overlaying text on the video, but it doesn't recognize the font path I've passed in.

To copy the font file i'm using into the Lambda, I do this in my Dockerfile:

WORKDIR /var/task
COPY RubikVinyl.ttf ./

Then, to confirm the Lambda has access to the file, I do:

os.path.exists("/var/task/RubikVinyl.ttf")

which returns "True" so I know the path is correct and the file is there.

I've tried saving the file to different paths, but moviepy never uses the font path that I specify. It doesn't return any sort of error, but defaults the font to what looks like times new roman

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432

0 Answers0