[go: up one dir, main page]

CN114760527B - Video playing method and device in game scene, storage medium and electronic equipment - Google Patents

Video playing method and device in game scene, storage medium and electronic equipment Download PDF

Info

Publication number
CN114760527B
CN114760527B CN202210386624.6A CN202210386624A CN114760527B CN 114760527 B CN114760527 B CN 114760527B CN 202210386624 A CN202210386624 A CN 202210386624A CN 114760527 B CN114760527 B CN 114760527B
Authority
CN
China
Prior art keywords
target
audio
video
playing
game
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210386624.6A
Other languages
Chinese (zh)
Other versions
CN114760527A (en
Inventor
岳豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202210386624.6A priority Critical patent/CN114760527B/en
Publication of CN114760527A publication Critical patent/CN114760527A/en
Application granted granted Critical
Publication of CN114760527B publication Critical patent/CN114760527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43072Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of multiple content streams on the same device
    • 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/439Processing of audio elementary streams
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本公开涉及一种游戏场景中的视频播放方法、装置、存储介质及电子设备,射击计算机技术领域,该方法包括:获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据;播放所述目标视频以及控制音频引擎同步播放所述目标音频。由此,在游戏场景中播放游戏视频时,通过游戏的音频引擎播放目标音频,则无需再启用另一个声音播放器,从而减少游戏占用的内存,提升游戏的运行速度。而且,通过播放单独的目标音频与目标视频,便于对目标音频的音量调试,无需对视频部分进行操作。

The present disclosure relates to a method, device, storage medium and electronic device for playing videos in a game scene, and the field of shooting computer technology. The method includes: obtaining a target video and a target audio, wherein the target video includes a video screen separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video; playing the target video and controlling the audio engine to synchronously play the target audio. Thus, when the game video is played in the game scene, the target audio is played through the audio engine of the game, and there is no need to enable another sound player, thereby reducing the memory occupied by the game and improving the running speed of the game. Moreover, by playing separate target audio and target video, it is convenient to adjust the volume of the target audio without having to operate the video part.

Description

游戏场景中的视频播放方法、装置、存储介质及电子设备Video playback method, device, storage medium and electronic device in game scene

技术领域Technical Field

本公开涉及计算机技术领域,具体地,涉及一种游戏场景中的视频播放方法、装置、存储介质及电子设备。The present disclosure relates to the field of computer technology, and in particular, to a method, device, storage medium and electronic device for playing videos in a game scene.

背景技术Background Art

由于预先渲染的视频具有更高的画面品质,在游戏场景中一般会通过播放预先渲染好的视频来提高游戏的画面表现力。例如,在进入游戏时,可以播放开场动画来提高游戏的画面表现力。在展示技能效果时,可以播放技能展示动画等等。因此,如何在游戏场景中播放视频成为游戏优化的又一问题。Since pre-rendered videos have higher picture quality, they are generally played in game scenes to improve the game's picture performance. For example, when entering a game, you can play an opening animation to improve the game's picture performance. When showing skill effects, you can play skill display animations, etc. Therefore, how to play videos in game scenes has become another issue for game optimization.

发明内容Summary of the invention

提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

第一方面,本公开提供一种游戏场景中的视频播放方法,包括:In a first aspect, the present disclosure provides a method for playing a video in a game scene, comprising:

获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据;Acquire a target video and a target audio, wherein the target video includes a video picture separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video;

播放所述目标视频以及控制音频引擎同步播放所述目标音频。Play the target video and control the audio engine to synchronously play the target audio.

第二方面,本公开提供一种游戏场景中的视频播放装置,包括:In a second aspect, the present disclosure provides a video playback device in a game scene, comprising:

获取模块,配置为获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据;An acquisition module configured to acquire a target video and a target audio, wherein the target video includes a video picture separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video;

播放模块,配置为播放所述目标视频以及控制音频引擎同步播放所述目标音频。The playing module is configured to play the target video and control the audio engine to synchronously play the target audio.

第三方面,本公开提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理装置执行时实现第一方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:

存储装置,其上存储有计算机程序;a storage device having a computer program stored thereon;

处理装置,用于执行所述存储装置中的所述计算机程序,以实现第一方面所述方法的步骤。A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

基于上述技术方案,通过将预渲染的游戏视频分离为包括视频画面的目标视频以及包括音频数据的目标音频,并在播放目标视频时,通过音频引擎同步播放目标音频。由于目标视频中不包括音频数据,因此通过视频播放组件播放目标视频时,无需调用视频播放组件中的声音播放器。在游戏场景中播放游戏视频时,通过游戏的音频引擎播放目标音频,则无需再启用另一个声音播放器,从而减少游戏占用的内存,提升游戏的运行速度。另外,通过将预渲染的游戏视频分离为目标视频和目标音频,可以对目标音频中的声音音量进行单独调试,无需对整个游戏视频进行调整。应当理解的是,当使用视频播放组件播放预渲染的游戏视频时,由于视频画面与音频数据是集成的,如果需要调整游戏视频中的声音,则需要对整个游戏视频的文件进行调整。例如,当游戏视频中的声音过大时,对声音的音量进行调小,需要重新压缩视频、调整音频的音量,再合成一个新的游戏视频。而通过播放单独的目标音频,可以直接调整目标音频的音量即可。Based on the above technical solution, the pre-rendered game video is separated into a target video including a video screen and a target audio including audio data, and the target audio is synchronously played through the audio engine when the target video is played. Since the target video does not include audio data, when the target video is played through the video playback component, there is no need to call the sound player in the video playback component. When the game video is played in the game scene, the target audio is played through the audio engine of the game, and there is no need to enable another sound player, thereby reducing the memory occupied by the game and improving the running speed of the game. In addition, by separating the pre-rendered game video into a target video and a target audio, the sound volume in the target audio can be debugged separately without adjusting the entire game video. It should be understood that when the pre-rendered game video is played using the video playback component, since the video screen and the audio data are integrated, if the sound in the game video needs to be adjusted, the file of the entire game video needs to be adjusted. For example, when the sound in the game video is too loud, the volume of the sound is reduced, and the video needs to be recompressed, the audio volume needs to be adjusted, and then a new game video needs to be synthesized. By playing a separate target audio, the volume of the target audio can be directly adjusted.

本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the following detailed description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

图1是根据一示例性实施例提出的一种游戏场景中的视频播放方法的流程图。FIG. 1 is a flow chart of a method for playing videos in a game scene according to an exemplary embodiment.

图2是根据一示例性实施例提出的同步播放目标视频以及目标音频的流程图。FIG. 2 is a flowchart of synchronously playing a target video and a target audio according to an exemplary embodiment.

图3是根据一示例性实施例提出的调整目标视频的播放进度的示意图。FIG. 3 is a schematic diagram of adjusting the playback progress of a target video according to an exemplary embodiment.

图4是根据另一示例性实施例提出的一种游戏场景中的视频播放方法的流程图。FIG. 4 is a flow chart of a method for playing videos in a game scene according to another exemplary embodiment.

图5是根据一示例性实施例提出的一种游戏场景中的视频播放装置的模块连接示意图。Fig. 5 is a schematic diagram of module connections of a video playback device in a game scene according to an exemplary embodiment.

图6是根据一示例性实施例提出的一种电子设备的结构示意图。Fig. 6 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment.

具体实施方式DETAILED DESCRIPTION

下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and/or in parallel. In addition, the method embodiments may include additional steps and/or omit the steps shown. The scope of the present disclosure is not limited in this respect.

本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

同时,可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

图1是根据一示例性实施例提出的一种游戏场景中的视频播放方法的流程图。如图1所示,本公开实施例提出一种游戏场景中的视频播放方法,该方法可以通过电子设备执行,具体可以是通过一种游戏场景中的视频播放装置来执行,该装置可以由软件和/或硬件的方式实现,配置于电子设备中。如图1所示,该方法可以包括以下步骤。FIG1 is a flow chart of a method for playing a video in a game scene according to an exemplary embodiment. As shown in FIG1 , the embodiment of the present disclosure proposes a method for playing a video in a game scene, which can be executed by an electronic device, specifically, by a video playing device in a game scene, which can be implemented by software and/or hardware and configured in an electronic device. As shown in FIG1 , the method can include the following steps.

在步骤110中,获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据。In step 110, a target video and a target audio are obtained, wherein the target video includes a video picture separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video.

这里,在电子设备获取到视频播放指令时,电子设备获取目标视频以及目标音频。其中,视频播放指令可以是在游戏场景触发特定事件时触发的。例如,当游戏从游戏场景A切换至游戏场景B时,可以触发视频播放指令,以在游戏场景切换过程中播放转场动画。当然,视频播放指令也可以是游戏玩家进行预设操作而触发的。例如,当游戏玩家点击游戏技能演示的控件时,触发视频播放指令,以在游戏场景中播放游戏技能展示动画。Here, when the electronic device obtains the video playback instruction, the electronic device obtains the target video and the target audio. Among them, the video playback instruction can be triggered when the game scene triggers a specific event. For example, when the game switches from game scene A to game scene B, the video playback instruction can be triggered to play the transition animation during the game scene switching process. Of course, the video playback instruction can also be triggered by the game player performing a preset operation. For example, when the game player clicks the control of the game skill demonstration, the video playback instruction is triggered to play the game skill demonstration animation in the game scene.

目标视频以及目标音频是对预先渲染好的游戏视频进行音视频分离而获得的,该目标视频为从游戏视频中分离得到的视频画面,该目标视频为从游戏视频中分离得到的音频数据。值得说明的是,目标视频以及目标音频具有相同长度的时间轴。The target video and the target audio are obtained by separating the audio and video of the pre-rendered game video. The target video is the video image separated from the game video, and the target video is the audio data separated from the game video. It is worth noting that the target video and the target audio have the same length of time axis.

响应于视频播放指令,电子设备可以从数据库中获取目标视频以及目标音频。其中,在数据库中可以根据“视频播放指令类型-目标音频/目标视频”的存储格式存储若干视频数据和音频数据。值得说明的是,该数据库可以是本地数据库,也可以是云端数据库。当游戏进行更新时,可以对该数据库中的内容进行同步更新。In response to the video playback instruction, the electronic device can obtain the target video and the target audio from the database. In the database, a number of video data and audio data can be stored according to the storage format of "video playback instruction type-target audio/target video". It is worth noting that the database can be a local database or a cloud database. When the game is updated, the content in the database can be updated synchronously.

当然,电子设备获取目标视频以及目标音频的方式也可以是获取预渲染的游戏视频,调用音视频分离模块对该预渲染的游戏视频进行音视频分离处理,获得目标视频以及目标音频。应当理解的是,音视频分离技术是成熟的相关技术,在此不再赘述。Of course, the electronic device can also obtain the target video and the target audio by obtaining a pre-rendered game video, calling the audio and video separation module to perform audio and video separation processing on the pre-rendered game video to obtain the target video and the target audio. It should be understood that the audio and video separation technology is a mature related technology and will not be described in detail here.

在步骤120中,播放所述目标视频以及控制音频引擎同步播放所述目标音频。In step 120, the target video is played and the audio engine is controlled to synchronously play the target audio.

这里,电子设备在获取到需要播放的目标视频以及目标音频之后,电子设备调用视频播放组件播放目标视频,并且调用游戏中的音频引擎同步播放目标音频。Here, after the electronic device obtains the target video and target audio to be played, the electronic device calls the video playback component to play the target video, and calls the audio engine in the game to synchronously play the target audio.

应当理解的是,音频引擎是游戏用于播放游戏场景中触发的游戏音效的组件,该音频引擎包括能够实现对音频数据的采集、前处理、编码、发送、接受、解码、混音、后处理以及播放等操作。视频播放组件是一种视频播放器,其可以实现在游戏内播放目标视频。具体地,该视频播放组件可以将目标视频附加在游戏场景中,并在游戏场景的纹理上播放目标视频。It should be understood that the audio engine is a component used by the game to play the game sound effects triggered in the game scene, and the audio engine includes operations such as the acquisition, pre-processing, encoding, sending, receiving, decoding, mixing, post-processing and playing of audio data. The video playback component is a video player that can play the target video in the game. Specifically, the video playback component can attach the target video to the game scene and play the target video on the texture of the game scene.

由此,通过将预渲染的游戏视频分离为包括视频画面的目标视频以及包括音频数据的目标音频,并在播放目标视频时,通过音频引擎同步播放目标音频。由于目标视频中不包括音频数据,因此通过视频播放组件播放目标视频时,无需调用视频播放组件中的声音播放器。在游戏场景中播放游戏视频时,通过游戏的音频引擎播放目标音频,则无需再启用另一个声音播放器,从而减少游戏占用的内存,提升游戏的运行速度。另外,通过将预渲染的游戏视频分离为目标视频和目标音频,可以对目标音频中的声音音量进行单独调试,无需对整个游戏视频进行调整。应当理解的是,当使用视频播放组件播放预渲染的游戏视频时,由于视频画面与音频数据是集成的,如果需要调整游戏视频中的声音,则需要对整个游戏视频的文件进行调整。例如,当游戏视频中的声音过大时,对声音的音量进行调小,需要重新压缩视频、调整音频的音量,再合成一个新的游戏视频。而通过播放单独的目标音频,可以直接调整目标音频的音量即可。Thus, by separating the pre-rendered game video into a target video including a video screen and a target audio including audio data, and when playing the target video, the target audio is synchronously played through the audio engine. Since the target video does not include audio data, when playing the target video through the video playback component, there is no need to call the sound player in the video playback component. When playing the game video in the game scene, the target audio is played through the audio engine of the game, and there is no need to enable another sound player, thereby reducing the memory occupied by the game and improving the running speed of the game. In addition, by separating the pre-rendered game video into a target video and a target audio, the sound volume in the target audio can be debugged separately without adjusting the entire game video. It should be understood that when using the video playback component to play the pre-rendered game video, since the video screen and the audio data are integrated, if the sound in the game video needs to be adjusted, the file of the entire game video needs to be adjusted. For example, when the sound in the game video is too loud, the volume of the sound is reduced, and the video needs to be recompressed, the volume of the audio needs to be adjusted, and then a new game video needs to be synthesized. By playing a separate target audio, the volume of the target audio can be directly adjusted.

图2是根据一示例性实施例提出的同步播放目标视频以及目标音频的流程图。如图2所示,可以通过以下步骤同步播放目标视频和目标音频。Fig. 2 is a flow chart of synchronously playing a target video and a target audio according to an exemplary embodiment. As shown in Fig. 2, the target video and the target audio can be synchronously played through the following steps.

在步骤201中,播放所述目标视频以及通过音频引擎播放所述目标音频。In step 201, the target video is played and the target audio is played through an audio engine.

这里,响应于视频播放指令,电子设备调用视频播放组件播放目标视频,并同时调用音频引擎播放目标音频。其中,目标视频与目标音频具有相同长度的时间轴,在播放目标视频与目标音频时,分别由视频播放组件和音频引擎分别控制目标视频和目标音频的时间轴。Here, in response to the video playback instruction, the electronic device calls the video playback component to play the target video, and simultaneously calls the audio engine to play the target audio. The target video and the target audio have a time axis of the same length, and when playing the target video and the target audio, the time axis of the target video and the target audio are controlled by the video playback component and the audio engine, respectively.

在步骤202中,获取所述目标视频的第一当前播放进度以及所述目标音频的第二当前播放进度。In step 202, a first current play progress of the target video and a second current play progress of the target audio are obtained.

这里,在播放目标视频和目标音频的过程中,电子设备可以通过视频播放组件获取目标视频的第一当前播放进度,以及通过音频引擎获取目标音频的第二当前播放进度。Here, in the process of playing the target video and the target audio, the electronic device can obtain the first current play progress of the target video through the video play component, and obtain the second current play progress of the target audio through the audio engine.

示例性地,电子设备可以根据预设的时间间隔周期性地获取第一当前播放进度和第二当前播放进度。例如,设置0.1秒的时间间隔,每间隔0.1秒获取一次第一当前播放进度和第二当前播放进度。Exemplarily, the electronic device may periodically obtain the first current play progress and the second current play progress according to a preset time interval. For example, a time interval of 0.1 seconds is set, and the first current play progress and the second current play progress are obtained every 0.1 seconds.

在步骤203中,根据所述第一当前播放进度以及所述第二当前播放进度,调整所述目标视频的播放进度,以使所述目标视频的播放进度与所述目标音频的播放进度保持一致。In step 203, the play progress of the target video is adjusted according to the first current play progress and the second current play progress, so that the play progress of the target video is consistent with the play progress of the target audio.

这里,在第一当前播放进度与第二当前播放进度不一致的情况下,根据第一当前播放进度与第二当前播放进度之间的差值对目标视频的播放进度进行调整,以使调整后的目标视频的播放进度能够与目标音频的播放进度保持一致。Here, when the first current playback progress is inconsistent with the second current playback progress, the playback progress of the target video is adjusted according to the difference between the first current playback progress and the second current playback progress, so that the adjusted playback progress of the target video can be consistent with the playback progress of the target audio.

值得说明的是,在本公开实施例中,目标音频的播放进度是不进行调整的,即音频引擎在播放目标音频时,其是以预设的播放速度播放目标音频直至目标音频播放完成,在目标音频的播放过程中,不会调整目标音频的播放速度。当目标视频的第一当前播放进度与目标音频的第二当前播放进度不一致,通过调整目标视频的播放进度,使得目标视频的播放进度能够与目标音频的播放进度保持一致。It is worth noting that in the disclosed embodiment, the playback progress of the target audio is not adjusted, that is, when the audio engine plays the target audio, it plays the target audio at a preset playback speed until the target audio is played. During the playback of the target audio, the playback speed of the target audio will not be adjusted. When the first current playback progress of the target video is inconsistent with the second current playback progress of the target audio, the playback progress of the target video is adjusted so that the playback progress of the target video can be consistent with the playback progress of the target audio.

图3是根据一示例性实施例提出的调整目标视频的播放进度的示意图。如图3所示,图3中的子图(a)为调整前的目标视频与目标音频的时间轴,子图(b)为调整后的目标视频与目标音频的时间轴。在调整前,目标音频的第二当前播放进度为5秒,目标视频的第一当前播放进度为4秒。根据第一当前播放进度和第二当前播放进度之间的差值,将目标视频的播放进度调整为5秒。如子图(b)所示,调整后的目标视频的播放进度与目标视频的播放进度均为5秒。FIG3 is a schematic diagram of adjusting the playback progress of a target video according to an exemplary embodiment. As shown in FIG3 , sub-figure (a) in FIG3 is the time axis of the target video and the target audio before adjustment, and sub-figure (b) is the time axis of the target video and the target audio after adjustment. Before adjustment, the second current playback progress of the target audio is 5 seconds, and the first current playback progress of the target video is 4 seconds. According to the difference between the first current playback progress and the second current playback progress, the playback progress of the target video is adjusted to 5 seconds. As shown in sub-figure (b), the playback progress of the target video after adjustment and the playback progress of the target video are both 5 seconds.

由此,在第一当前播放进度与第二当前播放进度不一致的情况下,通过调整目标视频的播放进度,使得目标视频的播放进度能够与目标音频的播放进度保持一致。应当理解的是,在本公开实施例中,目标音频的播放速度是保持不变的,通过使得目标视频的播放进度能够跟踪目标音频的播放进度,目标视频的播放进度与目标音频的播放进度能够保持一致。由于游戏玩家对于游戏画面的卡顿的敏感度相较于对于游戏音效的卡顿的敏感度更低,通过调整目标视频的播放进度,能够给游戏玩家带来更好的游戏体验。Thus, when the first current playback progress is inconsistent with the second current playback progress, the playback progress of the target video can be made consistent with the playback progress of the target audio by adjusting the playback progress of the target video. It should be understood that in the disclosed embodiment, the playback speed of the target audio remains unchanged, and the playback progress of the target video can be made consistent with the playback progress of the target audio by making the playback progress of the target video track the playback progress of the target audio. Since game players are less sensitive to the freeze of the game screen than to the freeze of the game sound effects, by adjusting the playback progress of the target video, a better gaming experience can be provided to game players.

在一些可以实现的实施方式中,步骤203中,在所述第一当前播放进度与所述第二当前播放进度之间的差值的绝对值大于等于预设阈值的情况下,根据所述差值,确定目标跳转进度,并根据所述目标跳转进度,对所述目标视频执行跳转操作。In some feasible implementations, in step 203, when the absolute value of the difference between the first current playback progress and the second current playback progress is greater than or equal to a preset threshold, the target jump progress is determined based on the difference, and the jump operation is performed on the target video based on the target jump progress.

这里,差值的绝对值大于等于预设阈值表征目标视频与目标音频之间的播放进度相差较大,通过采用跳转的方式调整目标视频的播放进度,能够快速使得目标视频与目标音频之间的播放进度保持一致。值得说明的是,预设阈值可以根据实际使用情况进行设置,如可以设置为1秒,也可以设置为2秒等等。Here, the absolute value of the difference being greater than or equal to the preset threshold indicates that the playback progress of the target video and the target audio are significantly different. By adjusting the playback progress of the target video in a jump manner, the playback progress of the target video and the target audio can be quickly made consistent. It is worth noting that the preset threshold can be set according to actual usage, such as 1 second, 2 seconds, etc.

例如,当所述差值表征所述目标视频的第一当前播放进度大于等于目标音频的第二当前播放进度、且大于第一阈值,则根据目标跳转进度对目标视频执行跳转操作。当所述差值表征所述目标视频的第一当前播放进度小于目标音频的第二当前播放进度、且大于第二阈值,则根据目标跳转进度对目标视频执行跳转操作。其中,第一阈值大于第二阈值。For example, when the difference indicates that the first current playback progress of the target video is greater than or equal to the second current playback progress of the target audio, and is greater than a first threshold, a jump operation is performed on the target video according to the target jump progress. When the difference indicates that the first current playback progress of the target video is less than the second current playback progress of the target audio, and is greater than a second threshold, a jump operation is performed on the target video according to the target jump progress. The first threshold is greater than the second threshold.

在一些实施例中,目标跳转进度可以根据所述差值、跳转耗时以及通信耗时,确定所述目标跳转进度,其中,所述跳转耗时为播放所述目标视频的视频播放组件执行一次跳转操作的所需时间,所述通信耗时包括游戏引擎与所述视频播放组件进行单程通信的所需时间以及所述游戏引擎与所述音频引擎进行单程通信的所需时间。In some embodiments, the target jump progress can be determined based on the difference, the jump time and the communication time, wherein the jump time is the time required for the video playback component that plays the target video to perform a jump operation, and the communication time includes the time required for the game engine to communicate with the video playback component in a one-way manner and the time required for the game engine to communicate with the audio engine in a one-way manner.

这里,在执行对目标视频的播放进度进行调整的操作时,不仅需要考虑第一当前播放进度与第二当前播放进度之间的差值,还需要考虑视频播放组件执行一次跳转操作所需的跳转耗时以及通信耗时。其中,在电子设备对视频播放组件的播放目标视频的播放进度进行调整时,电子设备通过游戏引擎向视频播放组件发送调整指令,以及获取音频引擎播放目标音频的第二当前播放进度,因此,通信耗时可以包括游戏引擎与所述视频播放组件进行单程通信的所需时间以及所述游戏引擎与所述音频引擎进行单程通信的所需时间。Here, when performing the operation of adjusting the playback progress of the target video, it is necessary to consider not only the difference between the first current playback progress and the second current playback progress, but also the jump time and communication time required for the video playback component to perform a jump operation. Among them, when the electronic device adjusts the playback progress of the target video played by the video playback component, the electronic device sends an adjustment instruction to the video playback component through the game engine, and obtains the second current playback progress of the target audio played by the audio engine. Therefore, the communication time can include the time required for the game engine to communicate with the video playback component in a one-way manner and the time required for the game engine to communicate with the audio engine in a one-way manner.

应当理解的是,目标跳转进度可以是差值、跳转耗时以及通信耗时的和。通过该目标跳转进度,目标视频与目标音频会在间隔目标跳转进度的未来保持播放进度一致。例如,目标视频的第一当前播放进度为35秒,目标音频的第二当前播放进度为39秒,目标视频从35秒跳转至39秒所需的跳转耗时以及通信耗时为0.3秒,则目标跳转进度为4.3秒。在调整目标视频的播放进度时,将目标视频的播放进度从35秒跳转至39.3秒,则目标视频与目标音频在39.3秒的播放进度保持一致,实现目标音频与目标视频的同步。It should be understood that the target jump progress can be the sum of the difference, the jump time-consuming and the communication time-consuming. Through the target jump progress, the target video and the target audio can keep the same play progress in the future of the interval target jump progress. For example, the first current play progress of the target video is 35 seconds, the second current play progress of the target audio is 39 seconds, and the jump time-consuming and the communication time-consuming required for the target video to jump from 35 seconds to 39 seconds are 0.3 seconds, and the target jump progress is 4.3 seconds. When adjusting the play progress of the target video, the play progress of the target video is jumped from 35 seconds to 39.3 seconds, then the target video and the target audio are consistent in the play progress of 39.3 seconds, and the synchronization of the target audio and the target video is realized.

在一些可以实现的实施方式中,步骤203中,在所述第一当前播放进度与所述第二当前播放进度之间的差值的绝对值小于所述预设阈值的情况下,根据所述差值,确定目标播放速度以及目标调整时长,并将所述目标视频的播放速度调整为所述目标播放速度,并在调整播放速度后的持续时间达到所述目标调整时长时,恢复所述目标视频的播放速度。In some feasible implementations, in step 203, when the absolute value of the difference between the first current playback progress and the second current playback progress is less than the preset threshold, the target playback speed and the target adjustment duration are determined based on the difference, and the playback speed of the target video is adjusted to the target playback speed, and when the duration after the playback speed adjustment reaches the target adjustment duration, the playback speed of the target video is restored.

这里,第一当前播放进度与第二当前播放进度之间的差值的绝对值小于预设阈值表征目标视频与目标音频之间的播放进度相差较小,通过采用加速或减速的目标视频的播放速度,能够稳定得使得目标视频与目标音频之间的播放进度保持一致,而且通过调整目标视频的播放速度,能够减小游戏玩家对游戏画面卡顿的感知。Here, the absolute value of the difference between the first current playback progress and the second current playback progress is less than the preset threshold, indicating that the playback progress difference between the target video and the target audio is small. By accelerating or decelerating the playback speed of the target video, the playback progress between the target video and the target audio can be stabilized to remain consistent, and by adjusting the playback speed of the target video, the game player's perception of game screen freezes can be reduced.

例如,当所述差值表征所述目标视频的第一当前播放进度大于等于目标音频的第二当前播放进度、且小于等于第一阈值时,则根据目标播放速度以及目标调整时长对目标视频执行减速播放操作。当所述差值表征所述目标视频的第一当前播放进度小于目标音频的第二当前播放进度、且小于等于第二阈值时,则根据目标播放速度以及目标调整时长对目标视频执行加速播放操作。For example, when the difference indicates that the first current playback progress of the target video is greater than or equal to the second current playback progress of the target audio, and is less than or equal to the first threshold, the target video is decelerated according to the target playback speed and the target adjustment duration. When the difference indicates that the first current playback progress of the target video is less than the second current playback progress of the target audio, and is less than or equal to the second threshold, the target video is accelerated according to the target playback speed and the target adjustment duration.

在一些实施例中,可以根据所述差值以及所述通信耗时,确定所述目标播放速度以及所述目标调整时长。In some embodiments, the target playback speed and the target adjustment duration may be determined based on the difference and the communication time.

这里,由于音频引擎播放目标音频的播放速度是固定的,因此,根据第一当前播放进度与第二当前播放进度之间的差值以及通信耗时可以计算得到目标播放速度以及目标调整时长。其中,目标调整时长是指视频播放组件以目标播放速度播放目标视频的时长。Here, since the playback speed of the target audio played by the audio engine is fixed, the target playback speed and the target adjustment duration can be calculated according to the difference between the first current playback progress and the second current playback progress and the communication time. The target adjustment duration refers to the duration of the video playback component playing the target video at the target playback speed.

作为一种示例,可以将预设的播放速度作为目标播放速度,并根据差值与通信耗时的和、目标播放速度与音频播放速度的差值,计算目标调整时长。As an example, a preset playback speed may be used as a target playback speed, and the target adjustment duration may be calculated based on the sum of the difference and the communication time consumption, and the difference between the target playback speed and the audio playback speed.

作为另一种示例,可以将预设的调整时长作为目标调整时长,根据差值与通信耗时的和、目标播放速度与音频播放速度的差值,计算目标调整速度。As another example, a preset adjustment duration may be used as a target adjustment duration, and the target adjustment speed may be calculated based on the sum of the difference and the communication time consumption, and the difference between the target playback speed and the audio playback speed.

应当理解的是,在本公开实施例中,根据第一当前播放进度与第二当前播放进度的差值,确定对目标视频执行的调整操作。其中,调整操作包括视频跳转操作以及视频加减速操作。It should be understood that in the embodiment of the present disclosure, the adjustment operation performed on the target video is determined according to the difference between the first current playback progress and the second current playback progress, wherein the adjustment operation includes a video jump operation and a video acceleration and deceleration operation.

图4是根据另一示例性实施例提出的一种游戏场景中的视频播放方法的流程图。如图4所示,该方法可以包括以下步骤:Fig. 4 is a flow chart of a method for playing a video in a game scene according to another exemplary embodiment. As shown in Fig. 4, the method may include the following steps:

在步骤410中,确定所述目标音频的音频特征参数。In step 410, audio feature parameters of the target audio are determined.

这里,音频特征参数是指从目标音频中分析得到的音频特征,该音频特征参数可以包括和弦信息、频谱特征以及音乐风格类型。其中,和弦信息反映了目标音频的主旋律信息以及音频调性。频谱特征则反映了声音的基本特征,包括频率特征以及时域特征等等。音乐风格类型是指目标音频所属的音乐分类,可以包括古风类型、流行乐类型等等。Here, the audio feature parameters refer to the audio features analyzed from the target audio, which may include chord information, spectrum features, and music style types. The chord information reflects the main melody information and audio tonality of the target audio. The spectrum features reflect the basic characteristics of the sound, including frequency features and time domain features, etc. The music style type refers to the music classification to which the target audio belongs, which may include ancient style type, pop music type, etc.

应当理解的是,由于是通过音频引擎播放目标音频,因此,电子设备可以通过调用游戏引擎获取目标音频,并通过游戏引擎对目标音频进行分析,获得和弦信息、频谱特征以及音乐风格类型。其中,如何从目标音频中识别目标音频的和弦信息、频谱特征以及音乐风格类型属于成熟的相关技术,在此不再赘述。It should be understood that, since the target audio is played through the audio engine, the electronic device can obtain the target audio by calling the game engine, and analyze the target audio through the game engine to obtain chord information, spectrum characteristics and music style type. Among them, how to identify the chord information, spectrum characteristics and music style type of the target audio from the target audio belongs to mature related technologies and will not be repeated here.

在步骤420中,根据所述音频特征参数,生成过渡音频,其中,所述过渡音频用于衔接所述目标音频。In step 420, a transition audio is generated according to the audio feature parameters, wherein the transition audio is used to connect with the target audio.

这里,过渡音频是用于与目标音频进行衔接的过渡性音频,目标音频与过渡音频进行首尾相连时,可以使得连接得到的音频既能够满足和声乐理,也能够在音乐风格上保持一致,而且符合听觉乐感。Here, the transition audio is a transitional audio used to connect with the target audio. When the target audio and the transition audio are connected end to end, the connected audio can satisfy the harmony theory, maintain consistency in musical style, and conform to the auditory sense of music.

在一些实施例中,可以将数据库中与所述和弦信息、所述频谱特征以及所述音乐风格类型均匹配的音频确定为所述过渡音频。In some embodiments, the audio in the database that matches the chord information, the frequency spectrum feature, and the music style type may be determined as the transition audio.

其中,在数据库中可以根据“和弦信息-频谱特征-音乐风格类型-过渡音频”的存储格式存储有若干音频。当获取到目标音频的音频特征参数之后,根据音频特征参数在数据库中查找对应的音频作为过渡音频。值得说明的是,该数据库可以为本地数据,也可以为云数据库。Among them, a number of audios can be stored in the database according to the storage format of "chord information-spectrum characteristics-music style type-transition audio". After the audio feature parameters of the target audio are obtained, the corresponding audio is searched in the database as the transition audio according to the audio feature parameters. It is worth noting that the database can be local data or a cloud database.

当然,在数据库中不存在对应的过渡音频时,可以从目标音频中截取若干段音频,并根据音频特征参数对截取到的音频进行重新编排,获得过渡音频。Of course, when there is no corresponding transition audio in the database, several audio segments can be intercepted from the target audio, and the intercepted audio can be rearranged according to the audio feature parameters to obtain the transition audio.

值得说明的是,过渡音频的时间长度是可以根据实际情况进行设置的,不同游戏场景下的过渡音频的时间长度可以不同。It is worth noting that the duration of the transition audio can be set according to actual conditions, and the duration of the transition audio in different game scenarios may be different.

在步骤430中,在所述目标音频播放至预设播放进度的情况下,控制所述音频引擎播放所述过渡音频,以使所述目标音频的声音效果延续至游戏场景中。In step 430, when the target audio is played to a preset playing progress, the audio engine is controlled to play the transition audio so that the sound effect of the target audio continues into the game scene.

这里,预设播放进度可以是目标音频的结尾,即当目标音频播放完成时,控制音频引擎播放过渡音频。由于过渡音频是根据目标音频的音频特征参数确定的,过渡音频与目标音频的音乐风格类型、和弦以及频谱特征能够保持延续,从而能够在目标视频播放完成后,将目标音频的声音效果延续至游戏场景中。Here, the preset playback progress may be the end of the target audio, that is, when the target audio is finished playing, the audio engine is controlled to play the transition audio. Since the transition audio is determined according to the audio feature parameters of the target audio, the music style type, chord and spectrum features of the transition audio and the target audio can be kept continuous, so that after the target video is finished playing, the sound effects of the target audio can be continued to the game scene.

例如,在从游戏场景A切换至游戏场景B的过程中,通过播放目标视频以及目标音频,能够通过视频画面与游戏音效来实现良好的游戏场景过渡效果。在游戏场景A切换到游戏场景B之后,通过播放过渡音频,能够将目标音频中到的游戏音效延续至游戏场景B中,以提供游戏玩家的游戏沉浸感,而不会在游戏场景切换完成后产生割裂感。例如,目标音频展示的是一种恢弘的声音效果,通过将这种恢弘的声音效果延续至游戏场景B中,可以使得游戏玩家能够沉浸在预渲染的游戏视频提供的恢弘的氛围中。For example, in the process of switching from game scene A to game scene B, by playing the target video and the target audio, a good game scene transition effect can be achieved through the video screen and the game sound effects. After the game scene A switches to the game scene B, by playing the transition audio, the game sound effects in the target audio can be continued to the game scene B, so as to provide the game player with a sense of game immersion, without a sense of separation after the game scene switching is completed. For example, the target audio shows a magnificent sound effect. By continuing this magnificent sound effect to the game scene B, the game player can be immersed in the magnificent atmosphere provided by the pre-rendered game video.

由此,通过使用音频引擎播放目标音频,可以对目标音频进行分析,从而实现目标音频中的游戏音效与游戏场景中的其他游戏音效进行交互,使得游戏视频中的音效能够延续至游戏场景中,提高游戏玩家的沉浸感。Therefore, by using the audio engine to play the target audio, the target audio can be analyzed, so that the game sound effects in the target audio can interact with other game sound effects in the game scene, so that the sound effects in the game video can be continued into the game scene, thereby improving the immersion of game players.

在一些可以实现的实施方式中,可以确定目标音频的第一音量,并在播放所述目标音频的情况下,若所述音频引擎同时播放其他游戏音效,则将所述其他游戏音效的音量调整为第二音量,其中,所述第二音量小于所述第一音量。In some feasible implementations, a first volume of a target audio can be determined, and when the target audio is played, if the audio engine simultaneously plays other game sound effects, the volume of the other game sound effects can be adjusted to a second volume, wherein the second volume is less than the first volume.

这里,由于目标音频是从预渲染的游戏视频中分离得到的音频数据,并且通过音频引擎播放目标音频,因此,游戏可以对音频引擎播放的目标音频的第一音量进行感知,以在音频引擎播放目标音频的过程中,若音频引擎同时播放其他游戏音效,则可以将其他游戏音效的第二音量调整为小于第一音量,实现预渲染的游戏视频的音效与游戏场景音效的交互。其中,其他游戏音效可以是技能音效、背景音乐以及环境音效等等。Here, since the target audio is audio data separated from the pre-rendered game video and played by the audio engine, the game can sense the first volume of the target audio played by the audio engine, so that when the audio engine plays the target audio, if the audio engine plays other game sound effects at the same time, the second volume of the other game sound effects can be adjusted to be smaller than the first volume, thereby realizing the interaction between the sound effects of the pre-rendered game video and the game scene sound effects. Among them, the other game sound effects can be skill sound effects, background music, and environmental sound effects, etc.

例如,当预渲染的游戏视频用于展示技能释放效果时,如果游戏场景中存在背景音乐,为了凸显技能释放的声音效果,需要将背景音乐的音量降低。而如果是采用视频播放组件播放游戏视频,由于视频播放组件与游戏是隔离的,游戏无法感知游戏视频的音量大小,则无法对游戏场景中的其他游戏音效进行调整,以突出游戏视频的声音效果。当采用音频引擎播放目标音频时,游戏可以通过音频引擎获取目标音频的第一音量,从而调整背景音乐的第二音量,以凸显技能释放时的声音效果,实现在游戏场景中播放的视频的音效与其他游戏音效的交互。For example, when a pre-rendered game video is used to show the effect of releasing a skill, if there is background music in the game scene, in order to highlight the sound effect of releasing the skill, the volume of the background music needs to be lowered. If the video playback component is used to play the game video, since the video playback component is isolated from the game, the game cannot perceive the volume of the game video, and it is impossible to adjust other game sound effects in the game scene to highlight the sound effect of the game video. When the audio engine is used to play the target audio, the game can obtain the first volume of the target audio through the audio engine, thereby adjusting the second volume of the background music to highlight the sound effect when the skill is released, so as to achieve the interaction between the sound effects of the video played in the game scene and other game sound effects.

图5是根据一示例性实施例提出的一种游戏场景中的视频播放装置的模块连接示意图。如图5所示,该装置500可以包括:Fig. 5 is a schematic diagram of module connections of a video playback device in a game scene according to an exemplary embodiment. As shown in Fig. 5, the device 500 may include:

获取模块501,配置为获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据;An acquisition module 501 is configured to acquire a target video and a target audio, wherein the target video includes a video image separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video;

播放模块502,配置为播放所述目标视频以及控制音频引擎同步播放所述目标音频。The playing module 502 is configured to play the target video and control the audio engine to synchronously play the target audio.

可选地,所述播放模块502包括:Optionally, the playing module 502 includes:

播放子单元,配置为播放所述目标视频以及通过音频引擎播放所述目标音频;A playing subunit, configured to play the target video and play the target audio through an audio engine;

获取子单元,配置为获取所述目标视频的第一当前播放进度以及所述目标音频的第二当前播放进度;An acquisition subunit configured to acquire a first current playback progress of the target video and a second current playback progress of the target audio;

调整子单元,配置为根据所述第一当前播放进度以及所述第二当前播放进度,调整所述目标视频的播放进度,以使所述目标视频的播放进度与所述目标音频的播放进度保持一致。The adjustment subunit is configured to adjust the playback progress of the target video according to the first current playback progress and the second current playback progress so that the playback progress of the target video is consistent with the playback progress of the target audio.

可选地,所述调整子单元包括:Optionally, the adjusting subunit includes:

第一确定单元,配置为在所述第一当前播放进度与所述第二当前播放进度之间的差值的绝对值大于等于预设阈值的情况下,根据所述差值,确定目标跳转进度;A first determining unit is configured to determine a target jump progress according to a difference between the first current playback progress and the second current playback progress when an absolute value of the difference between the first current playback progress and the second current playback progress is greater than or equal to a preset threshold;

跳转单元,配置为根据所述目标跳转进度,对所述目标视频执行跳转操作;A jump unit, configured to perform a jump operation on the target video according to the target jump progress;

或,or,

第二确定单元,配置为在所述第一当前播放进度与所述第二当前播放进度之间的差值的绝对值小于所述预设阈值的情况下,根据所述差值,确定目标播放速度以及目标调整时长;A second determining unit is configured to determine a target playback speed and a target adjustment duration according to a difference between the first current playback progress and the second current playback progress when an absolute value of the difference between the first current playback progress and the second current playback progress is less than the preset threshold;

速度调整单元,配置为将所述目标视频的播放速度调整为所述目标播放速度,并在调整播放速度后的持续时间达到所述目标调整时长时,恢复所述目标视频的播放速度。The speed adjustment unit is configured to adjust the playback speed of the target video to the target playback speed, and restore the playback speed of the target video when the duration after the playback speed adjustment reaches the target adjustment duration.

可选地,所述第一确定单元具体配置为:Optionally, the first determining unit is specifically configured to:

根据所述差值、跳转耗时以及通信耗时,确定所述目标跳转进度,其中,所述跳转耗时为播放所述目标视频的视频播放组件执行一次跳转操作的所需时间,所述通信耗时包括游戏引擎与所述视频播放组件进行单程通信的所需时间以及所述游戏引擎与所述音频引擎进行单程通信的所需时间;Determine the target jump progress according to the difference, the jump time and the communication time, wherein the jump time is the time required for the video playback component that plays the target video to perform a jump operation, and the communication time includes the time required for the game engine to perform one-way communication with the video playback component and the time required for the game engine to perform one-way communication with the audio engine;

或,or,

所述第二确定单元具体配置为:The second determining unit is specifically configured as follows:

根据所述差值以及所述通信耗时,确定所述目标播放速度以及所述目标调整时长。The target playback speed and the target adjustment duration are determined according to the difference and the communication time.

可选地,所述装置500还包括:Optionally, the device 500 further includes:

特征确定模块,配置为确定所述目标音频的音频特征参数;A feature determination module, configured to determine audio feature parameters of the target audio;

生成模块,配置为根据所述音频特征参数,生成过渡音频,其中,所述过渡音频用于衔接所述目标音频;A generating module, configured to generate transition audio according to the audio feature parameters, wherein the transition audio is used to connect with the target audio;

控制模块,配置为在所述目标音频播放至预设播放进度的情况下,控制所述音频引擎播放所述过渡音频,以使所述目标音频的声音效果延续至游戏场景中。The control module is configured to control the audio engine to play the transition audio when the target audio is played to a preset playback progress, so that the sound effect of the target audio continues into the game scene.

可选地,所述音频特征参数包括所述目标音频的和弦信息、频谱特征以及音乐风格类型;所述生成模块具体配置为:Optionally, the audio feature parameters include chord information, spectrum features, and music style type of the target audio; and the generation module is specifically configured as follows:

将数据库中与所述和弦信息、所述频谱特征以及所述音乐风格类型均匹配的音频确定为所述过渡音频。The audio in the database that matches the chord information, the spectrum feature, and the music style type is determined as the transition audio.

可选地,所述装置500还包括:Optionally, the device 500 further includes:

音量确定模块,配置为确定所述目标音频的第一音量;A volume determination module, configured to determine a first volume of the target audio;

音量调整模块,配置为在播放所述目标音频的情况下,若所述音频引擎同时播放其他游戏音效,则将所述其他游戏音效的音量调整为第二音量,其中,所述第二音量小于所述第一音量。The volume adjustment module is configured to adjust the volume of other game sound effects to a second volume when the target audio is played and if the audio engine simultaneously plays other game sound effects, wherein the second volume is smaller than the first volume.

其中,关于上述装置500中的各个功能模块执行的功能逻辑,已在关于方法的部分进行了详细说明,在此不再赘述。Among them, the functional logic executed by each functional module in the above-mentioned device 500 has been described in detail in the part about the method, and will not be repeated here.

下面参考图6,其示出了适于用来实现本公开实施例的电子设备600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring to FIG6 below, it shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG6 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.

如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG6 , the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to the bus 604.

通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 6 shows an electronic device 600 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取目标视频以及目标音频,其中,所述目标视频包括从预渲染的游戏视频中分离得到的视频画面,所述目标音频包括从所述预渲染的游戏视频中分离得到的音频数据;播放所述目标视频以及控制音频引擎同步播放所述目标音频。The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a target video and a target audio, wherein the target video includes a video picture separated from a pre-rendered game video, and the target audio includes audio data separated from the pre-rendered game video; plays the target video and controls the audio engine to synchronously play the target audio.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定。The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, constitute a limitation on the module itself.

本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (9)

1. A video playing method in a game scene, comprising:
Responding to a video playing instruction, acquiring a target video and target audio, wherein the target video comprises video pictures separated from a pre-rendered game video, and the target audio comprises audio data separated from the pre-rendered game video;
Playing the target video through a video playing component and controlling an audio engine to synchronously play the target audio;
The playing the target video and controlling an audio engine to synchronously play the target audio comprises the following steps:
Playing the target video and playing the target audio through an audio engine;
Acquiring a first current playing progress of the target video and a second current playing progress of the target audio;
And adjusting the playing progress of the target video according to the first current playing progress and the second current playing progress so as to keep the playing progress of the target video consistent with the playing progress of the target audio.
2. The method of claim 1, wherein adjusting the progress of playing the target video according to the first current progress of playing and the second current progress of playing comprises:
Determining a target jump progress according to the difference value when the absolute value of the difference value between the first current playing progress and the second current playing progress is greater than or equal to a preset threshold value;
Executing a jump operation on the target video according to the target jump progress;
Or alternatively, the first and second heat exchangers may be,
Determining a target playing speed and a target adjusting duration according to the difference value when the absolute value of the difference value between the first current playing progress and the second current playing progress is smaller than the preset threshold value;
and adjusting the playing speed of the target video to be the target playing speed, and recovering the playing speed of the target video when the duration after the playing speed is adjusted reaches the target adjusting duration.
3. The method of claim 2, wherein determining a target jump progress from the difference comprises:
Determining the target jump progress according to the difference value, jump time and communication time, wherein the jump time is required by a video playing component playing the target video to execute a jump operation, and the communication time comprises required time for a game engine to perform one-way communication with the video playing component and required time for the game engine to perform one-way communication with the audio engine;
Or alternatively, the first and second heat exchangers may be,
The determining the target playing speed and the target adjusting duration according to the difference value comprises:
And determining the target playing speed and the target adjusting duration according to the difference value and the communication time consumption.
4.A method according to any one of claims 1 to 3, further comprising:
determining audio characteristic parameters of the target audio;
generating transition audio according to the audio characteristic parameters, wherein the transition audio is used for connecting the target audio;
And under the condition that the target audio is played to a preset playing progress, controlling the audio engine to play the transition audio so as to enable the sound effect of the target audio to be continued to a game scene.
5. The method of claim 4, wherein the audio feature parameters include chord information, spectral features, and musical style of the target audio;
the generating transitional audio according to the audio characteristic parameters comprises the following steps:
And determining the audio matched with the chord information, the frequency spectrum characteristics and the music style type in a database as the transition audio.
6. The method according to claim 1, wherein the method further comprises:
Determining a first volume of the target audio;
and under the condition of playing the target audio, if the audio engine plays other game sound effects at the same time, adjusting the volume of the other game sound effects to be a second volume, wherein the second volume is smaller than the first volume.
7. A video playback device in a game scene, comprising:
The device comprises an acquisition module, a display module and a display module, wherein the acquisition module is configured to respond to a video playing instruction to acquire target video and target audio, wherein the target video comprises video pictures separated from a pre-rendered game video, and the target audio comprises audio data separated from the pre-rendered game video;
The playing module is configured to play the target video through the video playing component and control the audio engine to synchronously play the target audio;
The playing module comprises:
A play subunit configured to play the target video and play the target audio through an audio engine;
The acquisition subunit is configured to acquire a first current playing progress of the target video and a second current playing progress of the target audio;
And the adjustment subunit is configured to adjust the playing progress of the target video according to the first current playing progress and the second current playing progress so as to keep the playing progress of the target video consistent with the playing progress of the target audio.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-6.
9. An electronic device, comprising:
A storage device having a computer program stored thereon;
Processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-6.
CN202210386624.6A 2022-04-13 2022-04-13 Video playing method and device in game scene, storage medium and electronic equipment Active CN114760527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210386624.6A CN114760527B (en) 2022-04-13 2022-04-13 Video playing method and device in game scene, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210386624.6A CN114760527B (en) 2022-04-13 2022-04-13 Video playing method and device in game scene, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114760527A CN114760527A (en) 2022-07-15
CN114760527B true CN114760527B (en) 2024-08-13

Family

ID=82331274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210386624.6A Active CN114760527B (en) 2022-04-13 2022-04-13 Video playing method and device in game scene, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114760527B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685726A (en) * 2018-11-27 2019-04-26 Oppo广东移动通信有限公司 Scene of game processing method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7364505B2 (en) * 2002-09-16 2008-04-29 Igt Method and apparatus for player stimulation
JP5683556B2 (en) * 2012-10-18 2015-03-11 株式会社スクウェア・エニックス Video game processing apparatus and video game processing program
CN109600666B (en) * 2018-12-12 2021-08-10 网易(杭州)网络有限公司 Video playing method, device, medium and electronic equipment in game scene
CN111432276A (en) * 2020-03-27 2020-07-17 北京奇艺世纪科技有限公司 Game engine, interactive video interaction method and electronic equipment
CN113117340B (en) * 2021-04-29 2025-04-01 北京大米科技有限公司 Game running method, device, storage medium and electronic device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685726A (en) * 2018-11-27 2019-04-26 Oppo广东移动通信有限公司 Scene of game processing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114760527A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US12033671B2 (en) Video generation method and apparatus, electronic device, and storage medium
KR102792043B1 (en) Video generating apparatus and method, electronic device, and computer readable medium
CN113190314B (en) Interactive content generation method, device, storage medium and electronic device
CN113259744B (en) Video display method, device, equipment and medium
US12142296B2 (en) Audio processing method and apparatus, and electronic device and storage medium
CN111225232B (en) Video-based sticker animation engine, realization method, server and medium
US20240078638A1 (en) Image fusion method and apparatus, electronic device, and storage medium
CN115134670B (en) Multimedia playing method, device, storage medium and program product
WO2020259130A1 (en) Selected clip processing method and device, electronic equipment and readable medium
JP2025524433A (en) PAGE DISPLAY METHOD, APPARATUS, DEVICE, COMPUTER-READABLE STORAGE MEDIUM, AND PRODUCT
CN110418183B (en) Audio and video synchronization method and device, electronic equipment and readable medium
WO2024109706A1 (en) Media content display method and apparatus, and device, readable storage medium and product
US20250203128A1 (en) Live-streaming starting method, device and program product
CN114038465A (en) Voice processing method and device and electronic equipment
US10469794B2 (en) Information processing apparatus, information processing method, and information processing system for content management using play lists
CN114666666A (en) Video jump playback method, device, terminal device and storage medium
EP4270930A1 (en) Video recording method and device, electronic device and storage medium
WO2025118949A1 (en) Special effect processing method and apparatus, and electronic device and storage medium
WO2025056072A1 (en) Video generation method and apparatus, and device and storage medium
CN114760527B (en) Video playing method and device in game scene, storage medium and electronic equipment
CN113885741A (en) A multimedia processing method, device, equipment and medium
WO2025176188A1 (en) Video editing method and apparatus, and terminal device
WO2025051099A1 (en) Audio-based text processing method and apparatus, and device and storage medium
CN117896539A (en) Live broadcast sharing method, device, equipment and medium
JP2025515468A (en) Audio processing method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant