CN109218798A - A kind of live streaming barrage color setting method and device - Google Patents

A kind of live streaming barrage color setting method and device Download PDF

Info

Publication number
CN109218798A
CN109218798A CN201710527912.8A CN201710527912A CN109218798A CN 109218798 A CN109218798 A CN 109218798A CN 201710527912 A CN201710527912 A CN 201710527912A CN 109218798 A CN109218798 A CN 109218798A
Authority
CN
China
Prior art keywords
barrage
video frame
video
pixels
frame
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
CN201710527912.8A
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710527912.8A priority Critical patent/CN109218798A/en
Publication of CN109218798A publication Critical patent/CN109218798A/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/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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by 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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • 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/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a kind of live streaming barrage color setting method and devices, by the barrage size and barrage motion profile that obtain target video barrage;When live video switches to current video frame from a upper video frame, target video barrage display area shared in current video frame is determined according to barrage size and barrage motion profile, using block of pixels corresponding with display area in current video frame as the blocks of background pixels of target video barrage;Calculate the barrage color value for meeting presetted pixel difference condition with blocks of background pixels;Target video barrage is drawn according to barrage motion profile and barrage color, to show barrage content in current video frame.To ensure that display effect of the barrage effect on video is stablized.

Description

A kind of live streaming barrage color setting method and device
Technical field
The present invention relates to network direct broadcasting field more particularly to a kind of live streaming barrage color setting method and devices.
Background technique
Currently, network direct broadcasting is to carry out net cast using internet and stream media technology.In order to increase main broadcaster and spectators Between interactivity, can with barrage effect show present and with barrage effect show spectators, main broadcaster speech.The face of barrage The user that color can initiate barrage is configured, to show the barrage effect of different colours on video.
But when playing video and barrage, when the barrage color of user setting is close with vedio color and then unknown Aobvious, therefore, display effect of the barrage effect on video is unstable in the prior art.
Summary of the invention
The embodiment of the present invention solves the prior art and is hit by a bullet by providing a kind of live streaming barrage color setting method and device The unstable technical problem of display effect of the curtain effect on video.
In a first aspect, the embodiment of the invention provides a kind of live streaming barrage color setting methods to include:
Obtain the barrage information and barrage motion profile of target video barrage, wherein the barrage information includes barrage ruler Very little and barrage content;
When live video switches to current video frame from a upper video frame, transported according to the barrage size and the barrage Dynamic rail mark determines target video barrage display area shared in the current video frame, wherein described to work as forward sight Frequency frame is the video frame that the live video is in display state in playing process;
Back by block of pixels corresponding with the display area in the current video frame, as the target video barrage Scape block of pixels;
Calculate the barrage color value for meeting presetted pixel difference condition with the blocks of background pixels;
The target video barrage is drawn according to the barrage motion profile and the barrage color value, described current The barrage content is shown in video frame.
Optionally, described to be regarded using block of pixels corresponding with the display area in the current video frame as the target The blocks of background pixels of frequency barrage, comprising:
The current video frame of the live video is carried out 1/4 to reduce, to form new video frame;
Block of pixels corresponding with the display area in the new video frame is determined as the target video barrage Blocks of background pixels.
Optionally, the current video frame by the live video carries out 1/4 diminution, to form new video frame, packet It includes:
The pixel data of the current video frame is divided into M 2*2 block of pixels, M is positive integer;
The pixel data of single pixel block is taken, respectively to each 2*2 block of pixels in the M 2*2 block of pixels to obtain M A pixel data;
The M pixel data group is synthesized, to form the new video frame.
Optionally, before the barrage information for obtaining target video barrage and barrage motion profile, further includes:
Obtain the frame per second of the live video;
Traversal time identical with the numerical value of the frame per second of live video interval is set;
Judge whether the live video from a upper video frame switches to described work as according to the traversal time interval Preceding video frame.
Optionally, described to calculate the barrage color value for meeting presetted pixel difference condition with the blocks of background pixels, packet It includes:
Calculate the R component value average value of all pixels point in the blocks of background pixels, all pictures in the blocks of background pixels The B component value average value of all pixels point in the G component value average value of vegetarian refreshments and the blocks of background pixels;
It is flat based on the R component value average value, the G component value average value and B component value average value synthesis barrage background Mean value;
Barrage average background value progress binary system is negated, result is negated and is set as the barrage color value.
Optionally, described to determine that the target video barrage exists according to the barrage size and the barrage motion profile Shared display area in the current video frame, comprising:
The display length and font height of the target video barrage are obtained from the barrage size;
Track starting point of the target video barrage in the current video frame is determined according to the barrage motion profile And final on trajectory;
Display length and font height based on the target video barrage, the track starting point in the current video frame And final on trajectory, target video barrage display area shared in the current video frame is calculated jointly.
Second aspect, the embodiment of the invention provides a kind of live streaming barrage colors, and device is arranged, comprising:
Barrage information acquisition unit, for obtaining the barrage information and barrage motion profile of target video barrage, wherein institute Stating barrage information includes barrage size and barrage content;
Display area determination unit, for when live video switches to current video frame from a upper video frame, according to institute It states barrage size and the barrage motion profile is determined that the target video barrage is shared in the current video frame and shown Show region, wherein the current video frame is the video frame that the live video is in display state in playing process;
Background determination unit is used for block of pixels corresponding with the display area in the current video frame as described in The blocks of background pixels of target video barrage;
Barrage color computing unit, for calculating the barrage for meeting presetted pixel difference condition with the blocks of background pixels Color value;
Barrage display unit, for drawing the target video according to the barrage motion profile and the barrage color value Barrage, to show the barrage content in the current video frame.
Optionally, described device further include:
Frame per second acquiring unit, for obtaining the frame per second of the live video;
Traversal time setting unit, for being arranged between the identical traversal time of the numerical value of the frame per second of the live video Every;
Video frame switching judging unit, for judging the live video whether from described according to the traversal time interval A upper video frame switches to the current video frame.
Optionally, the background determination unit, comprising:
Processing subelement is reduced, is reduced for the current video frame of the live video to be carried out 1/4, to form new view Frequency frame;
Blocks of background pixels determines subelement, for by block of pixels corresponding with the display area in the new video frame It is determined as the blocks of background pixels of the target video barrage.
Optionally, the diminution handles subelement, is specifically used for:
The pixel data of the current video frame is divided into M 2*2 block of pixels, M is positive integer;
The pixel data of single pixel block is taken, respectively to each 2*2 block of pixels in the M 2*2 block of pixels to obtain M A pixel data;
The M pixel data group is synthesized, to form the new video frame.
Optionally, the barrage color computing unit, comprising:
Calculate the R component value average value of all pixels point in the blocks of background pixels, all pictures in the blocks of background pixels The B component value average value of all pixels point in the G component value average value of vegetarian refreshments and the blocks of background pixels;
It is flat based on the R component value average value, the G component value average value and B component value average value synthesis barrage background Mean value;
Barrage average background value progress binary system is negated, result is negated and is set as the barrage color value.
Optionally, the display area determination unit, is specifically used for:
The display length and font height of the target video barrage are obtained from the barrage size;
Track starting point of the target video barrage in the current video frame is determined according to the barrage motion profile And final on trajectory;
Display length and font height based on the target video barrage, the track starting point in the current video frame And final on trajectory, target video barrage display area shared in the current video frame is calculated jointly.
The third aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes step described in first aspect any embodiment when the program is executed by processor.
Fourth aspect the embodiment of the invention provides a kind of computer equipment, including memory, processor and is stored in On reservoir and the computer program that can run on a processor, the processor is realized in first aspect when executing described program appoints Step described in one embodiment.
The one or more technical solutions provided in the embodiment of the present invention, have at least the following technical effects or advantages:
By the barrage size and barrage motion profile that obtain target video barrage;It is cut in live video from a upper video frame When shifting to current video frame, target video barrage institute in current video frame is determined according to barrage size and barrage motion profile The display area accounted for, using block of pixels corresponding with display area in current video frame as the background pixel of target video barrage Block;Calculate the barrage color value for meeting presetted pixel difference condition with blocks of background pixels;According to barrage motion profile and barrage Color draws target video barrage, to show barrage content in current video frame.So as to the switching to video frame is followed And change the barrage color of target video barrage, and present a contrast with the color for being presently in video frame, so, it remains There are enough color differences with video frame is presently in, so that target video barrage can be clearly presented always, and then guarantees The display effect of barrage effect on video is stablized.
Detailed description of the invention
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 described, it should be apparent that, drawings in the following description are some embodiments of the invention, for this For the those of ordinary skill of field, without creative efforts, it can also be obtained according to these attached drawings others Attached drawing.
Fig. 1 is the flow chart of live streaming barrage color setting method provided in an embodiment of the present invention;
Fig. 2 is the structural schematic diagram of live streaming barrage color setting method provided in an embodiment of the present invention;
Fig. 3 is the structural schematic diagram of computer readable storage medium provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the present invention solves the prior art and is hit by a bullet by providing a kind of live streaming barrage color setting method and device The unstable technical problem of display effect of the curtain effect on video.
In order to solve the above-mentioned technical problem, technical solution provided in an embodiment of the present invention, general thought are as follows:
Obtain the barrage size and barrage motion profile of target video barrage;It is switched in live video from a upper video frame When current video frame, determine that target video barrage is shared in current video frame according to barrage size and barrage motion profile Display area, using block of pixels corresponding with display area in current video frame as the blocks of background pixels of target video barrage;Meter Calculate barrage color of the barrage color value as target video barrage for meeting presetted pixel difference condition with blocks of background pixels;Root Target video barrage is drawn according to barrage motion profile and barrage color, to show barrage content in current video frame.
Through the above technical solutions, the switching of video frame can be followed and change the barrage color of target video barrage, and And barrage color presents a contrast with the color for being presently in video frame, so, it remains barrage color and is presently in video Frame has enough color differences, so that target video barrage can be clearly presented always, ensure that barrage effect on video Display effect stablize.
In order to better understand the above technical scheme, in conjunction with appended figures and specific embodiments to upper Technical solution is stated to be described in detail.
A kind of live streaming barrage color setting method provided in an embodiment of the present invention is applied to Web, wireless client.For For wireless client, it can be applied to the wireless client of iOS system, also can be applied to the wireless visitor of android system Family end.
Refering to what is shown in Fig. 1, live streaming barrage color setting method provided in an embodiment of the present invention includes the following steps:
It executes S101: obtaining the barrage information of target video barrage and the barrage motion profile of target video barrage, wherein Barrage information includes barrage size and barrage content.
In the specific implementation process, the barrage information of target video barrage is obtained from barrage server by network module. The barrage motion profile of target video barrage is to be laid out to be arranged according to current barrage, is specifically configured to the bullet of other video barrages The barrage motion profile that curtain motion profile is not overlapped.
It should be noted that the target video barrage in the present embodiment can be present special efficacy barrage, or speech Barrage.
S102: when live video switches to current video frame from a upper video frame, according to the barrage of target video barrage Size and barrage motion profile determine target video barrage display area shared in current video frame, wherein work as forward sight Frequency frame is the video frame that live video is in display state in playing process.
In one embodiment, S102 includes the following steps that S1021~S10213 determines display area:
Step S1021: the display length and font height of target video barrage are obtained from barrage size.
Step S1022: according to barrage motion profile determine track starting point of the target video barrage in current video frame and Final on trajectory.
It should be noted that step S1021 and S1022 can be the step of independently executing, or successively successively It executes.
After step S1021 and step S1022 have been performed both by, step S1023 is executed: aobvious based on target video barrage Show length and font height, the track starting point in current video frame and final on trajectory, calculates target video barrage jointly and exist Shared display area in current video frame.
In one embodiment, since there is setting barrage motion profile in front, target video is determined according to barrage motion profile Coordinate information of the barrage in current video frame;Will be centered on coordinate information, the display length and font of target video barrage Height is that the region on boundary is determined as target video barrage display area shared in current video.
In one embodiment, further include following steps before executing S101: obtaining the frame per second of live video;Setting with The identical traversal time interval of the numerical value of the frame per second of live video;Judge live video whether from upper one according to traversal time interval Video frame switches to current video frame.
Determine that live video plays the time interval of each frame by frame per second, then traversal time interval is specially every to play The time interval of one frame is looped through, to keep the switching of video frame and calculate the barrage color of target video barrage It is synchronous, after the switching of each video frame, the barrage of each target video barrage is recalculated according to the video frame after switching Color, to keep video frame synchronous with the calculating of barrage color, and then barrage color follows the switching of video frame and dynamically changes To having enough colour contrasts with shown video frame, to persistently highlight in barrage.
S103: using block of pixels corresponding with display area in current video frame as the background pixel of target video barrage Block.
In one embodiment, S103 specifically comprises the following steps that S1031~S1032 determines blocks of background pixels:
Firstly, executing step S1031: the current video frame of live video being carried out 1/4 and is reduced, to form new video Frame.
Specifically, the pixel data of current video frame is divided into M 2*2 block of pixels, M is positive integer.It is divided into 2*2 block of pixels is specially the block of pixels of a length of 2 pixels, a height of 2 pixels.To each 2*2 pixel in M 2*2 block of pixels Block takes the single pixel data of block of pixels respectively, to obtain M pixel data;M pixel data group is synthesized, to be formed New video frame.
Top left corner pixel data can be taken simultaneously to each 2*2 block of pixels in M 2*2 block of pixels, or take a left side simultaneously Inferior horn pixel data perhaps takes upper right corner pixel data simultaneously or takes lower right corner pixel data simultaneously.The new video of composition The unit pixel height of frame is the 1/2 of the unit pixel height of original video frame (current video frame), the unit picture of new video frame Plain length is the 1/2 of the unit pixel length of original video frame, so that new video frame is compared with the data volume of current video frame, newly The data volume of video frame is reduced to the 1/4 of the data volume of current video frame, so that data calculation amount is reduced, so that calculating barrage Pixel color becomes smaller.
Step S1032, block of pixels corresponding with display area in new video frame is determined as to the back of target video barrage Scape block of pixels.
S104: the barrage color value for meeting presetted pixel difference condition with blocks of background pixels is calculated.
In order to calculate the barrage color value for meeting presetted pixel difference condition with blocks of background pixels, in one embodiment, Calculated barrage color value is the color average of blocks of background pixels on the contrary, realizing especially by the mode of being implemented as follows:
Step S1041: the R component value average value of all pixels point in blocks of background pixels is calculated.
Specifically, R component value is extracted to all pixels point in blocks of background pixels, then, by all R components of extraction Value carries out read group total, to calculate R component value summation, R component value summation is total divided by the pixel of blocks of background pixels It arrives, to obtain original R component value average value, if calculated original R component value average value is greater than 255, R component value is average Value takes 255;If calculated original R component value average value is less than 0, R component value average value takes 0;Otherwise R component value is average Value selects original R component value average value.
Step S1042: the G component value average value of all pixels point in blocks of background pixels is calculated.
Specifically, G component value is extracted to all pixels point in blocks of background pixels, then, by all G components of extraction Value carries out read group total, to calculate G component value summation, G component value summation is total divided by the pixel of blocks of background pixels It arrives, to obtain original R component value average value, if calculated original G component value average value is average greater than 255, G component value Value takes 255;If calculated original R component value average value takes 0 less than 0, G component value average value;Otherwise G component value is average Value selects original G component value average value.
Step S1043: the B component value average value of all pixels point in blocks of background pixels is calculated.
B component value is extracted to all pixels point in blocks of background pixels, then, all B component values of extraction are asked And calculating is obtained B component value summation, divided by the pixel sum of blocks of background pixels with calculating B component value summation to obtain Original R component value average value, if calculated original B component value average value is greater than 255, B component value average value takes 255; If calculated original B component value average value is less than 0, B component value average value takes 0;Otherwise the selection of B component value average value is former Beginning B component value average value.
It should be noted that in the specific implementation process, step S1041~S1043 can be the step of independently executing, The successive execution of random order can be divided.
After step S1041~S1043 has been performed both by, step S1044 is executed: being based on R component value average value, G component It is worth average value and B component value average value synthesizes barrage average background value.
After step S1044, barrage average background value progress binary system is negated, result is negated and is set as barrage color Value.
For example, white carries out binary system to negate is black, red carry out binary system and negate be it is light blue, by a large amount of Experiments have shown that be that background and barrage contrast are bigger by the anti-color that barrage color is arranged to background color tone, it is aobvious more to highlight barrage Show effect.
S105: target video is drawn in the current video frame of live video according to barrage motion profile and barrage color value Barrage, to show barrage content in current video frame.
Based on the same inventive concept, the embodiment of the invention provides a kind of live streaming barrage colors, and device is arranged, with reference to Fig. 2 institute Show, live streaming barrage color setting device provided in this embodiment includes:
Barrage information acquisition unit 201, for obtaining the barrage information and barrage motion profile of target video barrage, In, the barrage information includes barrage size and barrage content;
Display area determination unit 202, for when live video switches to current video frame from a upper video frame, according to The barrage size and the barrage motion profile determine that the target video barrage is shared in the current video frame Display area, wherein the current video frame is the video frame that the live video is in display state in playing process;
Background determination unit 203, for using block of pixels corresponding with the display area in the current video frame as The blocks of background pixels of the target video barrage;
Barrage color computing unit 204 meets presetted pixel difference condition with the blocks of background pixels for calculating Barrage color value;
Barrage display unit 205, for drawing the target according to the barrage motion profile and the barrage color value Video barrage, to show the barrage content in the current video frame.
Optionally, described device further include:
Frame per second acquiring unit, for obtaining the frame per second of the live video;
Traversal time setting unit, for being arranged between the identical traversal time of the numerical value of the frame per second of the live video Every;
Video frame switching judging unit, for judging the live video whether from described according to the traversal time interval A upper video frame switches to the current video frame.
Optionally, the background determination unit 203, comprising:
Processing subelement is reduced, is reduced for the current video frame of the live video to be carried out 1/4, to form new view Frequency frame;
Blocks of background pixels determines subelement, for by block of pixels corresponding with the display area in the new video frame It is determined as the blocks of background pixels of the target video barrage.
Optionally, the diminution handles subelement, is specifically used for:
The pixel data of the current video frame is divided into M 2*2 block of pixels, M is positive integer;
The pixel data of single pixel block is taken, respectively to each 2*2 block of pixels in the M 2*2 block of pixels to obtain M A pixel data;
The M pixel data group is synthesized, to form the new video frame.
Optionally, the barrage color computing unit 204, comprising:
Calculate the R component value average value of all pixels point in the blocks of background pixels, all pictures in the blocks of background pixels The B component value average value of all pixels point in the G component value average value of vegetarian refreshments and the blocks of background pixels;
It is flat based on the R component value average value, the G component value average value and B component value average value synthesis barrage background Mean value;
Barrage average background value progress binary system is negated, result is negated and is set as the barrage color value.
Optionally, the display area determination unit 202, is specifically used for:
The display length and font height of the target video barrage are obtained from the barrage size;
Track starting point of the target video barrage in the current video frame is determined according to the barrage motion profile And final on trajectory;
Display length and font height based on the target video barrage, the track starting point in the current video frame And final on trajectory, target video barrage display area shared in the current video frame is calculated jointly.
Based on the same inventive concept, the embodiment of the invention provides a kind of computer readable storage mediums 301, with reference to Fig. 3 It is shown, it is stored thereon with computer program 302, which realizes aforementioned live streaming barrage color setting when being executed by processor Step in any of method embodiment.
Based on the same inventive concept, the embodiment of the invention provides a kind of computer equipments 400, refering to what is shown in Fig. 4, including Memory 410, processor 430 and it is stored in the computer program 420 that can be run on memory 410 and on processor 430, institute State the step realized in any of aforementioned live streaming barrage color setting method embodiment when processor 430 executes described program 420 Suddenly.
Since above-mentioned introduced device, storage medium and computer equipment are to implement aforementioned live streaming in the embodiment of the present invention Barrage color setting method is used, so based on live streaming barrage color setting method described in the embodiment of the present invention, this Those skilled in the art can understand the specific embodiment and its various change of device, storage medium and computer equipment Form, so how to realize the live streaming barrage face in the embodiment of the present invention for device, storage medium and computer equipment at this Color setting method is no longer discussed in detail.As long as those skilled in the art implement the live streaming barrage color in the embodiment of the present invention Device, storage medium used by setting method and computer equipment belong to the range of the invention to be protected.
Technical solution in above-described embodiment, at least have the following technical effects or advantages:
By the barrage size and barrage motion profile that obtain target video barrage;It is cut in live video from a upper video frame When shifting to current video frame, target video barrage institute in current video frame is determined according to barrage size and barrage motion profile The display area accounted for, using block of pixels corresponding with display area in current video frame as the background pixel of target video barrage Block;Calculate the barrage color value for meeting presetted pixel difference condition with blocks of background pixels;According to barrage motion profile and barrage Color draws target video barrage, to show barrage content in current video frame.So as to following the switching of video frame and Change the barrage color of target video barrage, and barrage color presents a contrast with the color for being presently in video frame, so, begin Barrage color is kept eventually and is presently in video frame and there are enough color differences, so that target video barrage always can be clear It presents, ensure that display effect of the barrage effect on video is stablized.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind 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 live streaming barrage color setting method characterized by comprising
Obtain target video barrage barrage information and barrage motion profile, wherein the barrage information include barrage size and Barrage content;
When live video switches to current video frame from a upper video frame, rail is moved according to the barrage size and the barrage Mark determines target video barrage display area shared in the current video frame, wherein the current video frame The video frame of display state is in playing process for the live video;
Using block of pixels corresponding with the display area in the current video frame as the background picture of the target video barrage Plain block;
Calculate the barrage color value for meeting presetted pixel difference condition with the blocks of background pixels;
The target video barrage is drawn according to the barrage motion profile and the barrage color value, in the current video The barrage content is shown in frame.
2. as described in claim 1 live streaming barrage color setting method, which is characterized in that it is described will be in the current video frame Blocks of background pixels of the block of pixels corresponding with the display area as the target video barrage, comprising:
The current video frame of the live video is carried out 1/4 to reduce, to form new video frame;
Block of pixels corresponding with the display area in the new video frame is determined as to the background of the target video barrage Block of pixels.
3. live streaming barrage color setting method as claimed in claim 2, which is characterized in that the working as the live video Preceding video frame carries out 1/4 and reduces, to form new video frame, comprising:
The pixel data of the current video frame is divided into M 2*2 block of pixels, M is positive integer;
The pixel data of single pixel block is taken, respectively to each 2*2 block of pixels in the M 2*2 block of pixels to obtain M picture Prime number evidence;
The M pixel data group is synthesized, to form the new video frame.
4. such as live streaming barrage color setting method as claimed in any one of claims 1-3, which is characterized in that in the acquisition target Before the barrage information and barrage motion profile of video barrage, further includes:
Obtain the frame per second of the live video;
Traversal time identical with the numerical value of the frame per second of live video interval is set;
Judge whether the live video switches to from a upper video frame according to the traversal time interval and described works as forward sight Frequency frame.
5. live streaming barrage color setting method as described in claim 1, which is characterized in that described to calculate and the background picture Plain block meets the barrage color value of presetted pixel difference condition, comprising:
Calculate the R component value average value of all pixels point in the blocks of background pixels, all pixels point in the blocks of background pixels G component value average value and the blocks of background pixels in all pixels point B component value average value;
Barrage average background value is synthesized based on the R component value average value, the G component value average value and B component value average value;
Barrage average background value progress binary system is negated, result is negated and is set as the barrage color value.
6. live streaming barrage color setting method as described in claim 1, which is characterized in that it is described according to the barrage size and The barrage motion profile determines target video barrage display area shared in the current video frame, comprising:
The display length and font height of the target video barrage are obtained from the barrage size;
Track starting point and rail of the target video barrage in the current video frame are determined according to the barrage motion profile Mark terminal;
Display length and font height based on the target video barrage, the track starting point in the current video frame and rail Mark terminal calculates target video barrage display area shared in the current video frame jointly.
7. device is arranged in a kind of live streaming barrage color characterized by comprising
Barrage information acquisition unit, for obtaining the barrage information and barrage motion profile of target video barrage, wherein the bullet Curtain information includes barrage size and barrage content;
Display area determination unit, for when live video switches to current video frame from a upper video frame, according to the bullet Curtain size and the barrage motion profile determine target video barrage viewing area shared in the current video frame Domain, wherein the current video frame is the video frame that the live video is in display state in playing process;
Background determination unit, for using block of pixels corresponding with the display area in the current video frame as the target The blocks of background pixels of video barrage;
Barrage color computing unit, for calculating the barrage color for meeting presetted pixel difference condition with the blocks of background pixels Value;
Barrage display unit, for drawing the target video bullet according to the barrage motion profile and the barrage color value Curtain, to show the barrage content in the current video frame.
8. device is arranged in live streaming barrage color as claimed in claim 7, which is characterized in that described device further include:
Frame per second acquiring unit, for obtaining the frame per second of the live video;
Traversal time setting unit, for traversal time identical with the numerical value of the frame per second of live video interval to be arranged;
Video frame switching judging unit, for judging the live video whether from described upper one according to the traversal time interval Video frame switches to the current video frame.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor Step of any of claims 1-6 is realized when row.
10. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes step of any of claims 1-6 when executing described program Suddenly.
CN201710527912.8A 2017-06-30 2017-06-30 A kind of live streaming barrage color setting method and device Pending CN109218798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710527912.8A CN109218798A (en) 2017-06-30 2017-06-30 A kind of live streaming barrage color setting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710527912.8A CN109218798A (en) 2017-06-30 2017-06-30 A kind of live streaming barrage color setting method and device

