0
ffmpeg -y -i test.png -i test.mp4 -filter_complex "[1:v]scale=1152:648,rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0];[0:v][rotate0]overlay=304.2:172.29,drawtext=fontfile=test.ttf:text='hi text':fontsize=40:fontcolor=white:x=426.05:y=852.04,format=yuv420p" est.mp4

Above is the command for drawing text in mp4 video, but if in the case if need to apply to rotate for text, I should I do. Can anyone help me with command?

  • 1
    Does this answer your question? [Overlaying text on video with required angle using FFMPEG](https://stackoverflow.com/questions/38306321/overlaying-text-on-video-with-required-angle-using-ffmpeg) – Jao Sep 22 '20 at 14:56
  • Yes jao . But can you explain to me the command in detail? – Konduri Sai Aditya Sep 22 '20 at 14:59
  • Instead of drawing text directly on your video, you create a video with your text and an alpha background, then you overlay this video on your video with an angle. – Jao Sep 22 '20 at 15:00
  • why video only, can't we create an image is there any dependencies with video creation ? – Konduri Sai Aditya Sep 22 '20 at 15:06
  • In the same link is another answer showing how to rotate text using subtitles files which may be easier for you. – llogan Sep 22 '20 at 17:41
  • Okay, got it but how to mention overlay positions in subtitle filters? – Konduri Sai Aditya Sep 23 '20 at 12:08
  • @KonduriSaiAditya Set the position (alignment) directly in the ASS file (via Aegisub for example), or use the `force_style='Alignment=foo'` option in subtitles filter ([example](https://stackoverflow.com/a/43712635/)). – llogan Sep 23 '20 at 22:22

0 Answers0