CN106254922B - Preload the method and system for playing barrage - Google Patents

Preload the method and system for playing barrage Download PDF

Info

Publication number
CN106254922B
CN106254922B CN201610644446.7A CN201610644446A CN106254922B CN 106254922 B CN106254922 B CN 106254922B CN 201610644446 A CN201610644446 A CN 201610644446A CN 106254922 B CN106254922 B CN 106254922B
Authority
CN
China
Prior art keywords
video
barrage
window
frame picture
played
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610644446.7A
Other languages
Chinese (zh)
Other versions
CN106254922A (en
Inventor
李永超
朱春明
朱彦东
张鹏宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Storm Group Ltd By Share Ltd
Original Assignee
Storm Group Ltd By Share 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 Storm Group Ltd By Share Ltd filed Critical Storm Group Ltd By Share Ltd
Priority to CN201610644446.7A priority Critical patent/CN106254922B/en
Publication of CN106254922A publication Critical patent/CN106254922A/en
Application granted granted Critical
Publication of CN106254922B publication Critical patent/CN106254922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42653Internal components of the client ; Characteristics thereof for processing graphics
    • 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/4302Content synchronisation processes, e.g. decoder synchronisation
    • 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
    • H04N21/4316Generation 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 for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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

Abstract

The present invention discloses the method for preloading and playing barrage, comprising: setting generates barrage video window according to the broadcast window height of video player, width and preset width ratio in the equipment for playing video;When obtaining the video file with barrage mark, barrage video window is generated according to the height of broadcast window, width and preset width ratio;Barrage video window is filled by the video frame picture to be played that playing sequence obtains respective numbers from video file according to the height of barrage video window and width;The corresponding barrage of video frame picture to be played in barrage video window is obtained, and barrage correspondence is rendered into video frame picture to be played;The video frame picture that barrage rendering is completed in barrage video window is shown in the broadcast window of video player by playing sequence and predetermined frame rate.The present invention improves the efficiency of barrage broadcasting.

Description

Preload the method and system for playing barrage
Technical field
The present invention relates to the technical fields played to barrage, more particularly, to a kind of method for preloading and playing barrage And system.
Background technique
The phenomenon that showing user comment in the form of subtitle in the picture for playing video referred to as barrage, user can pass through bullet The form of curtain is discussed communications when seeing video with other users, thus become between a kind of widely used user interaction with Interactive mode.
Current barrage is all by way of playing online, after the barrage that each user uploads is received when playing video It corresponds to and is showed on the video pictures of play time in video.It is all made once for each frame of video in the prior art Barrage, and video playing is refreshed according to certain frame per second per second, for example, PAL system television standard (Phase Alteration Line, PAL) it is according to the refreshing frequency of 25 frame per second, then production plays bullet under this PAL television standard When curtain it is also required to that barrage is added in video frame frame by frame by the frame per second.The movement speed that present barrage uses for 3~4 pixels/ Second, user can feel that barrage movement is too slow when movement speed is too slow, and when movement speed is too fast will appear barrage ghost, not utilize User experience.
When playing barrage video, barrage image is sent into the time that the barrage corresponds on video according to user and is ranked up and broadcasts It puts, and barrage content is pellucidly superimposed upon on video pictures in the form of floating window and is showed, the barrage floating window width made at present For 140 pixels.Realize that barrage plays by floating window in the prior art, barrage picture and video pictures are mutually independent forms, Disengaging sense can be generated when video screen variation;Furthermore when Caton occur in broadcasting video pictures, barrage image still can be floating Window relaying continued broadcasting is put, and barrage and the nonsynchronous phenomenon of video-frequency playing content are caused.Moreover, being required for each frame video pictures It makes a barrage picture and renders broadcasting, need to expend a large amount of resource and time, can also reduce the efficiency of barrage broadcasting.
Therefore it provides a kind of scheme for improving the efficiency that barrage plays is this field urgent problem to be solved.
Summary of the invention
In view of this, being solved in the prior art the present invention provides a kind of method and system for preloading broadcasting barrage Barrage is asynchronous with video-frequency playing content and needs the technical issues of expending vast resources.
In order to solve the above-mentioned technical problem, the present invention proposes a kind of method for preloading and playing barrage, comprising:
It is arranged in the equipment for playing video according to the broadcast window height of video player, width and preset width ratio Generate barrage video window;
It obtains video file and parses the video file, when being resolved in the video file with barrage mark, obtain Take the width and height of the broadcast window of video player in the equipment for playing video;
Barrage video window is generated according to the height of the broadcast window, width and the preset width ratio;
Respective counts are obtained from the video file by playing sequence according to the height of the barrage video window and width The video frame picture to be played of amount fills the barrage video window;
Determined according to the timestamp of the video frame picture to be played loaded in the barrage video window wait broadcast When to put video frame picture not be run-out video frame picture, continue to obtain respective numbers from the video file by playing sequence Video frame picture to be played fills the barrage video window;
When the video frame picture to be played loaded in the barrage video window be run-out video frame picture when, stop from Video frame picture to be played is obtained in the video file, and by the barrage video to be played in the barrage video window by pre- The continuation of constant speed rate shows broadcasting in the broadcast window;
The video identifier and timestamp of the video frame picture to be played according to the barrage video window are from storage bullet Corresponding barrage is obtained on the server of curtain, and the barrage correspondence that will acquire is rendered into the video frame picture to be played In;
The video frame picture that barrage rendering is completed in the barrage video window is pressed into playing sequence and predetermined frame rate It is shown in the broadcast window of the video player.
Further, wherein obtain video file and parse the video file, be resolved in the video file and have When barrage identifies, the width and height of the broadcast window of video player in the equipment for playing video are obtained, further are as follows:
It obtains video file and parses the video file, when being resolved in the video file with barrage mark, obtain Take the width and height of the broadcast window of video player in the equipment for playing video;
When being identified in the video file without barrage, the video file transfer to the video player is carried out It is shown in the broadcast window of video player in the equipment for playing video after rendering.
Further, wherein the preset width ratio is 1-15:7;The predetermined frame rate is 3-4 pixel/second.
On the other hand, the present invention also provides a kind of systems for preloading and playing barrage, comprising: the setting of barrage video window Device, video file getter, barrage video window generator, video frame picture loader, barrage renderer and barrage video are broadcast Put device;Wherein,
The barrage video window setter is connected with the barrage video window generator, for playing video Equipment on setting according to the broadcast window height of video player, width and preset width ratio generate barrage video window;
The video file getter is connected, for obtaining video file simultaneously with the barrage video window generator The video file is parsed, when being resolved in the video file with barrage mark, is obtained in the equipment for playing video The width and height of the broadcast window of video player;
The barrage video window generator, with the barrage video window setter, video file getter and video Frame picture loader is connected, for generating barrage according to the height of the broadcast window, width and the preset width ratio Video window;
The video frame picture loader is connected with the barrage video window generator and barrage renderer, is used for Obtained from the video file according to the height of the barrage video window and width by playing sequence respective numbers wait broadcast It puts video frame picture and fills the barrage video window;
Determined according to the timestamp of the video frame picture to be played loaded in the barrage video window wait broadcast When to put video frame picture not be run-out video frame picture, continue to obtain respective numbers from the video file by playing sequence Video frame picture to be played fills the barrage video window;
When the video frame picture to be played loaded in the barrage video window is run-out video frame picture, stop from institute It states and obtains video frame picture to be played in video file, and by the barrage video to be played in the barrage video window by predetermined Rate continuation shows broadcasting in the broadcast window;
The barrage renderer is connected with the video frame picture loader and barrage video player, is used for basis The video identifier and timestamp of video frame picture to be played described in the barrage video window are from the server of storage barrage Corresponding barrage is obtained, and the barrage correspondence that will acquire is rendered into the video frame picture to be played;
The barrage video player is connected with the barrage renderer, and being used for will be complete in the barrage video window It is shown in the broadcast window of the video player at the video frame picture of barrage rendering by playing sequence and predetermined frame rate Show.
Further, wherein the system further include: non-barrage video player is connected with the video file getter It connects, the non-barrage video player is used for:
When being identified in the video file without barrage, after the video file is rendered in the equipment for playing video It is shown in the broadcast window of video player.
Further, wherein the preset width ratio is 1-15:7;The predetermined frame rate is 3-4 pixel/second.
Compared with prior art, preloading of the invention plays the method and system of barrage, realizes following beneficial effect Fruit:
(1) of the present invention to preload the method and system for playing barrage, it is arranged according to video player window size The broadcasting barrage video window widened, obtain in advance barrage according to the barrage in video playing the corresponding time by the barrage It is fused in video frame picture, then presses the video frame picture in the broadcasting barrage video window in advance when playing barrage video Constant speed rate carries out mobile display.The form showed in video frame that barrage is added to frame by frame in compared with the existing technology, Neng Gouti The efficiency that high barrage plays.
(2) of the present invention to preload the method and system for playing barrage, it obtains barrage content and utilizes renderer will It is fused in corresponding video pictures, middle compared with the existing technology to utilize floating window by barrage content transparency overlay to video pictures On, barrage will not be generated and video content is detached from and feels, and the video pictures synchronous refresh of barrage and broadcasting, be not in barrage With the nonsynchronous phenomenon of video content.
(3) of the present invention to preload the method and system for playing barrage, it obtains barrage content and utilizes renderer will It is fused in corresponding video pictures, and barrage is directly fused in video pictures, eliminates floating window transparency overlay to video Step on picture improves the playing efficiency of barrage video while reducing system resources consumption.
Certainly, implementing any of the products of the present invention specific needs while must not reach all the above technical effect.
By referring to the drawings to the detailed description of exemplary embodiment of the present invention, other feature of the invention and its Advantage will become apparent.
Detailed description of the invention
It is combined in the description and the attached drawing for constituting part of specification shows the embodiment of the present invention, and even With its explanation together principle for explaining the present invention.
Fig. 1 is that the flow diagram for playing the method for barrage is preloaded described in the embodiment of the present invention 1;
Fig. 2 is to be regarded in the embodiment of the present invention 1 according to the barrage video that the broadcast window of the video player generates The structural schematic diagram of window;
Fig. 3 is that the flow diagram for playing the method for barrage is preloaded described in the embodiment of the present invention 2;
Fig. 4 is that the flow diagram for playing the method for barrage is preloaded described in the embodiment of the present invention 3;
Fig. 5 is that the structural schematic diagram for playing the system of barrage is preloaded described in the embodiment of the present invention 4.
Specific embodiment
Carry out the various exemplary embodiments of detailed description of the present invention now with reference to attached drawing.It should also be noted that unless in addition having Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally The range of invention.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, never as to the present invention And its application or any restrictions used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable In the case of, the technology, method and apparatus should be considered as part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without It is as limitation.Therefore, other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
Embodiment 1
As shown in Figure 1, to preload the flow diagram for playing the method for barrage described in the present embodiment.In the present embodiment In, the barrage video window of video player width is greater than by setting width, it is pre-loaded in the barrage video window The video pictures of barrage are merged, then with the mobile preloading barrage video mode showed of set rate, improve barrage Playing efficiency.It is as follows to play the step of method of barrage for preloading described in the present embodiment:
Step 101, setting according to the broadcast window height of video player, width and makes a reservation in the equipment for playing video Width ratio generates barrage video window.
When having detected that barrage video needs to play, is generated and added according to current broadcast window in the equipment for playing video Long barrage video window facilitates acquisition by preloading video frame picture to be played in the barrage video window of the lengthening Barrage corresponding to video frame picture to be played is preloaded to be rendered.Avoid obtain every time in the prior art it is a certain number of Video frame picture carries out barrage rendering in real time in the broadcast window of the video player and plays brought barrage video The low problem of playing efficiency.
Step 102 obtains video file and parses the video file, when in the video file with barrage mark, Obtain the width and height of the broadcast window of video player in the equipment for playing video.
It whether include that barrage mark (barrage field) can differentiate that the broadcasting of the video is according in each video file It is no that barrage function can be used.If to determine current video to be played be barrage video, just triggering generates the bullet of lengthening It is existing to avoid the wasting of resources caused by also generating the barrage video window of lengthening common non-barrage video playing for curtain video window As.
Step 103 generates barrage video view according to the height of the broadcast window, width and the preset width ratio Window.
The width of playing view window is the principal element for determining to accommodate video frame quantity, therefore, in this step, according to current The width and preset width ratio (barrage video window width/broadcast window width) of player window generate the barrage video The width of form, then the height generation barrage video window of current player window is adopted, for pre-loaded to be played Barrage video frame.
Step 104 is obtained from the video file according to the height and width of the barrage video window by playing sequence The video frame picture to be played of respective numbers is taken to fill the barrage video window.
Video frame in the barrage video window can with certain predetermined frame rate the video player broadcasting window It is played out in mouthful, video frame gap will be generated in the barrage video window, it is ensured that the continuous broadcasting of video just needs It to be filled into the barrage video window from video frame is obtained according to the predetermined frame rate sequence in video file, until playing Complete video file.
Step 105 obtains the corresponding barrage of video frame picture to be played described in the barrage video window, and will be described Barrage correspondence is rendered into the video frame picture to be played.
The barrage video playing scheme of the present embodiment is to be rendered into barrage on video frame picture to play out, and non-existing Increase barrage floating window in technology on the video frame picture of broadcasting and show barrage content, avoid when network is bad video pictures with The nonsynchronous problem of barrage content.
Step 106 will complete the video frame picture of barrage rendering according to playing sequence in the barrage video window And predetermined frame rate is shown in the broadcast window of the video player.
As described in Figure 2, the barrage video to be generated described in the present embodiment according to the broadcast window of video player The structural schematic diagram of form.In Fig. 2, according to height, width and the preset width of the broadcast window 201 of the video player Ratio generates the barrage video window 202, goes forward side by side in the pre-loaded video frame picture to be played of the barrage video window 202 Display broadcasting is carried out in the broadcast window 201 of the video player with predetermined frame rate after the rendering of row barrage.
The method that preloading described in the present embodiment plays barrage is preloaded to be played using the barrage video window lengthened Barrage video played out with the broadcast window that predetermined frame rate is transmitted to the video player, improve broadcasting for barrage video Efficiency is put, and barrage is rendered into video frame picture in the present embodiment, ensure that the synchronism of video pictures and barrage.
Embodiment 2
As shown in figure 3, to preload the flow diagram for playing the method for barrage described in the present embodiment.In the present embodiment In, on the basis of embodiment 1, illustrates to preload barrage in barrage video window and render on corresponding video pictures Particular content.The method that preloading plays barrage described in the present embodiment includes the following steps:
Step 301 receives the video playing request that user sends, and parses request from video playing request and plays The description information of video, and the video file is obtained from the server of storage video according to the description information.
Step 302, the parsing video file simultaneously judge whether identify with barrage in the video file.
It whether can include barrage field (barrage mark according in video protocols with barrage mark in video file Know) differentiated, if barrage function can be used comprising the barrage explanation of field video in video protocols.
Step 303, when being identified in the video file without barrage, will the video file rendering after play regard It is shown in the broadcast window of video player in the equipment of frequency.
When determine the video be non-barrage video when, then by normal video playing step to the video file into Display broadcasting is carried out in the broadcast window after row rendering.
Step 304, when in the video file have barrage mark when, obtain it is described play video equipment on video broadcast Put the width and height of the broadcast window of device.
Step 305 generates barrage video according to the height of the broadcast window got, width and preset width ratio Form.
Preset width ratio is the barrage video window of the generation and ratio (the barrage video window of the broadcast window Width/broadcast window width), in the present embodiment, the preset width ratio is more than or equal to 1.Preferably, the preset width Proportional region is 1-15:7.The barrage video window width of generation is too small to be unfavorable for preloading barrage video to guarantee barrage video Stable playback;And if the barrage video window width generated is too big, and barrage video counts are preloaded in the barrage video window According to when can expend a large amount of resource.
In this step with the height of original broadcast window be the barrage video window height, according to the original The width combination preset width ratio for the broadcast window having generates the width of the barrage video window.Again with the institute of generation The height and width building width of stating barrage video window are greater than the barrage video window of the broadcast window, can be in institute Load capacity in barrage video window is stated to be greater than the video requency frame data progress video preloading of the broadcast window capacity and render Barrage is able to ascend the playing efficiency of barrage video.
Step 306 is obtained from the video file according to the height and width of the barrage video window by playing sequence The video frame picture to be played of respective numbers is taken to fill the barrage video window.
Preferably, play frame rate according to video data in the broadcast window can be set in this step from the view The video frame picture to be played that respective numbers are obtained in frequency file fills the barrage video window.It so, it is possible to guarantee in institute It states video playing rate in broadcast window and the fill rate of barrage video reaches dynamic equilibrium in the barrage video window, Enable barrage video stable playback.
The video identifier and timestamp of step 307, the video frame picture to be played according to the barrage video window Corresponding barrage is obtained from the server of storage barrage, and the barrage correspondence that will acquire is rendered into the view to be played In frequency frame picture.
Preferably, in this step, the barrage correspondence that will acquire is rendered into the video frame picture to be played It is less than or equal in the range of 2/5ths from top to bottom, to prevent from influencing the broadcasting of video caption.And in the storage barrage It is to store corresponding barrage according to video identifier and the timestamp of video playing, therefore pass through the video frame to be played on server The video identifier and timestamp of picture can obtain corresponding barrage from the server of the storage barrage.
Step 308 will complete the video frame picture of barrage rendering according to playing sequence in the barrage video window And predetermined frame rate is shown in the broadcast window of the video player.
Preferably, the predetermined frame rate is 3-4 pixel/second.Former barrage video width is player window size, in order to Preload multiplexing barrage video data, it would be desirable to widen and generate barrage video video, because of every frame view in video playback window Frequency is by the mobile broadcasting of 3-4 pixel/second, it is therefore desirable to barrage video data is updated with identical rate in video playback window, It is synchronous with preloading data to reach barrage video playing, it just can guarantee that video stabilization plays, the barrage video of the present embodiment is broadcast It puts efficiency and to draw the mode of barrage video playing frame by frame than in the prior art and promote 30-35 times of efficiency.
The method that preloading plays barrage described in the present embodiment is obtained barrage content and is fused to using renderer It is middle compared with the existing technology to utilize floating window by barrage content transparency overlay to video pictures in corresponding video pictures, it will not produce Raw barrage and video content, which are detached from, to be felt, and the video pictures synchronous refresh of barrage and broadcasting, is not in barrage and video Hold nonsynchronous phenomenon.
Embodiment 3
The present embodiment is a concrete application embodiment of the present invention for preloading and playing the method for barrage.Such as Fig. 4 institute Show, is to preload the flow diagram for playing the method for barrage described in the present embodiment.In the present embodiment.Described in the present embodiment Preloading play barrage method include the following steps:
Step 401, user send video playing request to the equipment for playing video, include in the video playing request Request the description information of broadcasting video.
Step 402 receives the video playing request that the user sends in the equipment for playing video, from institute State video playing request in parse request play video description information, and according to the description information from storage video clothes Business device obtains the video file.
Step 403, the parsing video file simultaneously judge whether identify with barrage in the video file.
Step 404, when being identified in the video file without barrage, will the video file rendering after play regard It is shown in the broadcast window of video player in the equipment of frequency.
Step 405, when in the video file have barrage mark when, obtain it is described play video equipment on video broadcast Put the width and height of the broadcast window of device.
Step 406, according to the height of the broadcast window got, width and preset width ratio, (barrage video is regarded Window width/broadcast window width) generate barrage video window.Wherein, the width of the broadcast window is 140 pixels, described pre- Determining width ratio is 15:7, therefore, generates the barrage video window that width is 300 pixels in this step.
Step 407 is obtained from the video file according to the height and width of the barrage video window by playing sequence The video frame picture to be played of respective numbers is taken to fill the barrage video window.
The video identifier and timestamp of step 408, the video frame picture to be played according to the barrage video window Corresponding barrage is obtained from the server of storage barrage, and the barrage correspondence that will acquire is rendered into the view to be played In frequency frame picture.
Preferably, in this step, the barrage correspondence that will acquire is rendered into the video frame picture to be played From top to bottom in the range of 2/5ths, to prevent from influencing the broadcasting of video caption.
Step 409 will complete the video frame picture of barrage rendering according to playing sequence in the barrage video window And predetermined frame rate is shown in the broadcast window of the video player.
Step 410 judges to load in the barrage video window according to the timestamp of the video frame picture to be played Video frame picture to be played whether be run-out video frame picture.
Step 411, when the video frame picture to be played loaded in the barrage video window be not run-out video frame draw When face, the video frame picture to be played for continuing to obtain respective numbers from the video file by playing sequence fills the barrage Video window.
Step 412, when the video frame picture to be played loaded in the barrage video window be run-out video frame picture When, stopping obtains video frame picture to be played from the video file, and by the bullet to be played in the barrage video window Curtain video shows broadcasting according to set rate continuation in the broadcast window.
Embodiment 4
As shown in figure 5, the structural schematic diagram of the system of barrage is played for preloading described in the present embodiment, described in the present embodiment The preloading system that plays barrage be used to implement described in above-described embodiment the method that preloading plays barrage.The present embodiment The system that the preloading plays barrage, comprising: barrage video window setter 501, video file getter 502, barrage Video window generator 503, video frame picture loader 504, barrage renderer 505 and barrage video player 506.
Wherein, the barrage video window setter 501 connects with the 503 phase lotus root of barrage video window generator, is used for Setting generates barrage according to the broadcast window height of video player, width and preset width ratio in the equipment for playing video Video window.
The getter 502 connects with the 503 phase lotus root of barrage video window generator, for obtaining video file and parsing The video file obtains video player in the equipment for playing video when in the video file with barrage mark Broadcast window width and height.
The barrage video window generator 503 and the barrage video window setter 501, the getter 502 and The 504 phase lotus root of video frame picture loader connects, for according to the height of the broadcast window, width and preset width ratio Example generates barrage video window.
The video frame picture loader 504 and the barrage video window generator 503 and the barrage renderer 505 Phase lotus root connects, for being obtained from the video file accordingly according to the height and width of the barrage video window by playing sequence The video frame picture to be played of quantity fills the barrage video window.
The barrage renderer 505 and 506 phase lotus root of the video frame picture loader 504 and the barrage video player It connects, for obtaining the corresponding barrage of video frame picture to be played described in the barrage video window, and the barrage is corresponding It is rendered into the video frame picture to be played.
Preferably, corresponding be rendered into the video frame picture to be played of the barrage that will acquire is less than from top to bottom Or be equal in the range of 2/5ths, to prevent from influencing the broadcasting of video caption.
The barrage video player 506 connects with the 505 phase lotus root of barrage renderer, is used for the barrage video window The middle video frame picture for completing barrage rendering according to playing sequence and predetermined frame rate the video player broadcasting window It is shown in mouthful.
Further, the barrage renderer 505, is also used to: according to view to be played described in the barrage video window The video identifier and timestamp of frequency frame picture obtain corresponding barrage from the server of storage barrage, and described in will acquire Barrage correspondence is rendered into the video frame picture to be played.
Further, the system that preloading plays barrage described in the present embodiment further include: non-barrage video player 507, the non-barrage video player 507 connects with the 502 phase lotus root of getter, is used in the video file without barrage When mark, it will be shown in the broadcast window of video player in the equipment for playing video after video file rendering.
Further, the system that preloading plays barrage described in the present embodiment further include: barrage video loads determining device 508, the barrage video load determining device 508 connects with the 504 phase lotus root of video frame picture loader, described wait broadcast for basis The timestamp for putting video frame picture judges whether the video frame picture to be played loaded in the barrage video window is run-out Video frame picture;
The video frame picture loader 504 is also used to when the video to be played loaded in the barrage video window When frame picture is not run-out video frame picture, continue to obtain the to be played of respective numbers from the video file by playing sequence Video frame picture fills the barrage video window;
When the video frame picture to be played loaded in the barrage video window be run-out video frame picture when, stop from Video frame picture to be played is obtained in the video file, and by the barrage video to be played in the barrage video window by pre- The continuation of constant speed rate shows broadcasting in the broadcast window.
Further, wherein the preset width ratio (barrage video window width/broadcast window width) is 1-15: 7。
Further, wherein the predetermined frame rate is 3-4 pixel/second.
System described in the present embodiment is avoided that user when watching barrage video, because video occur in certain network causes Caton and barrage are also played in flight, caused by posterior barrage to occur generation barrage content in advance asynchronous with video content The phenomenon that.
The system that preloading plays barrage described in the present embodiment is greatly reduced by way of preloading barrage video It plays every frame in barrage video image and requires the consumption that real-time rendering generates barrage video image, reduce CPU and occupy, relatively In 25-30 times of improved efficiency of the barrage video playing mode of the prior art.
It is existing beneficial by above each embodiment it is found that preloading of the invention plays the method and system of barrage Effect is:
(1) of the present invention to preload the method and system for playing barrage, it is arranged according to video player window size The broadcasting barrage video window widened, obtain in advance barrage according to the barrage in video playing the corresponding time by the barrage It is fused in video frame picture, then presses the video frame picture in the broadcasting barrage video window in advance when playing barrage video Constant speed rate carries out mobile display.The form showed in video frame that barrage is added to frame by frame in compared with the existing technology, Neng Gouti The efficiency that high barrage plays.
(2) of the present invention to preload the method and system for playing barrage, it obtains barrage content and utilizes renderer will It is fused in corresponding video pictures, middle compared with the existing technology to utilize floating window by barrage content transparency overlay to video pictures On, barrage will not be generated and video content is detached from and feels, and the video pictures synchronous refresh of barrage and broadcasting, be not in barrage With the nonsynchronous phenomenon of video content.
(3) of the present invention to preload the method and system for playing barrage, it obtains barrage content and utilizes renderer will It is fused in corresponding video pictures, and barrage is directly fused in video pictures, eliminates floating window transparency overlay to video Step on picture improves the playing efficiency of barrage video while reducing system resources consumption.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, apparatus 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.
Although some specific embodiments of the invention are described in detail by example, the skill of this field Art personnel it should be understood that example above merely to being illustrated, the range being not intended to be limiting of the invention.The skill of this field Art personnel are it should be understood that can without departing from the scope and spirit of the present invention modify to above embodiments.This hair Bright range is defined by the following claims.

Claims (6)

1. a kind of preload the method for playing barrage characterized by comprising
Setting is raw according to the broadcast window height of video player, width and preset width ratio D in the equipment for playing video At barrage video window, wherein the preset width ratio D is the barrage video window generated and the ratio of broadcast window, institute Preset width ratio D is stated more than or equal to 1;
It obtains video file and parses the video file, when being resolved in the video file with barrage mark, obtain institute State the width and height of the broadcast window of video player in the equipment for playing video;
Barrage video window is generated according to the height of the broadcast window, width and the preset width ratio D;
Respective numbers are obtained from the video file by playing sequence according to the height of the barrage video window and width Video frame picture to be played fills the barrage video window;
The video to be played loaded in the barrage video window is judged according to the timestamp of the video frame picture to be played Whether frame picture is run-out video frame picture;
When the video frame picture to be played loaded in the barrage video window is not run-out video frame picture, continue by broadcasting Put forward the video frame picture to be played filling barrage video window that sequence obtains respective numbers from the video file;
When the video frame picture to be played loaded in the barrage video window is run-out video frame picture, stop from described Video frame picture to be played is obtained in video file, and the barrage video to be played in the barrage video window is pressed into predetermined frame Rate continuation shows broadcasting in the broadcast window;
The video identifier and timestamp of the video frame picture to be played according to the barrage video window are from storage barrage Corresponding barrage is obtained on server, and the barrage correspondence that will acquire is rendered into the video frame picture to be played;
The video frame picture that barrage rendering is completed in the barrage video window is pressed into playing sequence and predetermined frame rate in institute It states in the broadcast window of video player and shows.
2. according to claim 1 preload the method for playing barrage, which is characterized in that obtain video file and parse institute Video file is stated, when being resolved in the video file with barrage mark, video in the equipment for playing video is obtained and broadcasts The width and height of the broadcast window of device are put, further are as follows:
It obtains video file and parses the video file, when being resolved in the video file with barrage mark, obtain institute State the width and height of the broadcast window of video player in the equipment for playing video;
When being identified in the video file without barrage, the video file transfer to the video player is rendered It is shown in the broadcast window of video player in the equipment for playing video afterwards.
3. according to claim 1 preload the method for playing barrage, which is characterized in that the preset width ratio D's Value range are as follows: 1≤D≤15/7;The predetermined frame rate is 3-4 pixel/second.
4. a kind of preload the system for playing barrage characterized by comprising barrage video window setter, video file obtain Take device, barrage video window generator, video frame picture loader, barrage renderer and barrage video player;Wherein,
The barrage video window setter is connected with the barrage video window generator, for playing setting for video Standby upper setting generates barrage video window according to the broadcast window height of video player, width and preset width ratio D, In, the preset width ratio D is the barrage video window generated and the ratio of broadcast window, and the preset width ratio D is big In equal to 1;
The video file getter is connected with the barrage video window generator, for obtaining video file and parsing The video file obtains video in the equipment for playing video when being resolved in the video file with barrage mark The width and height of the broadcast window of player;
The barrage video window generator is drawn with the barrage video window setter, video file getter and video frame Face loader is connected, for generating barrage video according to the height of the broadcast window, width and the preset width ratio D Form;
The video frame picture loader is connected with the barrage video window generator and barrage renderer, is used for basis The height and width of the barrage video window are obtained the view to be played of respective numbers by playing sequence from the video file Frequency frame picture fills the barrage video window;
The video to be played loaded in the barrage video window is judged according to the timestamp of the video frame picture to be played Whether frame picture is run-out video frame picture;
When the video frame picture to be played loaded in the barrage video window is not run-out video frame picture, continue by broadcasting Put forward the video frame picture to be played filling barrage video window that sequence obtains respective numbers from the video file;
When the video frame picture to be played loaded in the barrage video window is run-out video frame picture, stop from the view Video frame picture to be played is obtained in frequency file, and the barrage video to be played in the barrage video window is pressed into predetermined frame rate Continuation shows broadcasting in the broadcast window;
The barrage renderer is connected with the video frame picture loader and barrage video player, for according to The video identifier and timestamp of video frame picture to be played described in barrage video window are obtained from the server of storage barrage Corresponding barrage, and the barrage correspondence that will acquire is rendered into the video frame picture to be played;
The barrage video player is connected with the barrage renderer, for will complete bullet in the barrage video window The video frame picture of curtain rendering is shown in the broadcast window of the video player by playing sequence and predetermined frame rate.
5. according to claim 4 preload the system for playing barrage, which is characterized in that further include: non-barrage video is broadcast Device is put, is connected with the video file getter, the non-barrage video player is used for:
When being identified in the video file without barrage, by the video file rendering after play video equipment on video It is shown in the broadcast window of player.
6. according to claim 5 preload the system for playing barrage, which is characterized in that the preset width ratio D's Value range are as follows: 1≤D≤15/7;The predetermined frame rate is 3-4 pixel/second.
CN201610644446.7A 2016-08-08 2016-08-08 Preload the method and system for playing barrage Active CN106254922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610644446.7A CN106254922B (en) 2016-08-08 2016-08-08 Preload the method and system for playing barrage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610644446.7A CN106254922B (en) 2016-08-08 2016-08-08 Preload the method and system for playing barrage

Publications (2)

Publication Number Publication Date
CN106254922A CN106254922A (en) 2016-12-21
CN106254922B true CN106254922B (en) 2019-06-18

Family

ID=58077937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610644446.7A Active CN106254922B (en) 2016-08-08 2016-08-08 Preload the method and system for playing barrage

Country Status (1)

Country Link
CN (1) CN106254922B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107734353B (en) * 2017-10-09 2020-08-04 武汉斗鱼网络科技有限公司 Method and device for recording barrage video, readable storage medium and equipment
CN109348252B (en) * 2018-11-01 2020-01-10 腾讯科技(深圳)有限公司 Video playing method, video transmission method, device, equipment and storage medium
CN112118484B (en) * 2019-06-19 2022-04-19 上海哔哩哔哩科技有限公司 Video bullet screen display method and device, computer equipment and readable storage medium
US11513937B2 (en) 2019-06-19 2022-11-29 Shanghai Bilibili Technology Co., Ltd. Method and device of displaying video comments, computing device, and readable storage medium
CN110446087B (en) * 2019-08-30 2024-03-26 徐汉阳 Same-curtain playing system based on community hospital line playing equipment
CN111556375B (en) * 2020-04-24 2022-10-11 西交利物浦大学 Video barrage generation method and device, computer equipment and storage medium
CN111726672A (en) * 2020-06-09 2020-09-29 上海幕革科技有限公司 Method, system and equipment for adding bullet screen to film
CN112637670B (en) * 2020-12-15 2022-07-29 上海哔哩哔哩科技有限公司 Video generation method and device
CN116095382B (en) * 2022-06-02 2023-10-31 荣耀终端有限公司 Barrage identification method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102905170A (en) * 2012-10-08 2013-01-30 北京导视互动网络技术有限公司 Screen popping method and system for video
JP2014216808A (en) * 2013-04-25 2014-11-17 株式会社ドワンゴ Motion picture viewing system, operation method of the system, motion picture reproduction terminal device, operation program for the device, and operation program distribution server
CN104967876A (en) * 2014-09-30 2015-10-07 腾讯科技(深圳)有限公司 Pop-up information processing method and apparatus, and pop-up information display method and apparatus
CN105373554A (en) * 2014-08-25 2016-03-02 北京爱声声科技有限公司 Mobile device webpage based screen popup method and system
CN105812885A (en) * 2016-03-11 2016-07-27 武汉斗鱼网络科技有限公司 Bullet screen display method and system in live video

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102905170A (en) * 2012-10-08 2013-01-30 北京导视互动网络技术有限公司 Screen popping method and system for video
JP2014216808A (en) * 2013-04-25 2014-11-17 株式会社ドワンゴ Motion picture viewing system, operation method of the system, motion picture reproduction terminal device, operation program for the device, and operation program distribution server
CN105373554A (en) * 2014-08-25 2016-03-02 北京爱声声科技有限公司 Mobile device webpage based screen popup method and system
CN104967876A (en) * 2014-09-30 2015-10-07 腾讯科技(深圳)有限公司 Pop-up information processing method and apparatus, and pop-up information display method and apparatus
CN105812885A (en) * 2016-03-11 2016-07-27 武汉斗鱼网络科技有限公司 Bullet screen display method and system in live video

Also Published As

Publication number Publication date
CN106254922A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106254922B (en) Preload the method and system for playing barrage
CN102905170B (en) Screen popping method and system for video
KR101687640B1 (en) Method for synchronized content playback
JP3544502B2 (en) Method for displaying the contents of audio, video and graphic units in a multimedia display and a recording medium recording a computer program
CN102647634B (en) Multi-fragment video playing method and device based on hypertext markup language (HTML) 5 video
US20210243473A1 (en) Media data processing method and apparatus
CN100515056C (en) Method, system apparatus and set top box for displaying mutli-channel information in identical picture
US11095936B2 (en) Streaming media transmission method and client applied to virtual reality technology
US20190230388A1 (en) Method and apparatus for processing video data
KR20110053431A (en) 3d display handling of subtitles
TW201036437A (en) Systems and methods for providing closed captioning in three-dimensional imagery
US20220193540A1 (en) Method and system for a cloud native 3d scene game
WO2016188276A1 (en) Video playing method, client and computer storage medium
US10560753B2 (en) Method and system for image alteration
TW201424347A (en) Synchronous displaying system for displaying multi-view frame and method for synchronously displaying muti-view frame
WO2017185761A1 (en) Method and device for playing back 2d video
JP2019536339A (en) Method and apparatus for synchronizing video content
CN114079813A (en) Picture synchronization method, coding method, video playing device and video coding device
JP5955851B2 (en) Transfer of 3D image data
CN113596553A (en) Video playing method and device, computer equipment and storage medium
CN104683858A (en) Preview method and device for content of stream medium
CN113014943A (en) Video playing method, video player and video live broadcasting system
US11678019B2 (en) User interface (UI) engine for cloud UI rendering
CN112218128A (en) Advertisement video playing method, playing client and readable storage medium
Kim et al. Design and implementation for interactive augmented broadcasting system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20190705

Granted publication date: 20190618

PP01 Preservation of patent right