当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- From Silicon Valley to Xiaomi, Cui Baoqiu's 25 years of open source life
- QML Repeater
- Avoid pitfall guide for cloud integration - Android push
- 标梵IPFS矿机app软件开发软件 IPFSApp开发方法详解
- ABBYY FineReader 15 新增编辑表格单元格功能
- Learning notes of millet mall, day 5: ES full text search
- From next year, about 30% of the web pages will be inaccessible to older Android devices
- 第三阶段 Day19 用户回显 封装Cookie 商品远程调用 购物车模块 CRUD操作
- 百亿级数据分表后怎么分页查询?
- Solve the problem that the page does not refresh after the wechat applet uses switchtab to jump
猜你喜欢
Which industries are suitable for enterprises to develop wechat applet?
Analysis of h264nalu head
C#控制台调用FFMPEG推MP4视频文件至流媒体开源服务平台EasyDarwin过程
ABBYY FineReader 15 新增编辑表格单元格功能
Configure static IP address in ubuntu18.04 NAT mode -2020.11.09
Exhibition cloud technology interpretation | in the face of emergencies, how does app do a good job in crash analysis and performance monitoring?
自定义室内地图在线工具
[graffiti Internet of things footprint] graffiti cloud platform interface description
The selection of wire displacement encoder needs the guidance of precise electronics
企业公司开发微信小程序适用于哪些行业?
随机推荐
分享用MathType编辑字母与数学公式的技巧
Custom indoor map online tool
浅谈API网关(API Gateway)如何承载API经济生态链
ABBYY FineReader 15 新增编辑表格单元格功能
一个实用的Chrome小工具:xTrace
R8 编译器: 为 Kotlin 库和应用 '瘦身'
上云嘉年华,超低价云服务器来袭
揭秘在召唤师峡谷中移动路径选择逻辑?
openocd+jlink_picture
EasyExcel根据筛选列导出(中间不空列,顺序可调整)
关于生活,可能有用的40条建议
[God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!
How to implement a simple student management system with C + +
flask图书CURD小项目
Analysis of h264nalu head
The internal network penetration of raspberry is built and maintained. No server is required for intranet penetration
标梵IPFS矿机app软件开发软件 IPFSApp开发方法详解
[graffiti Internet of things footprint] graffiti cloud platform interface description
Avoid pitfall guide for cloud integration - Android push
Activity工作流交互demo简单实现