Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

ffmpeg add text with positions relative to video & text dimensions

> Top left: x=0:y=0 (with 10 pixel padding x=10:y=10)
> Top center: x=(w-text_w)/2:y=0 (with 10 px padding x=(w-text_w)/2:y=10)
> Top right: x=w-tw:y=0 (with 10 px padding: x=w-tw-10:y=10)
> Centered: x=(w-text_w)/2:y=(h-text_h)/2
> Bottom left: x=0:y=h-th (with 10 px padding: x=10:y=h-th-10)
> Bottom center: x=(w-text_w)/2:y=h-th (with 10 px padding: x=(w-text_w)/2:y=h-th-10)
> Bottom right: x=w-tw:y=h-th (with 10 px padding: x=w-tw-10:y=h-th-10)

ffmpeg -i input.mp4 -vf "drawtext=text='Super User':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white" -c:a copy output.mp4
Source by superuser.com #
 
PREVIOUS NEXT
Tagged: #ffmpeg #add #text #positions #relative #video #text #dimensions
ADD COMMENT
Topic
Name
6+1 =