am using this command to put text on a video
/usr/bin/ffmpeg -i $urlVideo $startFlags 'drawtext=fontfile=$font:text=$text:fontcolor=$color:x=$x: y=$y: fontsize=$size$enable' $endFlags " . $resultFilePath
so i added the rotate argument to rotate a text (rotate=0.3). so the result was that the hole file was rotated. how to rotate only the text? thank you.
PS:am so new to ffmpeg :3
Here is a -vf
option expression example:
color=c=black@0,drawtext=text=Test Text:x=w/2:y=h/2,rotate=PI/6:fillcolor=black@0[L0];
[in][L0]overlay=shortest=true
For precise positioning, you can try:
color
source to match your text size.rotate
to expand frame size.rotate
rotates the frame about its centeroverlay
's x
and y
options to place the text in its final position