3 ways that I add text to videos
imagemagick - I use this to make text that I save as a .png and overlay the text onto my videos.
drawtext - an inbuilt command in ffmpeg to add text to your video
-.ass is a file that can be used to add text.
commands used in the video:
ffmpge command to insert subtitles .srt
ffmpeg -i video.MOV -vf subtitles=srttext.srt srt_output.MOV
ffmpeg command to insert subtitles .ass
ffmpeg -i video.MOV -vf ass=asstext.ass ass_output.MOV
imagemagick command to create text
convert -background none -fill white -pointsize 72 label:'Hello \nWorld - png file' label.png
drawtext command using a textfile
ffmpeg -i video.MOV -vf "drawtext=textfile=helloworld.txt:fontsize=100" textfile-out.MOV
drawtext command single line in terminal
ffmpeg -i video.MOV -vf "drawtext=text='hello world':fontcolor=white:borderw=7:fontsize=100:x=50:y=100" singleline-output.MOV
drawtext command 2 lines in terminal
ffmpeg -i video.MOV -vf "drawtext=text='Hello':fontsize=100:x=100:y=100,drawtext=text='World':fontsize=150:x=100:y=300" out_2lines.MOV
I have written a basic example of the .ass format here https://gist.github.com/afrum/64bab2d...
links:
previous video
• using ffmpeg to add a title to a video
a reference I have used for .ass
https://github.com/weizhenye/ASS/wiki...
someone else who couldn't get some .ass working
https://hhsprings.bitbucket.io/docs/p...
0:00 happy new year and intro
0:51 .srt vs .ass
1:09 imagemagick description of previous video
1:30 overlay command to overlay the video
1:51 imagemagick command and display
2:06 overlay command used for this example
2:38 imagemagick command -background none
3:19 drawtext from textfile
4:00 drawtext single line text from commandline
4:20 drawtext two lines
4:40 ass file