当前位置:网站首页>Simple implementation scheme of transcoding and streaming (I)
Simple implementation scheme of transcoding and streaming (I)
2022-07-02 08:18:00 【Fat brother 1930】
Used in recent work ffmpeg, Just take this opportunity to share with you , A simple scheme of transcoding and streaming video stream . If this scheme is not particularly high concurrent playback , It's enough . Of course, if there is a high amount of concurrent playback , The module can also be expanded , Here is the sharing scheme, which is to realize the whole service in modules .
List of articles
Preface
This is a simple series of sharing , Take time to share with you in stages .
One 、 Flow chart of the whole service

This is a rough interaction flow chart , The whole service is divided into 3 A module , Let's talk about the function of each module first .
videoAgent: Responsible for interaction with business system , Respond to the transcoding request and streaming request of the business system . Responsible for ffmpeg Verification of transcoding parameters 、 call shell Carry out orders 、 Return new video stream address ( The stream address that the player can play )
ffmpeg: Install on server , Responsible for transcoding .
nginx: Configure streaming , be responsible for videoAgent Transcoding new address streaming .
The above is the basic scheme , There are several variants of this scheme , Adapt to multiple business environments . Here are some examples :
Internal network flow and external network push flow :videoAgent Deployed on the intranet , And ffmpeg And nginx The server can interact with it .videoAgent Increase internal and external network mapping capability .
High load scheme :videoAgent colony ,ffmpeg、nginx Multi-machine cluster deployment . Add registry ,videoAgent Increase dispatching capacity , Share transcoding push flow pressure .
Two 、 Use steps
1.ffmpeg install
There's nothing to say about this , There is no special configuration . Let's share CSDN The latest installation method shared by bloggers :
https://blog.csdn.net/qq_43627076/article/details/118584645
Not detailed enough , You can ask yourself again G Adult or Du Niang .
2. verification ffmpeg install

The version information indicates that the installation is complete , Be careful , Need to put ffmpeg Of bin Directory configuration to environment variables path in (centos It's better to be , Otherwise, the command will take a path , Other exceptions may also occur )
3. verification ffmpeg transcoding

After transcoding flv Playback effect 
command :
ffmpeg -i “I:\ personal \ Huilian infinite \2021\2021103003.mp4” -c:v libx264 -ar 22050 -crf 28 “I:\ personal \ Huilian infinite \2021\ Test transcoding .flv”
See for details of parameters ffmpeg file .
summary
I think the realization of this scheme is based on light weight , I haven't had time to share this time videoAgent Specific code , You can do it yourself think Next , Share with me next time . ffmpeg The transcoding ability of is still very powerful , As long as the server gives awesome power. , Do a good job of scheduling , This is still of great commercial value . Share next issue nginx Configuration of 、RTMP Streaming effect .边栏推荐
猜你喜欢

Carsim-实时仿真的动画同步问题

乐理基础(简述)
![Open3d learning note 3 [sampling and voxelization]](/img/71/0b2ac5dfd538017de639e5651c7f46.png)
Open3d learning note 3 [sampling and voxelization]

Sqlyog remote connection to MySQL database under centos7 system

应对长尾分布的目标检测 -- Balanced Group Softmax

Static library and dynamic library

Use of OpenCV 6.4 median filter

Carsim-问题Failed to start Solver: PATH_ID_OBJ(X) was set to Y; no corresponding value of XXXXX?

On the confrontation samples and their generation methods in deep learning

Generate database documents with one click, which can be called swagger in the database industry
随机推荐
Sparse matrix storage
Using transformer for object detection and semantic segmentation
Force deduction method summary: find classes
服务器的内网可以访问,外网却不能访问的问题
Programmers can only be 35? The 74 year old programmer in the United States has been programming for 57 years and has not retired
王-课外单词
How to wrap qstring strings
OpenCV3 6.3 用滤波器进行缩减像素采样
Global and Chinese markets for Salmonella typhi nucleic acid detection kits 2022-2028: Research Report on technology, participants, trends, market size and share
Constant pointer and pointer constant
Summary of one question per day: String article (continuously updated)
樂理基礎(簡述)
I'll show you why you don't need to log in every time you use Taobao, jd.com, etc?
Organigramme des activités
How to build the alliance chain? How much is the development of the alliance chain
Short video with goods source code, double-click to zoom in when watching the video
STL quick reference manual
Income in the first month of naked resignation
WCF更新服务引用报错的原因之一
使用Matplotlib绘制图表初步