Answers.Body: <p>drawtext using textfile</p>
  <pre><code>echo &quot;こ
  れ
  は
  蹤
  型
  で
  す
  。&quot; &gt; test.txt
  
  ffmpeg -i &quot;input.mp4&quot; -vf &quot;
  drawtext=textfile=test.txt:
  fontcolor=white:
  font='Noto Serif CJK JP':
  fontsize=h/12:
  x=w-text_w-20:
  y=(h-text_h)/2
  &quot; -c:a copy -t 5 output.mp4 -y
  ffplay output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T06:37:40.803Z
Answers.Text: That is a clever solution!  I'll give it a try. Thank you
Answers.UserDisplayName: Danny
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-12T09:41:42.947Z
Answers.Text: Works great. Thank you!
Answers.UserDisplayName: Danny
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T06:32:08.253Z
Answers.LastActivityDate: 2024-01-11T06:32:08.253Z
Answers.UserDisplayName: Баяр Гончикжапов
Body: <p>Is there any way to overlay vertical (eg, Japanese) text using the <code>ffmpeg</code> drawtext filter?</p>
  <p>I've searched around but didn't find anything.  <a href="https://www.ffmpeg.org/ffmpeg-all.html#drawtext-1" rel="nofollow noreferrer">The documentation</a> makes reference to the <code>ft_load_flags= vertical_layout</code> as a parameter to <code>libfreetype</code> but searching further came up with nothing.</p>
  <p>Something like this:</p>
  <p><a href="https://i.sstatic.net/NJlTU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NJlTU.png" alt="enter image description here" /></a></p>
  
Tags: <ffmpeg>
Title: Vertical text with drawtext filter
UserDisplayName: Danny
ThreadText: # Vertical text with drawtext filter
  
  (Asked by: username_0 on 2024-01-10)
  
  Is there any way to overlay vertical (eg, Japanese) text using the `ffmpeg` drawtext filter?
  
  I've searched around but didn't find anything. [The documentation](https://www.ffmpeg.org/ffmpeg-all.html#drawtext-1) makes reference to the `ft_load_flags= vertical_layout` as a parameter to `libfreetype` but searching further came up with nothing.
  
  Something like this:
  
  [![enter image description here](https://i.sstatic.net/NJlTU.png)](https://i.sstatic.net/NJlTU.png)
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-01-11. Score: 0 | Accepted answer
  
  drawtext using textfile
  
  ```
  echo "こ
  れ
  は
  蹤
  型
  で
  す
  。" > test.txt
  
  ffmpeg -i "input.mp4" -vf "
  drawtext=textfile=test.txt:
  fontcolor=white:
  font='Noto Serif CJK JP':
  fontsize=h/12:
  x=w-text_w-20:
  y=(h-text_h)/2
  " -c:a copy -t 5 output.mp4 -y
  ffplay output.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: That is a clever solution!  I'll give it a try. Thank you  
  > **username_0**: Works great. Thank you!  
  
  ---
  
  