WO2023193524A1 - 直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 - Google Patents

直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 Download PDF

Info

Publication number
WO2023193524A1
WO2023193524A1 PCT/CN2023/076420 CN2023076420W WO2023193524A1 WO 2023193524 A1 WO2023193524 A1 WO 2023193524A1 CN 2023076420 W CN2023076420 W CN 2023076420W WO 2023193524 A1 WO2023193524 A1 WO 2023193524A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
live broadcast
live
format
original video
Prior art date
Application number
PCT/CN2023/076420
Other languages
English (en)
French (fr)
Inventor
刘平
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023193524A1 publication Critical patent/WO2023193524A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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
    • 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
    • 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/44012Processing 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 rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • 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
    • 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/440218Processing 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 transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • 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
    • 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/4781Games

Definitions

  • Embodiments of the present application relate to the field of Internet technology, and relate to but are not limited to a live video processing method, device, electronic equipment, computer-readable storage media, and computer program products.
  • HDR High-Dynamic Range
  • SDR Standard-Dynamic Range
  • Embodiments of the present application provide a live video processing method, device, electronic equipment, computer-readable storage medium and computer program product, which are at least used in the image processing field and the game field and can generate the same picture quality as the original video of the target live broadcast object. Parameterized live video to improve the live viewing experience for live viewing users.
  • An embodiment of the present application provides a live video processing method, which is executed by an electronic device.
  • the method includes:
  • a run mode button is displayed on the setting interface of the live broadcast application; in response to the selection operation of the run mode button and the live broadcast start operation of the target live broadcast object, based on the original video of the target live broadcast object and the video corresponding to the selection operation In the operating mode, obtain the live video of the target live broadcast object; wherein the live video has a screen display effect corresponding to the operating mode; and display the live video on the live interface of the live broadcast application.
  • An embodiment of the present application provides a live video processing device, which includes:
  • the first display module is configured to display a running mode button on the setting interface of the live broadcast application; the acquisition module, configured to, in response to a selection operation of the running mode button and a live broadcast start operation of a target live broadcast object, obtain the target live broadcast object based on the original video of the target live broadcast object and the running mode corresponding to the selection operation.
  • Live video wherein the live video has a picture display effect corresponding to the operating mode; the second display module is configured to display the live video on the live interface of the live application.
  • An embodiment of the present application provides a live video processing device, including: a memory configured to store executable instructions; and a processor configured to implement the above live video processing method when executing the executable instructions stored in the memory.
  • Embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes executable instructions, and the executable instructions are stored in a computer-readable storage medium; wherein, the processor of the electronic device obtains the information from the computer-readable storage medium.
  • the executable instructions are read and executed, the above live video processing method is implemented.
  • Embodiments of the present application provide a computer-readable storage medium that stores executable instructions and is configured to cause the processor to execute the executable instructions to implement the above live video processing method.
  • the embodiments of the present application have the following beneficial effects: in the process of live broadcasting the target live broadcast object through the live broadcast application, by responding to the selection operation of the running mode button and the live broadcast start operation of the target live broadcast object, based on the original video of the target live broadcast object and The operating mode corresponding to the selected operation is obtained and displayed on the live broadcast interface of the live broadcast application.
  • the live video of the target live broadcast object is obtained.
  • the live video has a screen display effect corresponding to the running mode. In this way, a screen display matching the running mode is generated. Effective live video, improve the live viewing experience of live viewing users, and ensure the picture consistency between the live video and the original video.
  • Figure 1 is a comparison chart between the original HDR game screen and the OBS live broadcast screen in related technologies
  • Figure 2 is a schematic flow chart of implementing HDR game live broadcast based on LUT processing in related technologies
  • Figure 3 is an optional architectural schematic diagram of the live video processing system provided by the embodiment of the present application.
  • Figure 4 is a schematic structural diagram of a live video processing device provided by an embodiment of the present application.
  • Figure 5 is an optional flow diagram of the live video processing method provided by the embodiment of the present application.
  • Figure 6 is another optional flow diagram of the live video processing method provided by the embodiment of the present application.
  • Figure 7 is another optional flow diagram of the live video processing method provided by the embodiment of the present application.
  • Figure 8 is an interface diagram of the settings page of the live broadcast application provided by the embodiment of the present application.
  • Figure 9 is a selection interface diagram for turning on game HDR provided by an embodiment of the present application.
  • Figure 10 is an interface diagram for selecting a game to be broadcast provided by an embodiment of the present application.
  • Figure 11 is an interface diagram for starting a live broadcast provided by an embodiment of the present application.
  • Figure 12 is a comparison diagram between the HDR game live broadcast screen and the OBS live HDR game screen according to the embodiment of the present application;
  • Figure 13 is a flow chart of game live broadcast according to the embodiment of the present application.
  • Figure 14 is a schematic diagram of how the hook mechanism provided by the embodiment of the present application implements hook processing on messages
  • Figure 15 is a schematic comparison diagram of two color formats provided by the embodiment of the present application.
  • Figure 16 is a schematic diagram comparing the PQ curve and the traditional gamma curve provided by the embodiment of the present application.
  • Figure 17 is a schematic diagram comparing the BT.2020 color gamut and the BT.709 color gamut provided by the embodiment of the present application;
  • Figure 18 is a schematic diagram of the YUV format provided by the embodiment of the present application.
  • FIG 19 is a schematic flow chart of the CPU conversion solution provided by the embodiment of the present application.
  • FIG. 20 is a schematic flow chart of the GPU conversion solution provided by the embodiment of the present application.
  • Figure 21 is a performance comparison chart between the CPU conversion solution and the GPU conversion solution provided by the embodiment of the present application.
  • Figure 22 is a flow chart of the game HDR metadata acquisition method provided by the embodiment of the present application.
  • Figure 23 is an interface diagram of the game HDR metadata acquisition method provided by the embodiment of the present application.
  • Figure 24 is a flow chart of a method for hard-coding HEVC to support HDR data provided by an embodiment of the present application.
  • Live broadcast refers to a technology that collects broadcaster data through certain equipment, compresses it into a watchable and transmittable video stream through a series of processes (such as video encoding), and outputs it to the viewing client. Usually production and viewing are synchronized.
  • On-demand refers to putting some pre-recorded videos on the website and playing them according to the different hobbies of netizens. Compared with on-demand broadcast, live broadcast has higher software and hardware requirements.
  • HDR High Dynamic Range
  • HDR can provide more color range and image details, improve the contrast between light and dark in the image, what you see is what you get, and greatly restore the real environment and present Extremely high image quality.
  • HDR adopts a larger brightness range, wider color gamut, and larger bit depth than standard dynamic range images; different from the gamma correction conversion function and new encoding method, HDR is used in photography, photography, video, It has applications in games and other fields.
  • Standard Dynamic Range Sometimes also called LDR, compared with HDR, SDR images do not have more comprehensive details and do not have a wider color range. When an SDR image is overexposed, the information in the brighter parts of the image will be lost; similarly, when the image is underexposed, the information in the darker parts of the image will also be lost.
  • Tone mapping refers to compressing the brightness of the HDR image into the SDR range, trying to maintain the details and colors of the original HDR image. Tone mapping mainly includes two aspects, brightness mapping and color gamut mapping, and conversely there is inverse tone mapping, which maps SDR images to HDR images.
  • HDR game live broadcast refers to the live broadcast of HDR games, allowing the audience to experience the HDR effect, which can greatly improve the audience experience.
  • obs-studio Also called OBS, it is an open source software for live video broadcasting that provides users with functions such as game screen capture, encoding, and streaming.
  • DirectX It is a multimedia programming interface widely used in Windows video game development.
  • Hook function Before the system calls the function, the hook program first captures the message, and the hook function first obtains control. At this time, the hook function can process (change) the execution behavior of the function.
  • Live stream data The video and audio collected by the anchor user are encoded to form a code stream suitable for transmission in the network.
  • the receiving end can be decoded and played immediately without waiting to receive all the data.
  • Anchor Also known as anchor user, it refers to a user who performs and shares the performance in the live broadcast business.
  • Live broadcast room Corresponding to the anchor user, the live broadcast platform allows the anchor user to publish applications of different live broadcast services.
  • Live broadcast audience the audience for the performance of the anchor user in the live broadcast business.
  • HDR game screen performance of games that support HDR It can provide a greater color range and image details than SDR game screens, and a greater image light and dark contrast than SDR game screens.
  • HDR game screens can present extremely high image quality.
  • non-HDR game images of games that do not support HDR have a smaller color range, fewer image details, low image contrast between light and dark, and poorer image quality.
  • HDR offline on demand videos are gradually coming into view.
  • Major video platforms also support HDR playback. However, for offline HDR videos, major video platforms can only support special software playback or mobile devices, and do not support browsers. HDR playback. For offline HDR video playback, mobile terminals all use H.265 encoding format, which will bring high costs.
  • FIG. 1 is a comparison diagram between the original HDR game screen and the OBS live broadcast screen in the related technology. The left picture is the original HDR game screen and the right picture is the OBS live broadcast screen. As shown in Figure 1, the OBS live broadcast screen is compared with the original HDR The game screen image quality is poor.
  • the method of adding LUT processing is generally used.
  • Figure 2 it is a flow chart of implementing HDR game live broadcast based on LUT processing in related technologies.
  • the live broadcast software collects the game screen 202, adds the collected HDR game screen 201 to the live broadcast software canvas 203, and then maps the HDR color to an SDR color similar to the HDR game screen through LUT processing 204 to obtain the live broadcast screen 205.
  • LUT processing 204 maps the HDR color to an SDR color similar to the HDR game screen through LUT processing 204 to obtain the live broadcast screen 205.
  • the method in the related technology does not fully support HDR, and the final display is the live SDR picture. Therefore, the live broadcast audience with HDR equipment cannot experience the same HDR effect as the host; and, the picture processed by LUT It may cause greater distortion from the original picture, and adding LUT processing will increase the algorithm complexity of the entire live video processing process.
  • embodiments of the present application provide a live video processing method that fully supports HDR from rendering, pre-processing, and encoding instead of using LUT processing, thereby allowing anchors and Live viewers can truly experience the benefits of HDR live broadcast, such as excellent pictures, color range greater than the color range threshold, image details greater than the image detail quantity threshold, image light and dark contrast greater than the light and dark contrast threshold, and extremely high image quality, etc. .
  • the embodiment of this application proposes a solution that can realize HDR game live broadcast.
  • the solution at least includes the following contents: collection of HDR game screen content, HDR game screen rendering and synthesis of the screen and other SDR content, and encoding and streaming of HDR game screen content. , each of which will be described in detail below.
  • a run mode button is displayed on the setting interface of the live broadcast application; then, in response to the selection operation of the run mode button and the live broadcast start operation of the target live broadcast object, based on the target live broadcast
  • the original video of the object and the operating mode corresponding to the selection operation are used to obtain the live video of the target live broadcast object; finally, the live video is displayed on the live broadcast interface of the live broadcast application; in this operating mode, the live video has a corresponding screen display effect.
  • the live video processing device provided by the embodiment of the present application can be implemented as a terminal or as a server. Both the terminal and the server are used to implement the live video processing method.
  • Electronic equipment that is to say, the live video processing equipment is an electronic equipment.
  • the live video processing device provided by the embodiment of the present application can be implemented as a laptop computer, a tablet computer, a desktop computer, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated message devices, portable game devices), smart robots, smart home appliances, smart vehicle-mounted equipment, and other terminals with image processing functions; in another implementation, the live video processing device provided by the embodiment of the present application can also be implemented as a server, Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud communications.
  • the terminal and the server can be connected directly or indirectly through wired or wireless communication methods, which are not limited in the embodiments of this application. Below, an exemplary application when the live video processing device is implemented as a terminal will be described.
  • FIG 3 is an optional architectural schematic diagram of the live video processing system provided by the embodiment of the present application.
  • the live broadcast application adopts a specific operation model for the target live broadcast object to perform live broadcast to present the live broadcast.
  • the live video processing system 10 at least includes a terminal 100, a network 200 and a server 300, where the server 300 is a server for live broadcast applications, and the terminal 100 can constitute the live video processing device of the embodiment of the present application.
  • the terminal 100 connects to the server 300 through the network 200.
  • the network 200 may be a wide area network or a local area network, or a combination of the two.
  • the client of the live broadcast application can obtain the original video of the operation on the target live broadcast object in the operation application.
  • the terminal 100 i.e., the anchor terminal
  • the terminal 100 obtains the live broadcast video of the target live broadcast object from the server 300 based on the original video of the target live broadcast object and the running mode corresponding to the selection operation. ; And display the live video on the live broadcast interface of the live broadcast application of all terminals.
  • the server 300 determines the live broadcast video of the target live broadcast object based on the original video of the target live broadcast object and the running mode corresponding to the selection operation. , and distribute the live video to the host terminal and all audience terminals.
  • the live video processing method provided by the embodiment of the present application can also be based on a cloud platform and implemented through cloud technology.
  • the above-mentioned server 300 can be a cloud server, and the cloud server is based on the original video of the target live broadcast object and the operation corresponding to the selection operation. mode to determine the live video of the target live broadcast object.
  • cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to realize data calculation, storage, processing, and sharing.
  • Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool and use it on demand, which is flexible and convenient. Cloud computing technology will become an important support.
  • the background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data at different levels will be processed separately, and all types of industry data need to be powerful. System backing support can only be achieved through cloud computing.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device shown in Figure 4 (ie, a live video processing device) includes: at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330.
  • the various components in the electronic device are coupled together through bus system 340 .
  • the bus system 340 is used to implement connection communication between these components.
  • the bus system 340 also includes an electrical Source bus, control bus and status signal bus.
  • the various buses are labeled bus system 340 in FIG. 4 .
  • the processor 310 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware Components, etc., wherein the general processor can be a microprocessor or any conventional processor, etc.
  • DSP Digital Signal Processor
  • User interface 330 includes one or more output devices 331 that enable the presentation of media content, and one or more input devices 332.
  • Memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, etc. Memory 350 optionally includes one or more storage devices physically located remotely from processor 310 . Memory 350 includes volatile memory or non-volatile memory, and may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM, Read Only Memory), and volatile memory can be random access memory (RAM, Random Access Memory). The memory 350 described in the embodiments of this application is intended to include any suitable type of memory. In some embodiments, the memory 350 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplarily described below.
  • the operating system 351 includes system programs used to process various basic system services and perform hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., which are used to implement various basic services and process hardware-based tasks;
  • Network communications module 352 for reaching other computing devices via one or more (wired or wireless) network interfaces 320.
  • Example network interfaces 320 include: Bluetooth, Wireless Compliance Certification (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.;
  • An input processing module 353 for detecting one or more user inputs or interactions from one or more input devices 332 and translating the detected inputs or interactions.
  • the device provided by the embodiment of the present application can be implemented in software.
  • Figure 4 shows a live video processing device 354 stored in the memory 350.
  • the live video processing device 354 can be a device in an electronic device.
  • the live video processing device which can be software in the form of programs and plug-ins, includes the following software modules: a first display module 3541, an acquisition module 3542, and a second display module 3543. These modules are logical and therefore based on the functions implemented. Any combination or further split is possible. The functions of each module are explained below.
  • the device provided by the embodiment of the present application can be implemented in hardware.
  • the device provided by the embodiment of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the present application.
  • the live video processing method provided by the embodiment for example, the processor in the form of a hardware decoding processor can use one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, programmable logic device (PLD, Programmable Logic Device), complex programmable logic device (CPLD, Complex Programmable Logic Device), field programmable gate array (FPGA, Field-Programmable Gate Array) or other electronic components.
  • ASIC application specific integrated circuits
  • DSP digital signal processor
  • PLD programmable logic device
  • CPLD Complex Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • the live video processing method provided by each embodiment of the present application can be executed by an electronic device, where the electronic device can be any terminal with image processing functions, video display functions and game functions, or it can also be a server, that is, the electronic device
  • the live video processing method in each embodiment of the application can be executed by a terminal, a server, or the terminal interacts with a server.
  • Figure 5 is an optional flow diagram of the live video processing method provided by the embodiment of the present application. The following will be described in conjunction with the steps shown in Figure 5. It should be noted that the live video processing method in Figure 5 This is illustrated by taking the terminal as the execution subject as an example.
  • Step S501 Display a running mode button on the setting interface of the live broadcast application.
  • the anchor runs a live broadcast application on the terminal, where the live broadcast application provides a setting interface.
  • the settings interface allows you to set the live broadcast parameters of the current live broadcast process.
  • the device interface of the live broadcast application may have a running mode button, which is used to select whether to run the live broadcast application according to a specific running mode, so as to output the live video using the video output effect corresponding to the specific running mode during the live broadcast process.
  • the specific operating mode is the HDR operating mode as an example.
  • the HDR operating mode is displayed on the setting interface.
  • the HDR operating mode is used to indicate that the live video output during the current live broadcast process is HDR. video.
  • the anchor selects the HDR switch corresponding to the HDR operating mode in the setting interface, the live video output during this live broadcast process is an HDR video.
  • the method provided by the embodiment of this application can be used The live video processing method performs video processing to obtain HDR video.
  • Step S502 in response to the selection operation of the run mode button and the live broadcast start operation of the target live broadcast object, obtain the live broadcast video of the target live broadcast object based on the original video of the target live broadcast object and the running mode corresponding to the selection operation.
  • the live broadcast start operation refers to the operation of clicking the start button in the live broadcast application.
  • the live broadcast starts in response to the live broadcast start operation.
  • the user sets the live broadcast parameters and clicks the "Start Live Broadcast" button, the live video of the target live broadcast object can be obtained and the video can be pushed to achieve live broadcast.
  • the target live broadcast object may be any live broadcast type; for example, the target live broadcast object may be any live broadcast type such as games, shopping, performances, lectures, etc.
  • the target live broadcast object may be any type of live broadcast object; for example, the target live broadcast object may be any type of live broadcast object such as game characters, sold goods, performance roles, characters, content speeches, etc.
  • an operation application can also be run on the terminal.
  • the original video of the target live broadcast object can be generated. That is to say, the user performs a series of operations on the operation application to generate the original video. video.
  • the operation application may be a game application.
  • the anchor operates on the client of the game application to run the game application, thereby generating a game running screen.
  • the game running screen constitutes the original video of the target live broadcast object.
  • the live broadcast application may have a video recording function. That is to say, the live broadcast application may call the video collection module on the terminal to collect videos and generate original videos.
  • the anchor can perform a program while the live broadcast application is running, and collect the anchor's performance through the camera of the anchor terminal to generate the original video.
  • the anchor operates on the client of the game application to run the game application, and a game running screen is generated during the running of the game application.
  • the live broadcast application can obtain the game video by recording the game running screen. Among them, the game video constitutes the original video of the target live broadcast object.
  • the terminal obtains the live broadcast video of the target live broadcast object, where the live video is based on the original video of the target live broadcast object and generated by the operating mode corresponding to the selection operation.
  • generating the live video of the target live broadcast object based on the original video of the target live broadcast object and the operating mode corresponding to the selection operation can be implemented by the server of the live broadcast application, that is, the background server of the live broadcast application responds to the selection operation and When the live broadcast starts, the live video of the target live broadcast object is generated based on the original video of the target live broadcast object and the operating mode corresponding to the selection operation, and the live video is sent to the terminal.
  • the live video in the operating mode corresponding to the selection operation, has a corresponding picture display effect, wherein the picture display effect corresponds to a picture quality parameter, and the picture quality parameter is greater than the preset picture quality parameter threshold, Or, the picture quality parameter is greater than or equal to the picture quality parameter of the original video.
  • the picture quality parameter here may be clarity, and the resolution of the live video may be greater than the resolution threshold, or the resolution of the live video may be greater than or equal to the resolution of the original video.
  • the picture quality parameter here can be resolution, then the resolution of the live video can be greater than the resolution threshold, or the resolution of the live video can be greater than or equal to the original The original video resolution.
  • the live video when generating a live video, since the original video generated in the operating application has preset picture quality parameters, when generating a live video, the live video can be generated based on the picture quality parameters. For example, the live video can be at least Ensure that the picture quality parameters of the live video and the original video are the same, so that the video obtained during the live broadcast has the same or better effect than the final video.
  • Step S503 Display the live video on the live broadcast interface of the live broadcast application.
  • the live video after the live video is generated, the live video can be distributed to each viewer terminal watching the live broadcast, and the live video can be displayed on the current interface of each viewer terminal, thereby enabling the host to push the live broadcast process.
  • the picture quality parameters of the live video may be the same as the picture quality parameters of the original video.
  • the picture quality parameters include but are not limited to at least one of the following: color range, image light and dark contrast, color space, color format, color gamut, brightness range, etc.
  • the live video processing method provided by the embodiment of the present application, during the live broadcast process of the target live broadcast object through the live broadcast application, responds to the selection operation of the running mode button and the live broadcast start operation of the target live broadcast object, based on the original video of the target live broadcast object and the operating mode corresponding to the selected operation, obtain and display the live video of the target live broadcast object on the live broadcast interface of the live broadcast application, wherein the live video has a corresponding screen display effect in the operating mode, so that the generation of the video matching the operating mode is achieved Live video with excellent screen display effect, avoid live screen distortion, and improve the live viewing experience of live viewing users.
  • the live video processing system at least includes a terminal and a server, where the terminal includes a host terminal and multiple audience terminals.
  • Figure 6 is another live video processing method provided by an embodiment of the present application.
  • Optional flow chart in which Figure 6 takes a viewer terminal as an example for illustration.
  • the live broadcast application is running on both the anchor terminal and the audience terminal, or the live broadcast application is running on the anchor terminal, and the audience terminal enters the live broadcast room through a mini program or other third-party program to watch the live broadcast.
  • the anchor terminal also runs an operation application corresponding to the target live broadcast object. By running the operation application and performing corresponding operations on the client of the operation application, the original video of the target live broadcast object is generated.
  • the operation application can be a game application
  • the anchor can use the game application to operate the game character (that is, the target live broadcast object) to generate a game video (that is, the original video).
  • the live video processing method includes the following steps:
  • Step S601 Display a run mode button on the setting interface of the live broadcast application running on the anchor terminal.
  • Step S602 The anchor terminal receives the anchor's selection operation on the run mode button.
  • Step S603 The anchor terminal receives the anchor's live broadcast start operation for the target live broadcast object.
  • Step S604 The anchor terminal receives a series of operation instructions input by the anchor on the client of the operating application, and generates the original video of the target live broadcast object based on the operation instructions.
  • the live broadcast application since the live video displayed by the live broadcast application is generated in real time based on the obtained original video, the live broadcast application needs to have permission to obtain the original video generated by the operating application, that is, when starting the live broadcast application When operating an application, you can send a permission acquisition reminder message to the host in advance. This permission acquisition reminder message is used to remind the host that the live broadcast application needs to have permission to obtain the original video generated by the operation application. Only when the host chooses to allow acquisition, the live broadcast application can have the permission to obtain the original video generated by the operating application, and obtain the original video when the operating application generates the original video.
  • the original video when the live broadcast application generates the original video by operating the application, the original video can be obtained in the following manner: first, a texture area is initialized in the preset storage location of the live broadcast application; wherein the texture area can be shared across processes . Then, when generating the original video of the target live broadcast object, the hook function is called to perform hook processing on the original video, and the original video after hook processing is obtained. Finally, copy the hooked original video to the texture area.
  • the texture area is an area used to copy the original video picture.
  • the texture area can be shared across processes. Alternatively, the texture area can write and store different videos.
  • the texture area in the embodiment of the present application is a shared texture. In other words, video images obtained by different processes can be copied to the same texture area.
  • calling a hook function to perform hook processing on the original video can be implemented in the following manner: first, obtain the specified message used to generate the original video of the target live broadcast object, and then When generating the original video of the target live broadcast object, call the hook function to hook the specified message used to generate the original video. Then, modify the specified message processed by the hook to obtain the modified specified message. Finally, the original video of the target live broadcast object is obtained based on the modified specified message, and the original video after hook processing is obtained.
  • the specified message may be a generation instruction used in the operation application to generate the original video. Based on the generation instruction, the original video of the target live broadcast object can be generated.
  • the control right to the specified message is obtained. That is to say, the live broadcast application can control the specified message to generate the original video, so the hook can be modified based on the original video generation requirements.
  • the specified message after processing to add the functionality I currently need in the specified message.
  • Step S605 The anchor terminal sends the original video of the target live broadcast object and the operating mode corresponding to the selection operation to the server.
  • Step S606 The server generates a live video of the target live broadcast object based on the original video of the target live broadcast object and the operating mode corresponding to the selection operation.
  • the server transcodes and distributes the live video.
  • Transcoding refers to generating live videos with more bit rates, resolutions, and dynamic ranges for different users to watch.
  • the operating mode corresponding to the selection operation matches the video type of the original video of the target live broadcast object, and if the video type of the original video is a high-quality video type (that is, the picture quality parameter of the original video is greater than or equal to the predetermined When the picture quality parameter threshold is set), a live video with the same video type as the original video can be generated.
  • the video type of the original video is not a high-quality video type (high-quality video type means that the picture quality parameter of the original video is less than the preset picture quality parameter threshold), then the video type of the original video can also be processed. Adjustment, that is, repairing the picture of the original video, thereby improving the picture quality parameters of the original video, and obtaining a live video with a high-quality video type.
  • Step S607 The server sends the live video to all viewer terminals.
  • Step S608 The viewer terminal displays the live video on the live broadcast interface of the live broadcast application; wherein the picture quality parameters of the live video are the same as the picture quality parameters of the original video or the live video has a high-quality video type.
  • the live video processing method provided by the embodiment of the present application generates a live video of the target live broadcast object based on the original video of the target live broadcast object and the operating mode corresponding to the selection operation.
  • the picture quality parameters of the live video are the same as those of the original video.
  • the live video has a high-quality video type, that is to say, the picture quality parameters of the generated index video are not less than the picture quality parameters of the original video, thereby improving the picture effect of the live video.
  • FIG 7 is another optional flow diagram of the live video processing method provided by the embodiment of the present application. As shown in Figure 7, the method includes the following steps:
  • Step S701 Display a run mode button on the setting interface of the live broadcast application running on the anchor terminal.
  • Step S702 The anchor terminal receives the anchor's selection operation on the run mode button.
  • Step S703 The anchor terminal receives the anchor's live broadcast start operation for the target live broadcast object.
  • Step S704 The anchor terminal receives a series of operation instructions input by the anchor on the client of the operating application, and generates the original video of the target live broadcast object based on the operation instructions.
  • Step S705 When generating the original video of the target live broadcast object, the anchor terminal calls the open shared resource function Open a shared handle to the graphics infrastructure.
  • a graphics hook in the form of a dynamic link library (for example, graphics-hook.dll) can be built in advance and the graphics hook is injected into the operating application.
  • the operating application is operated by calling the open shared resource function
  • the shared handle of the process on the graphics infrastructure, the open shared resource function i.e. open shared resource interface
  • the open shared resource function can obtain the texture area initialized in the preset storage location of the live broadcast application.
  • Step S706 The anchor terminal obtains the texture area and the area identifier of the texture area that can be shared across processes through the shared handle.
  • each texture area when each texture area is initialized, a corresponding area identifier is generated, and the area identifier is used to distinguish different texture areas.
  • Step S707 The anchor terminal determines the format of the area identifier, and determines the video picture type of the generated original video based on the format of the area identifier.
  • the format field of the area identifier can be obtained to determine whether the format of the area identifier is a preset format.
  • the format of the area identifier is a preset format, it can be determined that the video picture type of the generated original video is a specific type. For example, if the format of the obtained region identifier is DXGI_FORMAT_R10G10B10A2_UNORM format, it can be determined that the original video captured is an HDR video.
  • Step S708 The anchor terminal sends the original video of the target live broadcast object, the video picture type of the original video, and the operating mode corresponding to the selection operation to the server.
  • Step S709 when the video picture type of the original video matches the running mode corresponding to the selection operation, the server uses the preset color format and preset color space to render the original video onto the target canvas of the live broadcast application to obtain the rendered video.
  • the video picture type of the original video may be an HDR type, that is, the original video may be an HDR type video.
  • the preset color format is a color format matching the HDR type
  • the preset color space is a color space matching the HDR type
  • the default color format can be the DXGI_FORMAT_R10G10B10A2_UNORM color format. In this color format, RGBA has 10 bits each and A occupies 2 bits.
  • the default color space can be the DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 color space. In this color space, BT.2020 is used. HDR wide color gamut and follows the HDR PQ curve.
  • Step S710 The server encodes the rendered video to obtain the live video of the target live broadcast object.
  • encoding the rendered video may include software encoding and hardware encoding. That is to say, step S710 may be implemented in either of the following two ways:
  • Method 1 Perform format conversion on the rendered video to obtain the format-converted video; perform software encoding on the format-converted video to obtain the live video of the target live broadcast object.
  • the rendered video may be RGB format data; in a feasible implementation, format conversion processing is performed on the rendered video to obtain the format-converted video, which can be achieved in the following manner: First, convert the RGB format data Perform bit operations to obtain the RGB component data of each pixel. Then, the RGB component data of each preset number of pixels is determined as a data group. Then, matrix conversion is performed on the RGB component data in each data group to obtain YUV data corresponding to each pixel. Finally, based on the YUV data corresponding to each pixel, the video data after format conversion is determined.
  • RGB format data is stored in a graphics processor (GPU, Graphics Processing Unit), and the format conversion processing of the rendered video can be implemented through a central processing unit (CPU, Central Processing Unit). Therefore, when RGB Before the format data is subjected to bit operations, the RGB format data can be copied from the GPU to the CPU. After that, the CPU performs bit operations on the RGB format data to obtain the RGB component data of each pixel, and completes subsequent steps to complete the format conversion process of the rendered video through the CPU.
  • GPU Graphics Processing Unit
  • CPU Central Processing Unit
  • the format conversion process is performed on the rendered video to obtain the format-converted video.
  • Frequency can be achieved in the following ways: first, obtain the format texture of the RGB format data, and linearly convert the format texture to obtain the format-converted RGB data. Then, the format-converted RGB data is sequentially subjected to color matrix conversion and reordering processing to obtain YUV data with preset bits. Finally, based on the YUV data with preset bits, the video data after format conversion is determined.
  • the format conversion process of the rendered video can be completed through the GPU. That is to say, the format texture is linearly converted through the GPU to obtain the format-converted RGB data, and the format-converted RGB data is sequentially processed. Color matrix conversion and reordering processing.
  • Method 2 Perform format conversion on the rendered video to obtain the format-converted video; perform hardware encoding on the format-converted video to obtain the live video of the target live broadcast object.
  • the video picture type of the live video may be an HDR type, that is, the live video may be an HDR type video.
  • the embodiment of this application also provides two methods for obtaining HDR metadata:
  • Method 1 of obtaining HDR metadata Before performing hardware encoding on the format-converted video, create a swap chain for the original video rendering and obtain the preset sample metadata; use the swap chain as the starting detection point , traverse the video data corresponding to the original video, and determine the data content in the video data that is the same as the sample metadata; determine the offset address based on the address information corresponding to the same data content and the address information of the sample metadata; determine the offset address HDR metadata for the original video.
  • the offset address is determined based on the address information corresponding to the same data content and the address information of the sample metadata, which may be to determine the address difference between the address information corresponding to the same data content and the address information of the sample metadata, and The address difference is determined as the offset address.
  • the swap chain is a series of virtual frame buffers, which are used by the graphics card and the graphics application programming interface (API, Application Programming Interface) to stabilize the frame rate and some other functions.
  • Swap chains usually exist in graphics memory, but can also exist in system memory. Not using a swap chain may result in rendering lags. The existence and use of a swap chain is required by many graphics APIs.
  • a swap chain with two buffers is a double buffer.
  • hardware encoding is performed on the format-converted video. This may be based on the HDR metadata of the original video. Hardware encoding is performed on the format-converted video to obtain the live video of the target live broadcast object.
  • Method 2 of obtaining HDR metadata Obtain the HDR metadata of the original video from the video data of the original video; determine the key frames in the live video after hardware encoding; add the HDR metadata to the key frames as supplementary enhancement information in the data.
  • Step S711 the server sends the live video to all audience terminals.
  • Step S712 The viewer terminal displays the live video on the live broadcast interface of the live broadcast application; wherein the picture quality parameters of the live video are the same as the picture quality parameters of the original video.
  • the live video processing method provided by the embodiment of the present application provides different format conversion methods to perform format conversion processing on the encoded video, thereby providing users with more optional operation methods, so that users can perform format conversion based on the performance of the currently used GPU and CPU.
  • Choose the appropriate format conversion method to convert the encoded video in addition, you can use software encoding or hardware encoding to encode the rendered video, which can also provide users with more optional operation methods and improve the quality of the video.
  • the encoding processing effect enables the live video processing equipment to efficiently generate live videos of the target live broadcast objects, thereby improving the live broadcast effect.
  • the embodiment of the present application provides a live video processing method, which can be applied to HDR game live broadcast.
  • the HDR switch option is added to the settings page of the live broadcast application to provide the user with the ability to turn on HDR live broadcast.
  • it is the setting page of the live broadcast application provided by the embodiment of the present application.
  • HDR switch option 801 is provided on the settings page 80.
  • the anchor is performing a game live broadcast, if the game is an HDR game, the HDR switch option 801 can be checked to achieve HDR game live broadcast.
  • Figure 9 is a selection interface diagram for turning on game HDR provided by an embodiment of the present application.
  • the anchor checks the HDR switch option 801 on the settings page, he can also set a function option 901 for turning on game HDR.
  • click the game process 101 to obtain the selectable game process 102, and then select the game 103 to be broadcast live.
  • click the start live broadcast button 111 to start the HDR game live broadcast.
  • Figure 12 is a comparison diagram between the HDR game live broadcast screen and the OBS live HDR game screen according to the embodiment of the present application.
  • the upper part of the path is the distortion effect of the OBS live HDR game
  • the lower half is the distortion effect of the OBS live HDR game according to the embodiment of the present application.
  • HDR game live broadcast is normal, and the audience gets the same experience as the host.
  • game live broadcast generally includes the steps shown in Figure 13: S131, collect game screen; S132, render the game screen; S133, game screen video pre-processing; S134, game screen video encoding, generate live broadcast video; S135, live video streaming.
  • S131 collect game screen
  • S132 render the game screen
  • S133 game screen video pre-processing
  • S134 game screen video encoding
  • live broadcast video S135, live video streaming.
  • the embodiment of this application will fully support HDR game live broadcast.
  • step S131 HDR game screen collection is divided into two parts, which require operations during the game process and during the live broadcast software process respectively.
  • the game process behavior includes: first writing a hook function (for example, it can be the graphics-hook.dll function).
  • This hook function can hook (that is, hook out) the current function (Present function) of the system.
  • the current function is 3D
  • the game process will call this current function at a certain time interval.
  • Figure 14 is a schematic diagram of different implementation methods for hooking messages by the hook mechanism provided by the embodiment of the present application.
  • the hook mechanism allows the live broadcast program to intercept and process window (Windows) messages or specified events. When the specified message is sent, the hook The program 141 can capture the message before it reaches the target window, thereby gaining control over the message, and can then process or modify the message and add required functions.
  • the actual operation on the window is to create the texture (for example, through CreateTexture2D) and add miscellaneous resource sharing (for example, D3D11_RESOURCE_MISC_SHARED).
  • identification corresponding to the area identification of the above texture area
  • open the get shared handle function for example, GetSharedHandle of the graphics infrastructure (DXGI, Microsoft DirectX Graphics Infrastructure,) to obtain the shared handle of the texture.
  • the hook handles the current function of the system.
  • the game screen Before the game screen is displayed on the screen, the game screen can be copied to the above texture.
  • the hook function can be injected into the game process.
  • the above shared handle is opened through the open shared resource interface (for example, OpenSharedResource) of ID3D11Device.
  • the open shared resource interface can obtain the ID3D11Texture2D Texture object.
  • the texture description (D3D11_TEXTURE2D_DESC) can be obtained through the texture description acquisition module (GetDesc) of ID3D11Texture2D, and then the format (Format) field of the texture description can be read. If the format is DXGI_FORMAT_R10G10B10A2_UNORM format, the collected game screen is considered to be an HDR game screen. .
  • the DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 color space used by SDR live broadcast has a 709 color gamut and a gamma curve (Gamma curve) in this color space.
  • the DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 color space (that is, the default color space) is used.
  • the HDR wide color gamut of BT.2020 follows the PQ curve of HDR.
  • Figure 16 is a comparison diagram of the PQ curve and the traditional gamma curve. As shown in Figure 16, the PQ curve can express a wider range of brightness range.
  • Figure 17 is a comparison diagram of the BT.2020 color gamut and the BT.709 color gamut. As shown in Figure 17, the BT.2020 color gamut can express more colors.
  • the game screen video pre-processing may be HDR encoding pre-processing. Because the HDR game screen can be rendered on the game HDR canvas through step S132, but HDR encoding requires YUV420P10 LE format or YUV P010 format, as shown in Figure 18, YUV (i.e. YUV420P10LE format or YUV P010) is only 10 bits (X in the picture Indicates 0, which is placeholder data), and the canvas uses the R10G10B10A2 format, which requires format conversion. Two solutions are proposed here to convert 10-bit RGB to 10-bit YUV.
  • FIG. 19 is a schematic flow chart of the CPU conversion solution provided by the embodiment of the present application. As shown in Figure 19, first in step S191, 10-bit RGB data (R10G10B10A2) is copied from the GPU to the CPU; then in step S192, YUV is based on RGB sampling data. The 10-bit RGB data can obtain the R, G, and B component data of each point through the following bit operations:
  • the average of four points can be taken.
  • 10-bit YUV data is obtained, and in step S193, the 10-bit YUV data is sent to the encoder.
  • FIG. 20 is a schematic flow chart of the GPU conversion solution provided by the embodiment of the present application.
  • the RGB10 format texture i.e., R10G10B10A2
  • the RGB16 format texture i.e., RGBA16
  • step S202 through color matrix conversion, 10-bit YUV data (the upper 10 bits are valid) is obtained; in step S203, reordering is performed and divided by 64 to obtain 10-bit YUV data (i.e., YUV420P10LE);
  • step S204 copy the 10-bit YUV data from the GPU to the CPU; in step S205, send the 10-bit YUV data to the encoder.
  • Figure 21 is a performance comparison chart between the CPU conversion scheme and the GPU conversion scheme.
  • Algorithm 1 is the CPU conversion scheme
  • Algorithm 2 is the GPU conversion scheme.
  • the CPU usage of Algorithm 1 is 10%
  • the CPU usage of Algorithm 2 is 10%.
  • the occupancy is 0; the frame processing time of algorithm one is 22 milliseconds, and the frame processing time of algorithm two is 1.2 milliseconds.
  • step S134 during the game screen video encoding process, two HDR encoding methods are supported. Among them, one is CPU software encoding and the other is GPU hardware encoding.
  • the libx264 open source encoder can be directly used.
  • the formats used in the embodiments of this application are AVCOL_SPC_BT2020_NCL, AVCOL_PRI_BT2020, AVCOL_TRC_SMPTE2084 and 10-bit YUVAV_PIX_FMT_YUV420P10LE. It should be noted that this encoding format is not a standard format for HDR.
  • the nvenc_hevc hardware encoder can be used.
  • the formats used in the embodiments of this application are AVCOL_SPC_BT2020_NCL, AVCOL_PRI_BT2020, AVCOL_ TRC_SMPTE2084 and 10-bit AV_PIX_FMT_P010LE.
  • the embodiments of this application propose the following data solutions, which are divided into game HDR metadata acquisition methods and HEVC hard-coded support HDR data methods.
  • Figure 22 is a flow chart of a method for obtaining game HDR metadata provided by an embodiment of the present application. As shown in Figure 22, the process of obtaining game HDR metadata includes the following steps:
  • Step S221 Enter the HDR metadata exchange command (swap4*hdrmetadata).
  • create an independent process create the device (DEVICE) and swap chain (SwapChain) data required for D3D rendering, and set an HDR sample metadata.
  • the HDR sample metadata corresponds to a swap4 address.
  • Step S223, determine whether the traversed video data is the same as the HDR sample metadata.
  • the subsequent data of the video data is traversed one by one, and the content equal to the HDR sample metadata is determined to obtain an offset address offset.
  • Different versions of operating systems have different offset addresses.
  • step S224 is executed; if the judgment result is no, step S225 is executed.
  • Step S225 add 1 to the value of i.
  • the swap chain of the game process is obtained through hook processing, and the content of the offset address is read.
  • the content of the offset address is the HDR metadata, and is then transmitted back to the assistant process through a pipeline.
  • FIG 23 is an interface diagram of the game HDR metadata acquisition method provided by the embodiment of the present application.
  • the HDR metadata address 231 is obtained through traversal.
  • the HDR metadata address 231 there is HDR metadata content 232.
  • a swap address (ie, swap4 address) 233 is also provided, as well as the same content 234 as the HDR metadata under the swap address 233, that is, the content in the HDR sample metadata.
  • HDR sample metadata is stored under the swap4 address
  • HDR metadata is stored under the HDR metadata address.
  • Figure 24 is a flow chart of a method for hard-coding HEVC to support HDR data provided by an embodiment of the present application. As shown in Figure 24, the process of hard-coding HEVC to support HDR data includes the following steps:
  • Step S241 determine whether the current frame of the game video (that is, the original video of the target live broadcast object) is a key frame.
  • step S242 is executed; if the judgment result is no, step S243 is executed.
  • Step S242 Obtain the HDR metadata of the game video through the AV bitstream filter (AVBitStreamFilter).
  • Step S243 obtain the Real Time Messaging Protocol (RTMP, Real Time Messaging Protocol) data stream (RtmpStream).
  • RTMP Real Time Messaging Protocol
  • RtmpStream Real Time Messaging Protocol
  • the H264 encoding method can use the AVBitStreamFilter of FFMPEG (a toolkit for processing audio and video) to add supplemental enhancement information (SEI, Supplemental Enhancement Information), but the 265AVBitStreamFilter does not define HDR metadata, so this
  • the application embodiment transforms the FFMPEG source code and implements 265AVBitStreamFilter's support for HDR metadata.
  • a step was added to the original encoding process: using AVBitStreamFilter to obtain the HDR metadata information obtained from the game, and adding the SEI of the HDR metadata to the key frames output by the encoder.
  • step S135 of the live video push after the encoding is completed, the encoded stream can be output to an offline MP4 file and can also be used for online live broadcast.
  • the live video processing method provided by the embodiment of the present application at least includes the following key points: collection of HDR game screen content; HDR game screen rendering and synthesis of the screen and other SDR content; HDR game screen encoding and live streaming; HDR game Screen recording.
  • the contents related to user information for example, the anchor’s operation
  • user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
  • the live video processing device 354 includes: a first display module 3541 configured as A run mode button is displayed on the setting interface of the live broadcast application; the acquisition module 3542 is configured to respond to the selection operation of the run mode button and the live broadcast start operation of the target live broadcast object, based on the original video of the target live broadcast object and the Select the operating mode corresponding to the operation to obtain the live video of the target live broadcast object; wherein the live video has a screen display effect corresponding to the operating mode; the second display module 3542 is configured to display the live video in the live broadcast application The live video is displayed on the live broadcast interface.
  • the device further includes: an initialization module configured to initialize the preset storage location of the live broadcast application to obtain a texture area; wherein cross-process sharing can be achieved in the texture area; the first function
  • the calling module is configured to, when generating the original video of the target live broadcast object, call the hook function to perform hook processing on the original video to obtain the hook-processed original video; the copy module is configured to write the hook-processed original video. into the textured area.
  • the first function calling module is further configured to: obtain a specified message for generating the original video of the target live broadcast object; when generating the original video of the target live broadcast object, call a hook function to The specified message used to generate the original video is subjected to hook processing; the specified message after hook processing is modified to obtain the modified specified message; the original video of the target live broadcast object is obtained based on the modified specified message, and the original video of the target live broadcast object is obtained.
  • the original video processed by the hook is further configured to: obtain a specified message for generating the original video of the target live broadcast object; when generating the original video of the target live broadcast object, call a hook function to The specified message used to generate the original video is subjected to hook processing; the specified message after hook processing is modified to obtain the modified specified message; the original video of the target live broadcast object is obtained based on the modified specified message, and the original video of the target live broadcast object is obtained. The original video processed by the hook.
  • the device further includes: a second function calling module configured to call an open shared resource function to open the shared handle of the graphics infrastructure when generating the original video of the target live broadcast object; an information acquisition module configured to In order to obtain a texture area that can be shared across processes and an area identifier of the texture area through the shared handle; a video picture type determination module is configured to determine the format of the area identifier; based on the format of the area identifier, determine the The video frame type of the generated original video.
  • a second function calling module configured to call an open shared resource function to open the shared handle of the graphics infrastructure when generating the original video of the target live broadcast object
  • an information acquisition module configured to In order to obtain a texture area that can be shared across processes and an area identifier of the texture area through the shared handle
  • a video picture type determination module is configured to determine the format of the area identifier; based on the format of the area identifier, determine the The video frame type of the generated original video.
  • the acquisition module is further configured to: when the video picture type of the original video matches the running mode corresponding to the selection operation, use a preset color format and a preset color space to obtain the The original video is rendered onto the target canvas of the live broadcast application to obtain a rendered video; the rendered video is encoded to obtain a live video of the target live broadcast object.
  • the acquisition module is further configured to: perform format conversion processing on the rendered video to obtain format-converted video data; perform software encoding processing on the format-converted video to obtain the target The live video of the live broadcast object; or, perform hardware encoding processing on the format-converted video to obtain the live video of the target live broadcast object.
  • the rendered video is RGB format data
  • the acquisition module is also configured to: perform bit operations on the RGB format data to obtain the RGB component data of each pixel; and convert each preset number of The RGB component data of the pixel is determined as a data group; matrix conversion is performed on the RGB component data in each data group to obtain YUV data corresponding to each pixel; based on the YUV data corresponding to each pixel, the Video after format conversion.
  • the rendered video is RGB format data
  • the acquisition module is further configured to: acquire the format texture of the RGB format data; linearly convert the format texture to obtain the format-converted RGB data ; Perform color matrix conversion and reordering processing on the format-converted RGB data in sequence to obtain YUV data with preset bits; determine the format-converted video based on the YUV data with preset bits .
  • the device further includes: an HDR metadata acquisition module configured to acquire HDR metadata of the original video; the acquisition module is further configured to: based on the HDR metadata of the original video, The format-converted video is subjected to hardware encoding processing to obtain the live video of the target live broadcast object.
  • an HDR metadata acquisition module configured to acquire HDR metadata of the original video
  • the acquisition module is further configured to: based on the HDR metadata of the original video,
  • the format-converted video is subjected to hardware encoding processing to obtain the live video of the target live broadcast object.
  • the HDR metadata acquisition module is further configured to: create a swap chain when rendering the original video, and acquire preset sample metadata; use the swap chain as a starting detection point, traverse Determine the video data corresponding to the original video and the same data content as the sample metadata in the video data; determine the offset based on the address information corresponding to the same data content and the address information of the sample metadata. Address; determine the offset address as the HDR metadata of the original video.
  • the device further includes: a metadata acquisition module configured to acquire the HDR metadata of the original video from the video data of the original video; a key frame determination module configured to determine the hardware encoding Key frames in the processed live video; an information adding module configured to add the HDR metadata as supplementary enhancement information to the frame data of the key frames.
  • a metadata acquisition module configured to acquire the HDR metadata of the original video from the video data of the original video
  • a key frame determination module configured to determine the hardware encoding Key frames in the processed live video
  • an information adding module configured to add the HDR metadata as supplementary enhancement information to the frame data of the key frames.
  • the video picture types of the original video and the live video are both HDR types.
  • Embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes executable instructions.
  • the executable instructions are computer instructions; the executable instructions are stored in a computer-readable storage medium.
  • the processor of the electronic device reads the executable instruction from the computer-readable storage medium and the processor executes the executable instruction, the electronic device is caused to execute the method described above in the embodiment of the present application.
  • Embodiments of the present application provide a storage medium in which executable instructions are stored. When the executable instructions are executed by a processor, they will cause the processor to execute the method provided by embodiments of the present application. For example, as shown in Figure 5 shows the method.
  • the storage medium may be a computer-readable storage medium, such as ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disk, Or memory such as CD-ROM (Compact Disk-Read Only Memory); it can also be various devices including one of the above memories or any combination thereof.
  • FRAM ferroelectric memory
  • ROM Read Only Memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • flash memory magnetic surface memory, optical disk, Or memory such as CD-ROM (Compact Disk-Read Only Memory); it can also be various devices including one of the above memories or any combination thereof
  • executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and their May be deployed in any form, including deployed as a stand-alone program or deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
  • executable instructions may, but do not necessarily correspond to, files in a file system and may be stored as part of a file holding other programs or data, for example, in a Hyper Text Markup Language (HTML) document. in one or more scripts, in a single file that is specific to the program in question, or in multiple collaborative files (e.g., files that store one or more modules, subroutines, or portions of code).
  • executable instructions may be deployed for execution on one computing device (which may be a job runtime determination device), or on multiple computing devices located at one location, or distributed across multiple locations and via Execute on multiple computing devices interconnected by a communications network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本申请实施例提供一种直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品,至少应用于图像处理领域和游戏领域,其中,方法包括:在直播应用的设置界面上显示运行模式按钮;响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;在所述直播应用的直播界面上显示所述直播视频。通过本申请,能够生成与目标直播对象的原始视频具有相同画面质量参数的直播视频,提高直播观看用户的直播观看体验。

Description

直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品
相关申请的交叉引用
本申请基于申请号为202210370093.1、申请日为2022年04月08日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请实施例涉及互联网技术领域,涉及但不限于一种直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品。
背景技术
随着互联网和多媒体技术的发展,目前电竞直播也得到了快速的发展,在电竞直播中,对于高动态范围(HDR,High-Dynamic Range)游戏,没有给主播直接直播的软件,一般需要采用兼容模式。以目前的视频直播开源软件(例如,obs-studio)为例,一般采用增加显示查找表(LUT,Look Up Table)处理的方法,先将HDR游戏画面通过直播软件采集,然后通过LUT处理,将HDR颜色映射到与HDR游戏画面类似的标准动态范围(SDR,Standard-Dynamic Range)颜色,从而得到显示效果在一定的颜色范围内的直播画面,不至于出现特别严重的颜色失真。
但是,相关技术中由于游戏直播软件通常不支持HDR直播且不能通过LUT处理,在主播开启游戏HDR时,直播画面会严重失真,从而导致主播游戏端的画面质量与直播画面的画面质量差别较大,对于有HDR直播需求的主播来说,相关技术无法提供HDR直播效果,从而降低直播观看用户的直播观看体验。
发明内容
本申请实施例提供一种直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品,至少应用于图像处理领域和游戏领域,能够生成与目标直播对象的原始视频具有相同画面质量参数的直播视频,提高直播观看用户的直播观看体验。
本申请实施例的技术方案是这样实现的:
本申请实施例提供一种直播视频处理方法,所述方法由电子设备执行,所述方法包括:
在直播应用的设置界面上显示运行模式按钮;响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;在所述直播应用的直播界面上显示所述直播视频。
本申请实施例提供一种直播视频处理装置,所述装置包括:
第一显示模块,配置为在直播应用的设置界面上显示运行模式按钮;获取模块, 配置为响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;第二显示模块,配置为在所述直播应用的直播界面上显示所述直播视频。
本申请实施例提供一种直播视频处理设备,包括:存储器,配置为存储可执行指令;处理器,配置为执行所述存储器中存储的可执行指令时,实现上述直播视频处理方法。
本申请实施例提供一种计算机程序产品或计算机程序,计算机程序产品或计算机程序包括可执行指令,可执行指令存储在计算机可读存储介质中;其中,电子设备的处理器从计算机可读存储介质中读取可执行指令,并执行可执行指令时,实现上述的直播视频处理方法。
本申请实施例提供一种计算机可读存储介质,存储有可执行指令,配置为引起处理器执行所述可执行指令时,实现上述直播视频处理方法。
本申请实施例具有以下有益效果:在通过直播应用对目标直播对象进行直播的过程中,通过响应针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,获取并在直播应用的直播界面上显示目标直播对象的直播视频,其中,直播视频具有与运行模式对应的画面显示效果,如此,生成具有与运行模式匹配的画面显示效果的直播视频,提高直播观看用户的直播观看体验,保证了直播视频与原始视频之间的画面一致性。
附图说明
图1是相关技术中的原始HDR游戏画面与OBS直播画面的对比图;
图2是相关技术中基于LUT处理实现HDR游戏直播的流程示意图;
图3是本申请实施例提供的直播视频处理系统的一个可选的架构示意图;
图4是本申请实施例提供的直播视频处理设备的结构示意图;
图5是本申请实施例提供的直播视频处理方法的一个可选的流程示意图;
图6是本申请实施例提供的直播视频处理方法的另一个可选的流程示意图;
图7是本申请实施例提供的直播视频处理方法的再一个可选的流程示意图;
图8是本申请实施例提供的直播应用的设置页面的界面图;
图9是本申请实施例提供的开启游戏HDR的选择界面图;
图10是本申请实施例提供的选择待直播游戏的界面图;
图11是本申请实施例提供的开始直播的界面图;
图12是本申请实施例的HDR游戏直播画面与OBS直播HDR游戏画面对比图;
图13是本申请实施例的游戏直播的流程图;
图14是本申请实施例提供的钩子机制对消息进行挂钩处理的实现方式示意图;
图15是本申请实施例提供的两种颜色格式的对比示意图;
图16是本申请实施例提供的PQ曲线和传统伽马曲线的对比示意图;
图17是本申请实施例提供的BT.2020色域和BT.709色域的对比示意图;
图18是本申请实施例提供的YUV格式示意图;
图19是本申请实施例提供的CPU转换方案的流程示意图;
图20是本申请实施例提供的GPU转换方案的流程示意图;
图21是本申请实施例提供的CPU转换方案和GPU转换方案的性能对比图;
图22是本申请实施例提供的游戏HDR元数据获取方法流程图;
图23是本申请实施例提供的游戏HDR元数据获取方法界面图;
图24是本申请实施例提供的HEVC硬编支持HDR数据方法流程图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。除非另有定义,本申请实施例所使用的所有的技术和科学术语与属于本申请实施例的技术领域的技术人员通常理解的含义相同。本申请实施例所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在说明本申请实施例的方案之前,首先对本申请实施例涉及的名词进行解释:
(1)直播:是指通过一定设备采集开播方数据,经过一系列处理(如视频编码)压缩成可观看可传输的视频流,输出至观看用户端的技术。通常制作和观看是同步的。
(2)点播:是指把一些预先录制好的视频放在网站上,根据网友不同的爱好自选播放。直播相较于点播而言,软硬件要求都更高。
(3)高动态范围(HDR,High-Dynamic Range):与普通图像相比,HDR可以提供更多的色彩范围和图像细节,提高图像明暗对比度,所见即所得,极大还原真实环境,呈现极高的图像品质。HDR采用了相比于标准动态范围图像更大的亮度范围,更广的色域,更大的比特深度;不同于伽马校正的转换函数以及新的编码方式,HDR在拍照、摄影、视频、游戏等领域均有应用。
(4)标准动态范围(SDR,Standard-Dynamic Range):有时也被叫做LDR,与HDR相比,SDR图像不具有更全面的细节,不具备更宽的色彩范围。SDR图像曝光过度,图像较亮部分的信息将丢失;同样,当图像曝光不足时,图像较暗部分的信息也会丢失。
(5)色调映射:是指将HDR画面的亮度进行压缩到SDR范围内,尽量保持原HDR图像的细节与颜色等。色调映射主要包含两方面内容,亮度映射和色域映射,反之还有逆色调映射,即将SDR画面映射为HDR画面。
(6)HDR游戏直播:指直播HDR游戏,让观众也能体验到HDR效果,能够大幅度提升观众体验。
(7)obs-studio:也叫OBS,是一款视频直播开源软件,为用户提供了游戏画面抓取、编码、推流等功能。
(8)DirectX:是一种多媒体编程接口,广泛用于Windows电子游戏开发。
(9)钩子函数(Hook):在系统没有调用函数之前,钩子程序就先捕获消息,钩子函数先得到控制权,这时钩子函数可以加工处理(改变)该函数的执行行为。
(10)直播流数据:主播用户采集的视频和音频进行编码形成的适用于在网络中传输的码流,支持被接收端即时解码播放而不必等待接收全部数据。
(11)主播:或者称为主播用户,是指在直播业务中进行表演并将表演分享的用户。
(12)直播间:与主播用户对应,直播平台中供主播用户发布不同直播业务的应用。
(13)直播观众:直播业务中主播用户的表演的受众。
在解释本申请实施例的直播视频处理方法之前,首先对相关技术中的方法进行说明。
目前大多数游戏普遍支持HDR,由于HDR具有较高的画面显示效果,因此能让游戏玩家具有较高的视觉体验,极大提升游戏体验。支持HDR的游戏的HDR游戏画面能 够提供大于SDR游戏画面的色彩范围和图像细节,且大于SDR游戏画面的图像明暗对比度,HDR游戏画面能够呈现极高的图像品质。而不支持HDR的游戏的非HDR游戏画面则相对于HDR游戏画面的色彩范围较小和图像细节较少、图像明暗对比度低,图像画质较差。视频点播领域,HDR离线点播视频也开始逐步进入视野,各大视频平台也支持了HDR的播放,但对于离线HDR视频,各大视频平台只能支持到专门软件播放或者移动设备,没有支持浏览器的HDR播放。对于离线HDR视频的播放,移动端都是采用H.265编码格式,这将带来高昂的费用。
目前,主播主要使用的是obs-studio或者基于obs-studio二次开发的软件,主播开启游戏HDR,直播会采用OBS形式进行,而OBS直播画面会严重失真。图1是相关技术中的原始HDR游戏画面与OBS直播画面的对比图,其中,左图是原始HDR游戏画面,右图是OBS直播画面,如图1所示,OBS直播画面相比于原始HDR游戏画面图像画质较差。
相关技术中,在游戏直播时,对于HDR游戏,由于没有给普通主播直接直播的软件,因此一般需要采用兼容模式来实现直播效果的优化。这里仍以obs-studio为例,在实现的时候,一般采用增加LUT处理的方法,如图2所示,是相关技术中基于LUT处理实现HDR游戏直播的流程示意图,先将HDR游戏画面201通过直播软件进行游戏画面采集202,并将采集到的HDR游戏画面201添加至直播软件画布203中,然后通过LUT处理204,将HDR颜色映射到与HDR游戏画面类似的SDR颜色,得到直播画面205,从而得到显示效果在一定颜色范围内的直播画面,从而不至于出现特别严重的颜色失真。
但是,相关技术中的方法,由于没有全方位支持HDR,最终显示的还是直播的SDR画面,那么,拥有HDR的设备的直播观众则无法体验和主播一致的HDR效果;并且,经过LUT处理的画面可能与原来画面产生较大失真,且增加LUT处理,会增加整个直播视频处理过程的算法复杂度。
基于相关技术中所存在的上述问题,本申请实施例提供一种直播视频处理方法,该直播视频处理方法从渲染、前处理、编码全方位支持HDR,而不是采用LUT处理,从而可以让主播和直播观众真正体验到HDR直播带来的好处,例如优秀的画面、大于色彩范围阈值的色彩范围、大于图像细节数量阈值的图像细节、大于明暗对比度阈值的图像明暗对比度,以及极高的图像品质等。本申请实施例提出一种能够实现HDR游戏直播的解决方案,方案至少包括以下内容:HDR游戏画面内容的采集、HDR游戏画面渲染及画面与其他SDR内容的合成、HDR游戏画面的编码及推流,将在下文中对每一内容进行详细说明。
本申请实施例提供的直播视频处理方法中,首先,在直播应用的设置界面上显示运行模式按钮;然后,响应于针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,获取目标直播对象的直播视频;最后,在直播应用的直播界面上显示直播视频;其中,在该运行模式下直播视频具有相应的画面显示效果。如此,实现了生成并输出具有与运行模式匹配的画面显示效果的直播视频,避免直播画面失真,提高直播观看用户的直播观看体验,保证了直播视频与原始视频之间的画面一致性。
下面说明本申请实施例的直播视频处理设备的示例性应用,本申请实施例提供的直播视频处理设备可以实施为终端,也可以实施为服务器,终端和服务器均是用于实现直播视频处理方法的电子设备,也就是说,直播视频处理设备为一电子设备。在一种实现方式中,本申请实施例提供的直播视频处理设备可以实施为笔记本电脑,平板电脑,台式计算机,移动设备(例如,移动电话,便携式音乐播放器,个人数字助理,专用消息 设备,便携式游戏设备)、智能机器人、智能家电和智能车载设备等任意的具备图像处理功能的终端;在另一种实现方式中,本申请实施例提供的直播视频处理设备还可以实施为服务器,其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(CDN,Content Delivery Network)、以及大数据和人工智能平台等基础云计算服务的云服务器。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例中不做限制。下面,将说明直播视频处理设备实施为终端时的示例性应用。
参见图3,图3是本申请实施例提供的直播视频处理系统的一个可选的架构示意图,为实现支撑任意一个直播应用,并通过直播应用对目标直播对象采用特定运行模型进行直播以呈现直播视频,终端上至少安装有直播应用和对目标直播对象进行操作的操作应用。直播视频处理系统10中至少包括终端100、网络200和服务器300,其中服务器300是直播应用的服务器,终端100可以构成本申请实施例的直播视频处理设备。终端100通过网络200连接服务器300,网络200可以是广域网或者局域网,又或者是二者的组合。在直播应用运行过程中,直播应用的客户端能够获取操作应用中针对目标直播对象进行操作的原始视频。在一些实施例中,终端可以具有多个,其中一个终端构成主播终端,另一些终端构成直播观众的观众终端(即图3中的终端100-1和终端100-2)。
在直播过程中,终端100(即主播终端)在直播应用的设置界面上显示运行模式按钮;并接收用户(例如,可以是主播)针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,然后,终端100响应于针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,从服务器300获取目标直播对象的直播视频;并在全部终端的直播应用的直播界面上显示直播视频。
在一些实施例中,服务器300响应于针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式确定出目标直播对象的直播视频,并将直播视频分发给主播终端和全部观众终端。
本申请实施例所提供的直播视频处理方法还可以基于云平台并通过云技术来实现,例如,上述服务器300可以是云端服务器,通过云端服务器基于目标直播对象的原始视频以及与选择操作对应的运行模式,确定出目标直播对象的直播视频。
在一些实施例中,还可以具有云端存储器,可以将目标直播对象的原始视频、目标直播对象的直播视频等存储至云端存储器中。这样,在后续可以基于目标直播对象的直播视频进行点播,即其他观众可以在直播结束后再次观看直播视频。
这里需要说明的是,云技术(Cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。云技术基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。
图4是本申请实施例提供的电子设备的结构示意图,图4所示的电子设备(即直播视频处理设备)包括:至少一个处理器310、存储器350、至少一个网络接口320和用户接口330。电子设备中的各个组件通过总线系统340耦合在一起。可理解,总线系统340用于实现这些组件之间的连接通信。总线系统340除包括数据总线之外,还包括电 源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图4中将各种总线都标为总线系统340。
处理器310可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。
用户接口330包括使得能够呈现媒体内容的一个或多个输出装置331,以及一个或多个输入装置332。
存储器350可以是可移除的,不可移除的或其组合。示例性的硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器350可选地包括在物理位置上远离处理器310的一个或多个存储设备。存储器350包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器350旨在包括任意适合类型的存储器。在一些实施例中,存储器350能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。
操作系统351,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;
网络通信模块352,用于经由一个或多个(有线或无线)网络接口320到达其他计算设备,示例性的网络接口320包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等;
输入处理模块353,用于对一个或多个来自一个或多个输入装置332之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。
在一些实施例中,本申请实施例提供的装置可采用软件方式实现,图4示出了存储在存储器350中的一种直播视频处理装置354,该直播视频处理装置354可以是电子设备中的直播视频处理装置,其可以是程序和插件等形式的软件,包括以下软件模块:第一显示模块3541、获取模块3542和第二显示模块3543,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。将在下文中说明各个模块的功能。
在另一些实施例中,本申请实施例提供的装置可以采用硬件方式实现,作为示例,本申请实施例提供的装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的直播视频处理方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)或其他电子元件。
本申请各实施例提供的直播视频处理方法可以由电子设备来执行,其中,该电子设备可以是任意一种具备图像处理功能、视频显示功能和游戏功能的终端,或者也可以是服务器,即本申请各实施例的直播视频处理方法可以通过终端来执行,也可以通过服务器来执行,或者还可以通过终端与服务器进行交互来执行。
参见图5,图5是本申请实施例提供的直播视频处理方法的一个可选的流程示意图,下面将结合图5示出的步骤进行说明,需要说明的是,图5中的直播视频处理方法是通过终端作为执行主体为例来说明的。
步骤S501,在直播应用的设置界面上显示运行模式按钮。
本申请实施例中,主播在终端上运行直播应用,其中,直播应用提供设置界面,在 设置界面上能够实现对当前直播过程的直播参数进行设置。这里直播应用的设备界面上可以具有运行模式按钮,该按钮用于选择是否按照特定运行模式运行直播应用,以实现在直播过程中采用与该特定运行模式对应的视频输出效果输出直播视频。
参见图8,为直播应用的设置界面,这里以特定运行模式为HDR运行模式为例进行说明,设置界面上显示HDR运行模式,该HDR运行模式用于表征当前直播过程中输出的直播视频为HDR视频。当主播在设置界面选中HDR运行模式对应的HDR开关时,则本次直播过程输出的直播视频为HDR视频,对应地,在生成本次直播过程的直播视频时,则可以采用本申请实施例提供的直播视频处理方法进行视频的处理,从而得到HDR视频。
步骤S502,响应于针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,获取目标直播对象的直播视频。
这里,直播开始操作是指在直播应用中点击开始按钮的操作,当直播应用的客户端接收到直播开始操作时,响应于直播开始操作开始直播。参见图11,当用户在设置好直播参数,并点击“开始直播”按钮时,则可以获取目标直播对象的直播视频并进行视频推流实现直播。
在一些实施例中,目标直播对象可以是任意一种直播类型;例如,目标直播对象可以是游戏、购物、表演、演讲等任意一种直播类型。在另一些实施例中,目标直播对象可以是任意一种直播对象;例如,目标直播对象可以是游戏角色、所售商品、表演角色、人物、内容演讲等任意一种类型的直播对象。
在一些实施例中,在终端上还可以运行有操作应用,在该操作应用中,能够生成目标直播对象的原始视频,也就是说,用户通过在该操作应用上进行一系列操作,进而生成原始视频。举例来说,操作应用可以是游戏应用,主播在游戏应用的客户端进行操作实现游戏应用的运行,从而产生游戏运行画面,该游戏运行画面构成目标直播对象的原始视频。
在另一些实施例中,直播应用可以具有视频录制功能,也就是说,直播应用可以调用终端上的视频采集模块进行视频采集,生成原始视频。举例来说,主播可以在直播应用运行过程中表演节目,并通过主播终端的摄像头采集主播的表演从而生成原始视频。或者,当目标直播对象为游戏时,主播在游戏应用的客户端进行操作实现游戏应用的运行,在游戏应用的运行过程中产生游戏运行画面,直播应用可以通过录制该游戏运行画面得到游戏视频,其中,该游戏视频构成目标直播对象的原始视频。
当用户在设置界面选择运行模式按钮以选择特定运行模式,且选择好目标直播对象,并且点击开始直播按钮时,终端获取目标直播对象的直播视频,其中,直播视频是基于目标直播对象的原始视频以及与选择操作对应的运行模式生成的。本申请实施例中,基于目标直播对象的原始视频以及与选择操作对应的运行模式生成目标直播对象的直播视频,可以是由直播应用的服务器来实现,即直播应用的后台服务器响应于选择操作和直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,生成目标直播对象的直播视频,并将直播视频发送给终端。
本申请实施例中,在选择操作对应的运行模式下,直播视频具有相应的画面显示效果,其中,该画面显示效果对应一画面质量参数,且该画面质量参数大于预设的画面质量参数阈值,或者,该画面质量参数大于或等于原始视频的画面质量参数。例如,这里的画面质量参数可以是清晰度,则直播视频的清晰度可以大于清晰度阈值,或者,直播视频的清晰度大于或等于原始视频的清晰度。再例如,这里的画面质量参数可以是分辨率,则直播视频的分辨率可以大于分辨率阈值,或者,直播视频的分辨率大于或等于原 始视频的分辨率。
需要说明的是,在生成直播视频时,由于在操作应用中所生成的原始视频具有预设的画面质量参数,因此在生成直播视频时,可以基于该画面质量参数生成直播视频,例如,可以至少保证直播视频与原始视频的画面质量参数相同,这样能够实现直播时候所获取的视频与最终呈现的视频的效果相同或者效果更好。
步骤S503,在直播应用的直播界面上显示直播视频。
本申请实施例中,在生成直播视频之后,可以将直播视频分发给观看直播的每一观众终端,在每一观众终端的当前界面上显示直播视频,从而实现对主播本次直播过程进行推流。
在一些实施例中,直播视频的画面质量参数可以与原始视频的画面质量参数相同。其中,画面质量参数包括但不限于以下至少之一:色彩范围、图像明暗对比度、颜色空间、颜色格式、色域、亮度范围等。
本申请实施例提供的直播视频处理方法,在通过直播应用对目标直播对象进行直播过程中,通过响应针对运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于目标直播对象的原始视频以及与选择操作对应的运行模式,获取并在直播应用的直播界面上显示目标直播对象的直播视频,其中,在运行模式下直播视频具有相应的画面显示效果,如此,实现生成具有与运行模式匹配的画面显示效果的直播视频,避免直播画面失真,提高直播观看用户的直播观看体验。
在一些实施例中,直播视频处理系统如图3所示,至少包括终端和服务器,其中终端包括一个主播终端和多个观众终端,图6是本申请实施例提供的直播视频处理方法的另一个可选的流程示意图,其中图6以一个观众终端为例进行说明。主播终端和观众终端上均运行有直播应用,或者,主播终端上运行有直播应用,观众终端通过小程序或者其他第三方程序进入直播间观看直播。主播终端上还运行有与目标直播对象对应的操作应用,通过运行该操作应用并在操作应用的客户端进行相应的操作,从而生成目标直播对象的原始视频。例如,该操作应用可以是游戏应用,主播可以通过游戏应用对游戏角色(即目标直播对象)进行操作生成游戏视频(即原始视频)。如图6所示,本申请实施例的直播视频处理方法,包括以下步骤:
步骤S601,在主播终端上所运行的直播应用的设置界面上显示运行模式按钮。
步骤S602,主播终端接收主播针对运行模式按钮的选择操作。
步骤S603,主播终端接收主播针对目标直播对象的直播开始操作。
步骤S604,主播终端接收主播在操作应用的客户端输入的一系列操作指令,并基于操作指令生成目标直播对象的原始视频。
在一些实施例中,由于直播应用所展示的直播视频是基于所获取的原始视频实时生成的,因此,直播应用需要具有获取操作应用所生成的原始视频的权限,也就是说,在启动直播应用和操作应用时可以预先向主播发送权限获取提醒信息,该权限获取提醒信息用于提醒主播直播应用需要具有获取操作应用所生成的原始视频的权限。当主播选择允许获取时,直播应用才能够具有获取操作应用所生成的原始视频的权限,并在操作应用生成原始视频时获取该原始视频。
本申请实施例中,直播应用在操作应用生成原始视频时,获取该原始视频可以通过以下方式实现:首先,在直播应用的预设存储位置初始化形成纹理区域;其中,纹理区域能够实现跨进程共享。然后,在生成目标直播对象的原始视频时,调用钩子函数对所始视频进行挂钩处理,得到挂钩处理后的原始视频。最后,将挂钩处理后的原始视频拷贝至纹理区域上。
这里,纹理区域是用于拷贝原始视频画面的区域,纹理区域能够实现跨进程共享, 或者,纹理区域能够写入并存储不同视频,本申请实施例的纹理区域为一共享纹理。也就是说,对于不同进程获取的视频画面,均可以拷贝至同一纹理区域。
在一些实施例中,在生成目标直播对象的原始视频时,调用钩子函数对所始视频进行挂钩处理,可以通过以下方式实现:首先,获取用于生成目标直播对象的原始视频的指定消息,在生成目标直播对象的原始视频时,调用钩子函数对用于生成原始视频的指定消息进行挂钩处理。然后,对挂钩处理后的指定消息进行修改,得到修改后的指定消息。最后,基于修改后的指定消息获取目标直播对象的原始视频,得到挂钩处理后的原始视频。
这里,指定消息可以是操作应用中用于生成原始视频的生成指令,基于生成指令能够生成目标直播对象的原始视频。
本申请实施例中,在得到挂钩处理后的指定消息之后,即得到了对指定消息的控制权,也就是说,直播应用可以控制该指定消息生成原始视频,因此可以基于原始视频生成需求修改挂钩处理后的指定消息,以在指定消息中加入我当前所需的功能。
步骤S605,主播终端将目标直播对象的原始视频以及与选择操作对应的运行模式发送给服务器。
步骤S606,服务器基于目标直播对象的原始视频以及与选择操作对应的运行模式生成目标直播对象的直播视频。
这里,在生成直播视频后,服务器对直播视频进行转码和分发。转码是指生成更多码率、分辨率、动态范围的直播视频,以供不同用户观看。
本申请实施例中,当选择操作对应的运行模式与目标直播对象的原始视频的视频类型匹配时,且如果原始视频的视频类型为高质量视频类型(即原始视频的画面质量参数大于或等于预设画面质量参数阈值)时,则可以生成与原始视频具有相同视频类型的直播视频。
在一些实施例中,如果原始视频的视频类型不是高质量视频类型(高质量视频类型是指原始视频的画面质量参数小于预设画面质量参数阈值)时,则还可以对原始视频的视频类型进行调整,即对原始视频的画面进行修复,从而提高原始视频的画面质量参数,得到具有高质量视频类型的直播视频。
步骤S607,服务器将直播视频发送给全部观众终端。
步骤S608,观众终端在直播应用的直播界面上显示直播视频;其中,直播视频的画面质量参数与原始视频的画面质量参数相同或者直播视频具有高质量视频类型的视频。
本申请实施例提供的直播视频处理方法,通过基于目标直播对象的原始视频以及与选择操作对应的运行模式生成目标直播对象的直播视频,该直播视频的画面质量参数与原始视频的画面质量参数相同或者直播视频具有高质量视频类型的视频,也就是说,生成的指标视频的画面质量参数不小于原始视频的画面质量参数,从而提高直播视频的画面效果。
图7是本申请实施例提供的直播视频处理方法的再一个可选的流程示意图,如图7所示,方法包括以下步骤:
步骤S701,在主播终端上所运行的直播应用的设置界面上显示运行模式按钮。
步骤S702,主播终端接收主播针对运行模式按钮的选择操作。
步骤S703,主播终端接收主播针对目标直播对象的直播开始操作。
步骤S704,主播终端接收主播在操作应用的客户端输入的一系列操作指令,并基于操作指令生成目标直播对象的原始视频。
步骤S705,在生成目标直播对象的原始视频时,主播终端调用开放共享资源函数 打开图形基础设施的共享句柄。
这里,可以预先构建具有动态链接库形式的图形钩子(例如,graphics-hook.dll),并将该图形钩子注入到操作应用中,在收到注入成功通知时,通过调用开放共享资源函数操作应用进程在图形基础设施上的共享句柄,该开放共享资源函数(即开放共享资源接口)能得到在直播应用的预设存储位置初始化形成的纹理区域。
步骤S706,主播终端通过共享句柄获取能够实现跨进程共享的纹理区域和纹理区域的区域标识。
本申请实施例中,每一纹理区域在初始化形式时,对应生成一区域标识,区域标识用于区别不同的纹理区域。
步骤S707,主播终端确定区域标识的格式,并基于区域标识的格式,确定所生成的原始视频的视频画面类型。
这里,可以获取区域标识的格式字段,判断该区域标识的格式是否为预设格式,当区域标识的格式是预设格式时,则可以确定出所生成的原始视频的视频画面类型为特定类型。举例来说,如果获取的区域标识的格式为DXGI_FORMAT_R10G10B10A2_UNORM格式,则可以确定出采集到的原始视频为HDR视频。
步骤S708,主播终端将目标直播对象的原始视频、原始视频的视频画面类型以及与选择操作对应的运行模式,发送给服务器。
步骤S709,当原始视频的视频画面类型与选择操作对应的运行模式匹配时,服务器采用预设颜色格式和预设颜色空间,将原始视频渲染至直播应用的目标画布上,得到渲染视频。
本申请实施例中,原始视频的视频画面类型可以是HDR类型,即原始视频可以是HDR类型视频。
这里,预设颜色格式是与HDR类型相匹配的颜色格式,预设颜色空间是与HDR类型相匹配的颜色空间。举例来说,预设颜色格式可以是DXGI_FORMAT_R10G10B10A2_UNORM颜色格式,在该颜色格式下,RGBA各10位,A占2位;预设颜色空间可以是DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020颜色空间,在该颜色空间下,采用BT.2020的HDR广色域,且遵循HDR的PQ曲线。
步骤S710,服务器对渲染视频进行编码处理,得到目标直播对象的直播视频。
在一些实施例中,对渲染视频进行编码处理可以包括软件编码处理和硬件编码处理,也就是说,步骤S710可以通过以下两种方式中的任意一种实现:
方式一:对渲染视频进行格式转换处理,得到格式转换后的视频;对格式转换后的视频进行软件编码处理,得到目标直播对象的直播视频。
在一些实施例中,渲染视频可以是RGB格式数据;在一种可行的实现方式中,对渲染视频进行格式转换处理,得到格式转换后的视频,可以通过以下方式实现:首先,对RGB格式数据进行位运算,得到每一像素点的RGB分量数据。然后,将每预设数量的像素点的RGB分量数据确定为一个数据组。再然后,对每一数据组中的RGB分量数据进行矩阵转换,得到与每一像素点对应的YUV数据。最后,基于每一像素点对应的YUV数据,确定格式转换后的视频数据。
在一些实施例中,RGB格式数据存储于图形处理器(GPU,Graphics Processing Unit)中,可以通过中央处理器(CPU,Central Processing Unit)来实现对渲染视频进行格式转换处理,因此,在对RGB格式数据进行位运算之前,可以将RGB格式数据从GPU中拷贝至CPU中。之后,通过CPU对RGB格式数据进行位运算,得到每一像素点的RGB分量数据,以及,完成后续的步骤,通过CPU完成对渲染视频的格式转换处理。
在另一种可行的实现方式中,对渲染视频进行格式转换处理,得到格式转换后的视 频,可以通过以下方式实现:首先,获取RGB格式数据的格式纹理,并对格式纹理进行线性转换,得到格式转换后的RGB数据。然后,对格式转换后的RGB数据依次进行颜色矩阵转换和重排序处理,得到具有预设比特位的YUV数据。最后,基于具有预设比特位的YUV数据,确定格式转换后的视频数据。
本申请实施例中,可以通过GPU完成对渲染视频的格式转换处理,也就是说,通过GPU对格式纹理进行线性转换,得到格式转换后的RGB数据,以及,对格式转换后的RGB数据依次进行颜色矩阵转换和重排序处理。
方式二:对渲染视频进行格式转换处理,得到格式转换后的视频;对格式转换后的视频进行硬件编码处理,得到目标直播对象的直播视频。
本申请实施例中,直播视频的视频画面类型可以是HDR类型,即直播视频可以是HDR类型视频。
在一些实施例中,由于硬件编码处理的方案缺少了HDR元数据,或者HDR元数据只是使用的是本机显示器数据,而不是游戏实际使用的HDR关键元数据,这将会导致观众看到的效果不准确,因此,本申请实施例还提供两种HDR元数据的获取方式:
获取HDR元数据的方式一:在对格式转换后的视频进行硬件编码处理之前,创建原始视频渲染时的交换链(swapchain),并获取预设的示例元数据;以交换链为起始检测点,遍历原始视频对应的视频数据,确定视频数据中与示例元数据相同的数据内容;基于相同的数据内容对应的地址信息和示例元数据的地址信息,确定出偏移地址;将偏移地址确定为原始视频的HDR元数据。
这里,基于相同的数据内容对应的地址信息和示例元数据的地址信息,确定出偏移地址,可以是确定相同的数据内容对应的地址信息与示例元数据的地址信息之间的地址差,将地址差确定为偏移地址。
本申请实施例中,交换链是一系列虚拟帧缓冲区,由显卡和图形应用程序编程接口(API,Application Programming Interface)用于稳定帧速率和其他一些功能。交换链通常存在于图形内存中,但也可以存在于系统内存中。不使用交换链可能会导致渲染卡顿,交换链的存在和使用是许多图形API所必需的,具有两个缓冲区的交换链是双缓冲区。
在获取到HDR元数据之后,对格式转换后的视频进行硬件编码处理,可以是基于原始视频的HDR元数据,对格式转换后的视频进行硬件编码处理,得到目标直播对象的直播视频。
获取HDR元数据的方式二:从原始视频的视频数据中获取原始视频的HDR元数据;确定硬件编码处理后的直播视频中的关键帧;将HDR元数据作为补充增强信息添加至关键帧的帧数据中。
步骤S711,服务器将直播视频发送给全部观众终端。
步骤S712,观众终端在直播应用的直播界面上显示直播视频;其中,直播视频的画面质量参数与原始视频的画面质量参数相同。
本申请实施例提供的直播视频处理方法,提供不同的格式转换方式对编码视频进行格式转换处理,从而为用户提供更多的可选操作方式,使得用户可以基于当前所使用的GPU和CPU的性能选择合适的格式转换方式对编码视频进行格式转换处理;另外,分别可以采用软件编码处理或硬件编码处理方式对渲染视频进行编码处理,也能够为用户提供更多的可选操作方式,提高了视频编码的处理效果,使得直播视频处理设备能够高效的生成目标直播对象的直播视频,从而提高直播效果。
下面,将说明本申请实施例在一个实际的应用场景中的示例性应用。本申请实施例提供一种直播视频处理方法,该直播视频处理方法可以应用于HDR游戏直播。
本申请实施例的直播视频处理方法中,会在直播应用的设置页面增加HDR开关选项,提供给用户开启HDR直播的能力,如图8所示,是本申请实施例提供的直播应用的设置页面的界面图,在设置页面80上,提供HDR开关选项801,当主播在进行游戏直播时,如果游戏为HDR游戏则可以勾选该HDR开关选项801,实现HDR游戏直播。图9是本申请实施例提供的开启游戏HDR的选择界面图,如图9所示,在主播在设置页面勾选HDR开关选项801之后,还可以设置选择开启游戏HDR的功能选项901。然后,如图10所示,点击游戏进程101获取可选择的游戏进程102,然后选择待直播游戏103。再然后,如图11所示,点击开始直播按钮111开始进行HDR游戏直播。
图12是本申请实施例的HDR游戏直播画面与OBS直播HDR游戏画面对比图,如图12所示,上半部分路径为OBS直播HDR游戏的失真效果,下半部分为经过本申请实施例的方案处理的路线,HDR游戏直播正常,观众获得和主播一致的体验。
在一些实施例中,游戏直播一般包括图13所示的步骤:S131,采集游戏画面;S132,对游戏画面进行渲染;S133,游戏画面视频前处理;S134,游戏画面视频编码,生成直播视频;S135,直播视频推流。本申请实施例将全方位支持HDR游戏直播。
本申请实施例中,在步骤S131中,HDR游戏画面采集分两部分,分别需要游戏进程中和直播软件进程中操作。在游戏进程中,游戏进程行为包括:先编写挂钩函数(例如可以是graphics-hook.dll函数),该挂钩函数能挂钩处理(即hook掉)系统的当前函数(Present函数),当前函数是3D加速卡(D3D,Direct3D)渲染上屏的必要过程,游戏进程在一定时间间隔都会调用该当前函数。图14是本申请实施例提供的钩子机制对消息进行挂钩处理的不同实现方式示意图,钩子机制(hook)允许直播程序拦截并处理窗口(Windows)消息或指定事件,当指定的消息发出后,钩子程序141就可以在消息到达目标窗口之前将消息捕获,从而得到对消息的控制权,进而可以对该消息进行处理或修改,加入所需的功能。
本申请实施例中,可以先初始化一块可以跨进程共享的纹理(即纹理区域),在窗口上的实际操作是创建纹理(例如,通过CreateTexture2D实现),并增加资源杂项共享(例如,D3D11_RESOURCE_MISC_SHARED)的标识(对应上述纹理区域的区域标识),并打开图形基础设施(DXGI,Microsoft DirectX Graphics Infrastructure,)的获得共享句柄函数(例如,GetSharedHandle),获取纹理的共享句柄。
这里,挂钩处理掉系统的当前函数,在游戏画面上屏前,可以将游戏画面先拷贝到上面这块纹理上。
在直播软件进程中,可以将挂钩函数注入到游戏进程中,在收到注入成功通知时,通过ID3D11Device的开放共享资源接口(例如,OpenSharedResource)打开上述共享句柄,该开放共享资源接口能得到ID3D11Texture2D的纹理对象。通过ID3D11Texture2D的纹理描述获取模块(GetDesc)能够获取到纹理描述(D3D11_TEXTURE2D_DESC),然后可以读取纹理描述的格式(Format)的字段,如果格式为DXGI_FORMAT_R10G10B10A2_UNORM格式,则认定采集到的游戏画面为HDR游戏画面。
在步骤S132对游戏画面进行渲染过程中,在采集到HDR游戏画面后,需要将游戏画面渲染到直播软件的画布上去。和传统SDR直播不同的是,这里可以使用DXGI_FORMAT_R10G10B10A2_UNORM颜色格式(即预设颜色格式),而不是SDR直播的DXGI_FORMAT_R8G8B8A8_UNORM颜色格式。图15是两种颜色格式的对比示意图,如图15所示,R8G8B8A8中的RGBA各占8比特(bit),而R10G10B10A2则是RGB各占10比特,A占2比特。
然后,设置颜色空间,SDR直播使用的DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709颜色空间,在该颜色空间下,具有709色域、伽马曲线(Gamma曲线)。 而本申请实施例的方法中,使用DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020颜色空间(即预设颜色空间),在该颜色空间下,BT.2020的HDR广色域,遵循HDR的PQ曲线。
图16是PQ曲线和传统伽马曲线的对比示意图,如图16所示,PQ曲线能够表达更大范围的亮度范围。图17是BT.2020色域和BT.709色域的对比示意图,如图17所示,BT.2020色域能够表达更多的颜色。
在步骤S133游戏画面视频前处理过程中,可以是HDR编码前处理。由于通过步骤S132可以将HDR游戏画面在游戏HDR画布上渲染,但HDR编码需要YUV420P10 LE格式或YUV P010格式,如图18所示,YUV(即YUV420P10LE格式或YUV P010)才10比特(图中X表示0,为占位数据),而画布使用的R10G10B10A2的格式,为此需要经过格式转换。这里提出两种方案实现10比特RGB转10比特YUV。
方案一:CPU转换方案。图19是本申请实施例提供的CPU转换方案的流程示意图,如图19所示,首先在步骤S191中,将10比特RGB数据(R10G10B10A2)从GPU中拷贝到CPU中;然后在步骤S192中,YUV是基于RGB的采样数据,10比特RGB数据通过如下的位运算可以得到各个点的R、G、B各自的分量数据:
int r=(ar30)&0x3FF;
int g=(ar30>>10)&0x3FF;
int b=(ar30>>20)&0x3FF;
int a=(ar30>>30)*0x55。
然后,通过四个点,经过下面矩阵转换过程能得到四个Y、一个U、一个V:
const float BT2020_10bit_limited_rgb_to_yuv[]={
0.224951f,0.580575f,0.050779f,0.000000f,0.062561f,
-0.122296f,-0.315632f,0.437928f,0.000000f,0.500489f,
0.437928f,-0.402706f,-0.035222f,0.000000f,0.500489f,
0.000000f,0.000000f,0.000000f,1.000000f,0.000000f,};
本申请实施例中,在计算U、V分量时,可以取四个点的均值。最后得出10比特YUV数据,在步骤S193中,将10比特YUV数据送入编码器。
方案二:GPU转换方案。由于CPU转换性能较低,故还提出一种GPU转换方案。图20是本申请实施例提供的GPU转换方案的流程示意图,如图20所示,在步骤S201中,通过GPU将RGB10格式纹理(即R10G10B10A2)线性转换到RGB16格式纹理上(即RGBA16);然后在步骤S202中,通过颜色矩阵转换,得到10比特的YUV数据(高10位有效);在步骤S203中,进行重排序,并除以64得到10比特YUV数据(即YUV420P10LE);在步骤S204中,将10比特YUV数据从GPU中拷贝至CPU中;在步骤S205中,将10比特YUV数据送入编码器。
图21是CPU转换方案和GPU转换方案的性能对比图,如图21所示,算法一为CPU转换方案,算法二为GPU转换方案,其中,算法一的CPU占用为10%,算法二的CPU占用为0;算法一的帧处理耗时为22毫秒,算法二的帧处理耗时为1.2毫秒。
在步骤S134游戏画面视频编码过程中,支持两种HDR编码方式。其中,一种为CPU软件编码,另一种为GPU硬件编码。
在CPU软件编码过程中,可以直接利用libx264开源编码器,和传统直播相比,本申请实施例使用的格式是AVCOL_SPC_BT2020_NCL、AVCOL_PRI_BT2020、AVCOL_TRC_SMPTE2084及10比特的YUVAV_PIX_FMT_YUV420P10LE。需要注意的是,这种编码格式不是HDR的标准格式。
在GPU硬件编码过程中,可以利用nvenc_hevc硬件编码器,和传统直播相比,本申请实施例使用的格式是AVCOL_SPC_BT2020_NCL、AVCOL_PRI_BT2020、AVCOL_ TRC_SMPTE2084及10比特的AV_PIX_FMT_P010LE。
由于现存方案缺少了HDR关键元数据(即HDR元数据),或者HDR关键元数据只是使用的是本机显示器数据,而不是游戏实际使用的HDR关键元数据,这将会导致观众看到的效果不准确。因此,本申请实施例提出以下数据方案,分为游戏HDR元数据获取方法和HEVC硬编支持HDR数据方法。
图22是本申请实施例提供的游戏HDR元数据获取方法流程图,如图22所示,在游戏HDR元数据获取过程中,包括以下步骤:
步骤S221,输入HDR元数据交换指令(swap4*hdrmetadata)。
这里,创建一个独立进程,创建D3D渲染需要的设备(DEVICE)和交换链(SwapChain)数据,设置一个HDR示例元数据,该HDR示例元数据对应一swap4地址。
步骤S222,定义i=0。
步骤S223,判断遍历的视频数据是否与HDR示例元数据相同。
这里,以交换链为起始,逐个遍历视频数据的后续数据,判断与HDR示例元数据相等的内容,以获取一个偏移地址offset。不同版本操作系统,这个偏移地址均不一样。
如果判断结果为是,则执行步骤S224;如果判断结果为否,则执行步骤S225。
步骤S224,输出元数据offset=i。
步骤S225,i的取值加1。
本申请实施例中,通过挂钩处理得到游戏进程的交换链,并读取偏移地址的内容,该偏移地址的内容即为HDR元数据,然后通过管道传回助手进程。
图23是本申请实施例提供的游戏HDR元数据获取方法界面图,如图23所示,通过遍历获取到HDR元数据地址231,在该HDR元数据地址231下,具有HDR元数据内容232,以及,还提供有交换地址(即swap4地址)233,以及交换地址233下与HDR元数据相同内容234,即HDR示例元数据中的内容。需要说明的是,在swap4地址下存储有HDR示例元数据,在HDR元数据地址下存储有HDR元数据。
图24是本申请实施例提供的HEVC硬编支持HDR数据方法流程图,如图24所示,在HEVC硬编支持HDR数据过程中,包括以下步骤:
步骤S241,判断游戏视频(即目标直播对象的原始视频)的当前帧是否为关键帧。
如果判断结果为是,则执行步骤S242;如果判断结果为否,则执行步骤S243。
步骤S242,通过AV比特流滤波器(AVBitStreamFilter)获取游戏视频的HDR元数据。
步骤S243,获取实时消息传输协议(RTMP,Real Time Messaging Protocol)数据流(RtmpStream)。
本申请实施例中,由于H264编码方式可以使用FFMPEG(一种用于处理音视频的工具包)的AVBitStreamFilter来添加补充增强信息(SEI,Supplemental Enhancement Information),但265AVBitStreamFilter没有定义HDR元数据,于是本申请实施例改造了FFMPEG源码,实现了265AVBitStreamFilter对HDR元数据的支持。在实现的过程中,在原来的编码流程中增加了一个步骤:使用AVBitStreamFilter将游戏获取到的HDR元数据信息,往编码器输出的关键帧中增加了HDR元数据的SEI。
在步骤S135直播视频推流中,在编码完成后,可以输出编码流到离线MP4文件中,亦可用于网络直播。
本申请实施例提供的直播视频处理方法中至少包括以下关键点:HDR游戏画面内容的采集;HDR游戏画面渲染及和画面与其他SDR内容的合成;HDR游戏画面的编码及直播推流;HDR游戏画面的录制。
可以理解的是,在本申请实施例中,涉及到用户信息的内容,例如,主播针对运行 模式按钮的选择操作和针对目标直播对象的直播开始操作、目标直播对象的原始视频、目标直播对象的直播视频等信息,如果涉及与用户信息或企业信息相关的数据,当本申请实施例运用到具体产品或技术中时,需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
下面继续说明本申请实施例提供的直播视频处理装置354实施为软件模块的示例性结构,在一些实施例中,如图4所示,直播视频处理装置354包括:第一显示模块3541,配置为在直播应用的设置界面上显示运行模式按钮;获取模块3542,配置为响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;第二显示模块3542,配置为在所述直播应用的直播界面上显示所述直播视频。
在一些实施例中,所述装置还包括:初始化模块,配置为对所述直播应用的预设存储位置进行初始化,得到纹理区域;其中,在所述纹理区域能够实现跨进程共享;第一函数调用模块,配置为在生成所述目标直播对象的原始视频时,调用钩子函数对所述原始视频进行挂钩处理,得到挂钩处理后的原始视频;拷贝模块,配置为将挂钩处理后的原始视频写入至所述纹理区域上。
在一些实施例中,所述第一函数调用模块,还配置为:获取用于生成所述目标直播对象的原始视频的指定消息;在生成所述目标直播对象的原始视频时,调用钩子函数对用于生成所述原始视频的指定消息进行挂钩处理;对挂钩处理后的指定消息进行修改,得到修改后的指定消息;基于所述修改后的指定消息获取所述目标直播对象的原始视频,得到所述挂钩处理后的原始视频。
在一些实施例中,所述装置还包括:第二函数调用模块,配置为在生成所述目标直播对象的原始视频时,调用开放共享资源函数打开图形基础设施的共享句柄;信息获取模块,配置为通过所述共享句柄获取能够实现跨进程共享的纹理区域和所述纹理区域的区域标识;视频画面类型确定模块,配置为确定所述区域标识的格式;基于所述区域标识的格式,确定所生成的原始视频的视频画面类型。
在一些实施例中,所述获取模块,还配置为:当所述原始视频的视频画面类型与所述选择操作对应的运行模式匹配时,采用预设颜色格式和预设颜色空间,将所述原始视频渲染至所述直播应用的目标画布上,得到渲染视频;对所述渲染视频进行编码处理,得到所述目标直播对象的直播视频。
在一些实施例中,所述获取模块,还配置为:对所述渲染视频进行格式转换处理,得到格式转换后的视频数据;对所述格式转换后的视频进行软件编码处理,得到所述目标直播对象的直播视频;或者,对所述格式转换后的视频进行硬件编码处理,得到所述目标直播对象的直播视频。
在一些实施例中,所述渲染视频为RGB格式数据;所述获取模块,还配置为:对所述RGB格式数据进行位运算,得到每一像素点的RGB分量数据;将每预设数量的像素点的RGB分量数据确定为一个数据组;对每一数据组中的RGB分量数据进行矩阵转换,得到与每一像素点对应的YUV数据;基于每一像素点对应的YUV数据,确定所述格式转换后的视频。
在一些实施例中,所述渲染视频为RGB格式数据;所述获取模块,还配置为:获取所述RGB格式数据的格式纹理;对所述格式纹理进行线性转换,得到格式转换后的RGB数据;对所述格式转换后的RGB数据依次进行颜色矩阵转换和重排序处理,得到具有预设比特位的YUV数据;基于所述具有预设比特位的YUV数据,确定所述格式转换后的视频。
在一些实施例中,所述装置还包括:HDR元数据获取模块,配置为获取所述原始视频的HDR元数据;所述获取模块,还配置为:基于所述原始视频的HDR元数据,对所述格式转换后的视频进行硬件编码处理,得到所述目标直播对象的直播视频。
在一些实施例中,所述HDR元数据获取模块,还配置为:创建所述原始视频渲染时的交换链,并获取预设的示例元数据;以所述交换链为起始检测点,遍历所述原始视频对应的视频数据,确定所述视频数据中与所述示例元数据相同的数据内容;基于所述相同的数据内容对应的地址信息和所述示例元数据的地址信息,确定偏移地址;将所述偏移地址确定为所述原始视频的HDR元数据。
在一些实施例中,所述装置还包括:元数据获取模块,配置为从所述原始视频的视频数据中获取所述原始视频的HDR元数据;关键帧确定模块,配置为确定所述硬件编码处理后的直播视频中的关键帧;信息添加模块,配置为将所述HDR元数据作为补充增强信息添加至所述关键帧的帧数据中。
在一些实施例中,所述原始视频和所述直播视频的视频画面类型均为HDR类型。
需要说明的是,本申请实施例装置的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括可执行指令,该可执行指令是一种计算机指令;该可执行指令存储在计算机可读存储介质中。当电子设备的处理器从计算机可读存储介质读取该可执行指令,处理器执行该可执行指令时,使得该电子设备执行本申请实施例上述的方法。
本申请实施例提供一种存储有可执行指令的存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图5示出的方法。
在一些实施例中,存储介质可以是计算机可读存储介质,例如,铁电存储器(FRAM,Ferromagnetic Random Access Memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory)、带电可擦可编程只读存储器(EEPROM,Electrically Erasable Programmable Read Only Memory)、闪存、磁表面存储器、光盘、或光盘只读存储器(CD-ROM,Compact Disk-Read Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。作为示例,可执行指令可被部署为在一个计算设备(可以是作业运行时长确定设备)上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。

Claims (16)

  1. 一种直播视频处理方法,所述方法由电子设备执行,所述方法包括:
    在直播应用的设置界面上显示运行模式按钮;
    响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;
    在所述直播应用的直播界面上显示所述直播视频。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    对所述直播应用的预设存储位置进行初始化,得到纹理区域;其中,在所述纹理区域能够实现跨进程共享;
    在生成所述目标直播对象的原始视频时,调用钩子函数对所述原始视频进行挂钩处理,得到挂钩处理后的原始视频;
    将所述挂钩处理后的原始视频写入至所述纹理区域上。
  3. 根据权利要求2所述的方法,其中,所述在生成所述目标直播对象的原始视频时,调用钩子函数对所述原始视频进行挂钩处理,包括:
    获取用于生成所述目标直播对象的原始视频的指定消息;
    在生成所述目标直播对象的原始视频时,调用钩子函数对所述指定消息进行挂钩处理;
    对挂钩处理后的指定消息进行修改,得到修改后的指定消息;
    基于所述修改后的指定消息获取所述目标直播对象的原始视频,得到所述挂钩处理后的原始视频。
  4. 根据权利要求1所述的方法,其中,所述方法还包括:
    在生成所述目标直播对象的原始视频时,调用开放共享资源函数打开图形基础设施的共享句柄;
    通过所述共享句柄获取能够实现跨进程共享的纹理区域和所述纹理区域的区域标识;
    确定所述区域标识的格式;
    基于所述区域标识的格式,确定所生成的原始视频的视频画面类型。
  5. 根据权利要求1所述的方法,其中,所述基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频,包括:
    当所述原始视频的视频画面类型与所述选择操作对应的运行模式匹配时,采用预设颜色格式和预设颜色空间,将所述原始视频渲染至所述直播应用的目标画布上,得到渲染视频;
    对所述渲染视频进行编码处理,得到所述目标直播对象的直播视频。
  6. 根据权利要求5所述的方法,其中,所述对所述渲染视频进行编码处理,得到所述目标直播对象的直播视频,包括:
    对所述渲染视频进行格式转换处理,得到格式转换后的视频;
    对所述格式转换后的视频进行软件编码处理,得到所述目标直播对象的直播视频;或者,对所述格式转换后的视频进行硬件编码处理,得到所述目标直播对象的直播视频。
  7. 根据权利要求6所述的方法,其中,所述渲染视频为RGB格式数据;所述对所述渲染视频进行格式转换处理,得到格式转换后的视频,包括:
    对所述RGB格式数据进行位运算,得到每一像素点的RGB分量数据;
    将每预设数量的像素点的RGB分量数据确定为一个数据组;
    对每一数据组中的RGB分量数据进行矩阵转换,得到与每一像素点对应的YUV数据;
    基于每一像素点对应的YUV数据,确定所述格式转换后的视频。
  8. 根据权利要求6所述的方法,其中,所述渲染视频为RGB格式数据;所述对所述渲染视频进行格式转换处理,得到格式转换后的视频,包括:
    获取所述RGB格式数据的格式纹理;
    对所述格式纹理进行线性转换,得到格式转换后的RGB数据;
    对所述格式转换后的RGB数据依次进行颜色矩阵转换和重排序处理,得到具有预设比特位的YUV数据;
    基于所述具有预设比特位的YUV数据,确定所述格式转换后的视频。
  9. 根据权利要求6所述的方法,其中,所述方法还包括:
    获取所述原始视频的HDR元数据;
    所述对所述格式转换后的视频进行硬件编码处理,得到所述目标直播对象的直播视频,包括:
    基于所述原始视频的HDR元数据,对所述格式转换后的视频进行硬件编码处理,得到所述目标直播对象的直播视频。
  10. 根据权利要求9所述的方法,其中,所述获取所述原始视频的HDR元数据,包括:
    创建所述原始视频渲染时的交换链,并获取预设的示例元数据;
    以所述交换链为起始检测点,遍历所述原始视频对应的视频数据,确定所述视频数据中与所述示例元数据相同的数据内容;
    基于所述相同的数据内容对应的地址信息和所述示例元数据的地址信息,确定偏移地址;
    将所述偏移地址确定为所述原始视频的HDR元数据。
  11. 根据权利要求6所述的方法,其中,所述方法还包括:
    从所述原始视频的视频数据中获取所述原始视频的HDR元数据;
    确定所述硬件编码处理后的直播视频中的关键帧;
    将所述HDR元数据作为补充增强信息添加至所述关键帧的帧数据中。
  12. 根据权利要求1至11任一项所述的方法,其中,所述原始视频和所述直播视频的视频画面类型均为HDR类型。
  13. 一种直播视频处理装置,所述装置包括:
    第一显示模块,配置为在直播应用的设置界面上显示运行模式按钮;
    获取模块,配置为响应于针对所述运行模式按钮的选择操作和针对目标直播对象的直播开始操作,基于所述目标直播对象的原始视频以及与所述选择操作对应的运行模式,获取所述目标直播对象的直播视频;其中,所述直播视频具有与所述运行模式对应的画面显示效果;
    第二显示模块,配置为在所述直播应用的直播界面上显示所述直播视频。
  14. 一种电子设备,包括:
    存储器,配置为存储可执行指令;处理器,配置为执行所述存储器中存储的可执行指令时,实现权利要求1至12任一项所述的直播视频处理方法。
  15. 一种计算机可读存储介质,存储有可执行指令,配置为引起处理器执行所述可执行指令时,实现权利要求1至12任一项所述的直播视频处理方法。
  16. 一种计算机程序产品或计算机程序,所述计算机程序产品或计算机程序包括可执行指令,所述可执行指令存储在计算机可读存储介质中;
    当电子设备的处理器从所述计算机可读存储介质读取所述可执行指令,并执行所述可执行指令时,实现权利要求1至12任一项所述的直播视频处理方法。
PCT/CN2023/076420 2022-04-08 2023-02-16 直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 WO2023193524A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210370093.1 2022-04-08
CN202210370093.1A CN116939233A (zh) 2022-04-08 2022-04-08 直播视频处理方法、装置、设备、存储介质及计算机程序

Publications (1)

Publication Number Publication Date
WO2023193524A1 true WO2023193524A1 (zh) 2023-10-12

Family

ID=88243942

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/076420 WO2023193524A1 (zh) 2022-04-08 2023-02-16 直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品

Country Status (2)

Country Link
CN (1) CN116939233A (zh)
WO (1) WO2023193524A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012152817A1 (en) * 2011-05-12 2012-11-15 Telefonica, S.A. Method and end point for distributing live content stream in a content delivery network
CN104410918A (zh) * 2014-12-09 2015-03-11 广州华多网络科技有限公司 一种直播视频参数调整方法和装置
CN108040285A (zh) * 2017-11-15 2018-05-15 上海掌门科技有限公司 视频直播画面调整方法、计算机设备及存储介质
CN112788358A (zh) * 2020-12-31 2021-05-11 腾讯科技(深圳)有限公司 游戏对局的视频直播方法、视频发送方法、装置及设备
CN113766252A (zh) * 2020-06-03 2021-12-07 广州虎牙科技有限公司 直播视频处理方法、装置、设备、集群和系统及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012152817A1 (en) * 2011-05-12 2012-11-15 Telefonica, S.A. Method and end point for distributing live content stream in a content delivery network
CN104410918A (zh) * 2014-12-09 2015-03-11 广州华多网络科技有限公司 一种直播视频参数调整方法和装置
CN108040285A (zh) * 2017-11-15 2018-05-15 上海掌门科技有限公司 视频直播画面调整方法、计算机设备及存储介质
CN113766252A (zh) * 2020-06-03 2021-12-07 广州虎牙科技有限公司 直播视频处理方法、装置、设备、集群和系统及存储介质
CN112788358A (zh) * 2020-12-31 2021-05-11 腾讯科技(深圳)有限公司 游戏对局的视频直播方法、视频发送方法、装置及设备

Also Published As

Publication number Publication date
CN116939233A (zh) 2023-10-24

Similar Documents

Publication Publication Date Title
CN109219844B (zh) 在视频优先级与图形优先级之间转换
US11418832B2 (en) Video processing method, electronic device and computer-readable storage medium
US10574955B2 (en) Re-projecting flat projections of pictures of panoramic video for rendering by application
EP3562163A1 (en) Audio-video synthesis method and system
US10720091B2 (en) Content mastering with an energy-preserving bloom operator during playback of high dynamic range video
US8121421B2 (en) Media content management
KR20080082759A (ko) 네트워크를 통한 가상 스튜디오 구현 시스템 및 그 방법
CN115190345B (zh) 用于显示媒体的协调控制方法、客户端设备及存储介质
CN113676773A (zh) 一种视频播放方法、系统、装置、计算机设备和存储介质
CN111741343B (zh) 视频处理方法及装置、电子设备
US11967345B2 (en) System and method for rendering key and fill video streams for video processing
WO2023193524A1 (zh) 直播视频处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品
CN114245027B (zh) 一种视频数据混合处理方法、系统、电子设备和存储介质
KR20160015128A (ko) 클라우드 스트리밍 서비스 시스템, 이미지 타입에 따른 클라우드 스트리밍 서비스 방법 및 이를 위한 장치
US20240087169A1 (en) Realtime conversion of macroblocks to signed distance fields to improve text clarity in video streaming
WO2024120031A1 (zh) 处理视频数据的方法、装置、计算机设备和存储介质
WO2022219202A1 (en) System and method for rendering key and fill video streams for video processing
CN117675780A (zh) 一种云端实时h5流式渲染的方法和系统
CN117714764A (zh) 一种视频播放方法、装置、设备及存储介质
CN116684629A (zh) 视频编码及解码方法、装置、电子设备及介质
WO2024097135A1 (en) High dynamic range video formats with low dynamic range compatibility
CN115396710A (zh) H5或小程序投短视频的方法以及相关装置
CN115706828A (zh) 数据处理方法及装置、设备、存储介质
CA3202614A1 (en) System and method for decimation of image data for multiviewer display
CN115883922A (zh) 一种视频编码渲染的方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23784088

Country of ref document: EP

Kind code of ref document: A1