当前位置:网站首页>如何使用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
边栏推荐
- 高质量的缺陷分析:让自己少写 bug
- Git + -- Code hosting in the history of version management
- Express yourself with wechat expression translation, programmer's little romance, get up quickly!
- The internal network penetration of raspberry is built and maintained. No server is required for intranet penetration
- The database executes truncate table cm_ CHECK_ ITEM_ How does his recover
- 5分钟GET我使用Github 5 年总结的这些骚操作!
- H264Nalu头部解析
- Easyexcel exports according to the filter column (not empty in the middle, the order can be adjusted)
- 【面试经验】BAT程序员面试200人,常见最常问的面试问题做出解析
- The selection of wire displacement encoder needs the guidance of precise electronics
猜你喜欢

零基础小白python入门——深入Python中的文件操作

GPS对时系统(网络对时仪器)应用电子政务系统

超简单集成华为系统完整性检测,搞定设备安全防护

同事笔记-小程序入坑点

电商/直播速看!双11跑赢李佳琦就看这款单品了!

CIM平台可视化建设

Learning notes of millet mall, day 5: ES full text search

Day83: Luffy: add shopping cart & navigation bar shopping cart digital display & shopping cart page display

Knowledge mapping 1.1 -- starting from NER

How to implement a simple student management system with C + +
随机推荐
[God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!
GPS对时系统(网络对时仪器)应用电子政务系统
The applet calls the native onshareappmessage to share. What if the imageurl parameter is in MP4 format
小程序调用原生onShareAppMessage分享,imageUrl参数是mp4格式怎么办
Echart sets the spacing between columns
浮点数之间的等值判断
OpenOCD-JTAG调试
从一次需求改良漫谈php文件分片上传
DCL单例模式中的缺陷及单例模式的其他实现
CentOS view the number of CPU cores and cpuinfo analysis
[invite you to vote] who is the key driver behind these big open source events in 2020?
菜鸟福音,28本书籍循序渐进让你成为大牛!(附学习大纲一份)
How important these built-in icons are to easily build a high profile application interface!
Ultra simple integration of Huawei system integrity testing, complete equipment security protection
【邀你投票】谁是2020年这些开源大事件背后的关键推动者?
Exhibition cloud technology interpretation | in the face of emergencies, how does app do a good job in crash analysis and performance monitoring?
RBAC of kubernetes authority management (1)
[share] interface tests how to transfer files in post request
用会声会影替换视频背景原来这么简单
.NET报表生成器Stimulsoft Reports.Net 发布最新版v2020.5!
