Live555+Windows+MSys2 编译Androidso库和运行使用(二,实验篇)

news2025/3/29 3:42:33

文章目录

          • 实验
          • 下载推流服务端版本
          • 运行

摘要:书接上回 https://blog.csdn.net/qq_20330595/article/details/146412411?spm=1001.2014.3001.5502 我们先做几个试验,方便我们理解rtsp推流,先把采集和播放体验一下,我们最后回到代码本身进行修改编译和运行。

实验

开启服务

maqi@maqi:~/Desktop/Live555/live/linux-64bit/usr/local/bin$ ./testOnDemandRTSPServer 8554

"mpeg4ESVideoTest" stream, from the file "test.m4e"
Play this stream using the URL "rtsp://192.168.145.130:8554/mpeg4ESVideoTest"

"h264ESVideoTest" stream, from the file "test.264"
Play this stream using the URL "rtsp://192.168.145.130:8554/h264ESVideoTest"

"h265ESVideoTest" stream, from the file "test.265"
Play this stream using the URL "rtsp://192.168.145.130:8554/h265ESVideoTest"

"mpeg1or2AudioVideoTest" stream, from the file "test.mpg"
Play this stream using the URL "rtsp://192.168.145.130:8554/mpeg1or2AudioVideoTest"

"mpeg1or2ESVideoTest" stream, from the file "testv.mpg"
Play this stream using the URL "rtsp://192.168.145.130:8554/mpeg1or2ESVideoTest"

"mp3AudioTest" stream, from the file "test.mp3"
Play this stream using the URL "rtsp://192.168.145.130:8554/mp3AudioTest"

"wavAudioTest" stream, from the file "test.wav"
Play this stream using the URL "rtsp://192.168.145.130:8554/wavAudioTest"

"amrAudioTest" stream, from the file "test.amr"
Play this stream using the URL "rtsp://192.168.145.130:8554/amrAudioTest"

"vobTest" stream, from the file "test.vob"
Play this stream using the URL "rtsp://192.168.145.130:8554/vobTest"

"mpeg2TransportStreamTest" stream, from the file "test.ts"
Play this stream using the URL "rtsp://192.168.145.130:8554/mpeg2TransportStreamTest"

"aacAudioTest" stream, from the file "test.aac"
Play this stream using the URL "rtsp://192.168.145.130:8554/aacAudioTest"

"dvVideoTest" stream, from the file "test.dv"
Play this stream using the URL "rtsp://192.168.145.130:8554/dvVideoTest"

"ac3AudioTest" stream, from the file "test.ac3"
Play this stream using the URL "rtsp://192.168.145.130:8554/ac3AudioTest"

"matroskaFileTest" stream, from the file "test.mkv"
Play this stream using the URL "rtsp://192.168.145.130:8554/matroskaFileTest"

"webmFileTest" stream, from the file "test.webm"
Play this stream using the URL "rtsp://192.168.145.130:8554/webmFileTest"

"oggFileTest" stream, from the file "test.ogg"
Play this stream using the URL "rtsp://192.168.145.130:8554/oggFileTest"

"opusFileTest" stream, from the file "test.opus"
Play this stream using the URL "rtsp://192.168.145.130:8554/opusFileTest"

"mpeg2TransportStreamFromUDPSourceTest" stream, from a UDP Transport Stream input source 
	(IP multicast address 239.255.42.42, port 1234)
Play this stream using the URL "rtsp://192.168.145.130:8554/mpeg2TransportStreamFromUDPSourceTest"

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



复制测试文件
在这里插入图片描述

vlc播放
在这里插入图片描述
./testRTSPClient rtsp://127.0.0.1:8554/h264ESVideoTest
./testRTSPClient rtsp://127.0.0.1:8554/mp3AudioTest

下载推流服务端版本

https://github.com/bluenviron/mediamtx/releases/tag/v1.11.3
uname -m
mediamtx_v1.11.3_linux_amd64.tar.gz b2e65c0be00434b13e01feb64e85af4bc65fa3c62d1b9aa2d4139bd28d795cba

运行

./mediamtx
端口占用

maqi@maqi:~/Desktop$ tar -zxvf mediamtx_v1.11.3_linux_amd64.tar.gz 
mediamtx
mediamtx.yml
LICENSE
maqi@maqi:~/Desktop$ ./mediamtx
2025/03/24 22:04:16 INF MediaMTX v1.11.3
2025/03/24 22:04:16 INF configuration loaded from /home/maqi/Desktop/mediamtx.yml
2025/03/24 22:04:16 ERR listen tcp :8554: bind: address already in use
2025/03/24 22:04:16 INF waiting for running hooks

运行成功

