当前位置:网站首页>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 .边栏推荐
猜你喜欢

Principes fondamentaux de la théorie musicale (brève introduction)

STM32疑难杂症之ST-LINK Connection error INVALID ROM TABLE

OpenCV3 6.2 低通滤波器的使用

樂理基礎(簡述)

C语言实现XML生成解析库(XML扩展)

How to build the alliance chain? How much is the development of the alliance chain

Specification for package drawing

Matlab数学建模工具

Installation and use of simple packaging tools

Carsim-实时仿真的动画同步问题
随机推荐
Using C language to realize MySQL true paging
It's great to save 10000 pictures of girls
服务器的内网可以访问,外网却不能访问的问题
Meta learning Brief
Using super ball embedding to enhance confrontation training
Carsim-路面3D形状文件参数介绍
Using transformer for object detection and semantic segmentation
Fundamentals of music theory (brief introduction)
多站点高可用部署
STM32-新建工程(参考正点原子)
Look for we media materials from four aspects to ensure your creative inspiration
Global and Chinese market of electric cheese grinder 2022-2028: Research Report on technology, participants, trends, market size and share
Graph Pooling 简析
Longest isometric subsequence
力扣每日一题刷题总结:二叉树篇(持续更新)
我的vim配置文件
OpenCV3 6.3 用滤波器进行缩减像素采样
Programmers can only be 35? The 74 year old programmer in the United States has been programming for 57 years and has not retired
用于类别增量学习的动态可扩展表征 -- DER
Li Kou daily one question brushing summary: binary tree chapter (continuous update)