当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 菜鸟福音,28本书籍循序渐进让你成为大牛!(附学习大纲一份)
- Ultra simple integration of Huawei system integrity testing, complete equipment security protection
- Detailed explanation of ipfsapp development method of biaofen IPFs mining machine app software development software
- ABBYY FineReader 15新增编辑页面布局功能
- Equivalent judgment between floating point numbers
- Numeric keyboard with decimal point in IOS
- 轻松构建高颜值应用界面,这些内置图标多重要!
- flask图书CURD小项目
- QML Repeater
- 脑机接口先驱炮轰马斯克:“他走的是一条死胡同,说的话我一个字都不同意”
猜你喜欢

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

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

R8 编译器: 为 Kotlin 库和应用 '瘦身'

拉线位移编码器的选择,需要精量电子的指导

Git + -- Code hosting in the history of version management

Which industries are suitable for enterprises to develop wechat applet?

以太网模块是什么,以太网模块的功能和特点

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

Chrome浏览器 js 关闭窗口失效解决方法

(3)ASP.NET Core3.1 Ocelot认证
随机推荐
EasyExcel根据筛选列导出(中间不空列,顺序可调整)
几乎刷完了力扣所有的链表题,我发现了这些东西。。。
[invite you to vote] who is the key driver behind these big open source events in 2020?
QML Repeater
The applet calls the native onshareappmessage to share. What if the imageurl parameter is in MP4 format
揭秘在召唤师峡谷中移动路径选择逻辑?
CIM平台可视化建设
解决微信小程序使用switchTab跳转后页面不刷新的问题
day83:luffy:添加购物车&导航栏购物车数字显示&购物车页面展示
Six axes of calibration service
Gesture switch background, let live with goods more immersive
Avoid pitfall guide for cloud integration - Android push
SEO解决方案制定,如何脱离杯弓蛇影?
Do you think it's easy to learn programming? In fact, it's hard! Do you think it's hard to learn programming? In fact, it's very simple!
The internal network penetration of raspberry is built and maintained. No server is required for intranet penetration
函数计算进阶-IP查询工具开发
如何设计并实现存储QoS?
Rabbitmq installation
一个实用的Chrome小工具:xTrace
In the third stage, day19 users echo packaged cookie products and remotely call Shopping Cart module crud operation