Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
6100cb47
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6100cb47
编写于
6月 15, 2007
作者:
R
Ramiro Polla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow user to specify rgb.txt for imlib2 vhook
Originally committed as revision 9326 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
3d907e22
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
2 deletion
+28
-2
doc/hooks.texi
doc/hooks.texi
+13
-0
vhook/imlib2.c
vhook/imlib2.c
+15
-2
未找到文件。
doc/hooks.texi
浏览文件 @
6100cb47
...
...
@@ -67,8 +67,13 @@ with the full path to the font file, as in:
@end example
where 20 is the point size.
You can specify the filename to read RGB color names from. If none are
specified, these defaults are used: @file
{
/usr/share/X11/rgb.txt
}
and
@file
{
/usr/lib/X11/rgb.txt
}
Options:
@multitable @columnfractions .2 .8
@item @option
{
-C <rgb.txt>
}
@tab The filename to read RGB color names from
@item @option
{
-c <color>
}
@tab The color of the text
@item @option
{
-F <fontname>
}
@tab The font face and size
@item @option
{
-t <text>
}
@tab The text
...
...
@@ -137,6 +142,14 @@ Usage examples:
a newline are treated as end-of-file. To create blank lines, use lines
that consist of space characters only.
# Scrolling credits with custom color from a text file
ffmpeg -i input.avi -vhook
\
'vhook/imlib2.so -C rgb.txt -c CustomColor1 -F VeraBd.ttf/16 -x 100 -y -1.0*N -f credits.txt'
\
-sameq output.avi
This example does the same as the one above, but specifies an rgb.txt file
to be used, which has a custom made color in it.
# scrolling credits from a graphics file
ffmpeg -sameq -i input.avi
\
-vhook 'vhook/imlib2.so -x 0 -y -1.0*N -i credits.png' output.avi
...
...
vhook/imlib2.c
浏览文件 @
6100cb47
...
...
@@ -15,6 +15,10 @@
*
* Options:
*
* -C <rgb.txt> The filename to read RGB color names from
* Defaults if none specified:
* /usr/share/X11/rgb.txt
* /usr/lib/X11/rgb.txt
* -c <color> The color of the text
* -F <fontname> The font face and size
* -t <text> The text
...
...
@@ -176,6 +180,7 @@ int Configure(void **ctxp, int argc, char *argv[])
{
int
c
;
ContextInfo
*
ci
;
char
*
rgbtxt
=
0
;
char
*
font
=
"LucidaSansDemiBold/16"
;
char
*
fp
=
getenv
(
"FONTPATH"
);
char
*
color
=
0
;
...
...
@@ -203,8 +208,11 @@ int Configure(void **ctxp, int argc, char *argv[])
imlib_add_path_to_font_path
(
fp
);
while
((
c
=
getopt
(
argc
,
argv
,
"c:f:F:t:x:y:i:"
))
>
0
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"
C:
c:f:F:t:x:y:i:"
))
>
0
)
{
switch
(
c
)
{
case
'C'
:
rgbtxt
=
optarg
;
break
;
case
'c'
:
color
=
optarg
;
break
;
...
...
@@ -246,11 +254,16 @@ int Configure(void **ctxp, int argc, char *argv[])
char
buff
[
256
];
int
done
=
0
;
if
(
rgbtxt
)
f
=
fopen
(
rgbtxt
,
"r"
);
else
{
f
=
fopen
(
"/usr/share/X11/rgb.txt"
,
"r"
);
if
(
!
f
)
f
=
fopen
(
"/usr/lib/X11/rgb.txt"
,
"r"
);
}
if
(
!
f
)
{
fprintf
(
stderr
,
"Failed to find
rgb.txt
\n
"
);
fprintf
(
stderr
,
"Failed to find
RGB color names file
\n
"
);
return
-
1
;
}
while
(
fgets
(
buff
,
sizeof
(
buff
),
f
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录