CN108737862A - A kind of method and apparatus generating video code flow segment - Google Patents

A kind of method and apparatus generating video code flow segment Download PDF

Info

Publication number
CN108737862A
CN108737862A CN201810502959.3A CN201810502959A CN108737862A CN 108737862 A CN108737862 A CN 108737862A CN 201810502959 A CN201810502959 A CN 201810502959A CN 108737862 A CN108737862 A CN 108737862A
Authority
CN
China
Prior art keywords
frame image
code
code check
image
stream segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810502959.3A
Other languages
Chinese (zh)
Inventor
唐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201810502959.3A priority Critical patent/CN108737862A/en
Publication of CN108737862A publication Critical patent/CN108737862A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/23805Controlling the feeding rate to the network, e.g. by controlling the video pump
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention relates to a kind of method and apparatus generating video code flow segment, to solve the problem of that the code check of video code flow that video sending end existing in the prior art can not change transmission automatically is unfavorable for user's viewing.This method can determine the image activity level of continuous N number of frame image, and transmit the target bit rate that this N number of frame image uses according to determining image activity level selection, generate the corresponding code stream segment of this N number of frame image according to target bit rate later.Using above method, video sending end equipment can determine target bit rate used in this section of video of transmission according to the amplitude of variation of continuous pictures in one section of video, and video code flow segment is generated according to target bit rate, since the code check of the video code flow segment generated according to different video image is different, video code flow is generated according to the video code flow segment of these different code checks and is transmitted, you can switches its code check when transmitting video code flow by video sending end equipment.

Description

