Live video broadcast method, live broadcast device and storage medium
The present application provides a method for live broadcasting a video game performed at a computer device. The method includes: receiving a live broadcast command to live broadcast a video game being played on the computer device in real time; in response to the live broadcast command extracting a plurality of video picture frames from the video game; storing the plurality of video picture frames in a video buffer; and uploading the plurality of video picture frames from the video buffer to a server. The server is configured to live broadcast the video game to other computer devices.
1. A method for live broadcasting a video game performed at a computer device, the method comprising:
receiving a live broadcast command to live broadcast a video game being played on the computer device in real time;
in response to the live broadcast command:
extracting a plurality of video picture frames from the video game;
storing the plurality of video picture frames in a video buffer;
transferring the plurality of video picture frames from the video buffer into a frame buffer;
displaying the plurality of video picture frames in the frame buffer on the computer device;
collecting audio data from a user of the computer device using a microphone of the computer device while the video game is being played on the computer device in real time;
synchronously synthesizing the audio data and the plurality of video picture frames stored in the video buffer into a video streaming media file corresponding to the video game; and
uploading the video streaming media file from the video buffer to a server, wherein the server is configured to live broadcast the audio data and the plurality of video picture frames relative to the video game to other computer devices in real time.
2. The method according to claim 1 , wherein the video buffer is bound to a game engine that generates the plurality of video picture frames in real time.
3. The method according to claim 1 , wherein the video buffer is created in response to the live broadcast command.
4. The method according to claim 3 , wherein the creation of the video buffer comprises:
invoking a pre-configured mounting component based on the live broadcast command; and
replacing a picture loading method with the video buffer using the mounting component.
5. The method according to claim 4 , wherein the operation of replacing a picture loading method with the video buffer using the mounting component comprise:
replacing a picture drawing method in the picture loading method with the video buffer when the picture loading method is invoked.
6. A computer device, comprising:
one or more processors;
memory coupled to the one or more processors; and
a plurality of programs stored in the memory that, when executed by the one or more processors, cause the computer device to perform a method for live broadcasting a video game including:
receiving a live broadcast command to live broadcast a video game being played on the computer device in real time;
in response to the live broadcast command:
extracting a plurality of video picture frames from the video game;
storing the plurality of video picture frames in a video buffer;
transferring the plurality of video picture frames from the video buffer into a frame buffer;
displaying the plurality of video picture frames in the frame buffer on the computer device;
collecting audio data from a user of the computer device using a microphone of the computer device while the video game is being played on the computer device in real time;
synchronously synthesizing the audio data and the plurality of video picture frames stored in the video buffer into a video streaming media file corresponding to the video game; and
uploading the video streaming media file from the video buffer to a server, wherein the server is configured to live broadcast the audio data and the plurality of video picture frames relative to the video game to other computer devices in real time.
7. The computer device according to claim 6 , wherein the video buffer is bound to a game engine that generates the plurality of video picture frames in real time.
8. The computer device according to claim 6 , wherein the video buffer is created in response to the live broadcast command.
9. The computer device according to claim 8 , wherein the creation of the video buffer comprises:
invoking a pre-configured mounting component based on the live broadcast command; and
replacing a picture loading method with the video buffer using the mounting component.
10. The computer device according to claim 9 , wherein the operation of replacing a picture loading method with the video buffer using the mounting component comprise:
replacing a picture drawing method in the picture loading method with the video buffer when the picture loading method is invoked.
11. A non-transitory computer readable storage medium storing a plurality of instructions in connection with a computer device, wherein the plurality of instructions, when executed by one or more processors of the computer device, cause the computer device to perform method for live broadcasting a video game including:
receiving a live broadcast command to live broadcast a video game being played on the computer device in real time;
in response to the live broadcast command:
extracting a plurality of video picture frames from the video game;
storing the plurality of video picture frames in a video buffer;
transferring the plurality of video picture frames from the video buffer into a frame buffer;
displaying the plurality of video picture frames in the frame buffer on the computer device;
collecting audio data from a user of the computer device using a microphone of the computer device while the video game is being played on the computer device in real time;
synchronously synthesizing the audio data and the plurality of video picture frames stored in the video buffer into a video streaming media file corresponding to the video game; and
uploading the video streaming media file from the video buffer to a server, wherein the server is configured to live broadcast the audio data and the plurality of video picture frames relative to the video game to other computer devices in real time.
12. The non-transitory computer readable storage medium according to claim 11 , wherein the video buffer is bound to a game engine that generates the plurality of video picture frames in real time.
13. The non-transitory computer readable storage medium according to claim 11 , wherein the video buffer is created in response to the live broadcast command.
14. The non-transitory computer readable storage medium according to claim 13 , wherein the creation of the video buffer comprises:
invoking a pre-configured mounting component based on the live broadcast command; and
replacing a picture loading method with the video buffer using the mounting component.