CN112188150A - Method for playing real-time monitoring video by browser through repackaging - Google Patents

Method for playing real-time monitoring video by browser through repackaging Download PDF

Info

Publication number
CN112188150A
CN112188150A CN201910601944.7A CN201910601944A CN112188150A CN 112188150 A CN112188150 A CN 112188150A CN 201910601944 A CN201910601944 A CN 201910601944A CN 112188150 A CN112188150 A CN 112188150A
Authority
CN
China
Prior art keywords
video
stream
browser
media information
playing
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.)
Pending
Application number
CN201910601944.7A
Other languages
Chinese (zh)
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.)
China Changfeng Science Technology Industry Group Corp
Original Assignee
China Changfeng Science Technology Industry Group Corp
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 China Changfeng Science Technology Industry Group Corp filed Critical China Changfeng Science Technology Industry Group Corp
Priority to CN201910601944.7A priority Critical patent/CN112188150A/en
Publication of CN112188150A publication Critical patent/CN112188150A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • 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/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4341Demultiplexing of audio and video streams
    • 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

A method for realizing browser to play real-time monitoring video by repackaging, firstly, demultiplexing received monitoring video PS stream, extracting video stream media information and clock information, and separating original audio stream and video stream; then recoding the proposed streaming media information, packaging the recoded streaming media information into MP4 format media information, and providing the media information for a browser to initialize decoding; and then, respectively packaging the audio stream and the video stream by adopting an MP4 format, determining the boundary of each frame of the video stream, transmitting the package of one frame to a decoder of the browser through an MSE interface, and finally decoding and playing the video stream by the decoder. The invention can provide support for video playing of a large amount of video applications, and is convenient for BS application of various monitoring industries.

Description

Method for playing real-time monitoring video by browser through repackaging
Technical Field
The invention belongs to the field of computer information processing, and relates to a method for playing a real-time monitoring video by a browser by means of repackaging.
Background
Browsers have now disabled the support of ActiveX or embedded plug-ins for security reasons, resulting in new browsers that have not been able to be used to monitor the playing of video in real time. Meanwhile, in order to support the playing of embedded audio and video, the browser adopts a video tag of the HTML5 standard to support the playing of the video, and simultaneously adopts a Media Source Extensions (MSE) mode to support the playing of the real-time video. However, this method is not directly compatible with surveillance video, and a new method needs to be designed to support surveillance video in this method.
Disclosure of Invention
The invention aims to play real-time monitoring videos in a novel browser by means of repackaging based on a video tag and an MSE (mean square error) technology of HTML 5.
The technical scheme of the invention is as follows:
a method for playing real-time monitoring video by a browser by means of repackaging is characterized by comprising the following steps:
(1) firstly, demultiplexing a received monitoring video PS stream, extracting video stream media information and clock information, and separating original audio stream and video stream, wherein the audio stream is generally in an AAC format, and the video stream is generally in an H264 format;
(2) then recoding the proposed streaming media information, packaging the recoded streaming media information into MP4 format media information, and providing the media information for a browser to initialize decoding;
(3) and then, respectively packaging the audio stream and the video stream by adopting an MP4 format, determining the boundary of each frame of the video stream, transmitting the package of one frame to a decoder of the browser through an MSE interface, and finally decoding and playing the video stream by the decoder.
The invention realizes that the real-time monitoring video is played in the browser by utilizing the video tags and the MSE, and can provide support for video playing of a large number of video applications. Due to the complexity of the development and the inconvenience of the use of the CS client, more and more applications are implemented by the BS, but the BS has many restrictions on developers due to security considerations, especially restrictions on real-time video playing, which causes great trouble in the monitoring industry. The method realizes that the browser plays the real-time monitoring video, and opens a convenient door for the BS application of various monitoring industries.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The HTML5 defines a video tag for playing audio and video, but the original video tag supports file-mode media playing and cannot support real-time streaming media playing, such as live video. To support real-time streaming Media playback in HTML5, the W3C standards organization introduced Media Source Extensions in turn, such that the video tag supports playback of real-time streaming Media. However, the tag mainly supports the MP4 media packaging format at present, and many other streaming media packaging formats (such as PS packaging commonly used in the monitoring industry) do not support the same, which causes a barrier for the browser to play the monitoring real-time video in real time.
As shown in fig. 1, in order for the browser to support real-time playing of the surveillance video, the received surveillance video needs to be processed in the browser. Firstly, demultiplexing a received monitoring video PS stream, extracting video stream media information and clock information, and separating original audio stream and video stream, wherein the audio stream is generally in an AAC format, and the video stream is generally in an H264 format; then recoding the proposed streaming media information, packaging the recoded streaming media information into MP4 format media information, and providing the media information for a browser to initialize decoding; and then, respectively packaging the audio stream and the video stream by adopting an MP4 format, determining the boundary of each frame of the video stream, transmitting the package of one frame to a decoder of the browser through an MSE interface, and finally decoding and playing the video stream by the decoder.
In order to realize the real-time effect of video playing, the clock for extracting the video stream needs to be analyzed and controlled, the cache number is controlled, the video streaming is ensured, and meanwhile, the time delay of the video is reduced so as to ensure the video playing effect.
When the method is implemented specifically, firstly, a data stream packaged by a PS stream is acquired from a monitoring video source in an HTTP or HTTPS mode, stream caching is established for the received data, the cached data is positioned at a packet header, and a packet of complete data is extracted for analysis; then, program stream information (PCM) is needed to be found to analyze the ID and the coding type of the audio and video stream in the code stream; analyzing the code stream type, splitting the code stream into audio stream and video stream according to the stream ID and the coding type, immediately installing MP4 format for packaging the audio stream, and constructing a Source buffer in MSE and then transmitting the SourceBuffer into a decoder after packaging; the video stream needs to obtain a complete frame to carry out data encapsulation, the video stream needs to be cached, the video stream is encapsulated in an MP4 format after obtaining the complete frame, and the video stream is transmitted into a decoder by using the sourceBuffer of MSE after being encapsulated; the decoder uses the data to decode and display.

