简体   繁体   中英

ffmpeg burn chinese subtitle(srt) with error

I use ffmpeg to add Chinese subtitles to the video. and the libass library has been installed.

I execute the following command and error messages will appear

ffmpeg -i video.mp4 -vf "ass=subtitle.srt" -y out.mp4

error message:

在此处输入图像描述

And the Chinese subtitles of the output video are unreadable.

在此处输入图像描述

So the question I want to ask is:

  1. What caused this?

  2. how to fix?

Solved! Need to install fonts

Problem finding step:

a) find ffmpeg fontconfig

cat /opt/ffmpeg/lib/pkgconfig/fontconfig.pc

在此处输入图像描述

b) find fontconfig config file according to the path obtained above

cat /opt/ffmpeg/etc/fonts/fonts.conf

在此处输入图像描述

c) Put the required fonts into this folder /usr/share/fonts/truetype

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM