一、嵌入式开发板采集音视频(远程)
音频采集程序:./audioc -i 222.222.222.222 -p 8888;
视频采集程序:./videoc -i 222.222.222.222 -p 9999;
音频采集程序利用alsa库,采集原始音频帧,发送至服务器进程(222.222.222.222, 8888);
视频采集程序利用v4l2库,采集原始视频帧,h.264硬编码后,发送至服务器进程(222.222.222.222, 9999);
二、Linux服务器接收音视频
音频接收程序:./audios -rp 8888 -sp 8899 -i 239.255.1.2;
视频接收程序:./videos -rp 9999 -sp 9988 -i 239.255.1.2;
音频接收程序,接收原始音频帧,并发送至组播(239.255.1.2, 8899);
视频接收程序,接收264视频帧,并发送至组播(239.255.1.2, 9988);
三、ffserver流媒体服务器搭建
1. ffserver的配置文件:ffserver.conf
配置文件如:
####################################################################
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
HTTPPort 8090
# Address on which the server is bound. Only useful if you have
# several network interfaces.
HTTPBindAddress 0.0.0.0
# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000
# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000
# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000
# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog -
######################################################################
######