In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains the "H.265 encoded video on the web page is how to achieve plug-in-free playback", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "H.265 encoded video on the web page is how to achieve plug-free playback" bar!
At present, the camera has two encoding formats: H.265 and H.264, and our camera already supports the transmission of H265 encoded video. The H.264 encoding format can be directly decoded through H5 in the web browser to complete the playback, but for H.265 encoded video, it is impossible to play the video through H5 direct decoding. The current scheme is to call the codec component through H5 for web live broadcast.
But the pain point of current playback is that only soft solution and single thread can be used for video playback processing.
Let's test H.265 live stream decoding and playback. After testing, on the MacBook Pro 2.2GHz Intel Core i7 / 16G memory notebook, using Chrome browser to watch LVB for a long time, the memory usage is stable between 270m and 320m, and the CPU occupancy rate is between 40% and 50%. Because the CPU occupies too much, it can not satisfy the effect of playing multi-channel video under the same client.
As the client playing H.265 encoded video is limited by technical bottleneck, now the H.265 encoding format is transcoded to H.264 coding through the server, and the video processing is carried out uniformly by the server, and the client only plays H.264 encoded video.
Implementation scenario 1:
Directly encapsulate H265 into custom FLV, RTMP, and HLS to be released to the front-end playback, and the web front-end has to support parsing the controls for H265 playback. If you use this solution, it is basically difficult to find a suitable open source solution, and the changes in the back-end and front-end can be said to be reversed and restarted, so this scheme is very difficult to implement in a short time.
Option 2:
Do a transcoding service to decode H265 and encode it into H264 web front-end playback scheme without any change. if transcoding, there are two schemes: software transcoding and hardware transcoding, software transcoding consumes CPU resources, and hardware transcoding is considered. The next part of this article is to introduce the hardware transcoding scheme.
Realization process
Based on the existing video service framework, a transcoding function is added to the existing LVB, and the platform connects to the camera uniformly, and determines whether the access camera video stream is H.265 encoded video stream by pulling the stream. If it is determined that the access video stream is an H.265 encoded video stream, the transcoding service will be turned on, the existing video stream will be encoded and decoded, and the video will be converted into H.264 coding and pushed to the streaming media for video distribution. The platform also synchronously adds whether the transcoding function is enabled or not, and the channel device after enabling the transcoding function will output H.264 encoded video.
At present, CPU is used for video transcoding. Later, CPU will be added to decode (need to be specifically associated with the device's graphics card).
Thank you for your reading, the above is "H.265 encoded video on the web page is how to achieve non-plug-in playback" content, after the study of this article, I believe you on the H.265 encoded video on the web page is how to achieve plug-in-free playback of this problem has a deeper understanding, the specific use of the need for you to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.