FFMPEG: Creating video using drawtext along with word wrap and padding

前端 未结 1 1045
温柔的废话
温柔的废话 2021-01-06 14:50

I\'m working to create a video from text with drawtext filter. Output video i can see the text is overflowing instead of coming in new line.

Is there any way i can a

相关标签:
1条回答
  • 2021-01-06 15:26

    Use the subtitles filter instead.

    ffmpeg -y -f lavfi -i color=c=white:s=640x480:d=5 -vf "subtitles=subs.srt" output.mp4
    

    You can generate ASS or SRT subtitles manually or via Aegisub.

    Example SRT:

    1
    00:00:00,000 --> 00:00:05,000
    This is new whiteboard testing no padding and the text is overflowing from the video frame check this  need to acheve word wrapping.
    

    ASS files are more complicated structurally, but they allow more formatting options. Otherwise, you can use the force_style option in the subtitles filter. Search this site for several examples.

    0 讨论(0)
提交回复
热议问题