当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 明年起旧版本安卓设备将无法浏览大约30%的网页
- 详解Git
- 标梵互动解说小程序开发该如何选择?
- Gesture switch background, let live with goods more immersive
- 标梵IPFS矿机app软件开发软件 IPFSApp开发方法详解
- The selection of wire displacement encoder needs the guidance of precise electronics
- 函数计算进阶-IP查询工具开发
- 浅谈API网关(API Gateway)如何承载API经济生态链
- How to design and implement storage QoS?
- [God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!
猜你喜欢

第三阶段 Day20 购物车模块实现 添加拦截器 添加用户权限校检 实现订单模块
![[graffiti Internet of things footprint] graffiti cloud platform interface description](/img/f9/521c69fed884058e3800af0ea06bc0.jpg)
[graffiti Internet of things footprint] graffiti cloud platform interface description

分享用MathType编辑字母与数学公式的技巧

企业公司开发微信小程序适用于哪些行业?

双十一大秒杀,云服务器低至 0.7 折

Share tips on editing letters and mathematical formulas with MathType

How to edit summation formula in MathType

(3) ASP.NET Core3.1 Ocelot certification

Flink的安装部署

Solve the problem that the page does not refresh after the wechat applet uses switchtab to jump
随机推荐
GPS对时系统(网络对时仪器)应用电子政务系统
分享用MathType编辑字母与数学公式的技巧
超简单集成华为系统完整性检测,搞定设备安全防护
一个实用的Chrome小工具:xTrace
Equivalent judgment between floating point numbers
OpenOCD-JTAG调试
函数计算进阶-IP查询工具开发
菜鸟福音,28本书籍循序渐进让你成为大牛!(附学习大纲一份)
MathType中如何编辑求和公式
第三阶段 Day16 用户模块跳转 SSO单点登录 JSONP/cors跨域方式 用户登录校检
[invite you to vote] who is the key driver behind these big open source events in 2020?
【STM32F429】第6章 ThreadX GUIX上手之STM32F429 DMA2D加速
MIT6.824分布式系统课程 翻译&学习笔记(三)GFS
How about Tencent cloud amd cloud server?
脑机接口先驱炮轰马斯克:“他走的是一条死胡同,说的话我一个字都不同意”
Configure static IP address in ubuntu18.04 NAT mode -2020.11.09
高性能库DPDK精简理解
Gesture switch background, let live with goods more immersive
Android软键盘遮挡的四种解决方案
How to design and implement storage QoS?