CN114071182A - Video playing processing method and device for forest fire monitoring and storage medium - Google Patents

Video playing processing method and device for forest fire monitoring and storage medium Download PDF

Info

Publication number
CN114071182A
CN114071182A CN202111331777.2A CN202111331777A CN114071182A CN 114071182 A CN114071182 A CN 114071182A CN 202111331777 A CN202111331777 A CN 202111331777A CN 114071182 A CN114071182 A CN 114071182A
Authority
CN
China
Prior art keywords
video
video file
slice
container
server
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
CN202111331777.2A
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.)
Shenzhen Shuyan Jinhan Intelligent Technology Co ltd
Original Assignee
Shenzhen Shuyan Jinhan Intelligent 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 Shenzhen Shuyan Jinhan Intelligent Technology Co ltd filed Critical Shenzhen Shuyan Jinhan Intelligent Technology Co ltd
Priority to CN202111331777.2A priority Critical patent/CN114071182A/en
Publication of CN114071182A publication Critical patent/CN114071182A/en
Pending legal-status Critical Current

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23103Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion using load balancing strategies, e.g. by placing or distributing content on different disks, different memories or different servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • 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

Abstract

The invention discloses a video playing processing method, a video playing processing device and a storage medium for forest fire monitoring, wherein the method comprises the following steps: a first server acquires an original video stream; slicing the original video stream to generate a sliced video file; storing the sliced video file in a container of a second server; the front-end component is notified to play the sliced video file. The method and the device have the advantages that the slice video file to be played is stored in the container of the second server, so that the load of the first server can be reduced, and the video monitoring image can be stably and smoothly played at a Web end. The method can be widely applied to the technical field of forest fire video monitoring.

Description

