阿哥论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 78|回复: 0

rtsp服务器以及rtsp推流/拉流/转发

[复制链接]

升级  39%

举人

Rank: 3Rank: 3

积分
317
 楼主| 发表于 2020-4-2 09:20:27 | 显示全部楼层 |阅读模式
rtsp服务器以及rtsp推流/拉流/转发

rtsp服务器
1、live555
2、ZLMediaKit
3、ffserver
4、gst-rtsp-server
5、feng
6、rtspd

1)live555 proxyServer
live555库文件编译
https://www.cnblogs.com/dong1/p/5861624.html
源码
live/proxyServer/live555ProxyServer.cpp
编译
g++ live555ProxyServer.cpp -o live555ProxyServer \
-I $(pwd)/liveMedia/include ./liveMedia/libliveMedia.a \
-I $(pwd)/groupsock/include ./groupsock/libgroupsock.a \
-I $(pwd)/BasicUsageEnvironment/include ./BasicUsageEnvironment/libBasicUsageEnvironment.a \
-I $(pwd)/UsageEnvironment/include ./UsageEnvironment/libUsageEnvironment.a \
运行

./live555ProxyServer rtsp://admin:12345@172.16.23.142:554/H.264/ch1/main/av_stream
LIVE555 Proxy Server
    (LIVE555 Streaming Media library version 2019.06.28; licensed under the GNU LGPL)

Created new TCP socket 4 for connection
RTSP stream, proxying the stream "rtsp://admin:12345@172.16.23.142:554/H.264/ch1/main/av_stream"
    Play this stream using the URL: rtsp://172.16.23.140:8554/proxyStream

(We use port 8000 for optional RTSP-over-HTTP tunneling.)


2)rtsp2rtmp
rtsp stream to rtmp
How to use:
cd demo
go build demo.go
./demo -rtspUrl "rtsp://admin:123456@10.1.51.13/H264?ch=1&subtype=0" -rtmpUrl "rtmp://10.1.51.20:1935/myapp/cv"

3)ffmpeg推送rtsp码流到rtmp服务器
摄像头
HIKVISION DS-2CD23RZ
admin 12345
rtsp://admin:12345@172.16.23.142:554/H.264/ch1/main/av_stream
转推送
ffmpeg -i "rtsp://admin:12345@172.16.23.142:554/H.264/ch1/main/av_stream" -f flv -r 25 -s 1920x1080 -an "rtmp://182.61.45.149:1935/live/movie"
ffmpeg -rtsp_transport tcp -re -i "rtsp://admin:12345@172.16.23.142:554/H.264/ch1/main/av_stream" -vcodec libx264 -preset ultrafast -acodec aac -f flv  rtmp://182.61.45.149:1935/live/movie
播放
ffplay rtmp://182.61.45.149:1935/live/movie

4)还有srs Ingest模块
我从2014年到如今(2019年7月30日)都没用起来,有谁验证过的请告诉我一声。因为选择太多,我也不迷恋srs,所以这些年也就没折腾了。
采集(Ingest)指的是将文件(flv,mp4,mkv,avi,rmvb等等),流(RTMP,RTMPT,RTMPS,RTSP,HTTP,HLS等等),设备等的数据,
转封装为RTMP流(若编码不是h264/aac则需要转码),推送到SRS。

5)基于gstreamer的rtsp推送,转发和拉取
1)gstreamer rtsp拉流播放
2)gstereamer rtsp推流


网上搜一圈,太多了,一杯茶得功夫,挖出下面一大堆,不用干重复劳动了,珍惜时间。
https://github.com/beatgammit/rtsp
https://github.com/iizukanao/node-rtsp-rtmp-server
https://github.com/Streamedian/HTML5_rtsp_player
https://github.com/anyRTC/anyRTC-RTMP-OpenSource
https://github.com/NiuStar/XRtspServer
https://github.com/statueofmike/rtsp
https://blog.csdn.net/xwu122930/article/details/78962234



分类: 1.1 数字媒体软件设计
摘自:https://www.cnblogs.com/dong1/p/10135277.html


您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表