Claims (2)

1. A method for playing real-time monitoring video by a browser by means of repackaging is characterized by comprising the following steps:
(1) firstly, demultiplexing a received monitoring video PS stream, extracting video stream media information and clock information, and separating original audio stream and video stream, wherein the audio stream is generally in an AAC format, and the video stream is generally in an H264 format;
(2) then recoding the proposed streaming media information, packaging the recoded streaming media information into MP4 format media information, and providing the media information for a browser to initialize decoding;
(3) and then, respectively packaging the audio stream and the video stream by adopting an MP4 format, determining the boundary of each frame of the video stream, transmitting the package of one frame to a decoder of the browser through an MSE interface, and finally decoding and playing the video stream by the decoder.
2. The method for enabling a browser to play real-time surveillance video with repackaging as recited in claim 1, further comprising:
(4) in order to realize the real-time effect of video playing, the clock for extracting the video stream is further analyzed and controlled, the cache quantity is controlled, the video streaming is ensured, and meanwhile, the time delay of the video is reduced so as to ensure the video playing effect.
CN201910601944.7A 2019-07-04 2019-07-04 Method for playing real-time monitoring video by browser through repackaging Pending CN112188150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910601944.7A CN112188150A (en) 2019-07-04 2019-07-04 Method for playing real-time monitoring video by browser through repackaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910601944.7A CN112188150A (en) 2019-07-04 2019-07-04 Method for playing real-time monitoring video by browser through repackaging

Publications (1)

Publication Number Publication Date
CN112188150A true CN112188150A (en) 2021-01-05

Family

ID=73915194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910601944.7A Pending CN112188150A (en) 2019-07-04 2019-07-04 Method for playing real-time monitoring video by browser through repackaging

Country Status (1)

Country Link
CN (1) CN112188150A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929686A (en) * 2021-02-04 2021-06-08 北京华宇信息技术有限公司 Method and device for playing back recorded video in real time on line
CN113556579A (en) * 2021-06-07 2021-10-26 武汉众智数字技术有限公司 Method for playing security real-time video without web plug-in based on HTML5
CN115460183A (en) * 2021-06-07 2022-12-09 中移物联网有限公司 Method and device for playing streaming media data based on browser and related equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929686A (en) * 2021-02-04 2021-06-08 北京华宇信息技术有限公司 Method and device for playing back recorded video in real time on line
CN112929686B (en) * 2021-02-04 2022-12-20 北京华宇信息技术有限公司 Method and device for playing back recorded video in real time on line
CN113556579A (en) * 2021-06-07 2021-10-26 武汉众智数字技术有限公司 Method for playing security real-time video without web plug-in based on HTML5
CN115460183A (en) * 2021-06-07 2022-12-09 中移物联网有限公司 Method and device for playing streaming media data based on browser and related equipment

Similar Documents

Publication Publication Date Title
KR102130429B1 (en) Method and device for decoding multimedia file
CN112188150A (en) Method for playing real-time monitoring video by browser through repackaging
WO2017063399A1 (en) Video playback method and device
CN113556579B (en) Method for playing security real-time video without web plug-in based on HTML5
TWI540887B (en) Audio and video media files composition method and server system
CN110996160B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN103002353A (en) Method and device for packaging multimedia documents
CN110545456B (en) Synchronous playing method and device of media files and storage medium
CN112261377B (en) Web edition monitoring video playing method, electronic equipment and storage medium
CN111107391A (en) Distributed WEB plug-in-free video live broadcast method
CN110545483A (en) Method, device and storage medium for playing media file by switching resolution in webpage
JP2021508995A (en) Network playback method, device and storage medium for media files
CN113938470B (en) Method and device for playing RTSP data source by browser and streaming media server
US20180376180A1 (en) Method and apparatus for metadata insertion pipeline for streaming media
CN110545469B (en) Webpage playing method, device and storage medium of non-streaming media file
CN110545448B (en) Media playing method and device based on data encryption and storage medium
CN108122558B (en) Real-time capacity conversion implementation method and device for LATM AAC audio stream
CN112995698A (en) Video playing method, client, service platform and intelligent conference system
CN110858915A (en) Resolution switching method and device in media file playing process and storage medium
CN105142037A (en) Distributed transcoded audio and video synthesis method and system
CN110545460B (en) Media file preloading method and device and storage medium
CN113079386B (en) Video online playing method and device, electronic equipment and storage medium
CN117812388A (en) Web playing method and web player supporting HEVC decoding
KR20140007893A (en) A method for optimizing a video stream
CN116614686A (en) Real-time audio and video playing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210105