CN115174992A - Method and system for realizing TS video playing based on NGINX - Google Patents
Method and system for realizing TS video playing based on NGINX Download PDFInfo
- Publication number
- CN115174992A CN115174992A CN202210790593.0A CN202210790593A CN115174992A CN 115174992 A CN115174992 A CN 115174992A CN 202210790593 A CN202210790593 A CN 202210790593A CN 115174992 A CN115174992 A CN 115174992A
- Authority
- CN
- China
- Prior art keywords
- video
- nginx
- processing module
- file
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 239000000284 extract Substances 0.000 claims abstract description 5
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 5
- 238000004806 packaging method and process Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
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/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44004—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
-
- 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/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440218—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream 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
-
- 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/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8193—Monomedia components thereof involving executable data, e.g. software dedicated tools, e.g. video decoder software or IPMP tool
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a method for realizing TS video playing based on NGINX, which comprises the following steps: the web end sends a TS video playing request to the NGINX video processing module; the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, acquires a TS video file through a request address, and caches the TS video file to the local; a TS video decoding module is called inside the NGINX video processing module, and the NGINX video processing module decodes the TS video file; the NGINX video processing module extracts audio coding, video coding and metadata information; and synthesizing the audio coding, the video coding and the metadata information into an MP4 video file according to a standard MP4 protocol, wherein the MP4 video metadata is generated at the head of the file. The invention also discloses a system for playing the TS video based on NGINX, and the system has the advantages of convenience in video watching, playing while playing and the like.
Description
Technical Field
The invention relates to the field of video playing, in particular to a method and a system for playing a TS video based on NGINX.
Background
With the rapid development of the internet of things and social networks, a large amount of video data can be generated, videos stored in a TS file format are very clear, and a large amount of videos stored in the TS file format are required at present. At present, the application based on the B/S architecture is more and more, and a plurality of video playing websites and live broadcast platforms are realized based on the B/S architecture, so that a user can easily browse and play videos on the web. However, due to the limitation of web technology, the video in the TS file format cannot be played by using a commonly used video playing method, and only a downloading operation is triggered, and online playing cannot be realized. The TS video can only be downloaded to the local and played by a specific video player, which is very inconvenient.
Therefore, it is necessary to implement a simpler and more convenient playing method, which is not limited by the web technology and easily helps the user to implement the video playing in the TS file format.
Disclosure of Invention
The invention provides a method for playing TS video based on NGINX, which has the advantages of convenience in video watching and playing while playing and solves the problem of limitation of original video playing.
The method for realizing TS video playing based on NGINX provided by the embodiment of the application comprises the following steps:
the web end sends a TS video playing request to the NGINX video processing module;
the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, obtains a TS video file through a request address, and caches the TS video file to the local;
a TS video decoding module is called inside the NGINX video processing module to decode the TS video file;
the NGINX video processing module extracts audio coding, video coding and metadata information;
the NGINX video processing module synthesizes audio coding, video coding and metadata information into an MP4 video file according to a standard MP4 protocol, and MP4 video metadata is generated at the head of the file.
Preferably, the method further comprises the following steps:
the NGINX video processing module generates the generated MP4 video file into a media data source;
and the NGINX video processing module returns the media data source to the web front end, and the media data source is played through a player carried by the web front end to finish the video playing in the TS file format.
Preferably, the step of synthesizing the MP4 video file is as follows:
the NGINX video processing module analyzes audio coding, video coding and metadata information of the TS video;
packaging the extracted metadata information into the head of the MP4 video file;
and the NGINX video processing module synthesizes the audio coding, the video coding and the metadata information into the MP4 video according to the standard MP4 video protocol.
Preferably, the method comprises the following steps:
the NGINX video processing module sends a TS video file downloading request through the analyzed TS video URL address information;
and caching the downloaded TS video file to a specified cache space of the NGINX server.
A system based on NGINX for realizing TS video playing, which applies the method based on NGINX for realizing TS video playing, comprises an NGINX server and a web end, wherein the web end sends a TS video playing request to the NGINX server, the NGINX server comprises an NGINX video processing module and a TS video decoding module, and the NGINX video processing module analyzes the URL address of the TS video through the URL information requested by the web end;
the NGINX video processing module sends a TS video file downloading request through analyzed TS video URL address information, and caches the downloaded TS video file to a specified cache space of the NGINX server; and the NGINX video processing module calls the TS video decoding module to extract audio coding, video coding and TS video file metadata information.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the web end sends a TS video playing request to the NGINX video processing module; the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, obtains a TS video file through a request address, and caches the TS video file to the local; a TS video decoding module is called inside the NGINX video processing module to decode the TS video file; the NGINX video processing module extracts audio coding, video coding and metadata information; the NGINX video processing module synthesizes audio coding, video coding and metadata information into an MP4 video file according to a standard MP4 protocol, and MP4 video metadata is generated at the head of the file. The method for playing the TS video by the general web technology is realized, so that convenience is brought to users for viewing the video, and the users can watch the video more conveniently; the mobile phone end and the PC end can use a self-contained browser to retrieve the TS file format video anytime and anywhere without installing a specified player;
generating a media data source by the generated MP4 video file; returning the media data source to the web front end, and playing through a player carried by the web front end to finish video playing in a TS file format; the MP4 video metadata is arranged at the head of the file, so that the function of playing while downloading can be realized, the playing can be carried out without completely downloading, and the video playing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a first embodiment of the present invention;
FIG. 2 is another flow chart illustrating the first embodiment of the present invention;
FIG. 3 is a flowchart illustrating step S6 according to the first embodiment of the present invention;
FIG. 4 is a flowchart illustrating the step S2 according to the first embodiment of the present invention
Fig. 5 is a schematic structural diagram of a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, a method 100 for implementing TS video playing based on NGINX includes the following steps:
step S1: the web end sends a TS video playing request to the NGINX video processing module;
step S2: the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, obtains a TS video file through a request address, and caches the TS video file to the local;
and step S3: a TS video decoding module is called inside the NGINX video processing module to decode the TS video file;
and step S4: the NGINX video processing module extracts audio coding, video coding and metadata information;
step S5: the NGINX video processing module synthesizes audio coding, video coding and metadata information into an MP4 video file according to a standard MP4 protocol, and MP4 video metadata is generated at the head of the file.
Referring to fig. 2, the method 100 for implementing TS video playing based on NGINX further includes the following steps:
step S6: the NGINX video processing module generates the generated MP4 video file into a media data source;
step S7: and the NGINX video processing module returns the media data source to the web front end, and the media data source is played through a player carried by the web front end to finish the video playing in the TS file format.
Referring to fig. 3, the step S6 and the step S7 of synthesizing the MP4 video file include the following steps:
step S61: the NGINX video processing module analyzes audio coding, video coding and metadata information of the TS video;
step S62: packaging the extracted metadata information into the head of the MP4 video file;
step S63: and the NGINX video processing module synthesizes the audio coding, the video coding and the metadata information into the MP4 video according to the standard MP4 video protocol.
Referring to fig. 4, the step S2 further includes the following steps:
step S21: the NGINX video processing module sends a TS video file downloading request through the analyzed TS video URL address information;
step S22: and caching the downloaded TS video file to a specified cache space of the NGINX server.
Referring to fig. 5, a system 200 for implementing TS video playing based on NGINX according to a second embodiment of the present invention is provided, and the method 100 for implementing TS video playing based on NGINX includes a NGINX server 210 and a web end 220, where the web end 220 sends a TS video playing request to the NGINX server 210, the NGINX server 210 includes a NGINX video processing module 211 and a TS video decoding module 212, and the NGINX video processing module 211 parses a URL address of a TS video through URL information requested by the web end 220;
the NGINX video processing module 211 sends a TS video file downloading request through the analyzed TS video URL address information; the NGINX video processing module 211 caches the downloaded TS video file to a designated cache space of the NGINX server 210; the NGINX video processing module 211 calls the TS video decoding module 212 to extract the audio coding, the video coding and the TS video file metadata information.
The NGINX server 210 returns the media data source to the web end 220, and plays the media data source through a player of the web end 220, so as to complete video playing in the TS file format, that is, the NGINX server 210 returns a video address, and the web end 220 can normally read video resources, in this embodiment, the web end 220 is a browser.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the web end sends a TS video playing request to the NGINX video processing module; the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, obtains a TS video file through a request address, and caches the TS video file to the local; a TS video decoding module is called inside the NGINX video processing module to decode the TS video file; extracting audio coding, video coding and metadata information; and synthesizing the audio coding, the video coding and the metadata information into an MP4 video file according to a standard MP4 protocol, wherein the MP4 video metadata is generated at the head of the file. The method for playing the TS video by the universal web technology is realized, convenience is brought to users for viewing the video, and the users can watch the video more conveniently; the mobile phone end and the PC end can use a self-contained browser to retrieve the TS file format video at any time and any place without installing a designated player;
generating a media data source from the generated MP4 video file; returning the media data source to the web front end, and playing the media data source through a player carried by the web front end to finish video playing in a TS file format; the MP4 video metadata is arranged at the head of the file, so that the function of playing while downloading can be realized, the playing can be carried out without completely downloading, and the video playing efficiency is improved.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (5)
1. A method for realizing TS video playing based on NGINX comprises the following steps:
the web end sends a TS video playing request to the NGINX video processing module;
the NGINX video processing module detects a TS video playing request, analyzes URL address information of the TS video, obtains a TS video file through a request address, and caches the TS video file to the local;
a TS video decoding module is called inside the NGINX video processing module to decode the TS video file;
the NGINX video processing module extracts audio coding, video coding and metadata information;
the NGINX video processing module synthesizes audio coding, video coding and metadata information into an MP4 video file according to a standard MP4 protocol, and MP4 video metadata is generated at the head of the file.
2. The method of claim 1, further comprising the following steps:
the NGINX video processing module generates the generated MP4 video file into a media data source;
and the NGINX video processing module returns the media data source to the web front end, and the media data source is played through a player carried by the web front end to finish the video playing in the TS file format.
3. The method as claimed in claim 1, wherein the step of synthesizing MP4 video file comprises:
the NGINX video processing module analyzes audio coding, video coding and metadata information of the TS video;
packaging the extracted metadata information into the head of the MP4 video file;
and the NGINX video processing module synthesizes the audio coding, the video coding and the metadata information into the MP4 video according to the standard MP4 video protocol.
4. The method of claim 1, wherein the method for implementing TS video playing based on NGINX comprises the following steps:
the NGINX video processing module sends a TS video file downloading request through the analyzed TS video URL address information;
and caching the downloaded TS video file to a specified cache space of the NGINX server.
5. A system for implementing TS video playing based on NGINX, applying the method for implementing TS video playing based on NGINX as claimed in claim 1, comprising a NGINX server and a web end, the web end sending a TS video playing request to the NGINX server, the NGINX server including a NGINX video processing module and a TS video decoding module, the NGINX video processing module resolving a URL address of the TS video through URL information requested by the web end;
the NGINX video processing module sends a TS video file downloading request through analyzed TS video URL address information, and caches the downloaded TS video file to a specified cache space of the NGINX server; and the NGINX video processing module calls the TS video decoding module to extract audio coding, video coding and TS video file metadata information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210790593.0A CN115174992A (en) | 2022-07-06 | 2022-07-06 | Method and system for realizing TS video playing based on NGINX |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210790593.0A CN115174992A (en) | 2022-07-06 | 2022-07-06 | Method and system for realizing TS video playing based on NGINX |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115174992A true CN115174992A (en) | 2022-10-11 |
Family
ID=83490437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210790593.0A Pending CN115174992A (en) | 2022-07-06 | 2022-07-06 | Method and system for realizing TS video playing based on NGINX |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115174992A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103957469A (en) * | 2014-05-21 | 2014-07-30 | 百视通网络电视技术发展有限责任公司 | Internet video on demand method and system based on real-time packaging switching |
CN105704581A (en) * | 2016-01-25 | 2016-06-22 | 互联天下科技发展(深圳)有限公司 | HTTP real-time video transmission method based on MP4 file format |
CN105812895A (en) * | 2016-03-17 | 2016-07-27 | 张俊莲 | Video on-demand data processing method and system |
CN106412530A (en) * | 2016-12-08 | 2017-02-15 | 山东省科学院情报研究所 | IoT (Internet of Things) video monitoring system and method |
CN106791931A (en) * | 2017-01-05 | 2017-05-31 | 上海浦东软件园汇智软件发展有限公司 | A kind of method and apparatus of data flow transcoding |
CN108156478A (en) * | 2016-12-06 | 2018-06-12 | 创盛视联数码科技(北京)有限公司 | Mp4 formatted files turn the video on-demand system and method for hls forms |
US20190037252A1 (en) * | 2017-07-26 | 2019-01-31 | CodeShop BV | System and method for delivery and caching of personalized media streaming content |
US20200344498A1 (en) * | 2017-10-19 | 2020-10-29 | Lazar Entertainment Inc. | Systems and methods for broadcasting live media streams |
CN113127777A (en) * | 2021-03-08 | 2021-07-16 | 深圳市麦谷科技有限公司 | Method and system for playing TS video based on HTML5 |
CN114417055A (en) * | 2021-12-28 | 2022-04-29 | 北京华夏电通科技股份有限公司 | Video playing method and device, computer equipment and storage medium |
-
2022
- 2022-07-06 CN CN202210790593.0A patent/CN115174992A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103957469A (en) * | 2014-05-21 | 2014-07-30 | 百视通网络电视技术发展有限责任公司 | Internet video on demand method and system based on real-time packaging switching |
CN105704581A (en) * | 2016-01-25 | 2016-06-22 | 互联天下科技发展(深圳)有限公司 | HTTP real-time video transmission method based on MP4 file format |
CN105812895A (en) * | 2016-03-17 | 2016-07-27 | 张俊莲 | Video on-demand data processing method and system |
CN108156478A (en) * | 2016-12-06 | 2018-06-12 | 创盛视联数码科技(北京)有限公司 | Mp4 formatted files turn the video on-demand system and method for hls forms |
CN106412530A (en) * | 2016-12-08 | 2017-02-15 | 山东省科学院情报研究所 | IoT (Internet of Things) video monitoring system and method |
CN106791931A (en) * | 2017-01-05 | 2017-05-31 | 上海浦东软件园汇智软件发展有限公司 | A kind of method and apparatus of data flow transcoding |
US20190037252A1 (en) * | 2017-07-26 | 2019-01-31 | CodeShop BV | System and method for delivery and caching of personalized media streaming content |
US20200344498A1 (en) * | 2017-10-19 | 2020-10-29 | Lazar Entertainment Inc. | Systems and methods for broadcasting live media streams |
CN113127777A (en) * | 2021-03-08 | 2021-07-16 | 深圳市麦谷科技有限公司 | Method and system for playing TS video based on HTML5 |
CN114417055A (en) * | 2021-12-28 | 2022-04-29 | 北京华夏电通科技股份有限公司 | Video playing method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170318359A1 (en) | Authoring System for IPTV Network | |
US10567834B2 (en) | Using an audio stream to identify metadata associated with a currently playing television program | |
JP7026449B2 (en) | Information processing device, receiving device, and information processing method | |
US20100281042A1 (en) | Method and System for Transforming and Delivering Video File Content for Mobile Devices | |
US20090063645A1 (en) | System and method for supporting messaging using a set top box | |
CN105828096B (en) | Method and device for processing media stream file | |
JP2005534368A (en) | System and method for games based on video on demand | |
JP2006503384A (en) | Multimedia content service system and method based on user preference and recording medium thereof | |
WO2007018726A2 (en) | System and method for providing pre-encoded audio content to a television in a communications network | |
CN101345838A (en) | TV program navigation method, apparatus and system | |
US10965969B2 (en) | Method and apparatus for playing online television program | |
CN104284238A (en) | Video playing method and device based on two-dimension code | |
US20010039572A1 (en) | Data stream adaptation server | |
WO2015196749A1 (en) | Scenario recognition-based information recommendation method and device | |
CN105228001A (en) | The method and system that a kind of FLV format video is play online | |
CN104038774B (en) | Generate the method and device of ring signal file | |
JP2017538328A (en) | Promotion information processing method, apparatus, device, and computer storage medium | |
JPWO2019054199A1 (en) | Information processing device and information processing method | |
KR102630037B1 (en) | Information processing device, information processing method, transmission device, and transmission method | |
KR100908144B1 (en) | Multimedia editing / playback system and its operation method | |
KR100824600B1 (en) | Customized broadcasting service system and its method based on open interface | |
CN115174992A (en) | Method and system for realizing TS video playing based on NGINX | |
US20090089354A1 (en) | User device and method and authoring device and method for providing customized contents based on network | |
CN112188256B (en) | Information processing method, information providing device, electronic device, and storage medium | |
CN103888788A (en) | Virtual tourism service system based on bidirectional set top box and realization method thereof |
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 |