Video playing processing method and device for forest fire monitoring and storage medium
Technical Field
The invention relates to the field of video monitoring, in particular to a video playing processing method and device for forest fire monitoring and a storage medium.
Background
In a forest fire monitoring system, a real-time environment around a forest area is often displayed in a video to monitor whether a fire occurs in the forest area, and the fire position and the fire range are monitored, wherein the monitoring method generally comprises the following steps: the video is transmitted to a network web end through data to display real-time pictures, and the two pictures are respectively: visible light pictures and thermal infrared light pictures.
In the practical application of forest fire monitoring, the problems that webpage version video loading is blocked, the loading is unstable, the occupied bandwidth is high, and the delay is high often occur. A method is needed for reasonably transmitting the data after the front-end video data is coded and decoded to a web end, and a playing plug-in of the web end is used for quickly loading and stably displaying a real-time picture.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, an object of the present invention is to provide a video playing processing method, apparatus and storage medium for forest fire monitoring, which can stably and smoothly play forest fire monitoring pictures on the Web side.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a video playing method for forest fire monitoring, wherein the method includes: a first server acquires an original video stream; slicing the original video stream to generate a sliced video file; storing the sliced video file in a container of a second server; the front-end component is notified to play the sliced video file.
Wherein, should store this section video file to the container of the second server, also include: before storage, whether the total number of the slice video files in the container reaches a preset value is judged, and if the total number reaches the preset value, the slice video file stored in the container firstly is deleted.
The method comprises the following steps of adopting asynchronous threads to respectively execute the following two steps: (1) slicing the original video stream to generate a sliced video file; (2) the sliced video file is stored in a container of a second server.
Wherein generating a slice video file based on the original video stream comprises: capturing the original video stream through a frame grabber to obtain image pixel data; starting a plurality of video recorders, and recording the image pixel data to generate a plurality of video files; and when the recording time reaches the preset recording time, stopping recording, and synthesizing the plurality of video files into the slice video file.
Wherein the original video stream is an rtsp video stream; the container employs the following types of storage servers: nginx storage server, or tomcat storage server.
In a second aspect, the present invention provides a video playing apparatus for forest fire monitoring, wherein the video playing apparatus is disposed on a first server, and the apparatus includes: the video stream acquisition module is used for acquiring an original video stream; the slicing video file generation module is used for slicing the original video stream to generate a slicing video file; the video file storage module is used for storing the slice video file into a container of the second server; and the slice video file playing module is used for informing the front end component to play the slice video file.
The video file storage module is further configured to determine whether the total number of the sliced video files in the container reaches a preset value before storage, and delete the sliced video file stored first in the container if the total number reaches the preset value.
Wherein, this section video file generation module includes: an image pixel data acquisition unit for capturing the original video stream by a frame grabber to acquire image pixel data; the video file recording unit is used for starting a plurality of video recorders and recording the image pixel data to generate a plurality of video files; and the slice video file synthesis unit is used for stopping recording when the recording time reaches the preset recording time and synthesizing the plurality of video files into the slice video file.
In a third aspect, the present invention provides a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method as described above.
The invention has the beneficial effects that:
the method and the device have the advantages that the slice video file to be played is stored in the container of the second server, so that the load of the first server can be reduced, and the video monitoring image can be stably and smoothly played at a Web end.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a video playback processing method for forest fire monitoring according to the present invention;
FIG. 2 is a flowchart illustrating an embodiment of step S11 of FIG. 1;
FIG. 3 is a schematic flow chart diagram illustrating a video playback processing method for forest fire monitoring according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an embodiment of a video playback processing apparatus for forest fire monitoring according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of the slice video file generation module 12 of fig. 4.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a video playing processing method for forest fire monitoring according to an embodiment of the present invention. As shown in fig. 1, the video playing processing method includes the following steps:
s11: a first server acquires an original video stream;
the original video stream is from video data transmitted by cameras arranged at various monitoring positions of the forest.
Preferably, the original video stream is obtained based on an rtsp protocol, that is, the original video stream is an rtsp video stream.
S12: slicing the original video stream to generate a sliced video file;
referring to fig. 2, fig. 2 is a flowchart illustrating an embodiment of step S11 of fig. 1. As shown in fig. 2, this step includes the following sub-steps:
s121: capturing video frames through a frame grabber;
s122: starting a plurality of video recorders to record a plurality of video files;
s123: and when the recording time reaches the preset recording time, stopping recording, and synthesizing the plurality of video files into the slice video file.
In step S123, for example, the preset recording time is set to 10S, and when the recording time reaches 10S, recording is stopped and video file synthesis is performed.
Preferably, the preset recording time is a reasonable time, so that the slice video file can keep a proper length, the speed of the front end for playing the video file for the first time is increased, and the playback is free from a pause phenomenon.
S13: storing the sliced video file in a container of a second server;
in step S13, the slice video file is stored in the form of a still file. The container employs the following types of storage servers: nginx storage server, or tomcat storage server.
S14: the front-end component is notified to play the sliced video file.
The front-end component is an application plug-in arranged at the Web client.
When one slice video file is stored in step S13, this step S14 is executed. Preferably, after 3 to 4 slice video files are stored in step S13, the present step S14 is performed. This ensures that the video is not stuck.
Preferably, steps S12 and S13 are performed in an asynchronous thread. In this way, if the step S12 or the step S13 fails to be executed, the operation of playing the video in the step S14 is not affected, and the front-end user is prevented from dropping the video.
In the embodiment, the slice video file to be played is stored in the second server, so that the load of the first server can be reduced, and the video monitoring image can be stably and smoothly played at a Web end.
Example two
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a video playing processing method for forest fire monitoring according to another embodiment of the present invention. Steps S21, S22, S24, S25 of fig. 2 are the same as steps S11, S12, S13, S14 of fig. 1 in the first embodiment, respectively, and fig. 2 differs from fig. 1 in that:
between step S22 and step S24, the method further includes the sub-step S23: and judging whether the total number of the slice video files in the container reaches a preset value, and if so, deleting the slice video file which is stored firstly in the container.
For example, the preset value is set to 10, and when the total number n of the slice video files in the container is greater than 10, the first to n-10 th slice video files in the container are deleted, so that the total number of the slice video files in the container is guaranteed to be 10.
It is understood that if the steps S22 and S24 are executed in asynchronous threads, the steps S23 and S24 are located in the same thread.
In this embodiment, as the playing time is longer, the total number of the slice video files in the container is gradually increased, and the total number of the slice video files in the container is kept to be a preset value, so that the load of the second server can be reduced, and the video monitoring image can be stably and smoothly played at the Web end.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic structural diagram of a video playback processing apparatus for forest fire monitoring according to an embodiment of the present invention. As shown in fig. 4, the video playback processing apparatus includes a video stream acquisition module 11, a slice video file generation module 12, a video file storage module 13, and a slice video file playback module 14.
And a video stream obtaining module 11, configured to obtain an original video stream.
And a slicing video file generating module 12, configured to slice the original video stream to generate a slicing video file. As shown in fig. 5, the slice video file generation module 12 includes: an image pixel data acquisition unit 121, a video file recording unit 122, and a slice video file synthesizing unit 123. The image pixel data acquisition unit 121 is configured to capture the original video stream by a frame grabber to acquire image pixel data. The video file recording unit 122 is configured to start a plurality of video recorders, and record the image pixel data to generate a plurality of video files. The slice video file synthesizing unit 123 is configured to stop recording when the recording time reaches a preset recording time, and synthesize the plurality of video files into the slice video file.
And a video file storage module 13, configured to store the slice video file into a container.
A slice video file playing module 14, configured to notify the front-end component to play the slice video file.
In other embodiments, the video file storage module 13 is further configured to determine whether the total number of the slice video files in the container reaches a preset value before storage, and delete the slice video file stored first in the container if the total number reaches the preset value.
Specifically, each module method of the present embodiment has been described in detail in the first embodiment or the second embodiment, and is not described herein again.
Example four
The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method according to the first embodiment or the second embodiment.
In summary, the present invention provides a video playing processing method, device and storage medium for forest fire monitoring, which can ensure that a video monitoring picture is stably and smoothly played at a Web end.
Through practical verification, the method is applied to forest fire prevention monitoring in Shenzhen market mountainous areas, and the monitoring operation effect is good. The invention is verified by a plurality of tests, the video loading is reliable, the time delay is low, the card pause is avoided, and the real-time scene of the forest area can be clearly displayed on the picture.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A video playing method for forest fire monitoring is characterized by comprising the following steps:
a first server acquires an original video stream;
slicing the original video stream to generate a sliced video file;
storing the sliced video file in a container of a second server;
and informing a front-end component to play the slice video file.
2. The method of claim 1, wherein storing the sliced video file in a container on a second server further comprises:
before storage, judging whether the total number of the slice video files in the container reaches a preset value, and if the total number reaches the preset value, deleting the slice video file stored in the container first.
3. The method of claim 1, wherein the following two steps are performed separately using asynchronous threads:
(1) slicing the original video stream to generate a sliced video file;
(2) the storing the sliced video file into a container of a second server.
4. The method of claim 1, wherein generating a slice video file based on the original video stream comprises:
capturing the original video stream through a frame grabber to obtain image pixel data;
starting a plurality of video recorders, and recording the image pixel data to generate a plurality of video files;
and when the recording time reaches the preset recording time, stopping recording, and synthesizing the plurality of video files into the slice video file.
5. The method of claim 1, wherein the original video stream is an rtsp video stream; the container is a storage server of the following type: nginx storage server, or tomcat storage server.
6. The utility model provides a video playback device for forest fire control, its characterized in that sets up on first server, and the device includes:
the video stream acquisition module is used for acquiring an original video stream;
the slicing video file generation module is used for slicing the original video stream to generate a slicing video file;
the video file storage module is used for storing the slice video file into a container of a second server;
and the slice video file playing module is used for informing the front end component to play the slice video file.
7. The apparatus of claim 6, wherein the video file storage module is further configured to determine whether a total number of the slice video files in the container reaches a preset value before storage, and delete the slice video file stored first in the container if the total number reaches the preset value.
8. The apparatus of claim 6, wherein the slice video file generation module comprises:
an image pixel data acquisition unit, configured to capture the original video stream through a frame grabber to acquire image pixel data;
the video file recording unit is used for starting a plurality of video recorders and recording the image pixel data to generate a plurality of video files;
and the slice video file synthesis unit is used for stopping recording when the recording time reaches the preset recording time and synthesizing the plurality of video files into the slice video file.
9. The apparatus of claim 6, wherein the original video stream is an rtsp video stream; the container is a storage server of the following type: nginx storage server, or tomcat storage server.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 5.
CN202111331777.2A 2021-11-11 2021-11-11 Video playing processing method and device for forest fire monitoring and storage medium Pending CN114071182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111331777.2A CN114071182A (en) 2021-11-11 2021-11-11 Video playing processing method and device for forest fire monitoring and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111331777.2A CN114071182A (en) 2021-11-11 2021-11-11 Video playing processing method and device for forest fire monitoring and storage medium