maqi@maqi:~/Desktop$ ./mediamtx
2025/03/24 22:06:56 INF MediaMTX v1.11.3
2025/03/24 22:06:56 INF configuration loaded from /home/maqi/Desktop/mediamtx.yml
2025/03/24 22:06:56 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2025/03/24 22:06:56 INF [RTMP] listener opened on :1935
2025/03/24 22:06:56 INF [HLS] listener opened on :8888
2025/03/24 22:06:56 INF [WebRTC] listener opened on :8889 (HTTP), :8189 (ICE/UDP)
2025/03/24 22:06:56 INF [SRT] listener opened on :8890 (UDP)

投屏
全屏录制
ffmpeg -f x11grab -video_size $(xdpyinfo | grep dimensions | awk '{print $2;}') -r 30 -i :0.0 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -f rtsp -g 5 -an rtsp://192.168.145.130:8554/mystream
在这里插入图片描述
vlc播放
rtsp://192.168.145.130:8554/mystream
ffplay播放
ffplay -i rtsp://192.168.145.130:8554/mystream
go2rtc在线播放
https://github.com/AlexxIT/go2rtc

运行
在这里插入图片描述
http://localhost:1984/log.html
在这里插入图片描述
录屏效果展示
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2321852.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

工作杂谈(十七)——研发阶段术语

EVT/DVT/PVT/MP是指在制造行业一个产品研发导入从试产到量产的不同阶段:   EVT:Engineering Verification Test工程验证测试阶段   DVT:Design Verification Test设计验证测试   PVT:Production Verification Test 小批量生…

2025 polarctf春季个人挑战赛web方向wp

来个弹窗 先用最基础的xss弹窗试一下 <script>alert("xss")</script>没有内容&#xff0c;猜测过滤了script&#xff0c;双写绕过一下 <scrscriptipt>alert("xss")</scscriptript>background 查看网页源代码 查看一下js文件 类…

RabbitMQ 学习整理1 - 基础使用

项目代码&#xff1a;RabbitMQDemo: 学习RabbitMQ的一些整理 基本概念 RabbitMQ是一种基于AMQP协议的消息队列实现框架RabbitMQ可以用于在系统与系统之间或者微服务节点之间&#xff0c;进行消息缓存&#xff0c;消息广播&#xff0c;消息分配以及限流消峰处理RabbitMQ-Serve…

分布式渲染与云渲染:技术与应用的黄金搭档

一、核心概念&#xff1a;先区分再关联 分布式渲染是通过多台设备并行计算拆分渲染任务的技术&#xff08;如将一帧拆分为 64 个小块&#xff0c;64 台电脑同时渲染&#xff09;&#xff1b; 云渲染是基于云计算的渲染服务&#xff0c;本质是分布式渲染的商业化落地—— 用户无…

【实战ES】实战 Elasticsearch:快速上手与深度实践-5.2.1 多字段权重控制(标题、品牌、类目)

&#x1f449; 点击关注不迷路 &#x1f449; 点击关注不迷路 &#x1f449; 点击关注不迷路 文章大纲 电商商品搜索实战&#xff1a;多字段权重控制策略1. 业务场景与核心挑战1.1 典型搜索问题1.2 权重失衡的影响数据 2. 权重控制核心方案2.1 字段权重分配矩阵2.2 多策略组合方…

如何避免测试数据准备不充分或不可复用

避免测试数据准备不充分或不可复用的关键方法包括明确数据需求、统一数据管理工具、建立数据复用机制、定期维护更新测试数据以及加强团队沟通与协作。 其中&#xff0c;统一数据管理工具对确保数据质量和复用性尤为重要。例如&#xff0c;许多团队采用专门的测试数据管理工具以…

使用AI一步一步实现若依(23)

功能23&#xff1a;从后端获取路由/菜单数据 功能22&#xff1a;用户管理 功能21&#xff1a;使用axios发送请求 功能20&#xff1a;使用分页插件 功能19&#xff1a;集成MyBatis-Plus 功能18&#xff1a;创建后端工程 功能17&#xff1a;菜单管理 功能16&#xff1a;角色管理…

第一天学爬虫

阅读提示&#xff1a;我今天才开始尝试爬虫&#xff0c;写的不好请见谅。 一、准备工具 requests库&#xff1a;发送HTTP请求并获取网页内容。BeautifulSoup库&#xff1a;解析HTML页面并提取数据。pandas库&#xff1a;保存抓取到的数据到CSV文件中。 二、爬取步骤 发送请求…

W、M、C练题笔记(持续更新中)

web here are the flag 点击&#xff0c;页面跳转404.php&#xff0c;用bp抓包访问/flag.php页面&#xff0c;得到flag用base64解码 TryToFindFlag 打开后查看源代码 发现是robots协议&#xff0c;访问robots.txt 访问flllaaa......&#xff0c;得到空白页面&#xff0c;查看…

