Video synchronization method and device, computer readable storage medium and electronic device

文档序号:1219003 发布日期:2020-09-04 浏览:8次 中文

阅读说明:本技术 视频同步方法及装置、计算机可读存储介质以及电子设备 (Video synchronization method and device, computer readable storage medium and electronic device ) 是由 黄业龙 于 2020-06-11 设计创作,主要内容包括:本发明实施例是关于一种视频同步方法及装置、计算机可读存储介质以及电子设备,涉及视频直播技术领域,该方法包括:当主播端接收拍照指令时,显示与所述拍照指令对应的提示动画;将正在直播的当前视频画面写入视频帧,并将所述提示动画写入数据帧;根据所述视频帧以及数据帧生成待播放视频流;将所述待播放视频流推送至服务器,以使得服务器将所述待播放视频流推送至观看直播的用户端,以实现所述提示动画在所述主播端以及用户端的同步。该方法提高了待播放视频流的生成速度,同时也提高了直播视频的实时性。(The embodiment of the invention relates to a video synchronization method and device, a computer readable storage medium and electronic equipment, which relate to the technical field of video live broadcast, and the method comprises the following steps: when the anchor end receives a photographing instruction, displaying a prompt animation corresponding to the photographing instruction; writing a current video picture which is in live broadcasting into a video frame, and writing the prompt animation into a data frame; generating a video stream to be played according to the video frame and the data frame; and pushing the video stream to be played to a server so that the server pushes the video stream to be played to a user side watching the live broadcast, thereby realizing the synchronization of the prompt animation at the main broadcast end and the user side. The method improves the generation speed of the video stream to be played and simultaneously improves the real-time property of the live video.)

1. A method for video synchronization, comprising:

when the anchor end receives a photographing instruction, displaying a prompt animation corresponding to the photographing instruction;

writing a current video picture which is in live broadcasting into a video frame, and writing the prompt animation into a data frame;

generating a video stream to be played according to the video frame and the data frame;

and pushing the video stream to be played to a server so that the server pushes the video stream to be played to a user side watching the live broadcast, thereby realizing the synchronization of the prompt animation at the main broadcast end and the user side.

2. The video synchronization method of claim 1, wherein the video synchronization method further comprises:

when the prompt animation is detected to be played completely, intercepting the current video picture at the playing completion moment, and generating a target image according to the intercepted current video picture; wherein the prompt animation comprises a countdown animation or a progress bar;

and pushing the target image to the server so that the server pushes the target image to the user side, thereby realizing the synchronization of the target image at the anchor side and the user side.

3. The video synchronization method of claim 2, wherein the video synchronization method further comprises:

storing the target image into an image list to obtain a current image list;

and updating a historical image list corresponding to the current image list in a server by using the current image list so as to facilitate the user end to view the target image in the current image list.

4. The video synchronization method according to claim 2, wherein the live current video picture includes a live anchor;

wherein capturing the current video frame at the playing completion time comprises:

intercepting attitude information of the anchor at the playing completion moment; wherein the gesture information comprises a facial expression and/or a limb movement of the anchor.

5. The video synchronization method of claim 1, wherein writing a current video picture being live into a video frame and writing the cue animation into a data frame comprises:

respectively writing the current video picture which is in live broadcasting into an audio frame and a video frame of a real-time message transmission protocol stream;

and writing the prompt animation into a data frame of the real-time message transmission protocol stream.

6. A method for video synchronization, comprising:

receiving a video stream to be played pushed by a server, and decoding the video stream to be played to obtain a video frame and a data frame; the video frame is a video of a current video picture which is live;

playing the video frame through a preset video player, and judging whether the data frame comprises a prompt animation corresponding to the photographing instruction;

and when the data frame is judged to comprise the prompt animation, calling an animation playing module in the video player to play the prompt animation so as to realize the synchronization of the prompt animation at the anchor end and the user end.

7. The video synchronization method of claim 6, wherein the video synchronization method further comprises:

receiving a target image pushed by the server; when the anchor end detects that the prompt animation is played completely, capturing a current video picture at the playing completion moment, and generating the current video picture according to the captured current video picture;

and displaying the target image, thereby realizing the synchronization of the target image at the anchor end and the user end.

8. A video synchronization apparatus, comprising:

the prompting animation display module is used for displaying a prompting animation corresponding to the photographing instruction when the anchor receives the photographing instruction;

the data writing module is used for writing the current video picture which is live in a video frame and writing the prompt animation in a data frame;

the video stream generating module is used for generating a video stream to be played according to the video frame and the data frame;

and the video stream pushing module is used for pushing the video stream to be played to a server so that the server pushes the video stream to be played to a user side watching the live broadcast, and the synchronization of the prompt animation at the main broadcast end and the user side is realized.

9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the video synchronization method of any one of claims 1 to 7.

10. An electronic device, comprising:

a processor; and

a memory for storing executable instructions of the processor;

wherein the processor is configured to perform the video synchronization method of any of claims 1-7 via execution of the executable instructions.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:直播信息处理方法及装置、计算机存储介质、电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类