当前位置:网站首页>How to use RTSP streaming component easypusher to push MP4 files to easydarwin open source platform?

How to use RTSP streaming component easypusher to push MP4 files to easydarwin open source platform?

2020-11-09 17:46:38 TSINGS

EasyPusher It is a free one maintained by Qingxi video team RTSP Thruster ,EasyDarwin Is an open source streaming media service , Recently, I met a lot of netizens' consultation , How to integrate MP4 File push to EasyDarwin The problem of , Let's implement the process step by step .

EasyPlayer EasyPusher.png

EasyPusher Provides a push FILE The engineering of DEMO, Engineering, :EasyPusher_FILE.

1、 First read the video file ,DEMO Under the program directory , as follows :
std::string sTestFilm = “./test.mp4”;
And then from MP4 File access audio and video coding information , fill pusher In the structure of media information

53.png

Then judge whether the audio track and video track exist or not and deal with it accordingly , Set up callbacks and call push functions :

EasyPusher_SetEventCallback(g_fPusherHandle, __EasyPusher_Callback, 0, NULL);// Callback function 
EasyPusher_StartStream(g_fPusherHandle, ConfigIP, atoi(ConfigPort), ConfigName, EASY_RTP_OVER_TCP, "admin", "admin", &mediainfo, 1024, 0);// push , By default TCP Way to connect 

After a successful push , We are EasyDarwin As you can see, the video stream we pushed is shown below :

54.png

It can be used VLC Pull the stream to see the playback effect , Here's the picture :

55.png

If there are users who want to know about our open source projects , Can enter the EasyDarwin understand , And after years of experience , We've developed a system based on EasyDarwin Derivative EasyNVR、EasyDSS Wait for the video platform , You can all understand . If you have any questions , Welcome to consult .

版权声明
本文为[TSINGS]所创,转载请带上原文链接,感谢