Publications (1)

Publication Number Publication Date
CN114071182A true CN114071182A (en) 2022-02-18

Family

ID=80274953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111331777.2A Pending CN114071182A (en) 2021-11-11 2021-11-11 Video playing processing method and device for forest fire monitoring and storage medium

Country Status (1)

Country Link
CN (1) CN114071182A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018095302A1 (en) * 2016-11-22 2018-05-31 深圳创维数字技术有限公司 Method and system for displaying video file recorded on set-top box
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN111447455A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Live video stream playback processing method and device and computing equipment
CN113329267A (en) * 2021-05-27 2021-08-31 北京奇艺世纪科技有限公司 Video playing method and device, terminal equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018095302A1 (en) * 2016-11-22 2018-05-31 深圳创维数字技术有限公司 Method and system for displaying video file recorded on set-top box
CN111447455A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Live video stream playback processing method and device and computing equipment
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN113329267A (en) * 2021-05-27 2021-08-31 北京奇艺世纪科技有限公司 Video playing method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
US11871093B2 (en) Socially annotated audiovisual content
KR102010513B1 (en) Method and apparatus for playing back recorded video
US11153658B2 (en) Image display method and generating method, device, storage medium and electronic device
WO2017107649A1 (en) Video transmission method and device
US20220103904A1 (en) Bullet screen delivery method for live broadcast playback and live video bullet screen playback method
EP4171050A1 (en) Enforcement of trick-play disablement in adaptive bit rate video content delivery
CN110784750B (en) Video playing method and device and computer equipment
US20130335447A1 (en) Electronic device and method for playing real-time images in a virtual reality
TWI540890B (en) Method and apparatus for processing motion video
JP4499573B2 (en) Easier to use time shift buffer
CN112822503A (en) Method, device and equipment for playing live video stream and storage medium
US20220345776A1 (en) Temporal placement of a rebuffering event
CN110139128B (en) Information processing method, interceptor, electronic equipment and storage medium
JP2013214800A (en) Streaming media reproduction device, streaming media reproduction method, and program
CN114363315A (en) Method and system for monitoring playing of screen equipment and storage medium
CN113794924A (en) Video playing method, device, equipment and computer readable storage medium
CN114071182A (en) Video playing processing method and device for forest fire monitoring and storage medium
US11457286B2 (en) Video distribution apparatus, distribution method, and recording medium
CN111918074A (en) Live video fault early warning method and related equipment
CN107018442B (en) A kind of video recording synchronized playback method and device
US9420316B2 (en) Control apparatus, reproduction control method, and recording medium
CN110209539B (en) Test method, terminal equipment and tester
US10049158B1 (en) Analyzing user behavior relative to media content
JP6099715B2 (en) Streaming media playback apparatus, streaming media playback method, and program
JP7099693B2 (en) Video monitoring method and server and video monitoring system

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