Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
4d58e4cb
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,发现更多精彩内容 >>
提交
4d58e4cb
编写于
7月 26, 2011
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename ffserver to avserver.
上级
9e12f0bf
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
102 addition
and
102 deletion
+102
-102
.gitignore
.gitignore
+1
-1
Changelog
Changelog
+1
-1
Makefile
Makefile
+3
-3
avserver.c
avserver.c
+32
-32
configure
configure
+10
-10
doc/avplay.texi
doc/avplay.texi
+1
-1
doc/avprobe.texi
doc/avprobe.texi
+1
-1
doc/avserver.conf
doc/avserver.conf
+7
-7
doc/avserver.texi
doc/avserver.texi
+30
-30
doc/ffmpeg.texi
doc/ffmpeg.texi
+3
-3
doc/general.texi
doc/general.texi
+1
-1
ffmpeg.c
ffmpeg.c
+4
-4
libavformat/ffm.h
libavformat/ffm.h
+1
-1
libavformat/ffmdec.c
libavformat/ffmdec.c
+4
-4
libavformat/ffmenc.c
libavformat/ffmenc.c
+2
-2
libavformat/mpjpeg.c
libavformat/mpjpeg.c
+1
-1
未找到文件。
.gitignore
浏览文件 @
4d58e4cb
...
...
@@ -14,7 +14,7 @@ doxy
ffmpeg
avplay
avprobe
ff
server
av
server
libavcodec/*_tablegen
libavcodec/*_tables.c
libavcodec/*_tables.h
...
...
Changelog
浏览文件 @
4d58e4cb
...
...
@@ -5,7 +5,7 @@ releases are sorted from youngest to oldest.
version <next>:
- BWF muxer
- Flash Screen Video 2 decoder
- ffplay/ffprobe
renamed to avplay/avprobe
- ffplay/ffprobe
/ffserver renamed to avplay/avprobe/avserver
version 0.7:
...
...
Makefile
浏览文件 @
4d58e4cb
...
...
@@ -55,7 +55,7 @@ COMPILE_S = $(call COMPILE,AS)
PROGS-$(CONFIG_FFMPEG)
+=
ffmpeg
PROGS-$(CONFIG_AVPLAY)
+=
avplay
PROGS-$(CONFIG_AVPROBE)
+=
avprobe
PROGS-$(CONFIG_
FFSERVER)
+=
ff
server
PROGS-$(CONFIG_
AVSERVER)
+=
av
server
PROGS
:=
$
(
PROGS-yes:%
=
%
$(EXESUF)
)
OBJS
=
$
(
PROGS-yes:%
=
%.o
)
cmdutils.o
...
...
@@ -64,7 +64,7 @@ HOSTPROGS := $(TESTTOOLS:%=tests/%)
TOOLS
=
qt-faststart trasher
TOOLS-$(CONFIG_ZLIB)
+=
cws2fws
BASENAMES
=
ffmpeg avplay avprobe
ff
server
BASENAMES
=
ffmpeg avplay avprobe
av
server
ALLPROGS
=
$
(
BASENAMES:%
=
%
$(EXESUF)
)
ALLMANPAGES
=
$(BASENAMES:%=%.1)
...
...
@@ -118,7 +118,7 @@ $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
avplay.o
:
CFLAGS += $(SDL_CFLAGS)
avplay$(EXESUF)
:
FF_EXTRALIBS += $(SDL_LIBS)
ffserver$(EXESUF)
:
LDFLAGS += $(FF
SERVERLDFLAGS)
avserver$(EXESUF)
:
LDFLAGS += $(AV
SERVERLDFLAGS)
$(PROGS)
:
%$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
$(LD)
$(LDFLAGS)
-o
$@
$<
cmdutils.o
$(FF_EXTRALIBS)
...
...
ff
server.c
→
av
server.c
浏览文件 @
4d58e4cb
...
...
@@ -59,7 +59,7 @@
#include "cmdutils.h"
const
char
program_name
[]
=
"
ff
server"
;
const
char
program_name
[]
=
"
av
server"
;
const
int
program_birth_year
=
2000
;
static
const
OptionDef
options
[];
...
...
@@ -200,7 +200,7 @@ typedef struct IPAddressACL {
struct
in_addr
last
;
}
IPAddressACL
;
/* description of each stream of the
ff
server.conf file */
/* description of each stream of the
av
server.conf file */
typedef
struct
FFStream
{
enum
StreamType
stream_type
;
char
filename
[
1024
];
/* stream filename */
...
...
@@ -299,10 +299,10 @@ static int rtp_new_av_stream(HTTPContext *c,
static
const
char
*
my_program_name
;
static
const
char
*
my_program_dir
;
static
const
char
*
config_filename
=
"/etc/
ff
server.conf"
;
static
const
char
*
config_filename
=
"/etc/
av
server.conf"
;
static
int
ff
server_debug
;
static
int
ff
server_daemon
;
static
int
av
server_debug
;
static
int
av
server_daemon
;
static
int
no_launch
;
static
int
need_to_start_children
;
...
...
@@ -320,7 +320,7 @@ static AVLFG random_state;
static
FILE
*
logfile
=
NULL
;
/* FIXME: make
ff
server work with IPv6 */
/* FIXME: make
av
server work with IPv6 */
/* resolve host with also IP address parsing */
static
int
resolve_host
(
struct
in_addr
*
sin_addr
,
const
char
*
hostname
)
{
...
...
@@ -480,7 +480,7 @@ static void start_children(FFStream *feed)
for
(
i
=
3
;
i
<
256
;
i
++
)
close
(
i
);
if
(
!
ff
server_debug
)
{
if
(
!
av
server_debug
)
{
i
=
open
(
"/dev/null"
,
O_RDWR
);
if
(
i
!=
-
1
)
{
dup2
(
i
,
0
);
...
...
@@ -620,7 +620,7 @@ static int http_server(void)
return
-
1
;
}
http_log
(
"
FF
server started.
\n
"
);
http_log
(
"
AV
server started.
\n
"
);
start_children
(
first_feed
);
...
...
@@ -664,7 +664,7 @@ static int http_server(void)
poll_entry
->
events
=
POLLOUT
;
poll_entry
++
;
}
else
{
/* when
ff
server is doing the timing, we work by
/* when
av
server is doing the timing, we work by
looking at which packet need to be sent every
10 ms */
delay1
=
10
;
/* one tick wait XXX: 10 ms assumed */
...
...
@@ -1480,7 +1480,7 @@ static int http_parse_request(HTTPContext *c)
av_strlcpy
(
c
->
protocol
,
protocol
,
sizeof
(
c
->
protocol
));
if
(
ff
server_debug
)
if
(
av
server_debug
)
http_log
(
"%s - - New connection: %s %s
\n
"
,
inet_ntoa
(
c
->
from_addr
.
sin_addr
),
cmd
,
url
);
/* find the filename and the optional info string in the request */
...
...
@@ -1643,7 +1643,7 @@ static int http_parse_request(HTTPContext *c)
"Content-type: video/x-ms-asf
\r\n
"
"
\r\n
"
"<ASX Version=
\"
3
\"
>
\r\n
"
//"<!-- Autogenerated by
ff
server -->\r\n"
//"<!-- Autogenerated by
av
server -->\r\n"
"<ENTRY><REF HREF=
\"
http://%s/%s%s
\"
/></ENTRY>
\r\n
"
"</ASX>
\r\n
"
,
hostbuf
,
filename
,
info
);
break
;
...
...
@@ -1652,7 +1652,7 @@ static int http_parse_request(HTTPContext *c)
"HTTP/1.0 200 RAM Follows
\r\n
"
"Content-type: audio/x-pn-realaudio
\r\n
"
"
\r\n
"
"# Autogenerated by
ff
server
\r\n
"
"# Autogenerated by
av
server
\r\n
"
"http://%s/%s%s
\r\n
"
,
hostbuf
,
filename
,
info
);
break
;
case
REDIR_ASF
:
...
...
@@ -3458,7 +3458,7 @@ static int rtp_new_av_stream(HTTPContext *c,
}
/********************************************************************/
/*
ff
server initialization */
/*
av
server initialization */
static
AVStream
*
add_av_stream1
(
FFStream
*
stream
,
AVCodecContext
*
codec
,
int
copy
)
{
...
...
@@ -3914,10 +3914,10 @@ static void load_module(const char *filename)
return
;
}
init_func
=
dlsym
(
dll
,
"
ff
server_module_init"
);
init_func
=
dlsym
(
dll
,
"
av
server_module_init"
);
if
(
!
init_func
)
{
fprintf
(
stderr
,
"%s: init function '
ff
server_module_init()' not found
\n
"
,
"%s: init function '
av
server_module_init()' not found
\n
"
,
filename
);
dlclose
(
dll
);
}
...
...
@@ -3926,7 +3926,7 @@ static void load_module(const char *filename)
}
#endif
static
int
ff
server_opt_default
(
const
char
*
opt
,
const
char
*
arg
,
static
int
av
server_opt_default
(
const
char
*
opt
,
const
char
*
arg
,
AVCodecContext
*
avctx
,
int
type
)
{
int
ret
=
0
;
...
...
@@ -3936,7 +3936,7 @@ static int ffserver_opt_default(const char *opt, const char *arg,
return
ret
;
}
static
int
ff
server_opt_preset
(
const
char
*
arg
,
static
int
av
server_opt_preset
(
const
char
*
arg
,
AVCodecContext
*
avctx
,
int
type
,
enum
CodecID
*
audio_id
,
enum
CodecID
*
video_id
)
{
...
...
@@ -3967,7 +3967,7 @@ static int ffserver_opt_preset(const char *arg,
*
video_id
=
opt_video_codec
(
tmp2
);
}
else
if
(
!
strcmp
(
tmp
,
"scodec"
)){
/* opt_subtitle_codec(tmp2); */
}
else
if
(
ff
server_opt_default
(
tmp
,
tmp2
,
avctx
,
type
)
<
0
){
}
else
if
(
av
server_opt_default
(
tmp
,
tmp2
,
avctx
,
type
)
<
0
){
fprintf
(
stderr
,
"%s: Invalid option or argument: '%s', parsed as '%s' = '%s'
\n
"
,
filename
,
line
,
tmp
,
tmp2
);
ret
=
1
;
break
;
...
...
@@ -3979,7 +3979,7 @@ static int ffserver_opt_preset(const char *arg,
return
ret
;
}
static
AVOutputFormat
*
ff
server_guess_format
(
const
char
*
short_name
,
const
char
*
filename
,
static
AVOutputFormat
*
av
server_guess_format
(
const
char
*
short_name
,
const
char
*
filename
,
const
char
*
mime_type
)
{
AVOutputFormat
*
fmt
=
av_guess_format
(
short_name
,
filename
,
mime_type
);
...
...
@@ -4066,7 +4066,7 @@ static int parse_ffconfig(const char *filename)
ERROR
(
"%s:%d: Invalid host/IP address: %s
\n
"
,
arg
);
}
}
else
if
(
!
strcasecmp
(
cmd
,
"NoDaemon"
))
{
ff
server_daemon
=
0
;
av
server_daemon
=
0
;
}
else
if
(
!
strcasecmp
(
cmd
,
"RTSPPort"
))
{
get_arg
(
arg
,
sizeof
(
arg
),
&
p
);
val
=
atoi
(
arg
);
...
...
@@ -4103,7 +4103,7 @@ static int parse_ffconfig(const char *filename)
}
else
max_bandwidth
=
llval
;
}
else
if
(
!
strcasecmp
(
cmd
,
"CustomLog"
))
{
if
(
!
ff
server_debug
)
if
(
!
av
server_debug
)
get_arg
(
logfilename
,
sizeof
(
logfilename
),
&
p
);
}
else
if
(
!
strcasecmp
(
cmd
,
"<Feed"
))
{
/*********************************************/
...
...
@@ -4227,7 +4227,7 @@ static int parse_ffconfig(const char *filename)
}
}
stream
->
fmt
=
ff
server_guess_format
(
NULL
,
stream
->
filename
,
NULL
);
stream
->
fmt
=
av
server_guess_format
(
NULL
,
stream
->
filename
,
NULL
);
avcodec_get_context_defaults2
(
&
video_enc
,
AVMEDIA_TYPE_VIDEO
);
avcodec_get_context_defaults2
(
&
audio_enc
,
AVMEDIA_TYPE_AUDIO
);
audio_id
=
CODEC_ID_NONE
;
...
...
@@ -4267,7 +4267,7 @@ static int parse_ffconfig(const char *filename)
/* jpeg cannot be used here, so use single frame jpeg */
if
(
!
strcmp
(
arg
,
"jpeg"
))
strcpy
(
arg
,
"mjpeg"
);
stream
->
fmt
=
ff
server_guess_format
(
arg
,
NULL
,
NULL
);
stream
->
fmt
=
av
server_guess_format
(
arg
,
NULL
,
NULL
);
if
(
!
stream
->
fmt
)
{
ERROR
(
"Unknown Format: %s
\n
"
,
arg
);
}
...
...
@@ -4430,7 +4430,7 @@ static int parse_ffconfig(const char *filename)
avctx
=
&
audio_enc
;
type
=
AV_OPT_FLAG_AUDIO_PARAM
;
}
if
(
ff
server_opt_default
(
arg
,
arg2
,
avctx
,
type
|
AV_OPT_FLAG_ENCODING_PARAM
))
{
if
(
av
server_opt_default
(
arg
,
arg2
,
avctx
,
type
|
AV_OPT_FLAG_ENCODING_PARAM
))
{
ERROR
(
"AVOption error: %s %s
\n
"
,
arg
,
arg2
);
}
}
else
if
(
!
strcasecmp
(
cmd
,
"AVPresetVideo"
)
||
...
...
@@ -4447,7 +4447,7 @@ static int parse_ffconfig(const char *filename)
audio_enc
.
codec_id
=
audio_id
;
type
=
AV_OPT_FLAG_AUDIO_PARAM
;
}
if
(
ff
server_opt_preset
(
arg
,
avctx
,
type
|
AV_OPT_FLAG_ENCODING_PARAM
,
&
audio_id
,
&
video_id
))
{
if
(
av
server_opt_preset
(
arg
,
avctx
,
type
|
AV_OPT_FLAG_ENCODING_PARAM
,
&
audio_id
,
&
video_id
))
{
ERROR
(
"AVPreset error: %s
\n
"
,
arg
);
}
}
else
if
(
!
strcasecmp
(
cmd
,
"VideoTag"
))
{
...
...
@@ -4638,14 +4638,14 @@ static void handle_child_exit(int sig)
static
void
opt_debug
(
void
)
{
ff
server_debug
=
1
;
ff
server_daemon
=
0
;
av
server_debug
=
1
;
av
server_daemon
=
0
;
logfilename
[
0
]
=
'-'
;
}
static
void
show_help
(
void
)
{
printf
(
"usage:
ff
server [options]
\n
"
printf
(
"usage:
av
server [options]
\n
"
"Hyper fast multi format Audio/Video streaming server
\n
"
);
printf
(
"
\n
"
);
show_help_options
(
options
,
"Main options:
\n
"
,
0
,
0
);
...
...
@@ -4655,7 +4655,7 @@ static const OptionDef options[] = {
#include "cmdutils_common_opts.h"
{
"n"
,
OPT_BOOL
,
{(
void
*
)
&
no_launch
},
"enable no-launch mode"
},
{
"d"
,
0
,
{(
void
*
)
opt_debug
},
"enable debug mode"
},
{
"f"
,
HAS_ARG
|
OPT_STRING
,
{(
void
*
)
&
config_filename
},
"use configfile instead of /etc/
ff
server.conf"
,
"configfile"
},
{
"f"
,
HAS_ARG
|
OPT_STRING
,
{(
void
*
)
&
config_filename
},
"use configfile instead of /etc/
av
server.conf"
,
"configfile"
},
{
NULL
},
};
...
...
@@ -4669,7 +4669,7 @@ int main(int argc, char **argv)
my_program_name
=
argv
[
0
];
my_program_dir
=
getcwd
(
0
,
0
);
ff
server_daemon
=
1
;
av
server_daemon
=
1
;
parse_options
(
argc
,
argv
,
options
,
NULL
);
...
...
@@ -4703,7 +4703,7 @@ int main(int argc, char **argv)
compute_bandwidth
();
/* put the process in background and detach it from its TTY */
if
(
ff
server_daemon
)
{
if
(
av
server_daemon
)
{
int
pid
;
pid
=
fork
();
...
...
@@ -4730,7 +4730,7 @@ int main(int argc, char **argv)
/* signal init */
signal
(
SIGPIPE
,
SIG_IGN
);
if
(
ff
server_daemon
)
if
(
av
server_daemon
)
chdir
(
"/"
);
if
(
http_server
()
<
0
)
{
...
...
configure
浏览文件 @
4d58e4cb
...
...
@@ -83,7 +83,7 @@ Configuration options:
--disable-ffmpeg disable ffmpeg build
--disable-avplay disable avplay build
--disable-avprobe disable avprobe build
--disable-
ffserver disable ff
server build
--disable-
avserver disable av
server build
--disable-avdevice disable libavdevice build
--disable-avcodec disable libavcodec build
--disable-avformat disable libavformat build
...
...
@@ -915,7 +915,7 @@ CONFIG_LIST="
ffmpeg
avplay
avprobe
ff
server
av
server
fft
frei0r
golomb
...
...
@@ -1492,8 +1492,8 @@ ffmpeg_select="buffer_filter"
avplay_deps
=
"avcodec avformat swscale sdl"
avplay_select
=
"rdft"
avprobe_deps
=
"avcodec avformat"
ff
server_deps
=
"avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
ff
server_extralibs
=
'$ldl'
av
server_deps
=
"avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
av
server_extralibs
=
'$ldl'
doc_deps
=
"texi2html"
...
...
@@ -1637,7 +1637,7 @@ enable fastdiv
enable
ffmpeg
enable
avplay
enable
avprobe
enable
ff
server
enable
av
server
enable
network
enable
optimizations
enable
postproc
...
...
@@ -1648,7 +1648,7 @@ enable swscale_alpha
# build settings
SHFLAGS
=
'-shared -Wl,-soname,$$(@F)'
FF
SERVERLDFLAGS
=
-Wl
,-E
AV
SERVERLDFLAGS
=
-Wl
,-E
LIBPREF
=
"lib"
LIBSUF
=
".a"
FULLNAME
=
'$(NAME)$(BUILDSUF)'
...
...
@@ -2355,7 +2355,7 @@ case $target_os in
host_libs
=
;;
sunos
)
FF
SERVERLDFLAGS
=
""
AV
SERVERLDFLAGS
=
""
SHFLAGS
=
'-shared -Wl,-h,$$(@F)'
enabled x86
&&
SHFLAGS
=
"-mimpure-text
$SHFLAGS
"
network_extralibs
=
"-lsocket -lnsl"
...
...
@@ -2400,7 +2400,7 @@ case $target_os in
SLIBSUF
=
".dylib"
SLIBNAME_WITH_VERSION
=
'$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR
=
'$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
FF
SERVERLDFLAGS
=
-Wl
,-bind_at_load
AV
SERVERLDFLAGS
=
-Wl
,-bind_at_load
objformat
=
"macho"
enabled x86_64
&&
objformat
=
"macho64"
enabled_any pic shared
||
...
...
@@ -2472,7 +2472,7 @@ case $target_os in
add_cppflags
-D_GNU_SOURCE
add_ldflags
-Zomf
-Zbin-files
-Zargs-wild
-Zmap
SHFLAGS
=
'$(SUBDIR)$(NAME).def -Zdll -Zomf'
FF
SERVERLDFLAGS
=
""
AV
SERVERLDFLAGS
=
""
LIBSUF
=
"_s.a"
SLIBPREF
=
""
SLIBSUF
=
".dll"
...
...
@@ -3218,7 +3218,7 @@ AS_O=$CC_O
CC_O=
$CC_O
DLLTOOL=
$dlltool
LDFLAGS=
$LDFLAGS
FFSERVERLDFLAGS=
$FF
SERVERLDFLAGS
AVSERVERLDFLAGS=
$AV
SERVERLDFLAGS
SHFLAGS=
$SHFLAGS
YASMFLAGS=
$YASMFLAGS
BUILDSUF=
$build_suffix
...
...
doc/avplay.texi
浏览文件 @
4d58e4cb
...
...
@@ -170,7 +170,7 @@ Seek to percentage in file corresponding to fraction of width.
@settitle AVplay media player
@c man begin SEEALSO
ffmpeg(1), avprobe(1),
ff
server(1) and the Libav HTML documentation
ffmpeg(1), avprobe(1),
av
server(1) and the Libav HTML documentation
@c man end
@c man begin AUTHORS
...
...
doc/avprobe.texi
浏览文件 @
4d58e4cb
...
...
@@ -122,7 +122,7 @@ with name "STREAM".
@settitle avprobe media prober
@c man begin SEEALSO
ffmpeg(1), avplay(1),
ff
server(1) and the Libav HTML documentation
ffmpeg(1), avplay(1),
av
server(1) and the Libav HTML documentation
@c man end
@c man begin AUTHORS
...
...
doc/
ff
server.conf
→
doc/
av
server.conf
浏览文件 @
4d58e4cb
...
...
@@ -12,7 +12,7 @@ BindAddress 0.0.0.0
# MaxClients maximum limit.
MaxHTTPConnections
2000
# Number of simultaneous requests that can be handled. Since
FF
Server
# Number of simultaneous requests that can be handled. Since
AV
Server
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients
1000
...
...
@@ -25,24 +25,24 @@ MaxBandwidth 1000
# '-' is the standard output.
CustomLog
-
# Suppress that if you want to launch
ff
server as a daemon.
# Suppress that if you want to launch
av
server as a daemon.
NoDaemon
##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another
#
ff
server. This sequence may be encoded simultaneously with several
#
av
server. This sequence may be encoded simultaneously with several
# codecs at several resolutions.
<
Feed
feed1
.
ffm
>
# You must use 'ffmpeg' to send a live feed to
ff
server. In this
# You must use 'ffmpeg' to send a live feed to
av
server. In this
# example, you can type:
#
# ffmpeg http://localhost:8090/feed1.ffm
#
ff
server can also do time shifting. It means that it can stream any
#
av
server can also do time shifting. It means that it can stream any
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
...
...
@@ -69,7 +69,7 @@ ACL allow 127.0.0.1
##################################################################
# Now you can define each stream which will be generated from the
# original audio and video stream. Each format has a filename (here
# 'test1.mpg').
FF
Server will send this stream when answering a
# 'test1.mpg').
AV
Server will send this stream when answering a
# request containing this filename.
<
Stream
test1
.
mpg
>
...
...
@@ -334,7 +334,7 @@ StartSendOnKey
# multicast address with MulticastAddress. The port and the TTL can
# also be set.
#
# An SDP file is automatically generated by
ff
server by adding the
# An SDP file is automatically generated by
av
server by adding the
# 'sdp' extension to the stream name (here
# http://localhost:8090/test1-sdp.sdp). You should usually give this
# file to your player to play the stream.
...
...
doc/
ff
server.texi
→
doc/
av
server.texi
浏览文件 @
4d58e4cb
\input
texinfo @c -*- texinfo -*-
@settitle
ff
server Documentation
@settitle
av
server Documentation
@titlepage
@center @titlefont
{
ff
server Documentation
}
@center @titlefont
{
av
server Documentation
}
@end titlepage
@top
...
...
@@ -15,37 +15,37 @@ The generic syntax is:
@example
@c man begin SYNOPSIS
ff
server [options]
av
server [options]
@c man end
@end example
@chapter Description
@c man begin DESCRIPTION
ff
server is a streaming server for both audio and video. It supports
av
server is a streaming server for both audio and video. It supports
several live feeds, streaming from files and time shifting on live feeds
(you can seek to positions in the past on each live feed, provided you
specify a big enough feed storage in
ff
server.conf).
specify a big enough feed storage in
av
server.conf).
ff
server runs in daemon mode by default; that is, it puts itself in
av
server runs in daemon mode by default; that is, it puts itself in
the background and detaches from its TTY, unless it is launched in
debug mode or a NoDaemon option is specified in the configuration
file.
This documentation covers only the streaming aspects of
ff
server /
This documentation covers only the streaming aspects of
av
server /
ffmpeg. All questions about parameters for ffmpeg, codec questions,
etc. are not covered here. Read @file
{
ffmpeg-doc.html
}
for more
information.
@section How does it work?
ff
server receives prerecorded files or FFM streams from some ffmpeg
av
server receives prerecorded files or FFM streams from some ffmpeg
instance as input, then streams them over RTP/RTSP/HTTP.
An
ff
server instance will listen on some port as specified in the
An
av
server instance will listen on some port as specified in the
configuration file. You can launch one or more instances of ffmpeg and
send one or more FFM streams to the port where
ff
server is expecting
to receive them. Alternately, you can make
ff
server launch such ffmpeg
send one or more FFM streams to the port where
av
server is expecting
to receive them. Alternately, you can make
av
server launch such ffmpeg
instances at startup.
Input streams are called feeds, and each one is specified by a <Feed>
...
...
@@ -57,7 +57,7 @@ file.
@section Status stream
ff
server supports an HTTP interface which exposes the current status
av
server supports an HTTP interface which exposes the current status
of the server.
Simply point your browser to the address of the special status stream
...
...
@@ -100,7 +100,7 @@ I understand that FreeBSD systems work just fine as well.
@section How do I make it work?
First, build the kit. It *really* helps to have installed LAME first. Then when
you run the
ff
server ./configure, make sure that you have the
you run the
av
server ./configure, make sure that you have the
@code
{
--enable-libmp3lame
}
flag turned on.
LAME is important as it allows for streaming audio to Windows Media Player.
...
...
@@ -110,7 +110,7 @@ As a simple test, just run the following two command lines where INPUTFILE
is some file which you can decode with ffmpeg:
@example
./
ffserver -f doc/ff
server.conf
&
./
avserver -f doc/av
server.conf
&
./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
@end example
...
...
@@ -129,8 +129,8 @@ The same is true of AVI files.
@section What happens next?
You should edit the
ff
server.conf file to suit your needs (in terms of
frame rates etc). Then install
ff
server and ffmpeg, write a script to start
You should edit the
av
server.conf file to suit your needs (in terms of
frame rates etc). Then install
av
server and ffmpeg, write a script to start
them up, and off you go.
@section Troubleshooting
...
...
@@ -166,14 +166,14 @@ I suspect that the new one is not available unless you have installed WMP 7].
You can replay video from .ffm files that was recorded earlier.
However, there are a number of caveats, including the fact that the
ff
server parameters must match the original parameters used to record the
file. If they do not, then
ff
server deletes the file before recording into it.
av
server parameters must match the original parameters used to record the
file. If they do not, then
av
server deletes the file before recording into it.
(Now that I write this, it seems broken).
You can fiddle with many of the codec choices and encoding parameters, and
there are a bunch more parameters that you cannot control. Post a message
to the mailing list if there are some 'must have' parameters. Look in
ff
server.conf for a list of the currently available controls.
av
server.conf for a list of the currently available controls.
It will automatically generate the ASX or RAM files that are often used
in browsers. These files are actually redirections to the underlying ASF
...
...
@@ -187,7 +187,7 @@ finishes.]
* When you connect to a live stream, most players (WMP, RA, etc) want to
buffer a certain number of seconds of material so that they can display the
signal continuously. However,
ff
server (by default) starts sending data
signal continuously. However,
av
server (by default) starts sending data
in realtime. This means that there is a pause of a few seconds while the
buffering is being done by the player. The good news is that this can be
cured by adding a '?buffer=5' to the end of the URL. This means that the
...
...
@@ -195,13 +195,13 @@ stream should start 5 seconds in the past -- and so the first 5 seconds
of the stream are sent as fast as the network will allow. It will then
slow down to real time. This noticeably improves the startup experience.
You can also add a 'Preroll 15' statement into the
ff
server.conf that will
You can also add a 'Preroll 15' statement into the
av
server.conf that will
add the 15 second prebuffering on all requests that do not otherwise
specify a time. In addition,
ff
server will skip frames until a key
_
frame
specify a time. In addition,
av
server will skip frames until a key
_
frame
is found. This further reduces the startup delay by not transferring data
that will be discarded.
* You may want to adjust the MaxBandwidth in the
ff
server.conf to limit
* You may want to adjust the MaxBandwidth in the
av
server.conf to limit
the amount of bandwidth consumed by live streams.
@section Why does the ?buffer / Preroll stop working after a time?
...
...
@@ -218,7 +218,7 @@ handled.
@section Does the @code
{
?date=
}
stuff work.
Yes (subject to the limitation outlined above). Also note that whenever you
start
ff
server, it deletes the ffm file (if any parameters have changed),
start
av
server, it deletes the ffm file (if any parameters have changed),
thus wiping out what you had recorded before.
The format of the @code
{
?date=xxxxxx
}
is fairly flexible. You should use one
...
...
@@ -246,26 +246,26 @@ For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
@table @option
@item -f @var
{
configfile
}
Use @file
{
configfile
}
instead of @file
{
/etc/
ff
server.conf
}
.
Use @file
{
configfile
}
instead of @file
{
/etc/
av
server.conf
}
.
@item -n
Enable no-launch mode. This option disables all the Launch directives
within the various <Stream> sections. Since
ff
server will not launch
within the various <Stream> sections. Since
av
server will not launch
any ffmpeg instances, you will have to launch them manually.
@item -d
Enable debug mode. This option increases log verbosity, directs log
messages to stdout and causes
ff
server to run in the foreground
messages to stdout and causes
av
server to run in the foreground
rather than as a daemon.
@end table
@c man end
@ignore
@setfilename
ff
server
@settitle
ff
server video server
@setfilename
av
server
@settitle
av
server video server
@c man begin SEEALSO
ffmpeg(1), avplay(1), avprobe(1), the @file
{
ffmpeg/doc/
ff
server.conf
}
ffmpeg(1), avplay(1), avprobe(1), the @file
{
ffmpeg/doc/
av
server.conf
}
example and the Libav HTML documentation
@c man end
...
...
doc/ffmpeg.texi
浏览文件 @
4d58e4cb
...
...
@@ -164,7 +164,7 @@ Set the number of video frames to record.
@item -r @var
{
fps
}
Set frame rate (Hz value, fraction or abbreviation), (default = 25).
@item -s @var
{
size
}
Set frame size. The format is @samp
{
wxh
}
(
ff
server default = 160x128, ffmpeg default = same as source).
Set frame size. The format is @samp
{
wxh
}
(
av
server default = 160x128, ffmpeg default = same as source).
The following abbreviations are recognized:
@table @samp
@item sqcif
...
...
@@ -726,7 +726,7 @@ Set RTP payload size in bytes.
Read input at native frame rate. Mainly used to simulate a grab device.
@item -loop
_
input
Loop over the input stream. Currently it works only for image
streams. This option is used for automatic
FF
server testing.
streams. This option is used for automatic
AV
server testing.
This option is deprecated, use -loop.
@item -loop
_
output @var
{
number
_
of
_
times
}
Repeatedly loop output for formats that support looping such as animated GIF
...
...
@@ -1079,7 +1079,7 @@ file to which you want to add them.
@settitle ffmpeg video converter
@c man begin SEEALSO
avplay(1), avprobe(1),
ff
server(1) and the Libav HTML documentation
avplay(1), avprobe(1),
av
server(1) and the Libav HTML documentation
@c man end
@c man begin AUTHORS
...
...
doc/general.texi
浏览文件 @
4d58e4cb
...
...
@@ -91,7 +91,7 @@ library:
@item Electronic Arts cdata @tab @tab X
@item Electronic Arts Multimedia @tab @tab X
@tab Used in various EA games; files have extensions like WVE and UV2.
@item FFM (
FF
server live feed) @tab X @tab X
@item FFM (
AV
server live feed) @tab X @tab X
@item Flash (SWF) @tab X @tab X
@item Flash 9 (AVM2) @tab X @tab X
@tab Only embedded audio is decoded.
...
...
ffmpeg.c
浏览文件 @
4d58e4cb
...
...
@@ -691,7 +691,7 @@ static OutputStream *new_output_stream(AVFormatContext *oc, int file_idx, AVCode
return
ost
;
}
static
int
read_
ff
server_streams
(
AVFormatContext
*
s
,
const
char
*
filename
)
static
int
read_
av
server_streams
(
AVFormatContext
*
s
,
const
char
*
filename
)
{
int
i
,
err
;
AVFormatContext
*
ic
=
NULL
;
...
...
@@ -3766,9 +3766,9 @@ static void opt_output_file(const char *filename)
if
(
!
strcmp
(
file_oformat
->
name
,
"ffm"
)
&&
av_strstart
(
filename
,
"http:"
,
NULL
))
{
/* special case for files sent to
ff
server: we get the stream
parameters from
ff
server */
int
err
=
read_
ff
server_streams
(
oc
,
filename
);
/* special case for files sent to
av
server: we get the stream
parameters from
av
server */
int
err
=
read_
av
server_streams
(
oc
,
filename
);
if
(
err
<
0
)
{
print_error
(
filename
,
err
);
ffmpeg_exit
(
1
);
...
...
libavformat/ffm.h
浏览文件 @
4d58e4cb
/*
* FFM (
ff
server live feed) common header
* FFM (
av
server live feed) common header
* Copyright (c) 2001 Fabrice Bellard
*
* This file is part of Libav.
...
...
libavformat/ffmdec.c
浏览文件 @
4d58e4cb
/*
* FFM (
ff
server live feed) demuxer
* FFM (
av
server live feed) demuxer
* Copyright (c) 2001 Fabrice Bellard
*
* This file is part of Libav.
...
...
@@ -23,7 +23,7 @@
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "ffm.h"
#if CONFIG_
FF
SERVER
#if CONFIG_
AV
SERVER
#include <unistd.h>
int64_t
ffm_read_write_index
(
int
fd
)
...
...
@@ -55,7 +55,7 @@ void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size)
ffm
->
write_index
=
pos
;
ffm
->
file_size
=
file_size
;
}
#endif // CONFIG_
FF
SERVER
#endif // CONFIG_
AV
SERVER
static
int
ffm_is_avail_data
(
AVFormatContext
*
s
,
int
size
)
{
...
...
@@ -510,7 +510,7 @@ static int ffm_probe(AVProbeData *p)
AVInputFormat
ff_ffm_demuxer
=
{
.
name
=
"ffm"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFM (
FF
server live feed) format"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFM (
AV
server live feed) format"
),
.
priv_data_size
=
sizeof
(
FFMContext
),
.
read_probe
=
ffm_probe
,
.
read_header
=
ffm_read_header
,
...
...
libavformat/ffmenc.c
浏览文件 @
4d58e4cb
/*
* FFM (
ff
server live feed) muxer
* FFM (
av
server live feed) muxer
* Copyright (c) 2001 Fabrice Bellard
*
* This file is part of Libav.
...
...
@@ -242,7 +242,7 @@ static int ffm_write_trailer(AVFormatContext *s)
AVOutputFormat
ff_ffm_muxer
=
{
.
name
=
"ffm"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFM (
FF
server live feed) format"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFM (
AV
server live feed) format"
),
.
mime_type
=
""
,
.
extensions
=
"ffm"
,
.
priv_data_size
=
sizeof
(
FFMContext
),
...
...
libavformat/mpjpeg.c
浏览文件 @
4d58e4cb
...
...
@@ -22,7 +22,7 @@
/* Multipart JPEG */
#define BOUNDARY_TAG "
ff
server"
#define BOUNDARY_TAG "
av
server"
static
int
mpjpeg_write_header
(
AVFormatContext
*
s
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录