当前位置:网站首页>A debate on whether flv should support hevc

A debate on whether flv should support hevc

2020-11-06 01:15:00 InfoQ

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" the other day , Browsing FFMpeg Of Trac when , Found a hope "},{"type":"link","attrs":{"href":"https://trac.ffmpeg.org/ticket/6389","title":null},"content":[{"type":"text","text":"FFMpeg increase "},{"type":"text","marks":[{"type":"italic"}],"text":" Give Way FLV Support HEVC code "}]},{"type":"text","text":" The needs of ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" The need is 2017 Submitted to FFMpeg Community , It can be seen from the whole communication process that , Requirements proponents and FFMpeg The need for this need is widely divergent , We can also see some differences in work ideas and work culture ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" The general process of the whole requirement discussion "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Proposal initiation "},{"type":"text","text":": at present HLS and TS They have already supported it H265 了 , But most of the country CDN It's more about RTMP/HTTP-FLV Format . also , because HLS The delay is higher , Therefore, most of the domestic live broadcasting services adopt RTMP/HTTP-FLV Format . therefore , The ISSUE The originator of the project just wanted to ask FFMpeg Does the community have a plan for FLV Support HEVC."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"FFMpeg Community response "},{"type":"text","text":": Have to say , The response from the community is still very fast . When the demand is put forward 20 Minutes later , Someone replied . It means : It's not that FLV Support HEVC, Just because Adobe No, right FLV Support HEVC Make specific statements . therefore , If Adobe Don't extend the standard ,FFMpeg Will not let FLV Support HEVC Of . meanwhile , The community has also come up with alternative solutions ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" The debate over delay "},{"type":"text","text":": Then there is the debate between the two sides over the delay of live streaming . One side thinks that it can be right to HLS or MPEG-DASH Do some optimizations to reduce latency , One side believes that HLS It is impossible to achieve 1-3 Second delay , Basically, the next discussion is that the discussion is delayed . because RTMP/HTTP-FLV The low delay has been domestic CDN Perfect support from manufacturers , therefore , Or hope FFMpeg Can let FLV Support HEVC. also , There are a lot of comments supporting this demand . exactly , stay 2017 year , Especially at home , For live broadcasting business , Can let FLV Support H265 It's really a very exciting thing ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" The community is strongly opposed to "},{"type":"text","text":": After a lot of comments supporting the requirement ,FFMpeg Just shut down the proposal , And set the proposal as "},{"type":"codeinline","content":[{"type":"text","text":"invalid"}]},{"type":"text","text":" state . These are the comments on the vest account , These comments on FFMpeg Whether or not to implement the proposal has no effect . as long as Adobe No upgrade FLV Standards for ,FFMpeg They won't let it FLV Support HEVC. Anyway ,FFMpeg Will not support this kind of customization demand ."}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" therefore , Until now ,3 Years have passed ,FFMpeg It didn't come true in FLV Chinese support HEVC Characteristics of . therefore , Until now , In the live broadcast business , You can't use the community version of FFMpeg Realization : stay FLV Transfer in format H265 Live streaming of ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Fortunately "},{"type":"link","attrs":{"href":"https://github.com/ksvc/FFmpeg/tree/release/3.4","title":null},"content":[{"type":"text","text":" Jinshan cloud has realized FFMpeg Of "},{"type":"text","marks":[{"type":"italic"}],"text":"hack"},{"type":"text","text":" edition "}]},{"type":"text","text":", So that RTMP/HTTP-FLV The agreement supports HEVC code . therefore , Even the standard decoder ( player ) Can't play Golden Mountain Cloud "},{"type":"text","marks":[{"type":"italic"}],"text":"hack"},{"type":"text","text":" Version generated RTMP/HTTP-FLV Of H265 Live streaming , however , The private agreement implemented by Jinshan cloud has basically become the standard protocol for domestic live broadcasting related services ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" agreement / Standards first , Or implementation first ?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"11:6 Said the Lord , Look , They become the same people , It's all the same words , Now that we have done this , In the future, there will be nothing that they will fail to accomplish ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"11:7 Let's go down , They're messing up their accents there , Make their words different from each other ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"11:8 therefore , From there the LORD scattered them over all the earth . They shut down , Stop building that city ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"11:9 For there the Lord has confounded the words of all the earth , Scatter the people over the whole earth , So it's called Babel ( It means "chaos" )."}]},{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" ——《 Bible · Genesis 》"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Now , Production is becoming more and more socialized , The technical requirements are becoming more and more complex , Production collaboration is becoming more and more extensive . Many technologies and products , It often involves dozens of 、 Hundreds or even tens of thousands of enterprises , This objectively requires : A high degree of unity and coordination of production activities must be maintained technically . here , It is necessary to establish and implement technical standards so that all production departments and internal production links can be organically linked , To ensure that production is carried out in an orderly manner . There is no standard 、 agreement , We can't effectively realize social mass production ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Throughout the computer industry , No matter what field , Whether it's network communication or codec protocol , It's all agreement first . The promotion of private agreements , It also starts with standardization , And then push for concrete implementation . otherwise , There is no consensus within the industry , otherwise , The interconnection of the whole network 、 There is no way to talk about intercommunication . therefore , It has to be standard 、 Agreement first ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Another aspect , standard 、 Protocols are abstractions of concrete implementations , There is no definition of interface , Where does the implementation of the interface come from ? Of course , You can also extract interfaces from specific implementations , But we have to realize that , Before interface extraction , This implementation is quite private ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" therefore ,FFMpeg The community refused to let FLV Self support HEVC It's reasonable . otherwise , Our work will be full of all kinds of FFMpeg Of "},{"type":"text","marks":[{"type":"italic"}],"text":"hack"},{"type":"text","text":" edition , And each "},{"type":"text","marks":[{"type":"italic"}],"text":"hack"},{"type":"text","text":" Versions are used to solve different problems . It's a terrible thing to do ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" The troops did not move , Gateway leading . If you really want to make things easier , The best way is to give priority to the promotion of standards or protocols ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" I've seen a lot of serious online problems , The fundamental reason is that there is no well-defined agreement between upstream and downstream , This led to the upgrade process "},{"type":"link","attrs":{"href":"https://wangwei1237.gitee.io/monolith-to-microservices/docs/Breaking_Changes.html","title":null},"content":[{"type":"text","text":" Disruptive modification "}]},{"type":"text","text":", This leads to problems ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" Organizational culture first or user needs first ?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Different communities have different cultures . The culture of the organization will make when there is a problem , The stress response of all members of the organization to this problem is consistent , This kind of stress response can be made without asking the superior . from "},{"type":"link","attrs":{"href":"https://trac.ffmpeg.org/ticket/6389","title":null},"content":[{"type":"text","text":" proposal "}]},{"type":"text","text":" It can be seen that ,FFMpeg One of the cultures of the community is : Codec should be implemented according to standards and specifications ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" If you read FFMpeg Source code , In fact, you can also find a lot of the following code :"}]},{"type":"codeblock","attrs":{"lang":"cpp"},"content":[{"type":"text","text":"enum {\n // 7.4.3.1: vps_max_layers_minus1 is in [0, 62].\n HEVC_MAX_LAYERS = 63,\n // 7.4.3.1: vps_max_sub_layers_minus1 is in [0, 6].\n HEVC_MAX_SUB_LAYERS = 7,\n // 7.4.3.1: vps_num_layer_sets_minus1 is in [0, 1023].\n HEVC_MAX_LAYER_SETS = 1024,\n\n // 7.4.2.1: vps_video_parameter_set_id is u(4).\n HEVC_MAX_VPS_COUNT = 16,\n // 7.4.3.2.1: sps_seq_parameter_set_id is in [0, 15].\n HEVC_MAX_SPS_COUNT = 16,\n // 7.4.3.3.1: pps_pic_parameter_set_id is in [0, 63].\n HEVC_MAX_PPS_COUNT = 64,\n\n // A.4.2: MaxDpbSize is bounded above by 16.\n HEVC_MAX_DPB_SIZE = 16,\n // 7.4.3.1: vps_max_dec_pic_buffering_minus1[i] is in [0, MaxDpbSize - 1].\n HEVC_MAX_REFS = HEVC_MAX_DPB_SIZE,\n \n // ...\n};"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" therefore , Different people in the community agree on the proposal . Even if the user's needs are reasonable , Even if this requirement has how many users support , As long as the standard is not updated ,FFMpeg Will never support it ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" in addition , Users just need a way to support H265 Coded 、CDN And support good 、 It's just a very low latency video streaming format , isn't it? ? If there is such a format , Give Way FLV Support HEVC Is it not a problem ? since ,Adobe It's stopped. Yeah RTMP The maintenance of , So why spend time on this Agreement ? Why not choose a newer technology ? Although choosing new technologies means taking more risks and costs ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Especially when there is a conflict between different user needs , How to deal with it ?To be or not to be, that’s a question!"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" For technology , Looking forward or looking back ?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“ The original thing , Its shape must be ugly ”. however , New technology is bound to replace old technology , Basically, it's because :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" New technology has new structure and function , Can adapt to the changed environment and conditions "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" New technology is the sublation of old technology , And added new content that the old technology couldn't accommodate "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" therefore , For Technology , We need to look forward , You need to understand these new technologies . Of course , There must be a price to pay for adopting new technology , There is no gain without giving . The gap between the new technology and our business needs to be studied in depth , And then in the practice of the business constantly improve the new technology ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" in addition , When learning about new technologies , And understand the history of new technologies , Understand the historical context in which new technologies are produced , What problem is it used to solve ? These things , It's the application of new technology , Only when we have a deep understanding of these , Can be used in subsequent applications , what the heart wishes one 's hands accomplish . The wrong application of the new technology creates more problems than the correct use of the old technology . Mistakenly ignoring the advantages of the old technology will also make us spend too much cost in the process of applying the new technology ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" For example, in HTTP2 In the agreement of , There is such a description :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"HTTP/2 addresses these issues by defining an optimized mapping of HTTP’s semantics to an underlying connection. Specifically, it allows interleaving of request and response messages on the same connection and uses an efficient coding for HTTP header fields. It also allows prioritization of requests, letting more important requests complete more quickly, further improving performance."}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" stay HTTP3 in , There are the following descriptions :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"HTTP/2 introduced a binary framing and multiplexing layer to improve latency without modifying the transport layer. However, because the parallel nature of HTTP/2’s multiplexing is not visible to TCP’s loss recovery mechanisms, a lost or reordered packet causes all active transactions to experience a stall regardless of whether that transaction was impacted by the lost packet."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"The QUIC transport protocol incorporates stream multiplexing and per-stream flow control, similar to that provided by the HTTP/2 framing layer. By providing reliability at the stream level and congestion control across the entire connection, it has the capability to improve the performance of HTTP compared to a TCP mapping."}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/60/60d4a4ea4dfcdafe086276d4b2519db0.jpeg","alt":null,"title":"","style":[{"key":"width","value":"50%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" It's like the picture above “ Crows drink water ” equally , It's a straw ? Or to improve the original stone ?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" later , I found another piece of cloud shooting on the Internet "},{"type":"link","attrs":{"href":"https://www.cnblogs.com/upyun/p/7053150.html","title":null},"content":[{"type":"text","text":"《 How to integrate HLS The delay is shortened to 4 second ,HLS+ Technical details 》"}]},{"type":"text","text":" An article from ."}]}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