'ffmpeg - how do I remove these strange white boxes underneath my drawtext?
After working all day on this, I have my script working ALMOST perfectly:
ffmpeg -i source.mp4 -filter_complex "[0:v]pad=iw:ih+1680:0:(oh-ih)/2:color=black, drawtext=text='SPENNY FREAKING OUT ABOUT TO DO':fontsize=190:fontcolor=white:fontfile='/Windows/Fonts/Impact.ttf':font='Impact':line_spacing=30:x=(w-tw)/2:y=(800-th)/2, drawtext=text='HARDEST WORKOUT IN THE WORLD':fontsize=190:fontcolor=white:fontfile='/Windows/Fonts/Impact.ttf':font='Impact':line_spacing=30:x=(w-tw)/2:y=h-450-(th/2)" output.mp4
This adds padding above and below the video, and text is added on top of the padding.
But I have a few little problems that have been holding me up for hours finding a solution:
- How do I remove these strange white boxes? Screenshot Screenshot 2
- Is there any way for me to align:center the drawtext? As you can probably tell in the script, I'm using a very crude method - adding blank spaces as characters so that the text looks centered.
- I'm also having to manually press ^L (Ctrl+L) in the command prompt to create a linebreak, for some reason \f and \v don't work. Can this be somehow automated?
The first problem is the most important. 2-3 I have workarounds so no big deal, but it would be nice to streamline everything.
Thanks! Hoping someone can help me!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
