<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
	<id>https://wiki.fiveyellowmice.com/index.php?action=history&amp;feed=atom&amp;title=%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_FFmpeg_%E8%BF%9B%E8%A1%8C%E8%A7%86%E9%A2%91%E8%BD%AC%E7%A0%81%3A%E5%AD%97%E5%B9%95%2F%E5%9C%A8_Microsoft_Windows_%E4%B8%8B%E4%BD%BF%E7%94%A8_FFmpeg_%E5%B0%86%E5%AD%97%E5%B9%95%E7%BC%96%E5%85%A5%E8%A7%86%E9%A2%91%E6%B5%81%E6%97%B6%E7%9A%84%E9%A2%9D%E5%A4%96%E8%AF%B4%E6%98%8E</id>
	<title>如何使用 FFmpeg 进行视频转码:字幕/在 Microsoft Windows 下使用 FFmpeg 将字幕编入视频流时的额外说明 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fiveyellowmice.com/index.php?action=history&amp;feed=atom&amp;title=%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_FFmpeg_%E8%BF%9B%E8%A1%8C%E8%A7%86%E9%A2%91%E8%BD%AC%E7%A0%81%3A%E5%AD%97%E5%B9%95%2F%E5%9C%A8_Microsoft_Windows_%E4%B8%8B%E4%BD%BF%E7%94%A8_FFmpeg_%E5%B0%86%E5%AD%97%E5%B9%95%E7%BC%96%E5%85%A5%E8%A7%86%E9%A2%91%E6%B5%81%E6%97%B6%E7%9A%84%E9%A2%9D%E5%A4%96%E8%AF%B4%E6%98%8E"/>
	<link rel="alternate" type="text/html" href="https://wiki.fiveyellowmice.com/index.php?title=%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_FFmpeg_%E8%BF%9B%E8%A1%8C%E8%A7%86%E9%A2%91%E8%BD%AC%E7%A0%81:%E5%AD%97%E5%B9%95/%E5%9C%A8_Microsoft_Windows_%E4%B8%8B%E4%BD%BF%E7%94%A8_FFmpeg_%E5%B0%86%E5%AD%97%E5%B9%95%E7%BC%96%E5%85%A5%E8%A7%86%E9%A2%91%E6%B5%81%E6%97%B6%E7%9A%84%E9%A2%9D%E5%A4%96%E8%AF%B4%E6%98%8E&amp;action=history"/>
	<updated>2026-05-10T15:26:45Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.fiveyellowmice.com/index.php?title=%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_FFmpeg_%E8%BF%9B%E8%A1%8C%E8%A7%86%E9%A2%91%E8%BD%AC%E7%A0%81:%E5%AD%97%E5%B9%95/%E5%9C%A8_Microsoft_Windows_%E4%B8%8B%E4%BD%BF%E7%94%A8_FFmpeg_%E5%B0%86%E5%AD%97%E5%B9%95%E7%BC%96%E5%85%A5%E8%A7%86%E9%A2%91%E6%B5%81%E6%97%B6%E7%9A%84%E9%A2%9D%E5%A4%96%E8%AF%B4%E6%98%8E&amp;diff=37&amp;oldid=prev</id>
		<title>FiveYellowMice：创建页面，内容为“== 废话 ==  要将字幕从文本变成可以显示出来的文字，[https://zh.wikipedia.org/wiki/%E5%AD%97%E4%BD%93 字体]是必须的，播放器在显示独...”</title>
		<link rel="alternate" type="text/html" href="https://wiki.fiveyellowmice.com/index.php?title=%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_FFmpeg_%E8%BF%9B%E8%A1%8C%E8%A7%86%E9%A2%91%E8%BD%AC%E7%A0%81:%E5%AD%97%E5%B9%95/%E5%9C%A8_Microsoft_Windows_%E4%B8%8B%E4%BD%BF%E7%94%A8_FFmpeg_%E5%B0%86%E5%AD%97%E5%B9%95%E7%BC%96%E5%85%A5%E8%A7%86%E9%A2%91%E6%B5%81%E6%97%B6%E7%9A%84%E9%A2%9D%E5%A4%96%E8%AF%B4%E6%98%8E&amp;diff=37&amp;oldid=prev"/>
		<updated>2016-03-30T02:02:02Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“== 废话 ==  要将字幕从文本变成可以显示出来的文字，[https://zh.wikipedia.org/wiki/%E5%AD%97%E4%BD%93 字体]是必须的，播放器在显示独...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 废话 ==&lt;br /&gt;
&lt;br /&gt;
要将字幕从文本变成可以显示出来的文字，[https://zh.wikipedia.org/wiki/%E5%AD%97%E4%BD%93 字体]是必须的，播放器在显示独立字幕文件或字幕流的时候需要在电脑中找到合适的字体，才能将字幕渲染到屏幕上， FFmpeg 在将字幕编入视频流的时候也是如此。&lt;br /&gt;
&lt;br /&gt;
FFmpeg 在找字体的时候，会使用一个叫做 [https://zh.wikipedia.org/wiki/Fontconfig Fontconfig] 的程序，这个程序是为[https://zh.wikipedia.org/wiki/%E7%B1%BBUnix%E7%B3%BB%E7%BB%9F 类 Unix] 系统设计的，所以在 GNU/Linux 以及 Mac OS X 上，它工作地很好。&lt;br /&gt;
&lt;br /&gt;
但是， Microsoft Windows 没有实现大部分的 [https://zh.wikipedia.org/wiki/POSIX POSIX] 接口，所以 Fontconfig 无法在它上面正常的工作，进而 FFmpeg 无法找到字体，将字幕编入视频流也是无从谈起。&lt;br /&gt;
&lt;br /&gt;
{{方框|borderColor=#2196F3|background=#E3F2FD|heading=安利|content=虽然这篇文章将指导你解决 Fontconfig 在 Microsoft Windows 上工作不正常的问题，但是为了你的精神、财富和智慧，[https://program-think.blogspot.com/2013/10/linux-newbie-guide.html 切换到 GNU/Linux] 才是最佳的选择。}}&lt;br /&gt;
&lt;br /&gt;
== fonts.conf ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;fonts.conf&amp;lt;/code&amp;gt; 是 Fontconfig 用来存储其配置的文件，在 GNU/Linux 下它已经存在与系统中了，而在 Microsoft Windows 下没有。&lt;br /&gt;
&lt;br /&gt;
因为没有，所以我们就得自己写一个，好在已经有现成的了。将[[/fonts.conf|我已经准备好的文件]]的内容复制并保存为文本文件，命名为 &amp;lt;code&amp;gt;fonts.conf&amp;lt;/code&amp;gt; 。将这个文件放到 &amp;lt;code&amp;gt;C:\\Users\用户名\&amp;lt;/code&amp;gt; 里，比如如果你的用户名叫 Alex ，就放到 &amp;lt;code&amp;gt;C:\\Users\Alex\&amp;lt;/code&amp;gt; 里面。&lt;br /&gt;
&lt;br /&gt;
{{提示|在 Windows XP 中，文件应该放到 &amp;lt;code&amp;gt;C:\\Documents and Settings\用户名\&amp;lt;/code&amp;gt; 里面。}}&lt;br /&gt;
&lt;br /&gt;
[[文件:Fw-c-users-username.png|600px]]&lt;br /&gt;
&lt;br /&gt;
接下来，在“计算机”（ Windows 7 ）或“这台电脑”（ Windows 8 或更高版本）上右键，选择“属性”。在出来的窗口中的左边，点击“高级系统设置”（图中红框部分）。&lt;br /&gt;
&lt;br /&gt;
{{提示|在 Windows XP 中，在“我的电脑”上右键后将直接打开“系统属性”窗口。}}&lt;br /&gt;
&lt;br /&gt;
[[文件:Fw-system.png|800px]]&lt;br /&gt;
&lt;br /&gt;
在出来的“系统属性”窗口中，选择“高级”选项卡，再在其中点击“环境变量”按钮。&lt;br /&gt;
&lt;br /&gt;
[[文件:Fw-advanced-system-props.png|600px]]&lt;br /&gt;
&lt;br /&gt;
在“环境变量”窗口中的上半部分（“ XX 的用户变量”），点“新建”按钮。&lt;br /&gt;
&lt;br /&gt;
[[文件:Fw-environ-var.png|600px]]&lt;br /&gt;
&lt;br /&gt;
在“变量名”中，写 &amp;lt;code&amp;gt;FONTCONFIG_FILE&amp;lt;/code&amp;gt; ，在“值”中写上 &amp;lt;code&amp;gt;fonts.conf&amp;lt;/code&amp;gt; 文件的路径，也就是 &amp;lt;code&amp;gt;C:\\Users\用户名\fonts.conf&amp;lt;/code&amp;gt; 。&lt;br /&gt;
&lt;br /&gt;
{{提示|在 Windows XP 中，路径应该是 &amp;lt;code&amp;gt;C:\\Documents and Settings\用户名\fonts.conf&amp;lt;/code&amp;gt; 。}}&lt;br /&gt;
&lt;br /&gt;
[[文件:Fw-new-var.png|600px]]&lt;br /&gt;
&lt;br /&gt;
点“确定”，再点“确定”，再点“确定”。这样就完成了。&lt;br /&gt;
&lt;br /&gt;
== 后果 ==&lt;br /&gt;
&lt;br /&gt;
以后再执行 FFmpeg 的时候，会停顿一段时间，这段时间是 Fontconfig 在加载字体。时间长短因字体数量而异。&lt;br /&gt;
&lt;br /&gt;
这段停顿的时间确实很令人不爽，但是没办法，谁叫 Windows 不支持 POSIX 接口呢。&lt;/div&gt;</summary>
		<author><name>FiveYellowMice</name></author>
		
	</entry>
</feed>