当前位置:网站首页>C console calls ffmpeg to push MP4 video file to stream media open source service platform easydarwin process
C console calls ffmpeg to push MP4 video file to stream media open source service platform easydarwin process
2020-11-09 17:46:00 【TSINGS】
I wrote a popular science article before 《 How to use RTSP Push flow components EasyPusher take MP4 File pushed to EasyDarwin Open source platform 》, In this article , We tried to pass EasyPusher take MP4 File pushed to EasyDarwin, But in addition to this method , We have other ways to MP4 File push to EasyDarwin On .
This article will share with you C# The console calls FFMPEG PUSH MP4 Video files to streaming media open source service platform EasyDarwin The process .
1、 Create a new console application project , Will download okay FFMPEG Put it under the program root , Here's the picture :

stay main Write the following code in the function :
static void Main(string[] args)
{
string exePath = "./ffmpeg/bin/ffmpeg.exe";
string arguments = "";
arguments = "-re -stream_loop -1 -i test.mp4 -vf ";
arguments += "settb=AVTB,setpts='trunc(PTS/1K)*1K+st(1,trunc(RTCTIME/1K))-1K*trunc(ld(1)/1K)',drawtext=fontsize=20:fontcolor=white:text='%{localtime}'";
arguments += " -rtsp_transport tcp -vcodec h264 -f rtsp rtsp://127.0.0.1:554/test2.sdp";
ProcessStartInfo info = new ProcessStartInfo(exePath, arguments);
info.WindowStyle = ProcessWindowStyle.Hidden;
info.UseShellExecute = false;
info.RedirectStandardInput = false;// May accept input from the caller
info.RedirectStandardOutput = false;// Get the output information from the calling program
info.RedirectStandardError = false;// Redirect standard error output
info.CreateNoWindow = false;// Don't show program window
Process AppProcess = System.Diagnostics.Process.Start(info);
AppProcess.WaitForExit();
}
2、 Run the console program , You can see the program directory in the test.mp4 Video with RTSP Push the form to EasyDarwin, Let's look at streaming servers EasyDarwin Operating condition :

It can be used VLC Check the actual playback effect , Here's the picture :

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]所创,转载请带上原文链接,感谢
边栏推荐
- 【面试经验】BAT程序员面试200人,常见最常问的面试问题做出解析
- 融云集成之避坑指南-Android推送篇
- 关于生活,可能有用的40条建议
- 浮点数之间的等值判断
- Configure static IP address in ubuntu18.04 NAT mode -2020.11.09
- In the third stage, day16 user module jumps to SSO single sign on jsonp / CORS cross domain user login verification
- Six axes of calibration service
- Solve the problem that the page does not refresh after the wechat applet uses switchtab to jump
- Share tips on editing letters and mathematical formulas with MathType
- 小程序调用原生onShareAppMessage分享,imageUrl参数是mp4格式怎么办
猜你喜欢
![[interview experience] bat programmers interviewed 200 people and analyzed the most frequently asked interview questions](/img/ab/b8a437d045d422a6a5c75fa4cc9dee.jpg)
[interview experience] bat programmers interviewed 200 people and analyzed the most frequently asked interview questions

运用强大的 PowerBI 桑基图表示复杂运营业务流

浮点数之间的等值判断

How to edit summation formula in MathType

andorid实例-简单登录布局

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

Configure static IP address in ubuntu18.04 NAT mode -2020.11.09

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

MathType中如何编辑求和公式

SEO solution development, how to break away from the shadow of the bow?
随机推荐
浮点数之间的等值判断
函数计算进阶-IP查询工具开发
How the API gateway carries the API economic ecological chain
如何设计并实现存储QoS?
JS object array de duplication
iOS下带小数点的数字键盘
Detailed explanation of ipfsapp development method of biaofen IPFs mining machine app software development software
(3)ASP.NET Core3.1 Ocelot认证
How to edit summation formula in MathType
CentOS view the number of CPU cores and cpuinfo analysis
Which industries are suitable for enterprises to develop wechat applet?
R8 compiler: tailoring kotlin libraries and Applications
Learning notes of millet mall, day 5: ES full text search
详解Git
【邀你投票】谁是2020年这些开源大事件背后的关键推动者?
How important these built-in icons are to easily build a high profile application interface!
程序模拟感知机算法(梯度下降法、sklearn.linear_model中perception方法)
Easyexcel exports according to the filter column (not empty in the middle, the order can be adjusted)
手势切换背景,让直播带货更加身临其境
Ultra simple integration of Huawei system integrity testing, complete equipment security protection