CVE-2021-45232未授权接口练习笔记

CVE-2021-45232 是 Apache APISIX Dashboard 中的一个严重权限漏洞&#xff0c;类似于攻击者无需密码即可拿到整个网关系统的“万能钥匙”。攻击者利用此漏洞&#xff0c;可直接操控网关流量转发规则&#xff0c;甚至远程执行代码&#xff0c;引发服务器沦陷。 默认账户密码导致…

贪心算法——c#

贪心算法通俗解释 贪心算法是一种"每一步都选择当前最优解"的算法策略。它不关心全局是否最优&#xff0c;而是通过局部最优的累积来逼近最终解。优点是简单高效&#xff0c;缺点是可能无法得到全局最优解。 一句话秒懂 自动售货机找零钱&#xff1a;用最少数量的…

Retrofit中scalars转换html为字符串

简介 在Retrofit中&#xff0c;如果你想直接获取HTML或其他文本格式的响应内容而不是将其映射到一个模型类&#xff0c;ScalarsConverterFactory 就派上用场了。ScalarsConverterFactory 是一个转换器工厂&#xff0c;它能够将响应体转换为Java基本类型如String、Integer或Byte…

【微服务架构】SpringCloud(七):配置中心 Spring Cloud Config

文章目录 配置中心为什么需要配置中心配置中心介绍 服务搭建基于GITHUB1.创建仓库2.新建微服务作为配置中心服务3.启动测试拉取 匹配规则分支读取 客户端配置配置文件引入依赖使用远程配置 刷新配置手动配置热更新自动刷新erlang安装RabbitMQ安装环境变量管理界面服务配置测试 …

Linux学习笔记(应用篇二)

基于I.MX6ULL.MINI开发板 开发板与电脑相互通信电脑与开发板互传文件 开发板与电脑相互通信 用网线将电脑与开发板连接 本人使用的是Ubuntu系统&#xff0c;不是虚拟机 一般来说刚开始电脑和开发板是ping不通的 首先查看电脑的 IP WinR&#xff0c;cmd调出终端 我使用的是…

记录一次部署k3s后,服务404 page not found,nginx显示正常

服务部署k3s后&#xff0c;正常入口端怎么返回都是80&#xff0c;且返回错误 TRAEFIK DEFAULT CERT ERR_CERT_AUTHORITY_INVALID ngnix显示也是正常&#xff0c;怎么找也找不到问题 后来通过 iptables -L -n -t nat|grep 80 发现入口端流量被DNAT转到新的服务 而k3s中&#…

mac上安装nvm及nvm的基本语法使用!!

种一棵树&#xff0c;最好是十年前&#xff0c;其次是现在&#xff01;想要改变&#xff0c;从此刻开始&#xff0c;一切都不晚&#xff01; 目录 nvm是什么&#xff1f;前提条件&#xff1a;安装homebrew如果系统已经有node版本&#xff1a;在mac上安装nvm&#xff1a;用nvm安…

(基本常识)C++中const与引用——面试常问

作者&#xff1a;求一个demo 版权声明&#xff1a;著作权归作者所有&#xff0c;商业转载请联系作者获得授权&#xff0c;非商业转载请注明出处 内容通俗易懂&#xff0c;没有废话&#xff0c;文章最后是面试常问内容&#xff08;建议通过标题目录学习&#xff09; 废话不多…

dfs(深度优先)——太抽象了

1. 两种方法 #include<bits/stdc.h> using namespace std; //void dfs(int index,int n,vector<int> current) //{ // if(index>n){ // for(int i0;i<current.size();i){ // cout<<current[i]<<" "; // } // cout<<endl;…

python --face_recognition(人脸识别,检测,特征提取,绘制鼻子,眼睛,嘴巴,眉毛)/活体检测

dlib 安装方法 之前博文 https://blog.csdn.net/weixin_44634704/article/details/141332644 环境: python3.8 opencv-python4.11.0.86 face_recognition1.3.0 dlib19.24.6人脸检测 import cv2 import face_recognition# 读取人脸图片 img cv2.imread(r"C:\Users\123\…

redis解决缓存穿透/击穿/雪崩

文章目录 1.缓存穿透1.1 概念1.2 解决方案1.2.1 缓存空对象1.2.2 布隆过滤 1.2 店铺查询使用缓存穿透解决方案1.2.1 流程 2.缓存雪崩2.1 什么是缓存雪崩&#xff1f;2.2 雪崩解决方案 3.缓存击穿3.1 什么是缓存击穿&#xff1f;3.2解决方案3.2.1 基于互斥锁解决缓存击穿问题&am…