CN107197386B - Cross-platform video playing implementation method without client - Google Patents
Cross-platform video playing implementation method without client Download PDFInfo
- Publication number
- CN107197386B CN107197386B CN201710400734.2A CN201710400734A CN107197386B CN 107197386 B CN107197386 B CN 107197386B CN 201710400734 A CN201710400734 A CN 201710400734A CN 107197386 B CN107197386 B CN 107197386B
- Authority
- CN
- China
- Prior art keywords
- video
- client
- media server
- request
- streaming media
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for realizing cross-platform video playing without a client, which comprises the following steps: 1) a client initiates a video request to a streaming media server; 2) the streaming media server analyzes the Web client request; 3) a Web client side initiates an HTTP request to a streaming media server; 4) the streaming media server transmits the specific video fragment to the Web client through an HTTP (hyper text transport protocol); 5) and the Web client analyzes the video fragment content and plays the video fragment content. According to the method, the server only needs to pack the original video stream according to the MPEG-DASH specification, and the client does not need to independently realize decoding; the user can complete the retrieval of the video under different platforms such as Windows, Linux, Android, iOS and the like only by means of a browser without installing a specific client or a third-party plug-in, the installation and deployment are simple, and the user experience is high.
Description
Technical Field
The invention belongs to the technical field of internet streaming media, and relates to a cross-platform video playing implementation method without a client.
Background
With the rapid development of the internet and the increase of internet of things devices applied to video monitoring, the demand of people for watching videos through a Web browser at a PC end or a mobile phone client is gradually increased, the traditional streaming media protocols such as a real-time transport protocol (RTP) and a real-time streaming protocol (RTSP) have gradually shown the defects, the implementation and deployment complexity of a server is high, an independent network port needs to be opened, and the internet of things devices are easily intercepted before network fire prevention. Although the traditional streaming media server based on the HTTP protocol is simple to deploy and does not need a separate network port, the traditional streaming media server has poor support for real-time video streaming, and needs to install a Flash plug-in to support video playing, which is difficult to achieve cross-platform to meet the requirements of the public.
Therefore, the method for playing the video of the Internet of things equipment, which has good cross-platform performance and does not need to be supported by a special player or a plug-in, is researched, and has a huge practical application value.
Disclosure of Invention
The invention aims to provide a method for realizing cross-platform video playing without a client, which solves the problems that the video playing in the prior art is poor in cross-platform performance, needs to be supported by a special client or a browser plug-in and is troublesome to install and deploy at a server.
The technical scheme adopted by the invention is that a cross-platform video playing implementation method without a client is implemented according to the following steps:
1.1) starting a streaming media server, analyzing a configuration file, creating an RPC thread, binding to a specific port, and monitoring the arrival of client connection;
1.2) the Web client reads a camera list stored in the database and displays the camera list on a Web interface for a user to select;
1.3) initiating a video request to an RPC interface of a streaming media server according to the specific camera number and the channel number selected by a user;
step 2, the streaming media server analyzes the Web client request;
step 3, the Web client side sends an HTTP request to the streaming media server;
step 4, the streaming media server transmits the specific video fragment to the Web client through the HTTP;
and 5, the Web client analyzes the video fragment content and plays the video fragment content.
The invention has the advantages that the real-time and historical video playing is realized by combining the characteristics of the DASH protocol and video monitoring and improving the DASH protocol in real time, optimizing and the like. The method comprises the steps that a server side processes an original video according to a format supported by a DASH video stream to generate an MPD index file and a video fragment file, a client side completes playing of the video stream by adopting an HTML5+ MSE technology, a user can adapt to changes of resolution and frame rate in different video streams without independently installing Flash plug-ins or specific player software, the user can read the video on different platforms such as Android, iOS, Windows and Linux well by means of a browser, the retrieval of real-time video and historical video is supported, and user experience is enhanced.
Drawings
FIG. 1 is an overall block diagram of the method of the present invention;
FIG. 2 is a flow chart of the RPC module interaction of the present invention;
fig. 3 is an HTTP interaction diagram during video playing according to the present invention.
Detailed Description
Hereinafter, the streaming server in this document refers to a PC equipped with a server program, and the Web client refers to a Web browser supporting HTML5 and MSE extensions.
The invention adopts HTML5+ MSE (media Source extensions) technology to realize MPEG-DASH protocol from the engineering angle and realize the video playing method without client.
As shown in fig. 1, the streaming media server is composed of an RPC module, a DASH video stream processing module, and an HTTP service module, wherein the RPC module is responsible for communicating with the client and processing the client video request; the DASH video stream processing module is responsible for packaging original video stream data into a format supported by MPEG-DASH, generating a video fragment file and an MPD index file and storing the video fragment file and the MPD index file at a server end; the HTTP service module is responsible for the transmission of the video fragment file.
The method of the invention is implemented based on the streaming media server architecture according to the following steps:
1.1) starting a streaming media server, analyzing a configuration file, creating an RPC thread, binding the RPC thread to a specific port (8090 is defaulted and used for carrying out RPC communication with a Web client), and monitoring the arrival of client connection;
1.2) the Web client reads a camera list stored in the database and displays the camera list on a Web interface for a user to select;
1.3) initiating a video request to an RPC interface of a streaming media server according to the specific camera number and the channel number selected by a user;
step 2, the streaming media server analyzes and processes the Web client request
2.1) analyzing the client request command;
2.2) creating a video processing thread, packaging and processing the video stream data in the original H.264 format into a format required by MPEG-DASH, generating an MPD index file and a video fragment, and storing the MPD index file and the video fragment in a server;
2.3) naming the video fragments by adopting a uniform naming standard;
2.4) returning the virtual URL where the MPD file is located to the Web client through an RPC interface;
step 3, the Web client side initiates an HTTP request to the streaming media server
3.1) sending an HTTP GET request to a streaming media server according to the URL returned by the RPC interface, and downloading an MPD file;
3.2) analyzing the MPD index file to obtain media characteristic information such as media duration, bit rate, segment URL and the like;
3.3) initiating an HTTP request to the streaming media server according to the URL of the video fragment 1;
step 4, the streaming media server transmits the specific video fragment to the Web client through the HTTP protocol
4.1) analyzing the HTTP request of the Web client;
4.2) according to the request URL of the Web client, the streaming media server searches the video fragment file corresponding to the URL;
4.3) calling a ReadFile () function to read the video fragment file, and returning video fragment data to the Web client through an HttpSendHttpResponse () method;
step 5, the Web client analyzes the video fragment content and plays the video fragment content
5.1) the Web client analyzes the video fragment content and plays the video fragment content;
and 5.2) starting a self-adaptive mechanism, estimating the network bandwidth through a certain strategy, adjusting the bit rate of the next video fragment request, and continuously requesting the next video fragment from the streaming media server until the video playing is finished.
Examples
1.1) starting a streaming media server, analyzing a configuration file, creating an RPC thread, binding the RPC thread to a specific port (8090 is defaulted and used for carrying out RPC communication with a Web client), and monitoring the arrival of client connection;
1.2) the Web client reads a camera list stored in the database and displays the camera list on a Web interface for a user to select;
1.3) initiating a video request to an RPC interface of a streaming media server according to the specific camera number and the channel number selected by a user;
step 2, the streaming media server analyzes and processes the Web client request
2.1) analyzing the client request command;
2.2) creating a video processing thread, packaging and processing the video stream data in the original H.264 format into a format required by MPEG-DASH, generating an MPD index file and a video fragment, and storing the MPD index file and the video fragment in a server side, wherein the MPD index file exists in an XML format and mainly comprises MPD, Period, AdaptionSet, repetition and segmentTemplate tags. The type attribute in the MPD tag represents that the video attribute is real-time video or historical video, the minBufferTime attribute represents the minimum buffer time of the video, and the media presentation duration attribute represents the total playing time of the program; the contentType attribute in the AdaptationSet tag represents the presentation mode of the media, including video, audio or subtitles; the codecs attribute in the Reresentiaton tag represents the type of a video codec, the miniType attribute represents the video format, and the width, height and frameRate attributes respectively represent the width, height and frame rate information of the video slice. The timescale attribute in the SegmentTemplate tag represents the timeline of the slice, the name of the generated video slice is identified by $ Number $ and represents that the part is represented by a specific Number;
2.3) naming the video fragments by adopting a unified naming specification, wherein the names of the video fragments consist of video file names and fragment serial numbers, all the video fragments begin with 'live-video-sd-', and the serial numbers '1' and '2' … … of the video fragments are connected in a fixed sequence;
and 2.4) returning a virtual URL where the MPD file is located to the Web client through an RPC interface, wherein the complete flow of RPC module communication is as shown in FIG. 2. When the streaming media server generates video fragments, returning the URL of the MPD file to the Web end, otherwise, returning corresponding error codes;
step 3, the Web client side initiates an HTTP request to the streaming media server
3.1) sending an HTTP GET request to a streaming media server according to the URL returned by the RPC interface, and downloading an MPD file;
3.2) analyzing the MPD index file to obtain media characteristic information such as media duration, bit rate, segment URL and the like;
3.3) sending HTTP GET request to the streaming media server according to the URL of the video segment 1;
step 4, the streaming media server transmits the specific video fragment to the Web client through the HTTP protocol
4.1) analyzing the HTTP request of the Web client;
4.2) according to the request URL of the Web client, the streaming media server searches the video fragment file corresponding to the URL;
4.3) calling a ReadFile () function to read the video fragment file, and returning video fragment data to the Web client through an HttpSendHttpResponse () method;
step 5, the Web client analyzes the video fragment content and plays the video fragment content
5.1) the Web client analyzes the content of the video fragment 1 and plays the content;
5.2) starting an adaptive mechanism, estimating the network bandwidth through a certain strategy, adjusting the bit rate of the next video fragment request, and continuously requesting the next video fragment from the streaming media server until the video playing is completed, wherein the interactive logic of the HTTP request process is shown in FIG. 3.
In the method, the streaming media server is deployed on a Windows platform and is uniformly managed by Windows service, and the Web client is a browser supporting HTML5 and MSE expansion. And after the Web end user successfully logs in, a video request is initiated to the streaming media server according to the selected camera number, and the video request is analyzed after the video stream is obtained, so that the video picture is played. Compared with the traditional Web end video stream playing, the method of the invention does not need the support of a specific Flash plug-in, has strong cross-platform performance, and can finish the reading of the video stream at any time and any place.
Claims (1)
1. A method for realizing cross-platform video playing without a client is characterized by comprising the following steps:
step 1, client end initiates video request to stream media server
1.1) starting a streaming media server, analyzing a configuration file, creating an RPC thread, binding to a specific port, and monitoring the arrival of client connection;
the streaming media server comprises an RPC module, a DASH video stream processing module and an HTTP service module, wherein the RPC module is responsible for communicating with the client and processing a client video request; the DASH video stream processing module is responsible for packaging original video stream data into a format supported by MEEG-DASH, generating video fragments and MPD index files and storing the video fragments and the MPD index files in a server; the HTTP service module is responsible for transmitting the video fragment file;
1.2) the Web client reads a camera list stored in the database and displays the camera list on a Web interface for a user to select;
1.3) initiating a video request to an RPC interface of a streaming media server according to the specific camera number and the channel number selected by a user;
step 2, the streaming media server analyzes and processes the Web client request, and the concrete process is,
2.1) analyzing the client request command;
2.2) creating a video processing thread, packaging the video stream data in the original H.264 format into video fragments in a format required by MPEG-DASH, and generating a video fragment index file;
2.3) naming the video fragments by adopting a unified naming rule, wherein the name of each fragment file consists of a video file name and a fragment serial number, all video fragments begin with a live-video-sd- "and are connected with the serial numbers" 1 "and" 2 "… … of the video fragments in a fixed sequence;
2.4) returning the address of the video fragment index file to the Web client through the RPC interface,
the specific process is as follows: firstly, creating an RPC thread, monitoring Web client connection, analyzing a client video request after receiving the client video request, then calling a video processing thread to process an original video, waiting for generation of video fragments, returning an MPD file URL to a Web end after a streaming media server generates the video fragments, and otherwise, returning a corresponding error code;
step 3, the Web client side initiates an HTTP request to the streaming media server, and the specific process is,
3.1) sending an HTTP GET request to a streaming media server according to the URL returned by the RPC interface, and downloading a video fragment index file;
3.2) analyzing the video fragment index file to obtain media characteristic information such as media duration, bit rate, fragment URL and the like;
3.3) initiating a request to a streaming media server according to the URL of the video fragment 1;
step 4, the streaming media server transmits the specific video fragment to the Web client through the HTTP protocol, and the specific process is that,
4.1) analyzing the HTTP request of the Web client;
4.2) according to the request URL of the Web client, the streaming media server searches the video fragment file corresponding to the URL;
4.3) calling a ReadFile () function to read the video fragment file, and returning video fragment data to the Web client through an HttpSendHttpResponse () method;
step 5, the Web client analyzes the video fragment content and plays the video fragment content, and the specific process is,
5.1) the Web client analyzes the content of the video fragment 1 and plays the content;
and 5.2) starting a self-adaptive mechanism, estimating the network bandwidth through a certain strategy, adjusting the bit rate of the next video fragment request, and continuously requesting the next video fragment from the streaming media server until the video playing is finished.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710400734.2A CN107197386B (en) | 2017-05-31 | 2017-05-31 | Cross-platform video playing implementation method without client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710400734.2A CN107197386B (en) | 2017-05-31 | 2017-05-31 | Cross-platform video playing implementation method without client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107197386A CN107197386A (en) | 2017-09-22 |
CN107197386B true CN107197386B (en) | 2020-04-21 |
Family
ID=59876830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710400734.2A Active CN107197386B (en) | 2017-05-31 | 2017-05-31 | Cross-platform video playing implementation method without client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107197386B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108668179B (en) * | 2017-03-27 | 2021-05-14 | 华为技术有限公司 | Transmission method of media index file and related equipment |
CN107888932A (en) * | 2017-10-20 | 2018-04-06 | 深圳思麦杰科技有限公司 | A kind of system and method for the cross-platform net cast based on browser |
CN109640038A (en) * | 2018-11-30 | 2019-04-16 | 武汉烽火众智智慧之星科技有限公司 | A kind of video monitoring platform access method and device |
CN112866745B (en) * | 2020-12-31 | 2023-04-25 | 南方电网大数据服务有限公司 | Streaming video data processing method, device, computer equipment and storage medium |
CN113824925A (en) * | 2021-08-11 | 2021-12-21 | 南京国电南自电网自动化有限公司 | WEB plug-in-free video monitoring system and method |
CN114024941B (en) * | 2021-11-11 | 2024-07-02 | 南京国电南自轨道交通工程有限公司 | WebRTC-based multi-terminal multi-channel real-time video monitoring method |
CN114925249B (en) * | 2022-05-20 | 2024-07-12 | 东南大学 | Video transmission fingerprint rapid generation method for self-adaptive streaming media |
CN115442659B (en) * | 2022-08-31 | 2024-02-23 | 四川长虹电器股份有限公司 | MSE media source playing method and system |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101103608A (en) * | 2005-01-10 | 2008-01-09 | 阿克塞斯股份公司 | Monitoring system and method for accessing a monitoring system |
CN103297452A (en) * | 2012-02-24 | 2013-09-11 | 北京对角巷科技发展有限公司 | Method and system for publishing and broadcasting streaming media on Internet in live mode |
CN103533305A (en) * | 2013-10-10 | 2014-01-22 | 国电南瑞科技股份有限公司 | B/S framework plugin-free universal video monitoring system |
CN103974147A (en) * | 2014-03-07 | 2014-08-06 | 北京邮电大学 | MPEG (moving picture experts group)-DASH protocol based online video playing control system with code rate switch control and static abstract technology |
CN104506802A (en) * | 2014-12-17 | 2015-04-08 | 浙江宇视科技有限公司 | Video monitoring system, and method for monitoring video data through traversing NAT (Network Address Translation) |
EP2979414A1 (en) * | 2013-03-29 | 2016-02-03 | Intel IP Corporation | Quality-aware rate adaptation techniques for dash streaming |
CN105812895A (en) * | 2016-03-17 | 2016-07-27 | 张俊莲 | Video on-demand data processing method and system |
WO2016204712A1 (en) * | 2015-06-16 | 2016-12-22 | Intel IP Corporation | Adaptive video content for cellular communication |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102064792B1 (en) * | 2013-12-17 | 2020-01-10 | 한국전자통신연구원 | Method and system for generating bandwidth adaptive segment file for http based multimedia streaming service |
-
2017
- 2017-05-31 CN CN201710400734.2A patent/CN107197386B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101103608A (en) * | 2005-01-10 | 2008-01-09 | 阿克塞斯股份公司 | Monitoring system and method for accessing a monitoring system |
CN103297452A (en) * | 2012-02-24 | 2013-09-11 | 北京对角巷科技发展有限公司 | Method and system for publishing and broadcasting streaming media on Internet in live mode |
EP2979414A1 (en) * | 2013-03-29 | 2016-02-03 | Intel IP Corporation | Quality-aware rate adaptation techniques for dash streaming |
CN103533305A (en) * | 2013-10-10 | 2014-01-22 | 国电南瑞科技股份有限公司 | B/S framework plugin-free universal video monitoring system |
CN103974147A (en) * | 2014-03-07 | 2014-08-06 | 北京邮电大学 | MPEG (moving picture experts group)-DASH protocol based online video playing control system with code rate switch control and static abstract technology |
CN104506802A (en) * | 2014-12-17 | 2015-04-08 | 浙江宇视科技有限公司 | Video monitoring system, and method for monitoring video data through traversing NAT (Network Address Translation) |
WO2016204712A1 (en) * | 2015-06-16 | 2016-12-22 | Intel IP Corporation | Adaptive video content for cellular communication |
CN105812895A (en) * | 2016-03-17 | 2016-07-27 | 张俊莲 | Video on-demand data processing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107197386A (en) | 2017-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107197386B (en) | Cross-platform video playing implementation method without client | |
US9351020B2 (en) | On the fly transcoding of video on demand content for adaptive streaming | |
US20150256600A1 (en) | Systems and methods for media format substitution | |
CA2870059C (en) | Methods and systems for real-time transmuxing of streaming media content | |
WO2017063399A1 (en) | Video playback method and device | |
US9247317B2 (en) | Content streaming with client device trick play index | |
JP2021061628A (en) | Information processing apparatus and information processing method | |
CN104796796B (en) | Improve the fault-tolerant method of the HLS streaming players of Android platform | |
US9565225B2 (en) | Server configuration including stream preview | |
CN109587514B (en) | Video playing method, medium and related device | |
CN111064972A (en) | Live video control method based on IPV9 | |
CN112752115B (en) | Live broadcast data transmission method, device, equipment and medium | |
CN105828096B (en) | Method and device for processing media stream file | |
CA2988320A1 (en) | Http live streaming (hls) video client synchronization | |
CN102130958A (en) | Method and system for video live broadcasting in small file slice mode based on hypertext transport protocol (HTTP) | |
KR102499231B1 (en) | Receiving device, sending device and data processing method | |
CN105228001A (en) | The method and system that a kind of FLV format video is play online | |
CN101600092A (en) | The generation of network video and player method and system | |
US20160373498A1 (en) | Media-timed web interactions | |
CN114866842A (en) | Web video preview method, equipment and medium | |
US10547878B2 (en) | Hybrid transmission protocol | |
CN115134664A (en) | Real-time video stream playing method and system and nonvolatile storage medium | |
KR20170141676A (en) | Receiving device, transmitting device and data processing method | |
EP3292698B1 (en) | Http live streaming (hls) video client synchronization | |
CN105207976A (en) | Multimedia information inter-cutting control method and multimedia information inter-cutting control system of AVS-DASH system, and client |
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 |