当前位置:网站首页>如何使用RTSP推流组件EasyPusher将MP4文件推到EasyDarwin开源平台?
如何使用RTSP推流组件EasyPusher将MP4文件推到EasyDarwin开源平台?
2020-11-09 17:46:00 【TSINGSEE】
EasyPusher是青犀视频团队维护的一款免费RTSP推流器,EasyDarwin是一款开源的流媒体服务,最近遇到很多网友咨询,如何将MP4文件推送至EasyDarwin的问题,下面我们来一步一步实现其过程。

EasyPusher提供了一个推送FILE的工程DEMO,工程名为:EasyPusher_FILE。
1、首先读取视频文件,DEMO中定义的为程序目录下,如下:
std::string sTestFilm = “./test.mp4”;
然后从MP4文件获取音视频编码信息,填入pusher媒体信息结构中

然后判断音频轨和视频轨是否存在做相应处理,设置回调和调用推送函数:
EasyPusher_SetEventCallback(g_fPusherHandle, __EasyPusher_Callback, 0, NULL);//回调函数
EasyPusher_StartStream(g_fPusherHandle, ConfigIP, atoi(ConfigPort), ConfigName, EASY_RTP_OVER_TCP, "admin", "admin", &mediainfo, 1024, 0);//推送,默认采用TCP方式连接
推送成功后,我们在EasyDarwin可以看到我们推送的视频流显示如下:
可以用VLC拉流看下播放效果,如下图:

如果有用户想了解我们的开源项目,可以进入EasyDarwin了解,并且经过多年的经验积累,我们已经研发出了基于EasyDarwin衍生的EasyNVR、EasyDSS等视频平台,大家均可了解。如有疑问,欢迎咨询。
版权声明
本文为[TSINGSEE]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4619556/blog/4710249
边栏推荐
- Gesture switch background, let live with goods more immersive
- Super discount, cloud server 88 yuan seconds
- Openocd-jtag debugging
- 2020中国电信终端技术与标准论坛上专家解读四大热门产业
- Avoid pitfall guide for cloud integration - Android push
- 最新版PyCharm 2020.3 :可实现结对编程,智能文本校对等|附下载体验
- 零基础小白python入门——深入Python中的文件操作
- 从硅谷到小米,崔宝秋的25年开源人生
- Serilog 源码解析——Sink 的实现
- 【运维思考】如何做好云上运维服务?
猜你喜欢

EasyExcel根据筛选列导出(中间不空列,顺序可调整)

How to implement a simple student management system with C + +

从一次需求改良漫谈php文件分片上传

Function calculation advanced IP query tool development

SEO solution development, how to break away from the shadow of the bow?

第三阶段 Day19 用户回显 封装Cookie 商品远程调用 购物车模块 CRUD操作

详解Git

用会声会影替换视频背景原来这么简单

解析:C++如何实现简单的学生管理系统(源码分享)

Gesture switch background, let live with goods more immersive
随机推荐
The database executes truncate table cm_ CHECK_ ITEM_ How does his recover
会展云技术解读 | 面对突发事故,APP 如何做好崩溃分析与性能监控?
Chrome浏览器 js 关闭窗口失效解决方法
腾讯云AMD云服务器怎么样好不好?
(3)ASP.NET Core3.1 Ocelot认证
SEO solution development, how to break away from the shadow of the bow?
Explain git in detail
In the third stage, the day20 Shopping Cart module is added, the interceptor is added, the user authority is checked, and the order module is realized
How the API gateway carries the API economic ecological chain
Learning notes of millet mall, day 5: ES full text search
Installation and testing of Flink
Ubuntu18.04 NAT模式下配置静态IP地址 -2020.11.09
Help enterprises to get rid of difficulties, famous enterprises return home Engineers: success depends on it!
Flink的安装和测试
零基础小白python入门——深入Python中的文件操作
从硅谷到小米,崔宝秋的25年开源人生
[God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!
[operation and maintenance thinking] how to do a good job in cloud operation and maintenance services?
【面试经验】BAT程序员面试200人,常见最常问的面试问题做出解析
CentOS查看CPU核心数及cpuinfo解析