Publications (1)

Publication Number Publication Date
CN109218798A true CN109218798A (en) 2019-01-15

Family

ID=64991685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710527912.8A Pending CN109218798A (en) 2017-06-30 2017-06-30 A kind of live streaming barrage color setting method and device

Country Status (1)

Country Link
CN (1) CN109218798A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111596834A (en) * 2019-09-06 2020-08-28 吴春光 Video playing APP control platform
CN111614993A (en) * 2020-04-30 2020-09-01 腾讯科技(深圳)有限公司 Barrage display method and device, computer equipment and storage medium
CN111722891A (en) * 2019-03-19 2020-09-29 腾讯科技(深圳)有限公司 Display method, display device, computer-readable storage medium and computer equipment
CN113542843A (en) * 2021-07-19 2021-10-22 北京奇艺世纪科技有限公司 Target bullet screen display method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663676A (en) * 2012-03-31 2012-09-12 深圳市万兴软件有限公司 Image zooming method and system thereof
CN104575553A (en) * 2014-12-19 2015-04-29 百度时代网络技术(北京)有限公司 Method and device for generating barrage overlaid on playing object
US9148630B2 (en) * 2008-09-12 2015-09-29 At&T Intellectual Property I, L.P. Moderated interactive media sessions
CN105100927A (en) * 2015-08-07 2015-11-25 广州酷狗计算机科技有限公司 Bullet screen display method and device
CN105812888A (en) * 2016-03-31 2016-07-27 北京奇艺世纪科技有限公司 Character display method and device
US20160366466A1 (en) * 2014-07-07 2016-12-15 Le Holdings(Beijing)Co., Ltd. Method for displaying bullet screen of video, and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9148630B2 (en) * 2008-09-12 2015-09-29 At&T Intellectual Property I, L.P. Moderated interactive media sessions
CN102663676A (en) * 2012-03-31 2012-09-12 深圳市万兴软件有限公司 Image zooming method and system thereof
US20160366466A1 (en) * 2014-07-07 2016-12-15 Le Holdings(Beijing)Co., Ltd. Method for displaying bullet screen of video, and electronic device
CN104575553A (en) * 2014-12-19 2015-04-29 百度时代网络技术(北京)有限公司 Method and device for generating barrage overlaid on playing object
CN105100927A (en) * 2015-08-07 2015-11-25 广州酷狗计算机科技有限公司 Bullet screen display method and device
CN105812888A (en) * 2016-03-31 2016-07-27 北京奇艺世纪科技有限公司 Character display method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
孟琭: "《计算机视觉原理与应用》", 30 November 2012 *
残月飞雪 转载: "图像的上采样与下采样", 《HTTPS://BLOG.CSDN.NET/MAJINLEI121/ARTICLE/DETAILS/46742339》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111722891A (en) * 2019-03-19 2020-09-29 腾讯科技(深圳)有限公司 Display method, display device, computer-readable storage medium and computer equipment
CN111722891B (en) * 2019-03-19 2024-05-28 腾讯科技(深圳)有限公司 Display method, display device, computer-readable storage medium, and computer apparatus
CN111596834A (en) * 2019-09-06 2020-08-28 吴春光 Video playing APP control platform
CN111614993A (en) * 2020-04-30 2020-09-01 腾讯科技(深圳)有限公司 Barrage display method and device, computer equipment and storage medium
CN111614993B (en) * 2020-04-30 2021-05-25 腾讯科技(深圳)有限公司 Barrage display method and device, computer equipment and storage medium
CN113542843A (en) * 2021-07-19 2021-10-22 北京奇艺世纪科技有限公司 Target bullet screen display method and device, electronic equipment and storage medium
CN113542843B (en) * 2021-07-19 2022-09-30 北京奇艺世纪科技有限公司 Target bullet screen display method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109218798A (en) A kind of live streaming barrage color setting method and device
CN112585978B (en) Generating a composite video stream for display in VR
US8488869B2 (en) Image processing method and apparatus
US20150350594A1 (en) Methods, apparatuses and computer programs for adapting content
US10404963B1 (en) System for processing 2D content for 3D viewing
CN108495152A (en) A kind of net cast method, apparatus, electronic equipment and medium
CN109168084A (en) A kind of method and apparatus of video clipping
CN107801093B (en) Video rendering method and device, computer equipment and readable storage medium
KR20140030111A (en) Pseudo-3d forced perspective methods and devices
CN110087128A (en) Living broadcast interactive method, living broadcast interactive device and live streaming equipment
CN104010179B (en) Multi-user clustering and viewpoint calculating system and method based on multiple three-dimensional pictures
CN109218754A (en) Information display method, device, equipment and medium in a kind of live streaming
CN108769824A (en) A kind of video mixed flow method, apparatus, system, equipment and medium
CN108307197A (en) Transmission method, playback method and the device and system of virtual reality video data
CN103927722A (en) Implementation method and device for augmented reality
CN110022499A (en) A kind of live streaming barrage color setting method and device
CN105578172B (en) Bore hole 3D image display methods based on Unity3D engines
CN103581652A (en) Multi-view stereoscopic video data processing method and device
CN104683781A (en) Video play processing method and video play processing device
CN110213640B (en) Virtual article generation method, device and equipment
CN106231397B (en) Main broadcaster's class interaction platform main broadcaster end method for changing scenes and its device, Zhu Boduan
CN112262570B (en) Method and computer system for automatically modifying high resolution video data in real time
CN110139128A (en) A kind of information processing method, blocker, electronic equipment and storage medium
CN108184101B (en) Apparatus and method for processing video
CN111097169B (en) Game image processing method, device, 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: 20190115