使用gstreamer中自带的rtsp服务器,就能快速的以管道的形式搭建rtsp服务器推流 下载gst-rtsp-server 查看自己系统gstreamer的版本,在gstreamer官网下载相关版
使用gstreamer中自带的rtsp服务器,就能快速的以管道的形式搭建rtsp服务器推流
下载gst-rtsp-server
查看自己系统gstreamer的版本,在gstreamer官网下载相关版本.tar.xz源码包。解压后进入目录。./configurer 然后make编译。进入examples目录就能看到已经编译好的各种示例程序以及源码
gst-inspect-1.0 --version
推流usb摄像头JPEG格式视频同时显示
./test-launch “( v4l2src device=/dev/video0 ! image/jpeg,width=1280,height=720,framerate=30/1 ! jpegdec ! timeoverlay ! tee name=vsrc vsrc. ! queue ! videoconvert ! ximagesink vsrc. ! queue ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 )”
推流videotestsrc
./test-launch “( videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! timeoverlay ! tee name=vsrc vsrc. ! queue ! videoconvert ! ximagesink vsrc. ! queue ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 )”
转发H265
./test-launch "( rtspsrc latency=10 location=rtsp://192.168.20.51:8554/123 ! queue ! rtph265depay ! queue ! rtph265pay name=pay0 pt=98 )"
转发H264
./test-launch "( rtspsrc latency=20 location=rtsp://192.168.20.51:8554/123 ! queue ! rtph264depay ! queue ! rtph264pay name=pay0 pt=96 )"
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo apt install mpvsudo apt install libmpv-devmpv rtsp://192.168.144.25:8554/main.264
安装gstreamer基础库
sudo apt-get install libgl1-mesa-devsudo apt-get install gstreamer1.0-libavsudo apt-get install gstreamer1.0-plugins-badsudo apt-get install gstreamer1.0-plugins-basesudo apt-get install gstreamer1.0-plugins-uglysudo apt-get install gstreamer1.0-plugins-Good
安装gst-rtsp功能包
sudo apt-get install gtk-doc-toolsgit clone -b 1.8 https://GitHub.com/GStreamer/gst-rtsp-server.git cd gst-rtsp-server ./autogen.shsudo makecd example/./test-launch "( rtspsrc latency=20 location=rtsp://192.168.1.64 ! queue ! rtph264depay ! queue ! rtph264pay name=pay0 pt=96 )"
configure: error: Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met:
No package ‘glib-2.0’ found
No package ‘gobject-2.0’ found
sudo apt install -y libglib2.0-dev
configure: No package ‘gstreamer-1.0’ found
configure: error: no gstreamer-1.0 >= 1.8.0 (GStreamer) found
configure failed
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
来源地址:https://blog.csdn.net/z1872385/article/details/131063765
--结束END--
本文标题: 使用gst-rtsp-server搭建rtsp服务器转发rtsp
本文链接: https://lsjlt.com/news/398017.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0