CN110139063B - Method, device and equipment for determining number of video streams supported by equipment - Google Patents
Method, device and equipment for determining number of video streams supported by equipment Download PDFInfo
- Publication number
- CN110139063B CN110139063B CN201810132859.6A CN201810132859A CN110139063B CN 110139063 B CN110139063 B CN 110139063B CN 201810132859 A CN201810132859 A CN 201810132859A CN 110139063 B CN110139063 B CN 110139063B
- Authority
- CN
- China
- Prior art keywords
- playing
- adjustment
- video streams
- played
- abnormal
- 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
- 238000000034 method Methods 0.000 title claims abstract description 91
- 230000002159 abnormal effect Effects 0.000 claims abstract description 232
- 238000005070 sampling Methods 0.000 claims description 80
- 230000008569 process Effects 0.000 claims description 44
- 238000012360 testing method Methods 0.000 claims description 26
- 238000004458 analytical method Methods 0.000 claims description 13
- 230000003247 decreasing effect Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000004891 communication Methods 0.000 claims description 2
- 238000001514 detection method Methods 0.000 claims description 2
- 230000009467 reduction Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/004—Diagnosis, testing or measuring for television systems or their details for digital television systems
-
- 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/432—Content retrieval operation from a local storage medium, e.g. hard-disk
- H04N21/4325—Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
-
- 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
- H04N7/181—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention provides a method and a device for determining the number of video flow paths supported by equipment, wherein the method comprises the following steps: increasing N paths of video streams to be played, determining playing parameters after the increasing playing, judging whether the playing parameters meet abnormal conditions, if so, determining the number of the video streams played before the increasing playing as the number of the video streams supported by the equipment, and if not, continuing to increase the N paths of the video streams to be played; or, reducing the played N paths of video streams, determining the playing parameters after the playing is reduced, judging whether the playing parameters meet abnormal conditions, if so, continuing to reduce the played N paths of video streams, and if not, determining the number of the video streams played after the playing is reduced as the number of the video streams supported by the equipment. In the scheme, various factors influencing the number of the video streams supported by the equipment do not need to be considered, the number of the played video streams only needs to be automatically adjusted by the equipment, whether the adjusted playing parameters meet abnormal conditions or not is automatically judged, and manual participation is not needed.
Description
Technical Field
The present invention relates to the field of monitoring technologies, and in particular, to a method, an apparatus, a device, and a system for determining the number of video channels supported by a device.
Background
In a video surveillance scene, a plurality of image capturing devices, such as IP cameras, that is, webcams, are typically provided. Each IP Camera sends one path of video stream collected by the IP Camera to the host, and the host receives and plays multiple paths of video streams.
Generally, it is necessary to determine the maximum number of paths that a host can play video streams in advance, and then set the number of image capturing devices connected to the host according to the number of paths. In the existing scheme, the number of video streams supported by a host is generally determined through manual testing.
There are many factors that affect the number of video channels supported by the host, such as host performance, coding quality, image resolution, code rate, etc., and these factors need to be considered comprehensively in the process of manual testing, which results in complex testing process and low efficiency.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a system for determining the number of video channels supported by a device, so as to improve efficiency of determining the number of video channels supported by the device.
To achieve the above object, an embodiment of the present invention provides a method for determining the number of video streams supported by a device, including:
adjusting the number of video flow paths played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition;
if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment;
if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
Optionally, the determining the adjusted playing parameter may include:
and analyzing the brightness and the chroma of the data block in the video frame played after the adjustment, and taking the analysis result as the playing parameter after the adjustment.
Optionally, the determining the adjusted playing parameter may include:
dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
the determining whether the playing parameter satisfies an abnormal condition may include:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
Optionally, the determining whether the counted number of abnormal time slices is greater than a preset first threshold may include:
determining a first threshold corresponding to the number of video channels played after the adjustment according to the corresponding relationship between the number of video channels stored in advance and the threshold,
and judging whether the counted abnormal time slice number is larger than the determined first threshold value.
Optionally, the adjusting the number of video streams currently played by using a preset adjustment manner may include:
adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream;
or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
Optionally, the determining the adjusted playing parameter may include:
determining delay information appearing in the playing process after the adjustment as the playing parameter after the adjustment;
or, judging and determining whether the picture abnormal information appears in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment;
or judging whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment.
Optionally, the determining of the delay information occurring in the playing process after the adjustment may include:
and comparing each path of video stream played after the adjustment with a preset time base line, and determining delay information appearing in the playing process after the adjustment according to a comparison result.
Optionally, the determining the adjusted playing parameter may include:
sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data;
judging whether each part of sampling data is abnormal or not, and counting the number of the abnormal sampling data as the adjusted playing parameter;
the judging whether the playing parameters meet the abnormal conditions includes:
and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
Optionally, in the process of determining the adjusted playing parameter, the method may further include:
if the network interruption is detected, the adjusted playing parameters are determined again.
In order to achieve the above object, an embodiment of the present invention further provides an apparatus for determining the number of video streams supported by a device, where the apparatus includes:
the adjusting module is used for adjusting the number of the video flow paths played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
the first determining module is used for determining the adjusted playing parameters;
the judging module is used for judging whether the playing parameters meet abnormal conditions or not; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, triggering the adjustment module; if the adjustment mode is to increase and play the N paths of video streams every time and the playing parameters meet abnormal conditions, triggering a second determination module; if the adjustment mode is that N paths of video streams are reduced and played each time, and the playing parameters meet abnormal conditions, triggering the adjustment module; if the adjustment mode is that N paths of video streams are reduced and played each time, and the playing parameters do not meet abnormal conditions, triggering a third determination module;
the second determining module is used for determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment;
and the third determining module is used for determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
Optionally, the first determining module may be specifically configured to: and analyzing the brightness and the chroma of the data block in the video frame played after the adjustment, and taking the analysis result as the playing parameter after the adjustment.
Optionally, the first determining module may be specifically configured to: dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
the determining module may be specifically configured to:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
Optionally, the determining module may be specifically configured to:
determining a first threshold corresponding to the number of video channels played after the adjustment according to the corresponding relationship between the number of video channels stored in advance and the threshold,
and judging whether the counted abnormal time slice number is larger than the determined first threshold value.
Optionally, the adjusting module may be specifically configured to:
adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream;
or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
Optionally, the first determining module may be specifically configured to:
determining delay information appearing in the playing process after the adjustment as the playing parameter after the adjustment;
or, judging and determining whether the picture abnormal information appears in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment;
or judging whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment.
Optionally, the first determining module may be further configured to:
and comparing each path of video stream played after the adjustment with a preset time base line, and determining delay information appearing in the playing process after the adjustment according to a comparison result.
Optionally, the first determining module may be specifically configured to:
sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data; judging whether each part of sampling data is abnormal or not, and counting the number of the abnormal sampling data as the adjusted playing parameter;
the determining module may be specifically configured to: and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
Optionally, the apparatus may further include:
and the detection module is used for detecting whether the network is interrupted or not, and if the network is interrupted, the first determination module is triggered.
In order to achieve the above object, an embodiment of the present invention further provides an electronic device, including a processor and a memory;
a memory for storing a computer program;
and the processor is used for realizing any method for determining the number of the video streaming channels supported by the equipment when executing the program stored in the memory.
In order to achieve the above object, an embodiment of the present invention further provides a system for determining the number of video streams supported by a device, including: the device to be tested is in communication connection with the video streaming device;
the video streaming device is used for acquiring or storing a video stream;
the device to be tested is used for reading and playing the video stream in the video stream device and adjusting the number of the video stream channels played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer; determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment; if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
Optionally, the device to be tested is a client, and the video streaming device is an image acquisition device or a storage server.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any one of the above methods for determining the number of video streams supported by a device.
By applying the embodiment of the invention, various factors influencing the number of video streams supported by the equipment do not need to be considered, the number of the played video streams only needs to be automatically adjusted by the equipment, whether the adjusted video streams are abnormal or not is automatically judged, the first aspect is simple in process and improves efficiency, the second aspect realizes automatic test and does not need manual participation, and the third aspect is that an abnormal condition is set in the scheme, if the adjusted playing parameters meet the abnormal condition, the abnormal condition is judged to be abnormal after adjustment, the abnormal condition can be adjusted according to an actual scene, or the tolerance of the abnormal degree in the scheme is adjustable, and the scheme has better adaptability to different scenes.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a method for determining the number of video streams supported by a device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario in an embodiment of the present invention;
fig. 3 is a second flowchart illustrating a method for determining the number of video streams supported by a device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for determining the number of video streams supported by a device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a system for determining the number of video streams supported by a device according to an 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In order to solve the foregoing technical problem, embodiments of the present invention provide a method and an apparatus for determining the number of video streams supported by a device, where the method and the apparatus may be applied to a device for playing a video stream.
The device to be tested may be a host, or may be a client, and the like, and is not limited specifically. If the device to be tested is a Client, the Client can be a Client with a C/S (Client/Server) structure or a Client with a B/S (Browser/Server) structure; if the client is a client with a C/S structure, the video stream can be played in software and the embodiment of the invention can be executed, and if the client is a client with a B/S structure, the video stream can be played in a webpage and the embodiment of the invention can be executed.
The method for determining the number of video flow paths supported by equipment provided by the embodiment of the invention comprises the following steps:
adjusting the number of video flow paths played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition;
if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment;
if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
In an application scenario, before the embodiment is executed, the device under test does not play video streams, and the preset adjustment manner may be to play N paths of video streams each time.
In another application scenario, before the embodiment is executed, the device under test is playing X video streams, where X is a preset value, X is greater than the number of video streams supported by the device under test, and X is a positive integer greater than N. In this case, the preset adjustment manner may be to play N video streams at a time of decreasing.
It is understood that before the implementation of the present embodiment, a specific value of the number of video streams supported by the device under test cannot be determined, but a rough range may be determined, or an approximate order of magnitude may be determined, and X may be set according to the rough range. For example, if it is predetermined that the number of video channels supported by the device under test is approximately between 5 and 15, X may be set to 20 or another value, which is not limited specifically.
In another application scenario, before the embodiment is executed, one or more video streams are being played in the device under test, and the number of the video streams being played is a smaller value and is smaller than the number of the video streams supported by the device under test. In this case, the preset adjustment manner may be to play N video streams each time, that is, to play N video streams each time on the basis of playing one or more video streams.
As described above, before the implementation of the present embodiment, a specific value of the number of video streams supported by the device under test cannot be determined, but a rough range may be determined, or an approximate order of magnitude may be determined. Before S101 is executed, the number of video streams being played in the device under test may be set according to the rough range. For example, it is predetermined that the number of video streams supported by the device under test is approximately between 5 and 15, before S101 is executed, the number of video streams being played in the device under test may be 1, 2, 3, and the like, and is not limited specifically.
First, an embodiment in which the adjustment method is to play N video streams at a time of increment will be described in detail.
Fig. 1 is a first flowchart of a method for determining the number of video streams supported by a device according to an embodiment of the present invention, where the method includes:
s101: and additionally playing N paths of video streams, wherein N is a positive integer.
If one or more paths of video streams are being played in the device to be tested before the step S101 is executed, N paths of video streams are additionally played on the basis of playing the one or more paths of video streams. If the video stream is not played in the device under test before S101 is executed, the device under test plays the N paths of video streams.
For example, the video stream may be a preview video stream or a playback video stream. The preview video stream may be a video stream captured in real time by the image capturing device, and the playback video stream may be a video stream stored in the storage server. S101 may include: adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream; or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
For example, as shown in fig. 2, the device to be tested is connected to multiple IP cameras and the storage server, and the device to be tested may read a preview video stream acquired by the IP cameras or a playback video stream stored by the storage server.
S102: and determining the playing parameters after the increasing playing.
As an implementation manner, the luminance and the chrominance of the data block in the video frame played after the incremental playing may be analyzed, and the analysis result is used as the playing parameter after the incremental playing.
For example, one or more video frames may be extracted from the video stream played after the incremental play, YUV (Y represents brightness, and U and V represent chrominance) components of each data block in the video frame may be analyzed for each extracted video frame, and the analysis result may be used as the play parameter after the incremental play.
In other embodiments, the playing parameters may be various, such as delay information, abnormal picture information, abnormal packet sequence number information, and the like, which occur during the playing process, and accordingly, the manner of determining the playing parameters may be various, which is described in detail below.
S103: and judging whether the playing parameters meet the abnormal conditions, if so, executing S104, and if not, returning to execute S101.
In this embodiment, an abnormal condition is set in advance for the playing parameter, for example, the abnormal condition may be: the delay information is greater than the threshold, the number of abnormal packets is greater than the threshold, and so on, as described in detail below.
S104: and determining the number of the video streams played before the increased playing as the number of the video streams supported by the equipment.
In the embodiment of the invention, if the playing parameters do not meet the abnormal conditions after the N paths of video streams are additionally played, the N paths of video streams are continuously additionally played until the playing parameters meet the abnormal conditions after the N paths of video streams are additionally played, and the number of the video streams played before the N paths of video streams are additionally played is determined as the number of the video streams supported by the equipment.
N may be a fixed number, such as 1 or 2, or may also be other positive integers, which are not limited in particular. Taking 1 as an example, each time 1 video stream is played in an increasing manner, assuming that the playing parameter does not satisfy the abnormal condition when 3 video streams are played, after 1 video stream is played in an increasing manner, that is, the playing parameter satisfies the abnormal condition when 4 video streams are played, the number of video streams played before the increasing play is 3, and the number of video streams supported by the device is 3.
Or N may not be fixed, that is, the number of video streams played in each increment may be different, for example, 3 video streams are played in an increment manner for the first time, and it is determined that the playing parameter after the first increment of playing does not satisfy the abnormal condition, 2 video streams are played in an increment manner for the second time, and it is determined that the playing parameter after the second increment of playing does not satisfy the abnormal condition, 1 video stream is played in an increment manner for the third time, it is determined that the playing parameter after the third increment of playing satisfies the abnormal condition, the number of video streams played before the third increment of playing is 3+2, and the number of video streams supported by the device is 5.
By applying the embodiment shown in fig. 1 of the present invention, the device to be tested increases and plays N paths of video streams each time, and determines whether the playing parameters increased and played this time satisfy abnormal conditions; if not, continuing to increase the playing N paths of video streams, and continuing to judge whether the playing parameters after increasing the playing meet abnormal conditions; if the playing parameters after the increasing playing meet the abnormal conditions, determining the number of the video flow paths played before the increasing playing as the number of the video flow paths supported by the equipment; it is thus clear that in this scheme, need not consider the various factors that influence equipment support video flow number, only need equipment automatic adjustment broadcast video flow number, whether unusual after the automatic judgement adjustment, the first aspect process is simple, efficiency is improved, automatic test has been realized in the second aspect, do not need artifical the participation, the third aspect, set for unusual condition in this scheme, if the broadcast parameter after the adjustment satisfies unusual condition, then judge that the adjustment is unusual, unusual condition can be adjusted according to the actual scene, or, tolerance to unusual degree in this scheme is adjustable, this scheme is to the adaptability preferred of different scenes.
The following describes an embodiment of the adjustment method for playing N video streams at a time of decreasing.
Fig. 3 is a second flowchart of a method for determining the number of video streams supported by a device according to an embodiment of the present invention, where the method includes:
s301: and reducing and playing N paths of video streams, wherein N is a positive integer.
Before the embodiment is executed, the device under test is playing X video streams, where X is a preset value, X is greater than the number of video streams supported by the device under test, and X is a positive integer greater than N.
It is understood that before the implementation of the present embodiment, a specific value of the number of video streams supported by the device under test cannot be determined, but a rough range may be determined, or an approximate order of magnitude may be determined, and X may be set according to the rough range. For example, if it is predetermined that the number of video channels supported by the device under test is approximately between 5 and 15, X may be set to 20 or another value, which is not limited specifically.
For example, the video stream may be a preview video stream or a playback video stream. The preview video stream may be a video stream captured in real time by the image capturing device, and the playback video stream may be a video stream stored in the storage server. In S301, reading of the preview video stream captured by the image capture device may be reduced, and reading of the playback video stream stored by the storage server may also be reduced.
For example, as shown in fig. 2, the device to be tested is connected to multiple IP cameras and the storage server, and the device to be tested may reduce reading of the preview video stream acquired by the IP cameras, and may also reduce reading of the playback video stream stored by the storage server.
S302: and determining the playing parameters after the reduction playing.
As an embodiment, the luminance and the chrominance of the data block in the video frame played after the reduction playing can be analyzed, and the analysis result is used as the playing parameter after the reduction playing.
For example, one or more video frames may be extracted from the video stream played after the reduction playing, YUV (Y represents brightness, and U and V represent chrominance) components of each data block in the video frame may be analyzed for each extracted video frame, and the analysis result may be used as the playing parameter after the reduction playing.
In other embodiments, the playing parameters may be various, such as delay information, abnormal picture information, abnormal packet sequence number information, and the like, which occur during the playing process, and accordingly, the manner of determining the playing parameters may be various, which is described in detail below.
S303: and judging whether the playing parameters meet the abnormal conditions, if so, returning to execute S301, and if not, executing S304.
In this embodiment, an abnormal condition is set in advance for the playing parameter, for example, the abnormal condition may be: the delay information is greater than the threshold, the number of abnormal packets is greater than the threshold, and so on, as described in detail below.
S304: and determining the number of the video streams played after the reduction playing as the number of the video streams supported by the equipment.
In the embodiment of the invention, if the playing parameters still meet the abnormal conditions after the N paths of video streams are played in a reducing way, the N paths of video streams are played continuously in a reducing way until the playing parameters do not meet the abnormal conditions after the N paths of video streams are played in a reducing way at a certain time, and the number of the video streams played after the N paths of video streams are played in the reducing way is determined as the number of the video streams supported by the equipment.
N may be a fixed number, such as 1 or 2, or may also be other positive integers, which are not limited in particular. For example, 1 is taken as an example, 1 video stream is played in a reduced manner each time, assuming that the playing parameters satisfy the abnormal conditions when 4 video streams are played, after 1 video stream is played in a reduced manner, that is, the playing parameters no longer satisfy the abnormal conditions when 3 video streams are played, the number of video streams played after the reduced playing is 3, and the number of video streams supported by the device is 3.
Alternatively, N may not be fixed, that is, the number of video streams played back at each time of reduction may be different. For example, X is 10, the device to be tested initially plays 10 paths of video streams, reduces and plays 3 paths of video streams for the first time, that is, plays 7 paths of video streams, and determines that the playing parameters still meet the abnormal conditions after the first reduction and play; and reducing and playing 2 paths of video streams for the second time, namely playing 5 paths of video streams, judging that the playing parameters still meet the abnormal conditions after the reducing and playing for the second time, reducing and playing 1 path of video streams for the third time, namely playing 4 paths of video streams, judging that the playing parameters do not meet the abnormal conditions any more after the reducing and playing for the third time, wherein the number of the video streams played after the reducing and playing for the third time is 4, and the number of the video streams supported by the equipment is 4.
By applying the embodiment shown in fig. 3 of the present invention, the device to be tested reduces and plays N paths of video streams each time, and determines whether the playing parameters after the reduction and the playing satisfy the abnormal conditions; if the video stream is still satisfied, continuously reducing and playing the N paths of video streams, and continuously judging whether the playing parameters after reducing and playing satisfy abnormal conditions; if the playing parameters after the playing is reduced do not meet the abnormal conditions, determining the number of the video flow paths played after the playing is reduced as the number of the video flow paths supported by the equipment; it is thus clear that in this scheme, need not consider the various factors that influence equipment support video flow number, only need equipment automatic adjustment broadcast video flow number, whether unusual after the automatic judgement adjustment, the first aspect process is simple, efficiency is improved, automatic test has been realized in the second aspect, do not need artifical the participation, the third aspect, set for unusual condition in this scheme, if the broadcast parameter after the adjustment satisfies unusual condition, then judge that the adjustment is unusual, unusual condition can be adjusted according to the actual scene, or, tolerance to unusual degree in this scheme is adjustable, this scheme is to the adaptability preferred of different scenes.
In the embodiment shown in fig. 1 and fig. 3, there are various ways to determine the playing parameter after the adjustment (increasing playing or decreasing playing), and determine whether the playing parameter satisfies the abnormal condition, for example:
the first judgment mode is that the delay information appearing in the playing process after the adjustment is determined and is used as the playing parameter after the adjustment, whether the delay information is smaller than a delay threshold value or not is judged, and if the delay information is smaller than the delay threshold value, the playing parameter is judged not to meet the abnormal condition.
As an implementation manner, each path of video stream played after the adjustment may be compared with a preset time baseline, and delay information occurring in the playing process after the adjustment may be determined according to a comparison result. For example, the time interval of receiving the data packets in the video stream may be differentiated from the step size of the preset time baseline, and it is determined whether the obtained difference is smaller than the delay threshold, and if so, it indicates that the abnormal condition is not satisfied.
The delay threshold may be set according to practical situations, for example, in some cases where the delay tolerance is low, the delay threshold is set to be smaller, such as 1 second, and in some cases where the delay tolerance is high, the delay threshold is set to be larger, and the delay threshold is generally not larger than the timestamp difference between two adjacent video frames.
The second judgment mode is to judge and determine whether the picture abnormal information occurs in the playing process after the current adjustment, and use the judgment result as the playing parameter after the current adjustment, that is, if the picture abnormal occurs in the playing process, the playing parameter after the current adjustment is judged to meet the abnormal condition.
As an implementation manner, the brightness and the chromaticity of the data block in the video frame played after the adjustment may be analyzed, and whether the video frame is abnormal or not may be determined according to the analysis result, and if the video frame is abnormal, it may be determined that the picture is abnormal in the playing process.
For example, one or more video frames may be extracted from the video stream played after the adjustment, YUV (Y represents brightness, and U and V represent chromaticity) components of each data block in the video frame are analyzed for each extracted video frame, whether the video frame is abnormal or not is determined according to the analysis result, and if the video frame is abnormal, it is determined that a picture is abnormal in the playing process.
For example, one video frame may be extracted per gop (group of pictures) time. Generally, if a picture of a video frame in a GOP is abnormal, the subsequent video frames in the GOP are abnormal. Therefore, extracting one video frame per GOP can more accurately judge whether picture abnormity occurs.
Or, if a plurality of video frames are extracted, a threshold value may be set, and if the number of abnormal video frames reaches the threshold value, it is determined that an image abnormality occurs during the playing process.
The third judgment mode is to judge whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and use the judgment result as the playing parameter after the adjustment, that is, if the abnormal condition of the sequence number of the data packet exists in the playing process, the playing parameter after the adjustment is judged to meet the abnormal condition.
The abnormal data packet sequence number condition can include the condition of losing data packet, the condition of data packet disorder, etc. For a simple example, assuming that the sequence number of the data packet is a number circularly arranged from 0 to 100, if the sequence number is discontinuous, for example, after receiving the data packet with sequence number 50, the data packets with sequence numbers 52 and 53 and thereafter are continuously received, it indicates that the data packet with sequence number 51 is lost; for another example, if the sequence numbers 52, 51 and later are continuously received after the data packet with the sequence number 50 is received, it indicates that the sequence of the data packet with the sequence number 51 and the data packet with the sequence number 52 is reversed, that is, the data packets are out of order. In this case, it can be determined that the adjusted playback parameter satisfies the abnormal condition.
As an implementation (first sampling manner), determining the adjusted playing parameter may include: sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data; judging whether the sampling data is abnormal or not according to each obtained sampling data, and counting the number of abnormal sampling data to be used as the playing parameter after the adjustment;
judging whether the playing parameter meets an abnormal condition may include: and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
In this embodiment, the video stream played after the adjustment is sampled, specifically, each played video stream may be sampled, or only the video stream played additionally may be sampled, or the video streams played at this time may be randomly sampled in the multiple played video streams, which is not limited specifically.
The adjusted playing parameter can be determined by any one of the first, second and third judging manners, and whether the playing parameter meets an abnormal condition is judged; or, the three determination methods may be combined to determine whether the playing parameter meets the abnormal condition, for example, for a sample data, determining the delay information of the sample data first, and then determining whether the sample data is abnormal, and if the delay information is smaller than the delay threshold and the sample data is not abnormal, determining that the sample data is not abnormal; the combination mode of the above judgment modes is not limited, two judgment modes can be combined, or three judgment modes can be combined, and the combination sequence is not limited.
For example, a sample data may include a video frame, if the second determination method is used to determine whether the sample data is abnormal, the luminance and the chrominance of a data block in a video frame in the sample data may be analyzed, and whether the video frame is abnormal is determined according to the analysis result, and if the video frame is abnormal, the sample data is determined to be abnormal.
The second threshold in the present embodiment may be a fixed value or may not be fixed. For example, the corresponding relationship between the number of video channels and the threshold may be stored in advance, and according to the corresponding relationship, a second threshold corresponding to the number of video channels played after the adjustment is determined, and then it is determined whether the number of counted abnormal sample data is greater than the determined second threshold. The corresponding relation can be set according to the actual situation.
By applying the embodiment, whether the playing parameters meet the abnormal conditions is judged, the judgment result is not obtained through one-time judgment, and the judgment result is sampled and judged for multiple times, so that the interference of accidental conditions on the judgment result can be reduced, and the judgment result is more accurate.
As another embodiment (a second sampling manner), determining the adjusted playing parameter may include:
dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
judging whether the playing parameter meets an abnormal condition may include:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
For example, a minute of video stream may be divided into time slices, and 10 samples may be taken per minute of video stream. The specific length of the time slice and the sampling frequency of each time slice may be set according to the actual situation, and are not limited specifically.
Each played video stream may be divided into time slices, or only the video stream that is additionally played at this time may be divided into time slices, or the time slices may be randomly divided among multiple played video streams, which is not limited specifically. For simplicity of description, the following description will be given only by taking the example of dividing a video stream into time slices.
In this embodiment, after the number of video streams currently played is adjusted each time, a time period may be set aside to determine whether the adjusted playback is abnormal. Assuming that the time period is 5 minutes, it is assumed that a video stream of one minute is divided into one time slice, that is, 5 time slices are divided, and it is necessary to determine whether an abnormality occurs in the 5 time slices. And setting a threshold value, supposing 3, and if the number of the abnormal time slices exceeds the threshold value 3, judging that the playing after the adjustment is abnormal.
For example, determining whether each time slice is abnormal may include: assuming that 10 times of sampling are performed on each time slice, a threshold value is set, and 5 is assumed, if the number of abnormal sampling data in 10 times of sampling data of one time slice exceeds 5, the video stream of the time slice is judged to be abnormal.
Whether a sample data is abnormal can be judged by any one of the first judgment mode, the second judgment mode and the third judgment mode; or, the three determination methods may be combined to determine whether a sample data is abnormal, for example, for a sample data, it is determined whether the delay information is smaller than the delay threshold value, and then it is determined whether the image is abnormal, and if the two determination results are both negative, it is determined that the sample data is not abnormal; the combination mode of the judgment modes is not limited, two judgment modes can be combined, three judgment modes can be combined, and the combination sequence is not limited. For example, a sample data may include a video frame, if the second determination method is used to determine whether the sample data is abnormal, the luminance and the chrominance of a data block in a video frame in the sample data may be analyzed, and whether the video frame is abnormal is determined according to the analysis result, and if the video frame is abnormal, the sample data is determined to be abnormal.
The second preset threshold in the present embodiment may be a fixed value, or may not be fixed. For example, the corresponding relationship between the number of video channels and the threshold may be stored in advance, and according to the corresponding relationship, the first threshold corresponding to the number of video channels played after the adjustment is determined, and then it is determined whether the counted number of abnormal time slices is greater than the determined first threshold. The corresponding relation can be set according to the actual situation.
By applying the embodiment, whether the playing parameters meet the abnormal conditions is judged, the judgment result is not obtained through one-time judgment, and the judgment result is sampled and judged for multiple times, so that the interference of accidental conditions on the judgment result can be reduced, and the judgment result is more accurate.
In the above embodiment of determining whether the adjusted playback parameter satisfies the abnormal condition by sampling for multiple times, if a network interruption is detected in the determination process, the adjusted playback parameter is determined again, and whether the playback parameter satisfies the abnormal condition is determined again.
For example, assuming that N is 1, one video stream is additionally played each time, the additional playing is fourth additional playing, three video streams are additionally played before the current time, four video streams are played after the current time, 5 minutes is left after the current time to determine the playing parameter after the fourth additional playing, and whether the playing parameter meets the abnormal condition is determined.
Within the 5 minutes, the video stream may be sampled by using any one of the two embodiments (two sampling methods), and the number of abnormal sampling data is counted, or the number of abnormal time slices is counted, and whether the playing parameter after the fourth playing is increased satisfies the abnormal condition is determined according to the counted number.
If the network interruption is detected at any time after the fourth play increment and before the judgment result (the judgment result for judging whether the play parameters after the fourth play increment meet the abnormal conditions) is obtained, the process of determining the play parameters and judging whether the play parameters meet the abnormal conditions is executed again. Specifically, in the above one embodiment, the step of "performing a preset second number of times of sampling on the played video stream" is returned again; in the above another embodiment, the step of dividing the played video stream into time slices of a preset length is returned again.
For another example, assuming that N is 1, one path of video stream is reduced and played each time, the reduced playing is a third reduced playing, four paths of video streams are reduced and played before the first reduced playing, three paths of video streams are played after the second reduced playing, 5 minutes are left after the second reduced playing to determine playing parameters after the third reduced playing, and whether the playing parameters meet abnormal conditions is determined.
Within the 5 minutes, the video stream may be sampled by using any one of the two embodiments (two sampling methods), and the number of abnormal sampling data is counted, or the number of abnormal time slices is counted, and whether the playing parameters after the third reduction playing satisfy the abnormal condition is judged according to the counted number.
If the network interruption is detected at any time after the third playing reduction until a judgment result (a judgment result for judging whether the playing parameters after the third playing reduction meet the abnormal conditions) is obtained, the process of determining the playing parameters and judging whether the playing parameters meet the abnormal conditions is executed again. Specifically, in the above one embodiment, the step of "performing a preset second number of times of sampling on the played video stream" is returned again; in the above another embodiment, the step of dividing the played video stream into time slices of a preset length is returned again.
By applying the embodiment, if the network interruption occurs, only the current adjustment is influenced, and the judgment of the previous adjustment times is not influenced.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides an apparatus for determining the number of video streams supported by a device, as shown in fig. 4, where the apparatus includes:
an adjusting module 401, configured to adjust the number of video streams currently played in a preset adjusting manner; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
a first determining module 402, configured to determine the adjusted playing parameter;
a judging module 403, configured to judge whether the playing parameter meets an abnormal condition; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet the abnormal conditions, the adjustment module 401 is triggered; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters meet abnormal conditions, triggering a second determining module 404; if the adjustment mode is to reduce the play of N paths of video streams each time and the play parameters meet abnormal conditions, the adjustment module 401 is triggered; if the adjustment mode is to reduce the play of N video streams each time and the play parameters do not satisfy the abnormal conditions, the third determining module 405 is triggered;
a second determining module 404, configured to determine the number of video streams played before the adjustment as the number of video streams supported by the device;
a third determining module 405, configured to determine the number of video streams played after the adjustment as the number of video streams supported by the device.
As an embodiment, the first determining module 402 may specifically be configured to: and analyzing the brightness and the chroma of the data block in the video frame played after the adjustment, and taking the analysis result as the playing parameter after the adjustment.
As an embodiment, the first determining module 402 may specifically be configured to: dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
the determining module 403 may specifically be configured to:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
As an embodiment, the determining module 403 may specifically be configured to:
determining a first threshold corresponding to the number of video channels played after the adjustment according to the corresponding relationship between the number of video channels stored in advance and the threshold,
and judging whether the counted abnormal time slice number is larger than the determined first threshold value.
As an embodiment, the adjusting module 401 may specifically be configured to:
adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream;
or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
As an embodiment, the first determining module 402 may specifically be configured to:
determining delay information appearing in the playing process after the adjustment as the playing parameter after the adjustment;
or, judging and determining whether the picture abnormal information appears in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment;
or judging whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment.
As an embodiment, the first determining module 402 may be further configured to:
and comparing each path of video stream played after the adjustment with a preset time base line, and determining delay information appearing in the playing process after the adjustment according to a comparison result.
As an embodiment, the first determining module 402 may specifically be configured to:
sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data; judging whether each part of sampling data is abnormal or not, and counting the number of the abnormal sampling data as the adjusted playing parameter;
the determining module 403 may specifically be configured to: and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
By applying the embodiment shown in fig. 4 of the present invention, various factors influencing the number of video streams supported by the device do not need to be considered, and only the device needs to automatically adjust the number of played video streams and automatically judge whether the adjusted playing parameters are abnormal or not.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 501 and a memory 502,
a memory 502 for storing a computer program;
the processor 501 is configured to implement any of the above methods for determining the number of video streams supported by the device when executing the program stored in the memory 502.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
An embodiment of the present invention further provides a system for determining the number of video channels supported by a device, as shown in fig. 6, including: a device under test and a video streaming device. In fig. 6, the system includes a plurality of video streaming devices, and a device under test is communicatively connected to each of the video streaming devices.
The video streaming device is used for acquiring or storing a video stream;
the device to be tested is used for reading and playing the video stream in the video stream device and adjusting the number of the video stream channels played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer; determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment; if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
As an implementation manner, the device to be tested is a client, and the video streaming device is an image acquisition device or a storage server.
The device to be tested may be a host, or may be a client, and the like, and is not limited specifically. If the device to be tested is a Client, the Client can be a Client with a C/S (Client/Server) structure or a Client with a B/S (Browser/Server) structure; if the client is a client with a C/S structure, the video stream can be played in software and the embodiment of the invention can be executed, and if the client is a client with a B/S structure, the video stream can be played in a webpage and the embodiment of the invention can be executed.
The device to be tested can implement any of the above methods for determining the number of video streams supported by the device.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any one of the above methods for determining the number of video streams supported by a device.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiment of the apparatus for determining the number of video streams supported by the device shown in fig. 4, the embodiment of the electronic device shown in fig. 5, the embodiment of the system for determining the number of video streams supported by the device shown in fig. 6, and the embodiment of the computer-readable storage medium described above, since they are substantially similar to the embodiment of the method for determining the number of video streams supported by the device shown in fig. 1 to 3, the description is relatively simple, and relevant points can be found in the partial description of the embodiment of the method for determining the number of video streams supported by the device shown in fig. 1 to 3.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (21)
1. A method for determining the number of video streams supported by a device, comprising:
adjusting the number of video flow paths played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition;
if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment;
if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode;
and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
2. The method according to claim 1, wherein the determining the adjusted playing parameter comprises:
and analyzing the brightness and the chroma of the data block in the video frame played after the adjustment, and taking the analysis result as the playing parameter after the adjustment.
3. The method according to claim 1, wherein the determining the adjusted playing parameter comprises:
dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
the judging whether the playing parameters meet the abnormal conditions includes:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
4. The method according to claim 3, wherein the determining whether the counted number of abnormal time slices is greater than a preset first threshold value comprises:
determining a first threshold corresponding to the number of video channels played after the adjustment according to the corresponding relationship between the number of video channels stored in advance and the threshold,
and judging whether the counted abnormal time slice number is larger than the determined first threshold value.
5. The method according to claim 1, wherein the adjusting the number of video streams currently played by using a preset adjustment mode comprises:
adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream;
or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
6. The method according to claim 1, wherein the determining the adjusted playing parameter comprises:
determining delay information appearing in the playing process after the adjustment as the playing parameter after the adjustment;
or, judging and determining whether the picture abnormal information appears in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment;
or judging whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment.
7. The method of claim 6, wherein the determining the delay information occurring during the adjusted playing comprises:
and comparing each path of video stream played after the adjustment with a preset time base line, and determining delay information appearing in the playing process after the adjustment according to a comparison result.
8. The method according to claim 1, wherein the determining the adjusted playing parameter comprises:
sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data;
judging whether each part of sampling data is abnormal or not, and counting the number of the abnormal sampling data as the adjusted playing parameter;
the judging whether the playing parameters meet the abnormal conditions includes:
and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
9. The method according to claim 3 or 8, further comprising, in determining the adjusted playing parameter:
if the network interruption is detected, the adjusted playing parameters are determined again.
10. An apparatus for determining a number of video streams supported by a device, comprising:
the adjusting module is used for adjusting the number of the video flow paths played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer;
the first determining module is used for determining the adjusted playing parameters;
the judging module is used for judging whether the playing parameters meet abnormal conditions or not; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, triggering the adjustment module; if the adjustment mode is to increase and play the N paths of video streams every time and the playing parameters meet abnormal conditions, triggering a second determination module; if the adjustment mode is that N paths of video streams are reduced and played each time, and the playing parameters meet abnormal conditions, triggering the adjustment module; if the adjustment mode is that N paths of video streams are reduced and played each time, and the playing parameters do not meet abnormal conditions, triggering a third determination module;
the second determining module is used for determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment;
and the third determining module is used for determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
11. The apparatus of claim 10, wherein the first determining module is specifically configured to: and analyzing the brightness and the chroma of the data block in the video frame played after the adjustment, and taking the analysis result as the playing parameter after the adjustment.
12. The apparatus of claim 10, wherein the first determining module is specifically configured to: dividing the video stream played after the adjustment into time slices with preset length;
presetting a first number of times of sampling aiming at each time slice, and obtaining one piece of sampling data by each time of sampling; judging whether each sampling data is abnormal or not, and counting the number of abnormal sampling data in the time slice; if the counted number of the time slices is larger than a preset first threshold value, judging that the time slices are abnormal;
counting the number of abnormal time slices as the adjusted playing parameter;
the judgment module is specifically configured to:
and judging whether the counted number of the abnormal time slices is greater than a preset first threshold value or not, and if so, judging that the playing parameters meet abnormal conditions.
13. The apparatus of claim 12, wherein the determining module is specifically configured to:
determining a first threshold corresponding to the number of video channels played after the adjustment according to the corresponding relationship between the number of video channels stored in advance and the threshold,
and judging whether the counted abnormal time slice number is larger than the determined first threshold value.
14. The apparatus of claim 10, wherein the adjustment module is specifically configured to:
adding and reading a preview video stream acquired by image acquisition equipment, and playing the preview video stream;
or, adding a playback video stream stored in the reading storage server, and playing the playback video stream.
15. The apparatus of claim 10, wherein the first determining module is specifically configured to:
determining delay information appearing in the playing process after the adjustment as the playing parameter after the adjustment;
or, judging and determining whether the picture abnormal information appears in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment;
or judging whether the abnormal information of the sequence number of the data packet occurs in the playing process after the adjustment, and taking the judgment result as the playing parameter after the adjustment.
16. The apparatus of claim 15, wherein the first determining module is further configured to:
and comparing each path of video stream played after the adjustment with a preset time base line, and determining delay information appearing in the playing process after the adjustment according to a comparison result.
17. The apparatus of claim 10, wherein the first determining module is specifically configured to:
sampling the video stream played after the adjustment for a preset second number of times, wherein each sampling time obtains a copy of sampling data; judging whether each part of sampling data is abnormal or not, and counting the number of the abnormal sampling data as the adjusted playing parameter;
the judgment module is specifically configured to: and judging whether the counted number of the abnormal sampling data is greater than a preset second threshold value or not, and if so, judging that the playing parameter meets an abnormal condition.
18. The apparatus of claim 12 or 17, further comprising:
and the detection module is used for detecting whether the network is interrupted or not, and if the network is interrupted, the first determination module is triggered.
19. An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-9 when executing a program stored in the memory.
20. A system for determining a number of video streams supported by a device, comprising: the device to be tested is in communication connection with the video streaming device;
the video streaming device is used for acquiring or storing a video stream;
the device to be tested is used for reading and playing the video stream in the video stream device and adjusting the number of the video stream channels played currently by using a preset adjusting mode; wherein, the adjustment mode is as follows: increasing and playing N paths of video streams each time, or decreasing and playing N paths of video streams each time, wherein N is a positive integer; determining the playing parameter after the adjustment, and judging whether the playing parameter meets an abnormal condition; if the adjustment mode is to increase and play N paths of video streams each time and the playing parameters do not meet abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; if the adjustment mode is that N paths of video streams are played in an increasing mode every time, and the playing parameters meet abnormal conditions, determining the number of the video streams played before the adjustment as the number of the video streams supported by the equipment; if the adjustment mode is to reduce and play the N paths of video streams each time and the playing parameters meet the abnormal conditions, returning to the step of adjusting the number of the video streams played currently by using the preset adjustment mode; and if the adjustment mode is that N paths of video streams are played in a reduced mode every time and the playing parameters do not meet abnormal conditions, determining the number of the video streams played after the adjustment as the number of the video streams supported by the equipment.
21. The system of claim 20, wherein the device under test is a client and the video streaming device is an image capture device or a storage server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810132859.6A CN110139063B (en) | 2018-02-09 | 2018-02-09 | Method, device and equipment for determining number of video streams supported by equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810132859.6A CN110139063B (en) | 2018-02-09 | 2018-02-09 | Method, device and equipment for determining number of video streams supported by equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110139063A CN110139063A (en) | 2019-08-16 |
CN110139063B true CN110139063B (en) | 2020-12-18 |
Family
ID=67567909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810132859.6A Active CN110139063B (en) | 2018-02-09 | 2018-02-09 | Method, device and equipment for determining number of video streams supported by equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110139063B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117156189B (en) * | 2023-02-27 | 2024-08-13 | 荣耀终端有限公司 | Screen-throwing display method and electronic equipment |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1575448A (en) * | 2001-09-06 | 2005-02-02 | 高通股份有限公司 | Generating and implementing a communication protocol and interface for high data rate signal transfer |
US7039074B1 (en) * | 2000-09-14 | 2006-05-02 | Agiletv Corporation | N-way demultiplexer |
US7130362B2 (en) * | 2001-12-18 | 2006-10-31 | Vixs, Inc. | Method and apparatus for establishing non-standard data rates in a wireless communication system |
CN101039270A (en) * | 2007-03-12 | 2007-09-19 | 杭州华为三康技术有限公司 | Data transmission device and method supporting multi-channel data transmission |
WO2009042049A2 (en) * | 2007-09-27 | 2009-04-02 | Lucent Technologies Inc. | Method and apparatus for controlling video streams |
CN101534431A (en) * | 2008-03-10 | 2009-09-16 | 中国移动通信集团公司 | Overvoltage testing method of video service system and system and device thereof |
CN102014313A (en) * | 2009-09-08 | 2011-04-13 | 华为技术有限公司 | Method and device for realizing link information publishing by nodes |
CN102708842A (en) * | 2012-06-08 | 2012-10-03 | 宁波Gqy视讯股份有限公司 | Image processor for mosaic screen |
US8345545B2 (en) * | 2009-01-28 | 2013-01-01 | Nec Laboratories America, Inc. | Methods and systems for rate matching and rate shaping in a wireless network |
CN103021438A (en) * | 2012-12-25 | 2013-04-03 | 创新科软件技术(深圳)有限公司 | Method and device for simulating writing of video data into disk arrays |
CN104349106A (en) * | 2014-10-31 | 2015-02-11 | 广东威创视讯科技股份有限公司 | Method and system for processing and acquiring multiple video signals |
CN104932996A (en) * | 2014-03-20 | 2015-09-23 | 英特尔公司 | A method, apparatus, and system for controlling power consumption of unused hardware of a link interface |
CN105407323A (en) * | 2015-11-17 | 2016-03-16 | 浙江大华技术股份有限公司 | Screen splitting method and device of monitor video |
CN106571859A (en) * | 2015-10-09 | 2017-04-19 | 华为技术有限公司 | MIMO transmission method and apparatus |
US9716913B2 (en) * | 2014-12-19 | 2017-07-25 | Texas Instruments Incorporated | Generation of a video mosaic display |
CN206948504U (en) * | 2017-06-19 | 2018-01-30 | 厦门视诚科技有限公司 | Realize the device of 32 road picture taking turns |
-
2018
- 2018-02-09 CN CN201810132859.6A patent/CN110139063B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7039074B1 (en) * | 2000-09-14 | 2006-05-02 | Agiletv Corporation | N-way demultiplexer |
CN1575448A (en) * | 2001-09-06 | 2005-02-02 | 高通股份有限公司 | Generating and implementing a communication protocol and interface for high data rate signal transfer |
US7130362B2 (en) * | 2001-12-18 | 2006-10-31 | Vixs, Inc. | Method and apparatus for establishing non-standard data rates in a wireless communication system |
CN101039270A (en) * | 2007-03-12 | 2007-09-19 | 杭州华为三康技术有限公司 | Data transmission device and method supporting multi-channel data transmission |
WO2009042049A2 (en) * | 2007-09-27 | 2009-04-02 | Lucent Technologies Inc. | Method and apparatus for controlling video streams |
CN101534431A (en) * | 2008-03-10 | 2009-09-16 | 中国移动通信集团公司 | Overvoltage testing method of video service system and system and device thereof |
US8345545B2 (en) * | 2009-01-28 | 2013-01-01 | Nec Laboratories America, Inc. | Methods and systems for rate matching and rate shaping in a wireless network |
CN102014313A (en) * | 2009-09-08 | 2011-04-13 | 华为技术有限公司 | Method and device for realizing link information publishing by nodes |
CN102708842A (en) * | 2012-06-08 | 2012-10-03 | 宁波Gqy视讯股份有限公司 | Image processor for mosaic screen |
CN103021438A (en) * | 2012-12-25 | 2013-04-03 | 创新科软件技术(深圳)有限公司 | Method and device for simulating writing of video data into disk arrays |
CN104932996A (en) * | 2014-03-20 | 2015-09-23 | 英特尔公司 | A method, apparatus, and system for controlling power consumption of unused hardware of a link interface |
CN104349106A (en) * | 2014-10-31 | 2015-02-11 | 广东威创视讯科技股份有限公司 | Method and system for processing and acquiring multiple video signals |
US9716913B2 (en) * | 2014-12-19 | 2017-07-25 | Texas Instruments Incorporated | Generation of a video mosaic display |
CN106571859A (en) * | 2015-10-09 | 2017-04-19 | 华为技术有限公司 | MIMO transmission method and apparatus |
CN105407323A (en) * | 2015-11-17 | 2016-03-16 | 浙江大华技术股份有限公司 | Screen splitting method and device of monitor video |
CN206948504U (en) * | 2017-06-19 | 2018-01-30 | 厦门视诚科技有限公司 | Realize the device of 32 road picture taking turns |
Non-Patent Citations (2)
Title |
---|
基于VPN的水电站远程监控系统的研究与应用;刘锋光.;《中国优秀硕士学位论文全文数据库》;20060531;全文 * |
高清监控存储系统的应用部署;杨玉糯.;《中国公共安全》;20110630;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110139063A (en) | 2019-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10957358B2 (en) | Reference and non-reference video quality evaluation | |
CN112291520B (en) | Abnormal event identification method and device, storage medium and electronic device | |
KR100468967B1 (en) | Thumbnail image generating system | |
US10219033B2 (en) | Method and apparatus of managing visual content | |
KR102260946B1 (en) | Techniques for detecting media playback errors | |
CN112019873A (en) | Video code rate adjusting method and device and electronic equipment | |
WO2020093164A1 (en) | Methods and systems for detection of anomalous motion in a video stream and for creating a video summary | |
US20190230277A1 (en) | Method and system for auto-setting of cameras | |
Bestagini et al. | Video recapture detection based on ghosting artifact analysis | |
US20190124384A1 (en) | System and method for automatic adjustment of scheduled recording time | |
CN110139063B (en) | Method, device and equipment for determining number of video streams supported by equipment | |
KR101336240B1 (en) | Method and apparatus for image processing using saved image | |
CN113873232B (en) | Video clamping detection method, device and system and storage medium | |
CN110581989A (en) | Method, device, electronic device, medium and system for detecting rapid exposure time | |
Xu et al. | What you see is what you get: measure ABR video streaming QoE via on-device screen recording | |
CN117640925A (en) | Multi-path video picture consistency detection method, system and electronic equipment | |
CN119094761A (en) | Video coding information extraction method, device, electronic device and storage medium | |
CN117651187A (en) | Video storage method, video playing device and electronic equipment | |
CN113572901B (en) | Method for detecting video color bell playing effect in real time | |
US20210152782A1 (en) | Data Transmission Method, Camera and Electronic Device | |
CN115883859B (en) | Multimedia data processing method, electronic device and storage medium | |
KR20150027645A (en) | Apparatus and method for synchronizating time | |
CN116781975B (en) | Media stream detection method, device, terminal equipment and storage medium | |
US10778740B2 (en) | Video image distribution apparatus, control method, and recording medium | |
Giammarrusco | Source identification of high definition videos: A forensic analysis of downloaders and YouTube video compression using a group of action cameras |
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 |