【问题标题】:How do I make FFMPEG use localized strftime with drawtext?How do I make FFMPEG use localized strftime with drawtext?
【发布时间】:2022-12-04 14:13:43
【问题描述】:

I\'m trying to write a script to use FFMPEG to draw localized timestamps on a video, but I\'m not having much luck.

I can confirm I have the locale fr_FR.UTF-8 installed on my system by running the following command: LC_ALL=fr_FR.UTF-8 date

However, the following command produces a 4 second video beginning with the string \"Monday 28 November 2022 19:00:47 PST\" on both my Mac and an Alpine Linux docker container:

LC_ALL=fr_FR.UTF-8 ffmpeg -hide_banner -f lavfi -i color=size=1024x768:rate=25:color=black -c:v libx264 -c:a aac -filter_complex drawtext=expansion=normal:fontsize=18:fontcolor=white:box=1:boxcolor=black@0.5:text=\'%{pts\\\\:localtime\\\\:1669690847\\\\:%A %-d %B %Y %X %Z}\' -t 4 -y out.mp4

Does anyone know how to make it create strings with non-English text?

  • Very strange. I can confirm that behavior. Have you tried other builds?
  • @pierpy I have a self-compiled FFMPEG version 4.3.1 on Alpine and and FFMPEG verson version 5.1.2 I probably got on Homebrew on Mac both showing the behavior.
  • My versions are 4.1.9, 4.1.10. Is this a bug then? 4 different versions...

标签: ffmpeg localization internationalization strftime drawtext


【解决方案1】:
猜你喜欢
  • 2022-11-20
  • 2022-12-28
  • 2022-01-04
  • 2022-12-19
  • 2022-12-01
  • 2022-12-02
  • 2013-07-10
  • 2022-12-27
  • 2022-12-01
相关资源
最近更新 更多