CN112073809A - Method for supporting browser to play video with any coding format - Google Patents

Method for supporting browser to play video with any coding format Download PDF

Info

Publication number
CN112073809A
CN112073809A CN202010792347.XA CN202010792347A CN112073809A CN 112073809 A CN112073809 A CN 112073809A CN 202010792347 A CN202010792347 A CN 202010792347A CN 112073809 A CN112073809 A CN 112073809A
Authority
CN
China
Prior art keywords
browser
video
background service
local background
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010792347.XA
Other languages
Chinese (zh)
Other versions
CN112073809B (en
Inventor
周阳
马强忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fullsee Technology Co ltd
Original Assignee
Fullsee Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fullsee Technology Co ltd filed Critical Fullsee Technology Co ltd
Priority to CN202010792347.XA priority Critical patent/CN112073809B/en
Publication of CN112073809A publication Critical patent/CN112073809A/en
Application granted granted Critical
Publication of CN112073809B publication Critical patent/CN112073809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • H04N21/4398Processing of audio elementary streams involving reformatting operations of audio signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Abstract

The invention relates to a method for supporting a browser to play videos with any coding format, which comprises the steps that the browser is in communication connection with a streaming media server to obtain IP (Internet protocol) and ports of audio and video streams sent by the streaming media server; simultaneously, the browser and the local background service send the IP and the port of the audio and video stream to the local background service through an interactive protocol; the streaming media server is in communication connection with the local background service and directly sends the audio and video streams to the local background service; the local background service decodes the audio and video streams and sends the decoded video stream data to the browser; the browser finishes video playing operation; and the decoded audio stream data is directly played by a computer. By adopting the technical scheme of the invention, the video files in all encoding formats can be decoded, the decoding efficiency is high, and the decoding can be synchronously completed for the files with high video resolution.

Description

Method for supporting browser to play video with any coding format
Technical Field
The invention relates to the technical field of computer internet, in particular to a method for supporting a browser to play videos with any coding format.
Background
In the field of security protection, a plurality of video coding formats exist, for example, mpeg2 and mpeg4 videos supported and shot by some old cameras are widely available in the market, and some new videos similar to H.265 coding formats appear. However, video tags in HTML5 standard defined by various large browser manufacturers and W3C cannot decode the video formats, so that in a scenario where a browser is used as a client, transcoding operations need to be performed on the video streams, and a large amount of computing resources of a background server are wasted in the transcoding process.
In order to solve this problem, the current mainstream technology is to directly communicate with the streaming media server and the browser to directly decode and display the transmitted video data. The WebAssembly technology is commonly used to compile ffmpeg into a javascript script interface, the decoding is directly called in a browser, and video frames are continuously displayed in the browser as pictures, but the WebAssembly technology removes the advantage of higher assembly language efficiency when the ffmpeg is edited, so that the decoding efficiency is low, and particularly when the video resolution is greater than 1920 × 1080, an obvious delay phenomenon occurs. Some manufacturers also use browser plug-ins to decode and display videos in the plug-ins, but the browser plug-ins cannot be used due to the fact that the plug-ins are no longer supported by the large browsers.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides a method for supporting a browser to play videos with any coding format.
In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps:
a method for supporting a browser to play video with any coding format is characterized by comprising the following steps:
s1, the browser is in communication connection with the streaming media server to obtain the IP and the port of the audio and video stream sent by the streaming media server;
s2, the browser and the local background service send the IP and the port of the audio and video stream to the local background service through an interactive protocol;
s3, the streaming media server is in communication connection with the local background service, and the audio and video streams are directly sent to the local background service;
s4, the local background service decodes the audio and video streams and sends the decoded video stream data to the browser;
and S5, finishing the video playing operation by the browser.
Further, the local background service is preferably a process executed by the computer background, and is started by itself when the computer is started.
Further, the decoded audio stream data is directly played by a computer.
Further, the local background service and the streaming media server are preferably connected in a TCP or UDP communication mode.
Further, the local background service and the browser are preferably connected through a websocket protocol.
Further, the local background service preferably decodes the video stream data into YUV data, and preferably directly sends the YUV data to the browser through the websocket protocol.
Further, the browser preferably displays the YUV video data through WebGL, so as to complete video playing.
Further, the local background service decodes the video stream data into the YUV data, preferably further encodes the YUV data into a picture file, and sends the picture file to the browser in the form of the picture file, and the browser displays the picture by using an IMG tag.
The invention has the beneficial effects that:
by adopting the method for supporting the browser to play the video with any coding format, the local background service is established, namely a background execution process is installed in the computer, and the computer is started up and started up automatically. The method can be connected with a browser through a websocket protocol to acquire IP and ports of audio and video streams sent by a streaming media server; the device can be in communication connection with a streaming media server in a TCP or UDP mode to acquire audio and video streaming data in a connected mode, decode the data into YUV data and directly send the YUV data to the browser through a websocket protocol, and the local background service decodes the YUV data through a display card of a computer, so that various standard limitations and performance limitations of the browser are avoided, video files in all encoding formats can be decoded, the decoding efficiency is high, and the decoding can be synchronously completed on files with high video resolution.
Drawings
Fig. 1 is a flowchart of an implementation of a method for supporting a browser to play a video with any encoding format according to an embodiment of the present invention.
Fig. 2 is a block diagram of a method for supporting a browser to play a video with any encoding format according to an embodiment of the present invention.
Description of the figure numbering: the method comprises the steps of 1-streaming media server, 2-browser, 3-local background service and 4-computer.
Detailed Description
For a clearer understanding of the contents of the present invention, reference will be made to the accompanying drawings and examples.
Fig. 1 and fig. 2 are a flowchart and a block diagram of an implementation of a method for supporting a browser to play a video with any encoding format according to an embodiment of the present invention. The local background service 3 is preferably a process executed by the computer 4 in the background, and is started by itself when the computer is started. A user operates on a browser 2 of a computer 4, when a video is clicked and played, the browser 2 is in communication connection with a streaming media server 1 to acquire IP (Internet protocol) and ports of audio and video streams sent by the streaming media server 1; the browser 2 and the local background service 3 interact data through an interaction protocol, preferably adopting websocket connection and the local background service 3, and the IP and the port of the audio and video stream are sent to the local background service 3; the streaming media server 1 is in communication connection with the local background service 3, and preferably, the audio and video streams are directly sent to the local background service 3 in a TCP or UDP manner; the local background service 3 decodes the audio and video streams into YUV data by using a video card of the computer 4, and preferably directly sends the YUV data to the browser 2 through the websocket protocol; the decoded audio stream data is directly played by the computer 4; the browser 2 preferably displays the YUV video data through WebGL to complete video playing.
Or the local background service 3 decodes the video stream data into the YUV data, preferably further encodes the YUV data into a picture file, and sends the picture file to the browser 2, and the browser 2 displays the picture by using an IMG tag. The YUV data is a frame representation method after decoding, the larger the video resolution is, the more the number of bytes per frame is, and if the number of video channels required to be displayed is large, a large burden is caused to websocket connection, and after the YUV data is coded into a picture, the data volume is greatly reduced.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for supporting a browser to play video with any coding format is characterized by comprising the following steps:
s1, the browser is in communication connection with the streaming media server to obtain the IP and the port of the audio and video stream sent by the streaming media server;
s2, the browser and the local background service send the IP and the port of the audio and video stream to the local background service through an interactive protocol;
s3, the streaming media server is in communication connection with the local background service, and the audio and video streams are directly sent to the local background service;
s4, the local background service decodes the audio and video streams and sends the decoded video stream data to the browser;
and S5, finishing the video playing operation by the browser.
2. The method of claim 1, wherein the local background service is a process executed in the background of the computer that boots up itself.
3. The method of claim 1, wherein the decoded audio stream data is played directly by a computer.
4. The method of claim 1, wherein the local background service is communicatively coupled to the streaming media server in a TCP or UDP manner.
5. The method of claim 1, wherein the local background service and the browser connect via a websocket protocol.
6. The method of claim 5, wherein the local background service decodes the video stream data into YUV data, which is sent directly to the browser via the websocket protocol.
7. The method of any one of claims 1 to 6, wherein the browser displays the YUV video data through WebGL, and video playing is completed.
8. The method of any one of claims 1 to 5, wherein the local background service decodes the video stream data into the YUV data and further encodes the YUV data into a picture file, and sends the picture file to the browser, and the browser displays the picture by using IMG tags.
CN202010792347.XA 2020-08-09 2020-08-09 Method for supporting browser to play video with any coding format Active CN112073809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010792347.XA CN112073809B (en) 2020-08-09 2020-08-09 Method for supporting browser to play video with any coding format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010792347.XA CN112073809B (en) 2020-08-09 2020-08-09 Method for supporting browser to play video with any coding format

Publications (2)

Publication Number Publication Date
CN112073809A true CN112073809A (en) 2020-12-11
CN112073809B CN112073809B (en) 2022-08-09

Family

ID=73662510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010792347.XA Active CN112073809B (en) 2020-08-09 2020-08-09 Method for supporting browser to play video with any coding format

Country Status (1)

Country Link
CN (1) CN112073809B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788431A (en) * 2020-12-24 2021-05-11 四川云从天府人工智能科技有限公司 Video playing method, device, system, medium and browser based on HTML5
CN112804542A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 Method and terminal for playing video and audio on demand by browser applied to cloud video fusion platform
CN112804536A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 System and method for requesting audio and video by browser based on cloud video fusion platform
CN112804543A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 Terminal and method for playing video and audio on demand by browser based on cloud video fusion platform
CN113271479A (en) * 2021-05-17 2021-08-17 中移智行网络科技有限公司 Playing processing method, device and related equipment
CN114040251A (en) * 2021-09-17 2022-02-11 北京旷视科技有限公司 Audio and video playing method, system, storage medium and computer program product
CN114285836A (en) * 2022-03-03 2022-04-05 苏州万店掌网络科技有限公司 Video playing method, device and medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869474A (en) * 2014-02-24 2015-08-26 风网科技(北京)有限公司 Expansible mobile streaming media system and application method thereof
US20160119399A1 (en) * 2014-10-24 2016-04-28 Kevin J. Glass Extending browser support of real time media to any available codec
US20170289214A1 (en) * 2016-04-04 2017-10-05 Hanwha Techwin Co., Ltd. Method and apparatus for playing media stream on web browser
CN107277004A (en) * 2017-06-13 2017-10-20 重庆扬讯软件技术股份有限公司 A kind of browser is without plug-in unit net cast method
CN107483972A (en) * 2017-07-24 2017-12-15 平安科技(深圳)有限公司 Live processing method, storage medium and a kind of mobile terminal of a kind of audio frequency and video
CN108076364A (en) * 2016-11-07 2018-05-25 韩华泰科株式会社 Adaptive media spreads transfer device and media serving device
CN108337545A (en) * 2017-01-20 2018-07-27 韩华泰科株式会社 Media playback and media serving device for reproduced in synchronization video and audio
CN108769616A (en) * 2018-06-21 2018-11-06 泰华智慧产业集团股份有限公司 A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system
CN108966006A (en) * 2018-07-24 2018-12-07 上海小蚁科技有限公司 Playback method, browser equipment and the readable storage medium storing program for executing of video
US20190356717A1 (en) * 2018-05-17 2019-11-21 Shanghai Bilibili Technology Co., Ltd. Multimedia file processing
CN110661752A (en) * 2018-06-29 2020-01-07 广州弘度信息科技有限公司 Plug-in-free real-time video playing system and method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869474A (en) * 2014-02-24 2015-08-26 风网科技(北京)有限公司 Expansible mobile streaming media system and application method thereof
US20160119399A1 (en) * 2014-10-24 2016-04-28 Kevin J. Glass Extending browser support of real time media to any available codec
US20170289214A1 (en) * 2016-04-04 2017-10-05 Hanwha Techwin Co., Ltd. Method and apparatus for playing media stream on web browser
CN107277612A (en) * 2016-04-05 2017-10-20 韩华泰科株式会社 Method and apparatus for playing Media Stream in web browser
CN108076364A (en) * 2016-11-07 2018-05-25 韩华泰科株式会社 Adaptive media spreads transfer device and media serving device
CN108337545A (en) * 2017-01-20 2018-07-27 韩华泰科株式会社 Media playback and media serving device for reproduced in synchronization video and audio
CN107277004A (en) * 2017-06-13 2017-10-20 重庆扬讯软件技术股份有限公司 A kind of browser is without plug-in unit net cast method
CN107483972A (en) * 2017-07-24 2017-12-15 平安科技(深圳)有限公司 Live processing method, storage medium and a kind of mobile terminal of a kind of audio frequency and video
US20190356717A1 (en) * 2018-05-17 2019-11-21 Shanghai Bilibili Technology Co., Ltd. Multimedia file processing
CN108769616A (en) * 2018-06-21 2018-11-06 泰华智慧产业集团股份有限公司 A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system
CN110661752A (en) * 2018-06-29 2020-01-07 广州弘度信息科技有限公司 Plug-in-free real-time video playing system and method
CN108966006A (en) * 2018-07-24 2018-12-07 上海小蚁科技有限公司 Playback method, browser equipment and the readable storage medium storing program for executing of video

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788431A (en) * 2020-12-24 2021-05-11 四川云从天府人工智能科技有限公司 Video playing method, device, system, medium and browser based on HTML5
CN112804542A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 Method and terminal for playing video and audio on demand by browser applied to cloud video fusion platform
CN112804536A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 System and method for requesting audio and video by browser based on cloud video fusion platform
CN112804543A (en) * 2020-12-31 2021-05-14 武汉兴图新科电子股份有限公司 Terminal and method for playing video and audio on demand by browser based on cloud video fusion platform
CN112804536B (en) * 2020-12-31 2023-03-14 武汉兴图新科电子股份有限公司 System and method for requesting audio and video by browser based on cloud video fusion platform
CN112804542B (en) * 2020-12-31 2023-05-23 武汉兴图新科电子股份有限公司 Method and terminal for requesting video and audio by browser applied to cloud video fusion platform
CN113271479A (en) * 2021-05-17 2021-08-17 中移智行网络科技有限公司 Playing processing method, device and related equipment
CN114040251A (en) * 2021-09-17 2022-02-11 北京旷视科技有限公司 Audio and video playing method, system, storage medium and computer program product
CN114285836A (en) * 2022-03-03 2022-04-05 苏州万店掌网络科技有限公司 Video playing method, device and medium

Also Published As

Publication number Publication date
CN112073809B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN112073809B (en) Method for supporting browser to play video with any coding format
US10187668B2 (en) Method, system and server for live streaming audio-video file
US20160119399A1 (en) Extending browser support of real time media to any available codec
CN113556579B (en) Method for playing security real-time video without web plug-in based on HTML5
WO2019024919A1 (en) Video transcoding method and apparatus, server, and readable storage medium
CN107637040A (en) Carry out transmission media data using WEBSOCKET sub-protocols
CN110661752A (en) Plug-in-free real-time video playing system and method
CN110870282B (en) Processing media data using file tracks of web content
CN111355976B (en) Video live broadcast method and system based on HEVC standard
CN107634930B (en) Method and device for acquiring media data
CN108337545A (en) Media playback and media serving device for reproduced in synchronization video and audio
US10582232B1 (en) Transcoding frame-synchronous metadata for segmented video delivery
KR20200109359A (en) Video streaming
KR20150110595A (en) System, apparatus and method for sharing a screen having multiple visual components
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
CN112788431A (en) Video playing method, device, system, medium and browser based on HTML5
CN108494792A (en) A kind of flash player plays the converting system and its working method of hls video flowings
CN108966006A (en) Playback method, browser equipment and the readable storage medium storing program for executing of video
CN113938470A (en) Method and device for playing RTSP data source by browser and streaming media server
CN112312221B (en) Audio and video playing method, storage medium and device
CN113438487A (en) Method for compatible private video format webpage player
CN109104635A (en) The method and system of instant delivery screen picture
KR20240023037A (en) Real-time augmented reality communication session
WO2016107174A1 (en) Method and system for processing multimedia file data, player and client
CN112423100A (en) WEB audio and video self-defined rendering method based on HTML5

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant