采用ffmpeg和ffserver实现音视频直播和点播

一、嵌入式开发板采集音视频(远程)        音频采集程序:./audioc -i 222.222.222.222 -p 8888;        视频采集程序:./videoc -i 222.222.222.222 -p 9999;        音频采集程序利用alsa库,采集原始音频帧,发送至服务器进程(222.222.222.222,  8888);        视频
摘要由CSDN通过智能技术生成

一、嵌入式开发板采集音视频(远程)

        音频采集程序:./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 -
######################################################################





######
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值