A kind of method and apparatus generating video code flow segment
Technical field
The present invention relates to stream media technology field, more particularly to a kind of method and apparatus generating video code flow segment.
Background technology
In current stream media technology field, there are a variety of stream media protocols and there are corresponding a variety of streaming media sides Formula, wherein (HTTP live stream, HTTP live TV streams, HTTP, Hyper Text Transfer Protocol surpass HLS Text transfer protocol) etc. in mobile Internets widely applied stream media protocol support the video that user terminal is played different Switch between code stream, to support video to switch between the kind play mode such as smooth, SD and high definition.
However in the prior art, if user terminal selection plays the video of a certain code stream, video sending end will continue will The video code flow of same code check is divided into code stream segment, and continues the video codes formed using the code stream segment of same code check It flows to user terminal and sends video, video sending end can not change the code check of the video of transmission, bring inconvenience automatically.Such as Monitoring field, if the video code flow of high code check is transmitted in user's selection by high definition pattern, since monitor video picture is usually in Static state, at this time user terminal still receive the high bit-rate video code stream of video sending end transmission, can cause to have used excessive Flow check static video pictures;If user selects the video code flow of smooth pattern transmission low bit- rate, user can be caused Hold the video pictures quality of display bad so that user can not see monitor video picture clearly.
To sum up, in the prior art video sending end can not change automatically transmission video code flow code check, be unfavorable for user Viewing.
Invention content
The present invention provides a kind of method and apparatus generating video code flow segment, to solve existing in the prior art regard The sending end that takes place frequently can not change the code check of the video code flow of transmission automatically, be unfavorable for the problem of user watches.
A kind of method generating video code flow segment provided in an embodiment of the present invention, including:
Determine that the image activity level of continuous N number of frame image, described image activity level characterize N number of frame figure The image change amplitude of picture, N are positive integer;
The target bit rate of N number of frame image is determined according to described image activity level;
Determine the corresponding code stream segment with the target bit rate of N number of frame image.
Optionally it is determined that the image activity level of continuous N number of frame image, including:
According to the pixel quantity being had differences between the consecutive frame image in N number of frame image, determine that described image is lived Jerk grade, the consecutive frame image are the continuous frame image of any two in N number of frame image.
Optionally it is determined that described image activity level, including:
Determine the pixel quantity being had differences between consecutive frame image whole in N number of frame image;
Determine the pixel summation for the pixel quantity being had differences between whole consecutive frame images;
Described image activity level is determined according to the pixel summation.
Optionally it is determined that before the image activity level of continuous N number of frame image, further include:
Obtain the code stream segment to be sent of the corresponding at least one alternative code check of N number of frame image;
According to waiting for for any one alternative code check in the code stream segment to be sent of at least one alternative code check It sends code stream segment and determines N number of frame image;
The alternative code check include it is following in some or all of:
High code check;
Middle code check;
Low bit- rate.
Optionally, if the alternative code check includes high code check, the target bit rate includes high code check, determines N number of frame The corresponding code stream segment with the target bit rate of image, including:
N number of frame image of high code check is determined according to the code stream segment to be sent of high code check;
According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, determines that N number of frame image corresponds to The code stream segment with the target bit rate, including:
N number of frame image of code check in being determined according to the code stream segment to be sent of middle code check;
According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, determines that N number of frame image corresponds to The code stream segment with the target bit rate, including:
N number of frame image of low bit- rate is determined according to the code stream segment to be sent of low bit- rate;
According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
The present invention also provides a kind of device generating video code flow segment in implementing, which includes:
Image activity level determining module, the image activity level for determining continuous N number of frame image, the figure As activity level characterizes the image change amplitude of N number of frame image, N is positive integer;
Target bit rate determining module, the object code for determining N number of frame image according to described image activity level Rate;
Code stream segment determining module, for determining the corresponding code stream piece with the target bit rate of N number of frame image Section.
Optionally, described image activity level determining module is specifically used for:
According to the pixel quantity being had differences between the consecutive frame image in N number of frame image, determine that described image is lived Jerk grade, the consecutive frame image are the continuous frame image of any two in N number of frame image.
Optionally, described image activity level determining module is specifically used for:
Determine the pixel quantity being had differences between consecutive frame image whole in N number of frame image;
Determine the pixel summation for the pixel quantity being had differences between whole consecutive frame images;
Described image activity level is determined according to the pixel summation.
Optionally, described image activity level determining module is additionally operable to:
In the code stream segment to be sent for obtaining the corresponding at least one alternative code check of N number of frame image, and according to described The code stream segment to be sent of any one alternative code check in the code stream segment to be sent of at least one alternative code check determines After N number of frame image, the image activity level of continuous N number of frame image is determined;
The alternative code check include it is following in some or all of:
High code check;
Middle code check;
Low bit- rate.
Optionally, if the alternative code check includes high code check, the target bit rate includes high code check, and the code stream segment is true Cover half block is specifically used for:
N number of frame image of high code check is determined according to the code stream segment to be sent of high code check;
According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, the code stream segment determining module It is specifically used for:
N number of frame image of code check in being determined according to the code stream segment to be sent of middle code check;
According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, the code stream segment determining module It is specifically used for:
N number of frame image of low bit- rate is determined according to the code stream segment to be sent of low bit- rate;
According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
A kind of method of the generation video code flow segment provided according to embodiments of the present invention can determine continuous N number of frame The image activity level of image, and the target that this N number of frame image uses is transmitted according to determining image activity level selection Code check generates the corresponding code stream segment of this N number of frame image according to target bit rate later.Using above method, video sending end is set It is standby that target bit rate used in this section of video of transmission, and root can be determined according to the amplitude of variation of continuous pictures in one section of video Video code flow segment is generated according to target bit rate, since the code check of the video code flow segment generated according to different video image may not Together, video code flow is generated according to the video code flow segment of these different code checks and transmitted, you can passed by video sending end equipment Switch its code check when defeated video code flow.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of step schematic diagram of method generating video code flow segment provided in an embodiment of the present invention;
Fig. 2 is the method schematic diagram (one) of the code stream segment of determining target bit rate provided in an embodiment of the present invention;
Fig. 3 is the method schematic diagram (two) of the code stream segment of determining target bit rate provided in an embodiment of the present invention;
Fig. 4 is according to a kind of side for the method transmission video code flow generating video code flow segment provided in an embodiment of the present invention Method flow chart;
Fig. 5 is a kind of structural schematic diagram of device generating video code flow segment provided in an embodiment of the present invention.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of method generating video code flow segment provided in an embodiment of the present invention includes the following steps:
S1:Determine that the image activity level of continuous N number of frame image, described image activity level characterization are described N number of The image change amplitude of frame image, N are positive integer;
S2:The target bit rate of N number of frame image is determined according to described image activity level;
S3:Determine the corresponding code stream segment with the target bit rate of N number of frame image.
Using above method, it can be determined and be passed according to the image activity level of continuous N number of frame image in one section of video Target bit rate used in defeated this section of video, and determine according to target bit rate the code stream segment of video, due to according to different sections The target bit rate that determines of video may be different, to which the code check of the code stream segment of the video generated is different, according to these differences The video code flow segment of code check generates video code flow and transmits, you can is switched when transmitting video code flow by video sending end equipment The code check of video code flow.In force, video sending end equipment can be after determining target bit rate, then goes to generate N number of frame image The corresponding code stream segment with the target bit rate, can also be after determining target bit rate, the N number of frame image that will obtain before Multiple code checks segment in the segment with target bit rate as the code stream segment, the video code flow for generation.
Wherein, the executive agent of above method can be video sending end equipment, which can be server or place Manage device etc..
In force, the amplitude of variation of image in N number of frame image is indicated by image activity level, N number of frame image Image change amplitude is bigger, and image activity level is higher, and the image activity level of static image is relatively low.In addition, image Activity level can be corresponding with the target bit rate of video, and a kind of feasible embodiment is that high liveness corresponds to high code check, Code check during middle liveness corresponds to, low liveness correspond to low bit- rate, to when the amplitude of variation of N number of frame image is larger, determine The code check of video code flow is higher, and user terminal can play clearly video according to the video code flow of the high code rate of reception, and in N The amplitude of variation of a frame image is smaller, and when such as N number of frame image is static, the code check of determining video code flow is relatively low, transmits this User terminal flow can be saved when the video code flow of the corresponding low bit- rate of a little still frame images.
In the embodiment of the present invention, there are many ways to determining the image activity level of continuous N number of frame image, lead to below It crosses way of example and introduces several feasible methods therein:
It is method one, whether identical according to the pixel between any two image compared in N number of frame image as a result, determining Image activity level:
In force, it can be determined according to the quantity for the pixel being had differences between any two image in N number of frame image The image activity level of N number of frame image, wherein M are positive integer, for example, had differences between determining arbitrary two field pictures After the quantity of pixel is M, according to pair of the amplitude range and image activity level of the quantity of the preset pixel having differences It should be related to, determine that the corresponding image activity level of amplitude range belonging to M is corresponding image liveness of N number of frame image etc. Grade.
For example, the mapping table of amplitude range as shown in Table 1 and image activity level can be preset.
Amplitude range belonging to the quantity for the pixel having differences Image activity level
0-99 Low liveness
100-199 Middle liveness
200 or more High liveness
Table 1
When determining image activity level according to the quantity M for the pixel being had differences between arbitrary two field pictures, pass through It tables look-up and determines the image activity level of N number of frame image.If for example, the quantity for the pixel being had differences between arbitrary two field pictures M is 100, then determines that the image activity level of N number of frame image is middle liveness according to table 1.It should be noted that the amplitude model in table 1 It encloses and is merely illustrative with the correspondence of image activity level, it in force can be according to possessed by each frame image Pixel quantity adjusts the correspondence of amplitude range and image activity level.
Method two is schemed according to whether the pixel between the consecutive frame image in the N number of frame image of comparison is identical as a result, determining As activity level, wherein consecutive frame image is the continuous frame image of any two in N number of frame image:
It in one embodiment, can be according to having differences between any two consecutive frame image in N number of frame image The quantity of pixel determines the image activity level of N number of frame image, wherein consecutive frame image is any two in N number of frame image Continuous frame image, for example, after the quantity for the pixel being had differences between arbitrary two consecutive frame images of determination is M, root According to the correspondence of the amplitude range and image activity level of the quantity of the preset pixel having differences, determine belonging to M The corresponding image activity level of amplitude range is the corresponding image activity level of N number of frame image.
For example, between arbitrary two consecutive frame images can be preset, belonging to the quantity for the pixel having differences The mapping table of amplitude range and image activity level, the setting of the table and occupation mode are similar with table 1, embodiments thereof It is referred to table 1, details are not described herein.
Method three, it is whether identical according to the pixel between the whole consecutive frame images compared in N number of frame image as a result, Determine image activity level:
In one embodiment, it may be determined that had differences between whole two consecutive frame images in N number of frame image The quantity of pixel, the pixel according to the pixel quantity of the difference of the result determination compared two-by-two between whole consecutive frame images are total With the image activity level of determining all N number of frame images, wherein consecutive frame image is that any two is continuous in N number of frame image Frame image.It will can every time be compared between determining whole consecutive frame images after the quantity of the pixel of difference using this method The summation of results added afterwards determines image activity level, i.e., by the pixel of difference between first frame image and the second frame image Difference between the pixel quantity, third frame image and the 4th frame image of difference between quantity, the second frame image and third frame image Pixel quantity ... N-1 frames image and nth frame image between the pixel quantity of difference be added, obtain whole consecutive frame figures The pixel summation of pixel quantity being had differences as between, later can according to belonging to preset pixel summation amplitude range with The correspondence of image activity level determines the corresponding image activity level of N number of frame image.
For example, can with the mapping table of amplitude range and image activity level belonging to presetted pixel summation, After determining and setting pixel summation, can determine the corresponding image activity level of N number of frame image according to the table, the setting of the table and Occupation mode is similar with table 1, and embodiments thereof is referred to table 1, and details are not described herein.
In addition, in the above-described embodiment, the quantity X of whole pixels in frame image can also be accounted for according to pixel summation Y The numberical range of ratio Z determines the corresponding image activity level of N number of frame image, and wherein X, Y, Z is positive integer, for example, in advance If the mapping table of numberical range as shown in Table 2 and image activity level, determining that it is complete in frame image that pixel summation Y is accounted for Image activity level is determined according to table 2 after the ratio Z of the quantity X of portion's pixel.
The numberical range (%) of ratio Z Image activity level
0-20 Low liveness
21-40 Middle liveness
41-100 High liveness
Table 2
After determining that pixel summation Y accounts in frame image the ratio Z of the quantity X of whole pixels, passes through to table look-up and determine N number of frame figure The image activity level of picture.Such as, however, it is determined that ratio Z is 15, then the image liveness etc. of N number of frame image is determined according to table 3 Grade is low liveness.
In other embodiment, the picture being had differences between determining consecutive frame image whole in N number of frame image After prime number amount, the corresponding figure of N number of frame image can also be determined according to the amplitude range described in one pixel quantity of maximum As activity level.
It should be noted that the method for image activity level determined above is merely illustrative, rather than to all determining image The restriction of the method for activity level.
Optionally it is determined that before the image activity level of continuous N number of frame image, further include:
Obtain the code stream segment to be sent of the corresponding at least one alternative code check of N number of frame image;
According to waiting for for any one alternative code check in the code stream segment to be sent of at least one alternative code check It sends code stream segment and determines N number of frame image;
The alternative code check include it is following in some or all of:High code check, middle code check, low bit- rate.
In the embodiment of the present invention, continuous N number of frame image can obtain the corresponding at least one of N number of frame image alternatively After the code stream segment to be sent of code check, determined according to the code stream segment to be sent of any one alternative code check, wherein to be sent Code stream segment can be the code stream segment to be sent of code check some or all of in high code check, middle code check, low bit- rate.
In force, video sending end equipment can obtain N number of frame from the video storaging equipments such as camera or memory The code stream segment to be sent of the corresponding a variety of alternative code checks of image later can be according to the code stream to be sent of all alternative code checks Segment determines the frame image of multiple code checks, and when determining image activity level and generated code flow section, it can therefrom select The frame image of a certain alternative code check is selected as N number of frame image, for determining its image activity level.
In addition in force, it is corresponding a variety of alternative can to obtain N number of frame image in equipment for video sending end equipment After the code stream segment to be sent of code check, therefrom selects the code stream segment to be sent of any alternative code check to determine and need to be converted to Target bit rate and the N number of frame image transmitted to user terminal.For example, video sending end equipment obtains continuous N number of frame figure from camera As the code stream segment to be sent of corresponding high code check, middle code check and the alternative code check of three kinds of low bit- rate, later, video sending end equipment N number of frame image can be determined according only to the code stream segment to be sent of high code check, to determine image liveness according to N number of frame image Grade.
Optionally, if the alternative code check includes high code check, the target bit rate includes high code check, determines N number of frame The corresponding code stream segment with the target bit rate of image, including:It is determined according to the code stream segment to be sent of high code check N number of frame image of high code check;According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, determines that N number of frame image corresponds to The code stream segment with the target bit rate, including:The N of code check in being determined according to the code stream segment to be sent of middle code check A frame image;According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, determines that N number of frame image corresponds to The code stream segment with the target bit rate, including:The N of low bit- rate is determined according to the code stream segment to be sent of low bit- rate A frame image;According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
In force, if receiving the corresponding high code check of N number of frame image, middle code check and the alternative code check of three kinds of low bit- rate respectively Code stream segment to be sent can be according to identical with target bit rate alternative then after the target bit rate for determining N number of frame image The code stream segment to be sent of code check, generates the code stream segment of target bit rate, at this time can be to the to be sent of other alternative code checks Code stream segment carries out discard processing.
Specifically, if as shown in Fig. 2, before the code stream segment for generating N number of frame image, video sending end equipment has received Code stream segment 201 to be sent, the code stream segment 202 to be sent of middle code check and the waiting for for low bit- rate of the high code check of this N number of frame image Send code stream segment 203, however, it is determined that the target bit rate of this N number of frame image is high code check, then can be according to the high code check of reception Code stream segment 201 to be sent generates the code stream segment 204 of high code check, and the code stream segment 202 to be sent of code check and low in abandoning The code stream segment 203 to be sent of code check;In addition, however, it is determined that target bit rate is middle code check, then can be according to the middle code check of reception The code stream segment of code check during code stream segment to be sent generates, and abandon the code stream segment to be sent of high code check and low bit- rate;If really The code check that sets the goal is low bit- rate, then the code stream piece of low bit- rate can be generated according to the code stream segment to be sent of the low bit- rate of reception Section, and abandon the code stream segment to be sent of high code check and middle code check.
During the video code flow of the code stream segment composition of the continuous multigroup N number of frame image of transmission, if in generated code flow The high code check of multigroup N number of frame image, the code stream segment to be sent of middle code check and the alternative code check of three kinds of low bit- rate are had received before section, After determining the corresponding target bit rate of each group of N number of frame image, according to each group of N number of frame image of reception have and target bit rate The code stream segment to be sent of identical alternative code check, generates the code stream segment of the N number of frame image of this group, later can be according to this company The code stream segment for continuing multigroup N number of frame image generates video code rate, for being transmitted to user.
Such as shown in Fig. 3, three kinds of alternative code checks for receiving first group of N number of frame image code stream segment 301 to be sent, Three kinds of alternative codes of the N number of frame image of code stream segment 302 and third group to be sent of the alternative code check of three kinds of two groups of N number of frame images After the code stream segment 303 to be sent of rate, if the corresponding target bit rate of first group of N number of frame image is high code check, second group of N number of frame figure As corresponding target bit rate be middle code check, the corresponding target bit rate of the N number of frame image of third group be low bit- rate, then according to each group of N The corresponding target bit rate of a frame image selects identical as target bit rate from the code stream segment to be sent of each group of N number of frame image Code stream segment to be sent, generate 304, second groups of N number of frame images of code stream segment of the high code check of first group of N number of frame image respectively Middle code check code stream segment 305 and the N number of frame image of third group low bit- rate code stream segment 306, later can be according to this Three code stream segments generate video code flow.
Optionally, in embodiments of the present invention, video sending end equipment can also be to receive N number of frame image corresponding multiple After the code stream segment to be sent of alternative code check, the code stream segment of the corresponding multiple code checks of N number of frame image is generated, is determining N number of frame After the corresponding target bit rate of image, the code stream segment of selection target code check is as described N number of from the code stream segment of multiple code checks The corresponding code stream segment with the target bit rate of frame image.
Optionally, however, it is determined that N number of frame image target bit rate and reception N number of frame image code stream segment to be sent Alternative code check is different, alternatively, not receiving the code stream segment to be sent of N number of frame image before determining target bit rate, then needs The code stream segment to be sent that the target bit rate of N number of frame image is obtained to camera or video storaging equipment, later according to acquisition Code stream segment to be sent determine the code stream segment of target bit rate.
Optionally, in the embodiment of the present invention, the corresponding code stream piece with the target bit rate of N number of frame image of generation Section, can be TS (Transport Stream, traffic flow) code stream segment under HLS protocol.
In force, the method provided in an embodiment of the present invention for generating video code flow segment can also be applied to generate other energy It is enough in generation video code flow, or directly can be used in the code stream segment of video code flow transmission.
Optionally, N number of frame image can be multiple frame images in a GOP period, wherein first frame image is root According to the image that I (Intra-Prediction, intra prediction) frame information determines, i.e. key frame images, the 2nd to N frames image can be with It is the image determined according to P (Prediction, prediction) frame information, wherein the 2nd is continuous according to former frame to N frame images needs Frame image determines.N number of frame figure in the GOP periods can be determined according to the code stream segment to be sent in the GOP periods of acquisition Picture, wherein code stream segment to be sent can include a frame I frame informations and P frame informations of N-1 frames later.
In force, video sending end equipment can preset the duration of GOP periods, pre- so as to obtain as needed If the corresponding code stream segment to be sent of N number of frame image in duration.Wherein, when video sending end equipment can obtain GOP respectively Between in section the corresponding multiple alternative code checks of code stream segment of N number of frame image code stream segment to be sent, so as to according to any one The code stream segment to be sent of the alternative code check of kind obtains N number of frame image in the GOP periods of corresponding code check.
It, can be according to N number of frame out of camera or video storaging equipment obtain the GOP periods in the embodiment of the present invention The code stream segment to be sent of image alternative code check identical with target bit rate generates the code stream of the corresponding target bit rate of N number of frame image Segment, wherein code stream segment can be TS code stream segments, specifically according to the code to be sent of a certain alternative code check of GOP frame images The method that flow section generates TS code stream segments is referred to the prior art, and details are not described herein.
As shown in figure 4, on the basis of the method provided in an embodiment of the present invention for generating video code flow segment, in the company of reception Continue the corresponding high code check of continuous multigroup N number of frame image in multiple GOP periods, middle code check and the alternative code check of three kinds of low bit- rate After code stream segment to be sent, video sending end equipment sends multigroup N number of frame figure in continuous multiple GOP periods to ustomer premises access equipment As the method for corresponding video code flow includes the following steps:
Step 401:Video sending end equipment N number of corresponding high code check of frame image in obtaining GOP period waits for After the code stream segment to be sent for sending code stream segment, the code stream segment to be sent of middle code check and low bit- rate, N number of frame image pair is determined The TS code streams segment for the high code check answered, the TS code stream segments of the TS code streams segment of middle code check and low bit- rate, N is positive integer;
Step 402:Video sending end equipment determines the corresponding image activity level of N number of frame image;
Step 403:Video sending end equipment determines the target bit rate of N number of frame image according to image activity level;
Step 404:Video sending end equipment is from the TS code streams segment of the corresponding high code check of N number of frame image, the TS of middle code check The TS code stream segments of selection target code check in code stream segment and the TS code stream segments of low bit- rate, and abandon the TS code streams of other code checks Segment;
Step 405:Video sending end equipment judges whether the code stream of N number of frame image in next GOP periods Segment needs to transmit, if so, 406 are thened follow the steps, it is no to then follow the steps 407;
Step 406:Video sending end equipment is waited for according to N number of corresponding high code check of frame image in next GOP periods Code stream segment, the code stream segment to be sent of the code stream segment to be sent of middle code check and low bit- rate are sent, determines that N number of frame image corresponds to High code check TS code streams segment, the TS code stream segments of the TS code streams segment of middle code check and low bit- rate, later execute step 402;
Step 407:Video sending end equipment is according to the TS code stream pieces of the determining corresponding target bit rate of the N number of frame image of whole Section generated time upper continuous video code flow;
Step 408:Video sending end equipment transmits video code flow according to HLS protocol to ustomer premises access equipment;
Step 409:Ustomer premises access equipment receives video code flow.
Using above scheme, the TS code stream pieces of different code checks can be sent from video sending end equipment to ustomer premises access equipment Section, to realize the automatic switchover of the code check during video code flow fragments for transport.For example, video sending end equipment is determining one The activity level of N number of frame image in a GOP periods is higher, then video sending end equipment determined in this GOP periods N number of frame image there is higher target bit rate, and using the TS code streams segment of high code rate as the TS code stream pieces of target bit rate Section;If video sending end equipment is relatively low in the activity level for determining N number of frame image in next GOP periods, video Sending ending equipment determines that N number of frame image in this GOP periods has lower target bit rate, and will be compared with the TS codes of low bit- rate TS code stream segment of the flow section as target bit rate, after determining the frame image in the GOP periods transmitted without other needs, Video sending end equipment generates video code flow according to the two TS code stream segments and is sent to ustomer premises access equipment, for regarding for transmission Frequency code stream is made of the code stream segment of different code checks, is automatically switched to realize the code check in video code flow transmission process, Wherein, the code stream segment of high code check is conducive to user's viewing high-definition video, and the code stream segment of low bit- rate is conducive to save Save customer flow.
Based on same inventive concept, this discovery embodiment additionally provides a kind of device generating video code flow segment, due to The principle that the device solves the problems, such as is similar to the generation method of video code flow segment provided in an embodiment of the present invention, therefore the device Implementation may refer to the implementation of method, overlaps will not be repeated.
As shown in figure 5, a kind of device generating video code flow segment provided in an embodiment of the present invention includes:
Image activity level determining module 501, the image activity level for determining continuous N number of frame image, institute The image change amplitude that image activity level characterizes N number of frame image is stated, N is positive integer;
Target bit rate determining module 502, the target for determining N number of frame image according to described image activity level Code check;
Code stream segment determining module 503, for determining the corresponding code stream with the target bit rate of N number of frame image Segment.
According to apparatus above, it can be determined and be passed according to the image activity level of continuous N number of frame image in one section of video Target bit rate used in defeated this section of video, and determine according to target bit rate the code stream segment of video, due to according to different sections The target bit rate that determines of video may be different, to which the code check of the code stream segment of the video generated is different, according to these differences The video code flow segment of code check generates video code flow and transmits, you can is switched when transmitting video code flow by video sending end equipment The code check of video code flow.
In force, apparatus above can be video sending end equipment, such as video server.Above-mentioned image liveness etc. Grade determining module 501, target bit rate determining module 502 and code stream segment determining module 503 can be in video sending end equipment Different processor, or can be the different function that same processor has.
Optionally, described image activity level determining module 501 is specifically used for:
According to the pixel quantity being had differences between the consecutive frame image in N number of frame image, determine that described image is lived Jerk grade, the consecutive frame image are the continuous frame image of any two in N number of frame image.
Optionally, described image activity level determining module 501 is specifically used for:
Determine the pixel quantity being had differences between consecutive frame image whole in N number of frame image;
Determine the pixel summation for the pixel quantity being had differences between whole consecutive frame images;
Described image activity level is determined according to the pixel summation.
Optionally, described image activity level determining module 501 is additionally operable to:
In the code stream segment to be sent for obtaining the corresponding at least one alternative code check of N number of frame image, and according to described The code stream segment to be sent of any one alternative code check in the code stream segment to be sent of at least one alternative code check determines After N number of frame image, the image activity level of continuous N number of frame image is determined;
The alternative code check include it is following in some or all of:
High code check;
Middle code check;
Low bit- rate.
Optionally, if the alternative code check includes high code check, the target bit rate includes high code check, and the code stream segment is true Cover half block 503 is specifically used for:
N number of frame image of high code check is determined according to the code stream segment to be sent of high code check;
According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, the code stream segment determining module 503 are specifically used for:
N number of frame image of code check in being determined according to the code stream segment to be sent of middle code check;
According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, the code stream segment determining module 503 are specifically used for:
N number of frame image of low bit- rate is determined according to the code stream segment to be sent of low bit- rate;
According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method generating video code flow segment, which is characterized in that this method includes:
Determine that the image activity level of continuous N number of frame image, described image activity level characterize N number of frame image Image change amplitude, N are positive integer;
The target bit rate of N number of frame image is determined according to described image activity level;
Determine the corresponding code stream segment with the target bit rate of N number of frame image.
2. the method as described in claim 1, which is characterized in that determine the image activity level of continuous N number of frame image, packet It includes:
According to the pixel quantity being had differences between the consecutive frame image in N number of frame image, described image liveness is determined Grade, the consecutive frame image are the continuous frame image of any two in N number of frame image.
3. method as claimed in claim 2, which is characterized in that determine described image activity level, including:
Determine the pixel quantity being had differences between consecutive frame image whole in N number of frame image;
Determine the pixel summation for the pixel quantity being had differences between whole consecutive frame images;
Described image activity level is determined according to the pixel summation.
4. the method as described in claim 1, which is characterized in that determine continuous N number of frame image image activity level it Before, further include:
Obtain the code stream segment to be sent of the corresponding at least one alternative code check of N number of frame image;
According to the to be sent of any one alternative code check in the code stream segment to be sent of at least one alternative code check Code stream segment determines N number of frame image;
The alternative code check include it is following in some or all of:
High code check;
Middle code check;
Low bit- rate.
5. method as claimed in claim 4, which is characterized in that if the alternative code check includes high code check, the target bit rate Including high code check, the corresponding code stream segment with the target bit rate of N number of frame image is determined, including:
N number of frame image of high code check is determined according to the code stream segment to be sent of high code check;
According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, determines the corresponding tool of N number of frame image There is the code stream segment of the target bit rate, including:
N number of frame image of code check in being determined according to the code stream segment to be sent of middle code check;
According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, determines the corresponding tool of N number of frame image There is the code stream segment of the target bit rate, including:
N number of frame image of low bit- rate is determined according to the code stream segment to be sent of low bit- rate;
According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
6. a kind of device generating video code flow segment, which is characterized in that the device includes:
Image activity level determining module, the image activity level for determining continuous N number of frame image, described image are lived Jerk grade characterizes the image change amplitude of N number of frame image, and N is positive integer;
Target bit rate determining module, the target bit rate for determining N number of frame image according to described image activity level;
Code stream segment determining module, for determining the corresponding code stream segment with the target bit rate of N number of frame image.
7. device as claimed in claim 6, which is characterized in that described image activity level determining module is specifically used for:
According to the pixel quantity being had differences between the consecutive frame image in N number of frame image, described image liveness is determined Grade, the consecutive frame image are the continuous frame image of any two in N number of frame image.
8. device as claimed in claim 7, which is characterized in that described image activity level determining module is specifically used for:
Determine the pixel quantity being had differences between consecutive frame image whole in N number of frame image;
Determine the pixel summation for the pixel quantity being had differences between whole consecutive frame images;
Described image activity level is determined according to the pixel summation.
9. device as claimed in claim 6, which is characterized in that described image activity level determining module is additionally operable to:
In the code stream segment to be sent for obtaining the corresponding at least one alternative code check of the N number of frame image, and according to it is described at least A kind of code stream segment to be sent of any one alternative code check in the code stream segment to be sent of alternative code check determines the N After a frame image, the image activity level of continuous N number of frame image is determined;
The alternative code check include it is following in some or all of:
High code check;
Middle code check;
Low bit- rate.
10. device as claimed in claim 9, which is characterized in that if the alternative code check includes high code check, the target bit rate Including high code check, the code stream segment determining module is specifically used for:
N number of frame image of high code check is determined according to the code stream segment to be sent of high code check;
According to N number of frame image of the high code check, the code stream segment with high code check is generated;
If the alternative code check includes middle code check, the target bit rate includes middle code check, and the code stream segment determining module is specific For:
N number of frame image of code check in being determined according to the code stream segment to be sent of middle code check;
According to N number of frame image of the middle code check, the code stream segment with middle code check is generated;
If the alternative code check includes low bit- rate, the target bit rate includes low bit- rate, and the code stream segment determining module is specific For:
N number of frame image of low bit- rate is determined according to the code stream segment to be sent of low bit- rate;
According to N number of frame image of the low bit- rate, the code stream segment with low bit- rate is generated.
CN201810502959.3A 2018-05-23 2018-05-23 A kind of method and apparatus generating video code flow segment Pending CN108737862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810502959.3A CN108737862A (en) 2018-05-23 2018-05-23 A kind of method and apparatus generating video code flow segment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810502959.3A CN108737862A (en) 2018-05-23 2018-05-23 A kind of method and apparatus generating video code flow segment

