CN107155093A - A kind of video previewing method, device and equipment - Google Patents

A kind of video previewing method, device and equipment Download PDF

Info

Publication number
CN107155093A
CN107155093A CN201710474658.XA CN201710474658A CN107155093A CN 107155093 A CN107155093 A CN 107155093A CN 201710474658 A CN201710474658 A CN 201710474658A CN 107155093 A CN107155093 A CN 107155093A
Authority
CN
China
Prior art keywords
code stream
decoding
video preview
resource
video
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.)
Granted
Application number
CN201710474658.XA
Other languages
Chinese (zh)
Other versions
CN107155093B (en
Inventor
李铁辉
汤达浚
蓝威涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201710474658.XA priority Critical patent/CN107155093B/en
Publication of CN107155093A publication Critical patent/CN107155093A/en
Application granted granted Critical
Publication of CN107155093B publication Critical patent/CN107155093B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/183Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a single remote source
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Abstract

The present invention is applied to video preview field to be included there is provided a kind of video previewing method:Obtain the resolution ratio of the code stream of video preview passage;According to the resolution ratio of the code stream of video preview passage, the decoding consumed resource corresponding to video preview passage is calculated;When the code stream to video preview passage is decoded, judge whether the corresponding decoding consumed resource of the code stream is more than system spare stock number;If the corresponding consumed resource that decodes of the code stream is more than system spare stock number, judged according to next code stream of the code stream of current video preview passage.So that limited decoding resource is reasonably distributed, it is to avoid because occurring causing bottom decoding resource allocation to fail the resolution ratio of code stream is excessive and the problem of lookahead delay is excessive occur.

Description

A kind of video previewing method, device and equipment
Technical field
The invention belongs to video preview field, more particularly to a kind of video previewing method, device and equipment.
Background technology
NVR (Network Video Recorder) is a kind of network storage equipment, and its main function is by network Receive the digital video bit stream that transmits of IPC (IP Camera) equipment, and provide to the storage of multichannel code stream, management, playback and The functions such as preview.In high-definition network video monitor supervision platform, because data volume is big and decodes and the factor such as is limited by hardware resource, And bandwidth usage is depended on per the compression level of road video image, frame sign (i.e. the corresponding resolution sizes of frame), frame speed Rate and code check, wherein frame sign influence whether to decode the distribution of resource again, therefore, in limited bandwidth and hardware decoding resource Under, the problem of excessive frame sign and frame rate can all cause preview experience difference occurs.
The motion state of IPC ends video is more violent, and the video data volume that can cause in the IPC unit interval is bigger, it is on the contrary then It is smaller.Under limited bandwidth resources, it is likely to result in network congestion if not adjusting its code check and causes network delay to increase, So as to cause preview function abnormal.
In order to avoid preview function is abnormal, a kind of current way be empirically a default motion state priority with The corresponding relation of passage maximal rate, the motion state of each passway code stream is then detected in real time, and to calculate its motion state excellent First level, is finally adjusted to corresponding code check value according to the priority, so as to realize the dynamically distributes of bandwidth resources, reduces net Network postpones.But, limited by decoding resource, when decoding inadequate resource at NVR ends, still result in serious decoding and prolong Late.
The content of the invention
In view of this, the embodiments of the invention provide a kind of video previewing method, device and equipment, to solve prior art During middle video preview, due to decoding the limitation of resource, the problem of causing decoding delay.
The first aspect of the embodiment of the present invention provides a kind of video previewing method, and the video previewing method includes:
Obtain the resolution ratio of the code stream of video preview passage;
According to the resolution ratio of the code stream of video preview passage, the decoding resource consumption corresponding to video preview passage is calculated Amount;
When the code stream to video preview passage is decoded, whether the corresponding decoding consumed resource of the code stream is judged More than system spare stock number;
If the corresponding consumed resource that decodes of the code stream is more than system spare stock number, according to current video preview Next code stream of the code stream of passage is judged.
It is described according to video preview passage with reference in a first aspect, in the first possible implementation of first aspect The resolution ratio of code stream, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M provides for decoding Source consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the auxiliary knot unrelated with the frame sign of decoding The resource that structure is consumed.
With reference in a first aspect, may be in implementation at second of first aspect, the video preview passage that obtains The step of resolution ratio of code stream is:
Parameter frame under the primary condition for the code stream for obtaining video preview passage, point of code stream is read according to the parameter frame Resolution.
With reference in a first aspect, in the third possible implementation of first aspect, the code stream correspondence is judged described Decoding consumed resource whether be more than system spare stock number the step of before, methods described also includes:
Judge whether the resolution ratio or system spare stock number of the code stream of the video preview passage change, if hair Changing, then judge whether the corresponding decoding consumed resource of the code stream is more than system spare stock number.
It is described according to video preview passage with reference in a first aspect, in the 4th kind of possible implementation of first aspect The resolution ratio of code stream, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
Resolution ratio belonging to the resolution ratio for the code stream for searching video preview passage is interval;
According to the interval corresponding relation with decoding consumed resource of default resolution ratio, the video preview passage is searched Decoding consumed resource corresponding to the resolution ratio of code stream.
It is described according to video preview passage with reference in a first aspect, in the 5th kind of possible implementation of first aspect The resolution ratio of code stream, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
According to default resolution ratio and decoding consumed resource or the corresponding table of decoding resource consumption value, in the corresponding table Decoding consumed resource or decoding resource consumption value corresponding to the resolution ratio of the middle code stream for searching the video preview passage.
With reference in a first aspect, in the 6th kind of possible implementation of first aspect, the video preview passage includes many Individual passage, the step of next code stream of the code stream of the selection current video preview passage is judged includes:
According to the priority orders of the code stream of multichannel set in advance, under the code stream for selecting each video preview passage One priority code stream is played out.
With reference in a first aspect, in the 7th kind of possible implementation of first aspect, the judgement code stream is corresponding The step of whether decoding consumed resource is more than system spare stock number includes:
The corresponding decoding consumed resource of code stream is converted into code stream consumption figures by conversion formula, and by the system Surplus yield is converted to system spare resource value, then the decoding resource consumption value and system spare by conversion formula The size of resource value, wherein, the conversion formula is:| (X+M/2)/M |=Y, X are stock number, and X is resource value, and M is conversion times Number.
The second aspect of the embodiment of the present invention provides a kind of video preview device, and the video preview device includes:
Resolution ratio acquiring unit, the resolution ratio of the code stream for obtaining video preview passage;
Consumed resource computing unit is decoded, for the resolution ratio of the code stream according to video preview passage, video preprocessor is calculated The decoding consumed resource look at corresponding to passage;
Judging unit, for when the code stream to video preview passage is decoded, judging the corresponding decoding of the code stream Whether consumed resource is more than system spare stock number;
Code stream selection unit, if being more than system spare stock number for the corresponding decoding consumed resource of the code stream, Then judged according to next code stream of the code stream of current video preview passage.
With reference to second aspect, in the first possible implementation of second aspect, the decoding consumed resource is calculated Unit is used for:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M provides for decoding Source consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the auxiliary knot unrelated with the frame sign of decoding The resource that structure is consumed.
With reference to second aspect, in second of possible implementation of second aspect, the resolution ratio acquiring unit is used for:
Parameter frame under the primary condition for the code stream for obtaining video preview passage, point of code stream is read according to the parameter frame Resolution.
The third aspect of the embodiment of the present invention provides a kind of video preview equipment, including memory, processor and deposits Store up the computer program that can be run in the memory and on the processor, it is characterised in that the computing device Realized during the computer program as described in any one of first aspect the step of video previewing method.
The fourth aspect of the embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage Media storage has computer program, realizes and is regarded as described in any one of first aspect when the computer program is executed by processor The step of frequency method for previewing.
The beneficial effect that the embodiment of the present invention exists compared with prior art is:By the code stream for obtaining video preview passage Resolution ratio, and the resolution ratio of the code stream according to video preview passage calculates the decoding resource corresponding to video preview passage and disappears Consumption, the decoding consumed resource required for code stream is compared with system spare stock number, is selected when that can not meet decoding needs Select next code stream to be decoded, so that limited decoding resource is reasonably distributed, it is to avoid because there is code stream Resolution ratio is excessive and causes that bottom decodes resource allocation failure and lookahead delay occur excessive.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art In required for the accompanying drawing that uses be briefly described, it should be apparent that, drawings in the following description are only some of the present invention Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is the system structure diagram of NVR networks provided in an embodiment of the present invention;
Fig. 2 is the implementation process schematic diagram of video previewing method provided in an embodiment of the present invention;
Fig. 3 is the interaction flow schematic diagram of another video previewing method provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of video preview device provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of video preview equipment provided in an embodiment of the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc Body details, thoroughly to understand the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity Road and the detailed description of method, in case unnecessary details hinders description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
It is that (English full name is Network Video Recorder to NVR, and Chinese full name is recorded for network hard disc as shown in Figure 1 Camera) network system structural representation, causing the factor of NVR network delays includes:Imaging lag (CCD imaging performances), regard Frequency coding delay (coding chip performance), network delay (data volume is big), buffer delay (software resource limitation) and decoding Postpone (hardware resource limitation).The fortune of IPC (English full name is IP Camera, and Chinese full name is IP network camera) end video Dynamic state is more violent, and the video data volume that can cause in the IPC unit interval is bigger, on the contrary then smaller.Wherein, RTSPS English Full name is Time Streaming Protocol Server, and Chinese full name is RTP server.In prior art On the basis of solution network delay, in order to avoid postponing occurs in multi-channel video preview, it is necessary to further be proposed to decoding delay Corresponding solution.
Fig. 2 is a kind of implementation process of video previewing method provided in an embodiment of the present invention, and details are as follows:
In step s 201, the resolution ratio of the code stream of video preview passage is obtained.
Specifically, the video preview passage can be single video preview passage, it may also comprise multiple video previews and lead to Road.The acquisition of the resolution ratio of the code stream of each video preview passage in multiple passages, can be while video preview, in real time Acquisition.In the video preview of multichannel, according to user the need for, different layout informations can be set, can include four Road, eight tunnels, nine tunnels, 16 tunnels, 25 tunnels or 36 road video preview layout informations etc..Include main bit stream on each passage And subcode stream.
Obtain resolution ratio mode, can by the parameter frame under the primary condition for the code stream for obtaining video preview passage, The resolution ratio of code stream is read according to the parameter frame.Such as, H.264, H.265 under form, had in code stream under initial situation (English full name is by one SPS (English full name is Sequence Parameter Set, and Chinese full name is sequence parameter set), PPS Picture Parameter Set, Chinese full name is picture parameter set) parameter frame, it have recorded in subsequent data frame in the frame The resolution information of image.Implement, the information can be written in the management data of code stream.This step is in realization Only need to when getting bit stream data, the current resolution information of the code stream inquired is recorded, by current record Resolution ratio and the resolution ratio that records before compared with, it can be determined that whether resolution ratio changes.
In step S202, according to the resolution ratio of the code stream of video preview passage, calculate corresponding to video preview passage Decode consumed resource.
Specifically, according to the resolution ratio of the code stream of video preview passage, decoding resource corresponding to each passage is calculated Consumption, can include three kinds of modes, be respectively:
Mode one:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M provides for decoding Source consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the auxiliary knot unrelated with the frame sign of decoding The resource that structure is consumed.Wherein, parameter b numerical value is relevant with decoding chip, can when no video is decoded, read it is current by The resource that Video decoding module is consumed is parameter b size, can test and set in advance when equipment is dispatched from the factory.It is described Parameter a can calculate the numerical value for obtaining parameter a, also can test and set before dispatching from the factory according to multiple statistical test.NVR The decoding resource-constrained of the base layer decoder of equipment, under live preview mode, if decoded data frame information needs to disappear In the case of the resource of consumption arrives greatly bottom and can not met, corresponding processing is not done on upper strata, can cause the waste of underlying resource, simultaneously The loss of data frame is will also result in, so that exception occurs in preview function.
In order to avoid decoding inadequate resource, the size of the internal memory for the underlying resource that this step is consumed to different frame signs, And according to sampled point, calculate decoding consumed resource M=a*F+b.Wherein, frame sign consumption radix NVR decoding chips and IP Camera IPC sample rate is related, and the resource b of supplementary structure consumption is related to NVR implementation.Meanwhile, we will The maximum memory number that bottom decoding chip is possessed regards the decoding resource maximum of chip.
In order to further improve relative efficiency, it is to avoid consume the premier of more hardware resource when step-by-step is compared, this Invention is described to judge that the step of whether corresponding decoding consumed resource of the code stream is more than system spare stock number can be:
The corresponding decoding consumed resource of code stream is converted into code stream consumption figures by conversion formula, and by the system Surplus yield is converted to system spare resource value, then the decoding resource consumption value and system spare by conversion formula The size of resource value, wherein, the conversion formula is:| (X+M/2)/M |=Y, X are stock number, and X is resource value, and M is conversion times Number, such as M can be 10 etc., " | | " it is rounding operation.
By the way that consumption is scaled into resource value, the complexity of the comparison to stock number size can be greatly reduced, is led to Crossing resource value can be compared with more efficiently, be conducive to improving relative efficiency.
Mode two:
According to default resolution ratio and decoding consumed resource or the corresponding table of decoding resource consumption value, in the corresponding table Decoding consumed resource or decoding resource consumption value corresponding to the resolution ratio of the middle code stream for searching the video preview passage.Institute The resolution ratio in corresponding table is stated, common resolution ratio can be selected.The corresponding table can in advance by staff statistics or Calculating is obtained.By tabling look-up, the consumed resource or resource consumption value corresponding to resolution ratio more can be quickly found, just In follow-up comparison.
Mode three:
On the basis of the corresponding table of mode two, the division of line range is further entered to resolution ratio so that corresponding relation is more Plus simplify, the lookup of specific decoding consumed resource may comprise steps of:
2.1 resolution ratio searched belonging to the resolution ratio of the code stream of video preview passage are interval;
2.2 according to the interval corresponding relation with decoding consumed resource of default resolution ratio, searches the video preview and leads to Decoding consumed resource corresponding to the resolution ratio of the code stream in road.
The interval corresponding relation with decoding consumed resource of the resolution ratio different by presetting, the corresponding relation can be with Set up according to statistics.In addition, according to the statistics of the resolution ratio of the common code stream in IPC ends, common resolution ratio can be set Corresponding decoding consumed resource, so as to quickly search the decoding consumed resource corresponding to the video at IPC ends.
In step S203, when the code stream to video preview passage is decoded, the corresponding decoding of the code stream is judged Whether consumed resource is more than system spare stock number.
When the code stream to video preview passage is decoded, the resolution ratio of code stream is obtained in real time, and according to described point Resolution searches corresponding decoding consumed resource, while obtaining current system spare stock number, both are compared, Obtain whether system currently can meet the resource requirement decoded to the code stream of current channel.
In step S204, if the corresponding decoding consumed resource of the code stream is more than system spare stock number, root Next code stream according to the code stream of current video preview passage is judged.
It is logical according to video preview if the decoding resource of system can not meet the decoding request of the code stream of current passage Next code stream of the code stream in road is judged.If the decoding resource corresponding to the resolution ratio of next code stream is surplus still above system Remaining stock number, the then next code stream for obtaining next code stream again is judged, until judgement obtains the corresponding solution of resolution ratio of code stream Code resource is less than system spare stock number, then carries out decoding operate to the code stream.
In optional embodiment, the priority orders of code stream can also be preset, it is undesirable in current code stream When (the decoding resource of system can not meet the decoding request of the code stream of current passage), the code stream of next priority is selected, The code stream of next priority is decoded.
Wherein, when being decoded to the code stream of next priority, the code stream of next priority can equally be obtained Resolution ratio, and the decoding resource consumption value corresponding to the resolution ratio is searched, will be described if system can meet its decoding request Code stream is directly sent to base layer decoder.If system is still not able to meet its decoding request, continue to search for described next The code stream of next priority corresponding to the code stream of priority, desired code stream is met until finding.
Such as the implementation process that Fig. 3 is another video previewing method provided in an embodiment of the present invention, details are as follows:
In step S301, the resolution ratio of the code stream of video preview passage is obtained.
In step s 302, according to the resolution ratio of the code stream of video preview passage, calculate corresponding to video preview passage Decode consumed resource.
In step S303, judge whether the resolution ratio or system spare stock number of the code stream of the video preview passage are sent out Changing.
Specifically, the resolution value of the code stream of the video preview passage is in the event of changing, by the change of the resolution of code stream Change, the change of decoding resource consumption value will necessarily be changed accordingly.In addition, the change of system spare stock number, can include regarding Whether the layout information and code stream attribute of frequency change to judge.For the change of the layout information of video, such as preview is drawn The change of the layout information of 4 pictures, 8 pictures, 9 pictures, 16 pictures, 25 pictures or 36 pictures is set on face;Code stream attribute is No change can equally cause the change of system spare resource value, such as set the code stream of the lower video preview passage of each layout Attribute for main bit stream or subcode stream etc..Code stream in configuration that can be according to user and layout information adjustment current channel Order, and the code stream order of the configuration of user priority be higher than layout information priority.
In step s 304, in the event of changing, then when the code stream to video preview passage is decoded, judge described Whether the corresponding decoding consumed resource of code stream is more than system spare stock number.
In step S305, if the corresponding decoding consumed resource of the code stream is more than system spare stock number, root Next code stream according to the code stream of current video preview passage is judged.
Video previewing method described in Fig. 3, on the basis of Fig. 2 further to decoding consumption resource whether change into Row judges, so as to reduce the calculation times to system spare resource.Only when decoding consumed resource changes, than As layout information changes or when code stream attribute changes, and can be to decoding consumed resource and decoding resource before Consumption compares, and if greater than decoding consumed resource before, the resource of system spare is just obtained, so as to reduce to being The calculation times for remaining resource of uniting.
It should be understood that the size of the sequence number of each step is not meant to the priority of execution sequence, each process in above-described embodiment Execution sequence should determine that the implementation process without tackling the embodiment of the present invention constitutes any limit with its function and internal logic It is fixed.
Fig. 4 is the structural representation of the video preview devices notified provided in an embodiment of the present invention more, and details are as follows:
The video preview device notified includes more:
Resolution ratio acquiring unit 401, the resolution ratio of the code stream for obtaining video preview passage;
Consumed resource computing unit 402 is decoded, for the resolution ratio of the code stream according to video preview passage, video is calculated Decoding consumed resource corresponding to preview passage;
Judging unit 403, for when the code stream to video preview passage is decoded, judging the corresponding solution of the code stream Whether code consumed resource is more than system spare stock number;
Code stream selection unit 404, if being more than system spare resource for the corresponding decoding consumed resource of the code stream Amount, then judged according to next code stream of the code stream of current video preview passage.
It is preferred that, the decoding consumed resource computing unit is used for:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M provides for decoding Source consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the auxiliary knot unrelated with the frame sign of decoding The resource that structure is consumed.
It is preferred that, the resolution ratio acquiring unit is used for:
Parameter frame under the primary condition for the code stream for obtaining video preview passage, point of code stream is read according to the parameter frame Resolution.
Video preview device described in the embodiment of the present invention, it is corresponding with the video previewing method described in Fig. 2-3.
Fig. 5 is the schematic diagram for the video preview equipment that one embodiment of the invention is provided.As shown in figure 5, the embodiment is regarded Frequency preview device 5 includes:Processor 50, memory 51 and it is stored in the memory 51 and can be on the processor 50 The computer program 52 of operation, such as video preview program.The processor 50 is realized when performing the computer program 52 State the step in each video previewing method embodiment, such as step 201 shown in Fig. 2 to 204.Or, the processor 50 The function of each module/unit in above-mentioned each device embodiment, such as module shown in Fig. 4 are realized when performing the computer program 52 401 to 404 function.
Exemplary, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 51, and are performed by the processor 50, to complete the present invention.Described one Individual or multiple module/units can complete the series of computation machine programmed instruction section of specific function, and the instruction segment is used for Implementation procedure of the computer program 52 in the video preview equipment 5 is described.For example, the computer program 52 can be with It is divided into resolution ratio acquiring unit, decoding consumed resource computing unit, judging unit, code stream selection unit, each module tool Body function is as follows:
Resolution ratio acquiring unit, the resolution ratio of the code stream for obtaining video preview passage;
Consumed resource computing unit is decoded, for the resolution ratio of the code stream according to video preview passage, video preprocessor is calculated The decoding consumed resource look at corresponding to passage;
Judging unit, for when the code stream to video preview passage is decoded, judging the corresponding decoding of the code stream Whether consumed resource is more than system spare stock number;
Code stream selection unit, if being more than system spare stock number for the corresponding decoding consumed resource of the code stream, Then judged according to next code stream of the code stream of current video preview passage.
The video preview equipment 5 can be that desktop PC, notebook, palm PC and cloud server etc. are calculated Equipment.The video preview equipment may include, but be not limited only to, processor 50, memory 51.Those skilled in the art can manage Solution, Fig. 5 is only the example of video preview equipment 5, does not constitute the restriction to video preview equipment 5, can be included than diagram More or less parts, either combine some parts or different parts, such as described video preview equipment can also be wrapped Include input-output equipment, network access equipment, bus etc..
Alleged processor 50 can be CPU (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) or other PLDs, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 51 can be the internal storage unit of the video preview equipment 5, such as video preview equipment 5 Hard disk or internal memory.The memory 51 can also be the External memory equipment of the video preview equipment 5, for example institute's video preview The plug-in type hard disk being equipped with equipment 5, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 51 can also both include the video The internal storage unit of preview device 5 also includes External memory equipment.The memory 51 is used to store the computer program And other programs and data needed for the video preview equipment.The memory 51 can be also used for temporarily storing Output or the data that will be exported.
It is apparent to those skilled in the art that, for convenience of description and succinctly, only with above-mentioned each work( Energy unit, the division progress of module are for example, in practical application, as needed can distribute above-mentioned functions by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completion The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used To be that unit is individually physically present, can also two or more units it is integrated in a unit, it is above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.In addition, each function list Member, the specific name of module are also only to facilitate mutually differentiation, is not limited to the protection domain of the application.Said system The specific work process of middle unit, module, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without detailed description or note in some embodiment The part of load, may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
, can be with embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method Realize by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of division of logic function there can be other dividing mode, for example when actually realizing Multiple units or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.Separately A bit, shown or discussed coupling or direct-coupling or communication connection each other can be by some interfaces, device Or INDIRECT COUPLING or the communication connection of unit, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated module/unit realized using in the form of SFU software functional unit and as independent production marketing or In use, can be stored in a computer read/write memory medium.Understood based on such, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct the hardware of correlation to complete, described meter by computer program Calculation machine program can be stored in a computer-readable recording medium, and the computer program can be achieved when being executed by processor The step of stating each embodiment of the method..Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or some intermediate forms etc..Computer-readable Jie Matter can include:Can carry any entity or device of the computer program code, recording medium, USB flash disk, mobile hard disk, Magnetic disc, CD, computer storage, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium is included can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as, in some jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme, all should Within protection scope of the present invention.

Claims (13)

1. a kind of video previewing method, it is characterised in that the video previewing method includes:
Obtain the resolution ratio of the code stream of video preview passage;
According to the resolution ratio of the code stream of video preview passage, the decoding consumed resource corresponding to video preview passage is calculated;
When the code stream to video preview passage is decoded, judge whether the corresponding decoding consumed resource of the code stream is more than System spare stock number;
If the corresponding consumed resource that decodes of the code stream is more than system spare stock number, current video preview passage is selected Next code stream of code stream judged.
2. video previewing method according to claim 1, it is characterised in that the code stream according to video preview passage Resolution ratio, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M disappears for decoding resource Consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the supplementary structure institute unrelated with the frame sign of decoding The resource of consumption.
3. video previewing method according to claim 1, it is characterised in that the code stream of the acquisition video preview passage The step of resolution ratio is:
Parameter frame under the primary condition for the code stream for obtaining video preview passage, the resolution of code stream is read according to the parameter frame Rate.
4. video previewing method according to claim 1, it is characterised in that judge the corresponding decoding of the code stream described Before the step of whether consumed resource is more than system spare stock number, methods described also includes:
Judge whether the resolution ratio or system spare stock number of the code stream of the video preview passage change, in the event of change Change, then judge whether the corresponding decoding consumed resource of the code stream is more than system spare stock number.
5. video previewing method according to claim 1, it is characterised in that the code stream according to video preview passage Resolution ratio, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
Resolution ratio belonging to the resolution ratio for the code stream for searching video preview passage is interval;
According to the interval corresponding relation with decoding consumed resource of default resolution ratio, the code stream of the video preview passage is searched Resolution ratio corresponding to decoding consumed resource.
6. video previewing method according to claim 1, it is characterised in that the code stream according to video preview passage Resolution ratio, the step of calculating the decoding consumed resource corresponding to video preview passage includes:
According to default resolution ratio and decoding consumed resource or the corresponding table of decoding resource consumption value, looked into the corresponding table Look for the video preview passage code stream resolution ratio corresponding to decoding consumed resource or decoding resource consumption value.
7. video previewing method according to claim 1, it is characterised in that the video preview passage includes multiple passages, The step of next code stream of the code stream of the selection current video preview passage is judged includes:
According to the priority orders of the code stream of multichannel set in advance, select each video preview passage code stream it is next Priority code stream is played out.
8. video previewing method according to claim 1, it is characterised in that the judgement code stream is corresponding to decode money The step of whether source consumption is more than system spare stock number includes:
The corresponding decoding consumed resource of code stream is converted into code stream consumption figures by conversion formula, and by the system spare Stock number is converted to system spare resource value, then the decoding resource consumption value and system spare resource by conversion formula The size of value, wherein, the conversion formula is:| (X+M/2)/M |=Y, X are stock number, and X is resource value, and M is conversion multiple.
9. a kind of video preview device, it is characterised in that the video preview device includes:
Resolution ratio acquiring unit, the resolution ratio of the code stream for obtaining video preview passage;
Consumed resource computing unit is decoded, for the resolution ratio of the code stream according to video preview passage, video preview is calculated and leads to Decoding consumed resource corresponding to road;
Judging unit, for when the code stream to video preview passage is decoded, judging the corresponding decoding resource of the code stream Whether consumption is more than system spare stock number;
Code stream selection unit, if being more than system spare stock number, root for the corresponding decoding consumed resource of the code stream Next code stream according to the code stream of current video preview passage is judged.
10. video preview device according to claim 9, it is characterised in that the decoding consumed resource computing unit For:
Decoding consumed resource according to corresponding to formula M=a*F+b calculates video preview passage, wherein M disappears for decoding resource Consumption, a is the consumption radix related to decoding chip, and F is frame sign, and b is the supplementary structure institute unrelated with the frame sign of decoding The resource of consumption.
11. video preview device according to claim 9, it is characterised in that the resolution ratio acquiring unit is used for:
Parameter frame under the primary condition for the code stream for obtaining video preview passage, the resolution of code stream is read according to the parameter frame Rate.
12. a kind of video preview equipment, including memory, processor and it is stored in the memory and can be in the processing The computer program run on device, it is characterised in that realize such as claim 1 described in the computing device during computer program The step of to any one of 5 video previewing method.
13. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, its feature exists In the step of realization video previewing method as described in any one of claim 1 to 5 when the computer program is executed by processor Suddenly.
CN201710474658.XA 2017-06-21 2017-06-21 Video preview method, device and equipment Active CN107155093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710474658.XA CN107155093B (en) 2017-06-21 2017-06-21 Video preview method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710474658.XA CN107155093B (en) 2017-06-21 2017-06-21 Video preview method, device and equipment

Publications (2)

Publication Number Publication Date
CN107155093A true CN107155093A (en) 2017-09-12
CN107155093B CN107155093B (en) 2020-10-23

Family

ID=59796031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710474658.XA Active CN107155093B (en) 2017-06-21 2017-06-21 Video preview method, device and equipment

Country Status (1)

Country Link
CN (1) CN107155093B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922366A (en) * 2019-03-28 2019-06-21 深圳创维数字技术有限公司 A kind of device parameter method of adjustment, device, equipment and medium
CN110944213A (en) * 2019-11-26 2020-03-31 浙江大华技术股份有限公司 Code stream adjusting method and device and computer storage medium
CN111918097A (en) * 2020-08-07 2020-11-10 杭州海康威视数字技术股份有限公司 Decoding method, device and equipment
CN112770138A (en) * 2019-11-01 2021-05-07 浙江宇视科技有限公司 Decoding resource management method, device, decoding equipment and readable storage medium
CN115174965A (en) * 2022-06-30 2022-10-11 杭州海康威视数字技术股份有限公司 Video preview method and device, electronic equipment and computer readable storage medium
WO2023165082A1 (en) * 2022-03-04 2023-09-07 上海商汤智能科技有限公司 Image preview method and apparatus, electronic device, storage medium, computer program, and product thereof
WO2023246946A1 (en) * 2022-06-24 2023-12-28 杭州海康威视数字技术股份有限公司 Coding and decoding resource allocation method and apparatus, and electronic device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778259A (en) * 2009-12-25 2010-07-14 深圳中兴力维技术有限公司 Network video monitoring system and method for improving video display efficiency thereof
CN101977185A (en) * 2010-10-14 2011-02-16 杭州海康威视数字技术股份有限公司 Digital video recorder in video monitoring system and network connection control method thereof
CN102307300A (en) * 2011-08-17 2012-01-04 杭州华三通信技术有限公司 Video connection control method and equipment
CN102364945A (en) * 2011-11-28 2012-02-29 杭州海康威视数字技术股份有限公司 Multi-picture image decoding display method and video monitoring terminal
US20120209889A1 (en) * 2011-01-28 2012-08-16 Giovanni Agnoli Data Structures for a Media-Editing Application
CN103024460A (en) * 2012-12-11 2013-04-03 广东威创视讯科技股份有限公司 Multi-code stream self-adapting method and system
CN103607552A (en) * 2013-10-14 2014-02-26 同方(深圳)云计算技术股份有限公司 Network video recorder (NVR) video hard decoding chip system resource allocation method
CN104079869A (en) * 2013-03-29 2014-10-01 杭州海康威视数字技术股份有限公司 Method and client side for previewing multi-channel code streams
CN104660978A (en) * 2013-11-18 2015-05-27 三星泰科威株式会社 Image processing apparatus and method for processing images
CN105554375A (en) * 2015-12-02 2016-05-04 浙江大华技术股份有限公司 Method and device of video preview in digital video recorder
CN105657334A (en) * 2014-11-14 2016-06-08 中国移动通信集团公司 Video transmission method, video monitoring platform and video monitoring equipment
CN105827633A (en) * 2016-05-06 2016-08-03 浙江大华技术股份有限公司 Video transmission method and device
CN106791551A (en) * 2016-12-12 2017-05-31 广东威创视讯科技股份有限公司 A kind of method of automatic regulating signal source resolution ratio, mosaic screen and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778259A (en) * 2009-12-25 2010-07-14 深圳中兴力维技术有限公司 Network video monitoring system and method for improving video display efficiency thereof
CN101977185A (en) * 2010-10-14 2011-02-16 杭州海康威视数字技术股份有限公司 Digital video recorder in video monitoring system and network connection control method thereof
US20120209889A1 (en) * 2011-01-28 2012-08-16 Giovanni Agnoli Data Structures for a Media-Editing Application
CN102307300A (en) * 2011-08-17 2012-01-04 杭州华三通信技术有限公司 Video connection control method and equipment
CN102364945A (en) * 2011-11-28 2012-02-29 杭州海康威视数字技术股份有限公司 Multi-picture image decoding display method and video monitoring terminal
CN103024460A (en) * 2012-12-11 2013-04-03 广东威创视讯科技股份有限公司 Multi-code stream self-adapting method and system
CN104079869A (en) * 2013-03-29 2014-10-01 杭州海康威视数字技术股份有限公司 Method and client side for previewing multi-channel code streams
CN103607552A (en) * 2013-10-14 2014-02-26 同方(深圳)云计算技术股份有限公司 Network video recorder (NVR) video hard decoding chip system resource allocation method
CN104660978A (en) * 2013-11-18 2015-05-27 三星泰科威株式会社 Image processing apparatus and method for processing images
CN105657334A (en) * 2014-11-14 2016-06-08 中国移动通信集团公司 Video transmission method, video monitoring platform and video monitoring equipment
CN105554375A (en) * 2015-12-02 2016-05-04 浙江大华技术股份有限公司 Method and device of video preview in digital video recorder
CN105827633A (en) * 2016-05-06 2016-08-03 浙江大华技术股份有限公司 Video transmission method and device
CN106791551A (en) * 2016-12-12 2017-05-31 广东威创视讯科技股份有限公司 A kind of method of automatic regulating signal source resolution ratio, mosaic screen and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922366A (en) * 2019-03-28 2019-06-21 深圳创维数字技术有限公司 A kind of device parameter method of adjustment, device, equipment and medium
CN112770138A (en) * 2019-11-01 2021-05-07 浙江宇视科技有限公司 Decoding resource management method, device, decoding equipment and readable storage medium
CN112770138B (en) * 2019-11-01 2022-07-19 浙江宇视科技有限公司 Decoding resource management method, device, decoding equipment and readable storage medium
CN110944213A (en) * 2019-11-26 2020-03-31 浙江大华技术股份有限公司 Code stream adjusting method and device and computer storage medium
CN110944213B (en) * 2019-11-26 2021-09-10 浙江大华技术股份有限公司 Code stream adjusting method and device and computer storage medium
CN111918097A (en) * 2020-08-07 2020-11-10 杭州海康威视数字技术股份有限公司 Decoding method, device and equipment
WO2023165082A1 (en) * 2022-03-04 2023-09-07 上海商汤智能科技有限公司 Image preview method and apparatus, electronic device, storage medium, computer program, and product thereof
WO2023246946A1 (en) * 2022-06-24 2023-12-28 杭州海康威视数字技术股份有限公司 Coding and decoding resource allocation method and apparatus, and electronic device
CN115174965A (en) * 2022-06-30 2022-10-11 杭州海康威视数字技术股份有限公司 Video preview method and device, electronic equipment and computer readable storage medium
CN115174965B (en) * 2022-06-30 2024-01-02 杭州海康威视数字技术股份有限公司 Video preview method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN107155093B (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN107155093A (en) A kind of video previewing method, device and equipment
CN110381322A (en) Method for decoding video stream, device, terminal device and storage medium
CN103210382B (en) Bus transaction based on bus unit health and fitness information and related power management in mediates communications bus
CN105791431A (en) On-line distributed monitoring video processing task scheduling method and device
WO2016148963A1 (en) Intelligent placement within a data center
WO2017166643A1 (en) Method and device for quantifying task resources
CN107729137A (en) Server, the method and storage medium of the decryption of block chain sign test
CN104461698A (en) Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
US20230176929A1 (en) Resource allocation method and apparatus based on edge computing
WO2021258512A1 (en) Data aggregation processing apparatus and method, and storage medium
CN102591594B (en) Data processing method and equipment
CN110879749B (en) Scheduling method and scheduling device for real-time transcoding task
CN114466227A (en) Video analysis method and device, electronic equipment and storage medium
CN105898399A (en) Video resource loading method and device and smart television
CN113824689B (en) Edge computing network, data transmission method, device, equipment and storage medium
CN112911390B (en) Video data playing method and terminal equipment
CN110062278A (en) Video data issues method, apparatus, electronic equipment and storage medium
CN113079062B (en) Resource adjusting method and device, computer equipment and storage medium
CN116841720A (en) Resource allocation method, apparatus, computer device, storage medium and program product
CN108255825A (en) For dynamically distributing the method and apparatus of database connection
CN115696441A (en) Call bill processing method, device, equipment and storage medium
WO2020155538A1 (en) Video processing method and system, computer device and storage medium
CN112788768A (en) Communication resource allocation method and device
CN116166575B (en) Method, device, equipment, medium and program product for configuring access segment length
CN111447258B (en) Method, device and equipment for scheduling offline tasks and storage medium

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