Publications (1)

Publication Number Publication Date
CN108737862A true CN108737862A (en) 2018-11-02

Family

ID=63935030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810502959.3A Pending CN108737862A (en) 2018-05-23 2018-05-23 A kind of method and apparatus generating video code flow segment

Country Status (1)

Country Link
CN (1) CN108737862A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933517A (en) * 2019-11-30 2020-03-27 咪咕视讯科技有限公司 Code rate switching method, client and computer readable storage medium
CN112312231A (en) * 2019-07-31 2021-02-02 北京金山云网络技术有限公司 Video image coding method and device, electronic equipment and medium
CN113382241A (en) * 2021-06-08 2021-09-10 北京奇艺世纪科技有限公司 Video encoding method, video encoding device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070153692A1 (en) * 2005-12-29 2007-07-05 Xudong Song Methods and apparatuses for performing scene adaptive rate control
CN102196267A (en) * 2011-05-05 2011-09-21 北京邮电大学 Video coding method and equipment for three-dimensional wavelet video coding
CN102625106A (en) * 2012-03-28 2012-08-01 上海交通大学 Scene self-adaptive screen encoding rate control method and system
CN104244009A (en) * 2014-08-26 2014-12-24 南京邮电大学 Method for controlling code rate in distributed video coding
CN104980819A (en) * 2015-06-26 2015-10-14 安徽四创电子股份有限公司 Video transmission method and device
CN105306960A (en) * 2015-10-18 2016-02-03 北京航空航天大学 Dynamic adaptive stream system for transmitting high-quality online course videos
CN105812710A (en) * 2016-05-05 2016-07-27 广东小天才科技有限公司 Method and system for optimizing image quality in video call process
CN106101766A (en) * 2016-07-11 2016-11-09 乐视控股(北京)有限公司 The control method for playing back of a kind of video ads, device and electronic equipment
CN106534211A (en) * 2016-12-29 2017-03-22 四川九洲电器集团有限责任公司 Data transmission method and electronic equipment
CN107635115A (en) * 2017-10-09 2018-01-26 深圳市天视通电子科技有限公司 A kind of method, storage medium and electronic equipment for realizing ultralow code check
CN107666611A (en) * 2017-09-13 2018-02-06 维沃移动通信有限公司 A kind of bit rate control method and mobile terminal
CN108024125A (en) * 2017-11-03 2018-05-11 青岛海信电器股份有限公司 A kind of audio, video data playback method and server and client side

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070153692A1 (en) * 2005-12-29 2007-07-05 Xudong Song Methods and apparatuses for performing scene adaptive rate control
CN102196267A (en) * 2011-05-05 2011-09-21 北京邮电大学 Video coding method and equipment for three-dimensional wavelet video coding
CN102625106A (en) * 2012-03-28 2012-08-01 上海交通大学 Scene self-adaptive screen encoding rate control method and system
CN104244009A (en) * 2014-08-26 2014-12-24 南京邮电大学 Method for controlling code rate in distributed video coding
CN104980819A (en) * 2015-06-26 2015-10-14 安徽四创电子股份有限公司 Video transmission method and device
CN105306960A (en) * 2015-10-18 2016-02-03 北京航空航天大学 Dynamic adaptive stream system for transmitting high-quality online course videos
CN105812710A (en) * 2016-05-05 2016-07-27 广东小天才科技有限公司 Method and system for optimizing image quality in video call process
CN106101766A (en) * 2016-07-11 2016-11-09 乐视控股(北京)有限公司 The control method for playing back of a kind of video ads, device and electronic equipment
CN106534211A (en) * 2016-12-29 2017-03-22 四川九洲电器集团有限责任公司 Data transmission method and electronic equipment
CN107666611A (en) * 2017-09-13 2018-02-06 维沃移动通信有限公司 A kind of bit rate control method and mobile terminal
CN107635115A (en) * 2017-10-09 2018-01-26 深圳市天视通电子科技有限公司 A kind of method, storage medium and electronic equipment for realizing ultralow code check
CN108024125A (en) * 2017-11-03 2018-05-11 青岛海信电器股份有限公司 A kind of audio, video data playback method and server and client side

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312231A (en) * 2019-07-31 2021-02-02 北京金山云网络技术有限公司 Video image coding method and device, electronic equipment and medium
CN112312231B (en) * 2019-07-31 2022-09-02 北京金山云网络技术有限公司 Video image coding method and device, electronic equipment and medium
CN110933517A (en) * 2019-11-30 2020-03-27 咪咕视讯科技有限公司 Code rate switching method, client and computer readable storage medium
CN110933517B (en) * 2019-11-30 2022-04-29 咪咕视讯科技有限公司 Code rate switching method, client and computer readable storage medium
CN113382241A (en) * 2021-06-08 2021-09-10 北京奇艺世纪科技有限公司 Video encoding method, video encoding device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103517137B (en) Network video transmission method and system, transmission/receiving terminal treating method and apparatus
Seeling et al. Network performance evaluation using frame size and quality traces of single-layer and two-layer video: A tutorial
US8441517B2 (en) Data processing apparatus and method, and network system
CN101072341B (en) Sending device and method, receiving device and method, sending and receiving system
US8510458B2 (en) Method and device for sharing bandwidth of a communication network
CN104125429B (en) The adjusting method and device of video data transmission
CN108737862A (en) A kind of method and apparatus generating video code flow segment
KR100731711B1 (en) Dynamic image receiver and dynamic image transmitter
CN101330436B (en) Method and device for transmitting adjustable multicast multimedia service data
CN102202210B (en) Method for mobile phone to play real-time monitoring video and mobile phone to play real-time monitoring video
US9516264B2 (en) Methods, devices, and systems for controlling audio and video transmission channel
CN102136962A (en) Method, relative device and system for delimiting quality problems
EP2649794B1 (en) Method and apparatus for managing content distribution over multiple terminal devices in collaborative media system
US8498331B2 (en) Motion picture receiving device, motion picture transmitting device, motion picture decoding method, and motion picture encoding method
CN103929682B (en) Method and device for setting key frames in video live broadcast system
Vassiliou et al. Requirements for the transmission of streaming video in mobile wireless networks
CN110460801A (en) The method and device of data forwarding between a kind of media server
KR20030026109A (en) Apparatus and Method for transmiting multimedia data to adapt channel condition
CN103795774A (en) Method for downloading content according to communication parameters, and associated content receiver
CN108476333A (en) The adjacent streaming of Media Stream
CN101909194B (en) Method and system for providing channel switching service and channel switching server
KR20050115226A (en) Transmission control device and method, recording medium, and program
CN106998328B (en) Video transmission method and device
Nguyen et al. A QoS-adaptive framework for screen sharing over Internet
CN116962613A (en) Data transmission method and device, computer equipment 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181102