Audio playback method, device, system, electronic device and storage medium
By obtaining audio data switching instructions during video playback and determining the playback time based on video keyframe information, seamless switching of audio data is achieved, and traffic waste and playback interruption caused by audio switching in the prior art is solved, ensuring smooth video playback.
Patent Information
- Application Number
- CN202210200144.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-02
AI Technical Summary
When switching video audio in the prior art, video files need to be downloaded again, resulting in waste of traffic and interruption of video playback, resulting in a poor playback experience.
During the current audio and video data playback process, when obtaining the audio data switching command, the target audio data is requested from the server, and the playback time of the audio data is determined based on the keyframe information of the video data, so as to achieve seamless switching of the audio data.
It realizes that only switching audio data during video playback is avoided to download redundant video content, ensure smooth video playback, and avoid black screen and lag.
Smart Images

Figure CN114567812B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of audio data processing, and in particular, to an audio playback method, device, system, electronic device, and storage medium. Background Art
[0002] In order to make video works reach a wider audience, some video works are usually produced in different language versions so that viewers who use different languages can watch the video. When viewers need to switch the audio of different language versions of the same video content during the video viewing process, they need to restart the playback task and switch the video of the corresponding language to realize the switching of the dubbing audio of different languages.
[0003] However, in the above-mentioned audio playback method of switching videos to achieve the effect of changing dubbing audio, the video file downloaded by the new playback task contains the same video content as the last playback, resulting in redundant downloads and increasing traffic usage; moreover, the switching method of reopening the playback task will interrupt the current video playback, causing black screen, freezes and other phenomena during playback, resulting in a poor playback experience. Summary of the invention
[0004] The embodiments of the present disclosure provide an audio playback method, device, system, electronic device and storage medium, which can achieve switching of only audio data during video playback, without generating redundant video content downloads, and playback of the video flow.
[0005] In a first aspect, an embodiment of the present disclosure provides an audio playback method, which is applied to a client, and the method includes:
[0006] During the current audio and video data playback process, when an audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server;
[0007] Determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data;
[0008] At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played.
[0009] In a second aspect, an embodiment of the present disclosure provides an audio playback device, the device comprising:
[0010] An audio switching start module is used to request target audio data associated with the audio data switching instruction from the server when an audio data switching instruction is obtained during the current audio and video data playback process;
[0011] An audio switching time positioning module, used to determine the playing time of the target audio data according to the key frame information of the video data in the current audio and video data;
[0012] The audio switching and playing module is used to switch the initial audio data in the current audio and video data to the target audio data at the playing time and play it.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the audio playback method as described in any one of the embodiments of the present disclosure.
[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the audio playback method as described in any one of the embodiments of the present disclosure.
[0018] The technical solution of the disclosed embodiment is as follows: during the playback of the current audio and video data, when an audio data switching instruction is obtained, the target audio data associated with the audio data switching instruction is requested from the server; the playback time of the target audio data is determined according to the key frame information of the video data in the current audio and video data; at the playback time, the initial audio data in the current audio and video data is switched to the target audio data and played. The audio data and video data in the audio and video data to be played are independent of each other, so that the two independent data are played synchronously according to the key frame information of the video data. The technical solution of the disclosed embodiment solves the problem in the prior art that when switching audio, it is necessary to switch a video containing another different audio, which consumes too much traffic and causes the video playback to be unsmooth. It realizes that only audio data can be switched during the video playback process, and no redundant video content download will be generated. The video is played smoothly, avoiding the black screen and freeze of the video playback interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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 accompanying 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.
[0020] Figure 1A flowchart of an audio playback method provided in the first embodiment of the present disclosure;
[0021] Figure 2 A flowchart of an audio playback method provided in Embodiment 2 of the present disclosure;
[0022] Figure 3 A schematic diagram of the structure of an audio playback device provided in Embodiment 3 of the present disclosure;
[0023] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present disclosure. DETAILED DESCRIPTION
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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".
[0029] Embodiment 1
[0030] Figure 1This is a flow chart of an audio playback method provided by the first embodiment of the present disclosure. The present embodiment is applicable to the scenario of audio playback, especially the situation of switching audio data during video playback. The method can be executed by an audio playback device configured on the client, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a mobile terminal or a server device.
[0031] like Figure 1 As shown, the audio playback method provided in this embodiment includes:
[0032] S110. During the current audio and video data playback process, when an audio data switching instruction is obtained, a request is made to a server for target audio data associated with the audio data switching instruction.
[0033] The audio playback method in this embodiment is applicable to various video application platforms, and the video data and audio data in the current audio and video data being played are two independent sets of data. During the playback of the video data and the audio data, the playback of the audio and video data can be synchronized by receiving the timestamp information of the corresponding data of the video data and the audio data, or the key frame information of the audio data and / or the video data. Among them, the key frame is the most important frame in the compression coding of the audio and video data, such as the I frame in the compression coding of the video data.
[0034] During the current audio and video data playback, when the audio data switching instruction is obtained, the client will send a request to the server to obtain the target audio data associated with the audio data switching instruction. The target audio data is the target object of the audio switching, and the initial audio data in the current audio and video is switched to the target audio data. Specifically, in the process of obtaining the target audio data, a connection channel is established with the server through the data acquisition link of the target audio data provided by the server; then, the target audio data is obtained through the connection channel and cached, and the playback is performed after the playback time is determined. Further, the target audio data and the initial audio data are data of different audio contents associated with the video data in the current audio and video data. In some scenarios, the initial audio data and the target audio data can be dubbing audio data of different languages matching the same video data. For example, a movie video contains dubbing audio data in different languages such as Chinese, English, French and Japanese that match it. The audience of the movie can switch audio data of any language while watching the movie. Alternatively, some cartoons have Mandarin versions and dialect versions of dubbing, and the audience can also choose different versions of audio data to play, and switch different versions of dubbing audio data during the playback process.
[0035] S120: Determine a playback time of the target audio data according to key frame information of the video data in the current audio and video data.
[0036] When performing audio and video synchronization, the video can usually be synchronized to the audio, that is, the video is synchronized based on the playback speed of the audio. The audio can also be synchronized to the video, that is, the audio is synchronized based on the playback speed of the video. Alternatively, the video and audio can be synchronized to an external clock, and an external clock is selected as a reference, and the playback speeds of the video and audio are both based on the clock. In this embodiment, considering the instability of audio switching, the synchronization strategy of synchronizing audio to video is preferred.
[0037] Specifically, in the cached but unplayed video data, determine the video key frame that is adjacent to the video image frame corresponding to the moment when the audio data switching instruction is obtained and has not been played, that is, according to the time sequence of each video image frame, the first video key frame after the video image frame corresponding to the moment when the audio data switching instruction is obtained; then, use the video playback time corresponding to the video key frame as the playback time of the target audio data. Thus, after the user's audio data switching instruction is issued, a response can be made quickly to perform the audio switching operation.
[0038] S130: At the playing time, switch the initial audio data in the current audio and video data to the target audio data and play the target audio data.
[0039] At the determined target audio data playback time, the target audio data is played to replace the initial audio data. While consuming the new target audio data, the cached data of the initial audio data after the playback time in the audio data cache area needs to be cleared to prevent the initial audio data from continuing to play after the playback time. This achieves the playback connection between the target audio data and the initial audio data. During this process, the playback of the video data does not stop, so there will be no black screen or freeze problems.
[0040] The technical solution of the disclosed embodiment can be achieved by, during the playback of the current audio and video data, when an audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server; determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data; and switching the initial audio data in the current audio and video data to the target audio data at the playback time and playing it. The audio data and video data in the audio and video data to be played are independent of each other, so that the two independent data are played synchronously according to the key frame information of the video data. The technical solution of the disclosed embodiment solves the problem in the prior art that when switching audio, it is necessary to switch a video containing another different audio, resulting in excessive traffic consumption and unsmooth video playback connection. It can achieve the ability to switch only audio data during the video playback process, without generating redundant video content downloads, and make the video play smoothly, avoiding the black screen and freeze phenomenon of the video playback interface.
[0041] Embodiment 2
[0042] The embodiments of the present disclosure can be combined with the various optional solutions in the audio playback method provided in the above embodiments. The audio playback method provided in this embodiment further describes the process from the current audio and video data playback to the audio data playback.
[0043] Figure 2 This is a flow chart of an audio playback method provided by Embodiment 2 of the present disclosure. Figure 2 As shown, the audio playback method provided in this embodiment includes:
[0044] S210. According to the audio and video data acquisition instruction of the user, request a data acquisition link of video data and at least one corresponding audio data associated with the audio and video data acquisition instruction from the server.
[0045] The audio playback method in this embodiment is applicable to various video application platforms, and the video data and audio data in the current audio and video data being played are two independent sets of data. That is to say, in the process of producing audio and video data, audio data and video data are produced separately, and multiple audio contents are produced corresponding to one video content, and each audio content is different. For example, a movie video has corresponding dubbing audio data in different languages such as Chinese, English, French and Japanese.
[0046] When a user selects a video to watch on a video application platform, he can search for the video he wants to watch on the platform, or watch the video recommended by the video application platform. When the user determines the video to watch, he sends an audio and video data acquisition instruction to the video application client, and the video application client requests the corresponding audio data and video data resources from the server according to the audio and video data acquisition instruction. The server will feedback the corresponding audio and video data resource link, including a video data acquisition link and at least one corresponding audio data data acquisition link.
[0047] In the past, audio and video data were fused together with time domain video data. If a film or TV work has different dubbing versions, the video files with the same video content and different language audios are stored on the server side, which results in high video production and storage costs for the server side. However, through the technical solution of this embodiment, video data and audio data can be stored separately. When playing the video, the corresponding video data and audio data groups can be played synchronously according to the user's playback requirements, which greatly reduces the video production and storage costs of the server side and is more friendly to the operation of the server side.
[0048] S220. According to the user's initial audio data determination instruction, determine the initial audio data in the at least one audio data, and obtain the video data and the initial audio data as the current audio and video data through the corresponding data acquisition link and play them.
[0049] The user needs to select one audio data as the initial audio data from one or more audio resources provided by the server. After the user determines the initial audio data, an initial audio data determination instruction is sent to the client. The client determines the initial audio data from at least one audio data according to the obtained initial audio data determination instruction, and establishes an audio and video data transmission link with the server based on the corresponding data acquisition link to obtain the video data and the initial audio data as the current audio and video data and play them.
[0050] S230: During the current audio and video data playback process, when an audio data switching instruction is obtained, request the server for target audio data associated with the audio data switching instruction.
[0051] In the currently played audio and video data, if there is more than one audio data corresponding to the video data, the user can issue an audio data switching instruction during the current audio and video data playback to switch to different audio data. For example, if the initial audio data is the English dubbing audio of the video data, and the user wants to switch to the Chinese dubbing audio, then the Chinese dubbing audio data is the target audio data.
[0052] S240: Determine a playback time of the target audio data according to key frame information of the video data in the current audio and video data.
[0053] In this embodiment, the synchronization strategy of synchronizing audio to video is preferred. In the cached but unplayed video data, the video key frame adjacent to the video image frame corresponding to the moment when the audio data switching instruction is obtained and not played is determined; then, the video playing time corresponding to the video key frame is used as the playing time of the target audio data. Therefore, after the user's audio data switching instruction is issued, a response can be made quickly to perform the audio switching operation.
[0054] S250: At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played.
[0055] The technical solution of the disclosed embodiment provides audio and video resources to users in a way that video data and audio data are independent of each other, and the corresponding audio data and video data are played synchronously according to the user's choice. In addition, during the current audio and video data playback process, when the audio data switching instruction is obtained, the target audio data associated with the audio data switching instruction is requested from the server; the playback time of the target audio data is determined according to the key frame information of the video data in the current audio and video data; at the playback time, the initial audio data in the current audio and video data is switched to the target audio data and played. It can be that the user does not need to pause the video during the video viewing process, and can switch different audio data. The technical solution of the disclosed embodiment solves the problem that the video containing another different audio needs to be switched when switching audio in the prior art, resulting in excessive traffic consumption and unsmooth video playback connection, and realizes that only audio data can be switched during the video playback process, and no redundant video content download will be generated, and the video is played smoothly, avoiding the black screen and freeze of the video playback interface, so that users have a better video consumption experience.
[0056] Embodiment 3
[0057] Figure 3 The structure diagram of an audio playback device provided in the third embodiment of the present disclosure is shown in FIG. The audio playback device provided in this embodiment is suitable for audio playback scenarios, especially for switching audio data during video playback.
[0058] like Figure 3 As shown, the audio playing device includes: an audio switching starting module 310 , an audio switching time positioning module 320 and an audio switching playing module 330 .
[0059] Among them, the audio switching start module 310 is used to request the target audio data associated with the audio data switching instruction from the server when an audio data switching instruction is obtained during the playback of the current audio and video data; the audio switching time positioning module 320 is used to determine the playback time of the target audio data according to the key frame information of the video data in the current audio and video data; the audio switching playback module 330 is used to switch the initial audio data in the current audio and video data to the target audio data at the playback time and play it.
[0060] The technical solution of the disclosed embodiment is as follows: during the playback of the current audio and video data, when an audio data switching instruction is obtained, the target audio data associated with the audio data switching instruction is requested from the server; the playback time of the target audio data is determined according to the key frame information of the video data in the current audio and video data; at the playback time, the initial audio data in the current audio and video data is switched to the target audio data and played. The audio data and video data in the audio and video data to be played are independent of each other, so that the two independent data are played synchronously according to the key frame information of the video data. The technical solution of the disclosed embodiment solves the problem in the prior art that when switching audio, it is necessary to switch a video containing another different audio, which consumes too much traffic and causes the video playback to be unsmooth. It realizes that only audio data can be switched during the video playback process, and no redundant video content download will be generated. The video is played smoothly, avoiding the black screen and freeze of the video playback interface.
[0061] In some optional implementations, the audio switching time positioning module 320 is specifically used to:
[0062] Determine, in the video data, a video key frame that is adjacent to the video image frame corresponding to the moment when the audio data switching instruction is obtained and has not been played;
[0063] The video playing time corresponding to the video key frame is used as the playing time of the target audio data.
[0064] In some optional implementations, the audio switching and playing module 330 is specifically used to:
[0065] The cached data of the initial audio data after the playing time is cleared, and the cached data of the target audio data is read and played starting from the playing time.
[0066] In some optional implementations, the audio switching initiation module 310 is specifically used to:
[0067] A data acquisition link for target audio data is established with a server, and the target audio data is acquired and cached based on the data acquisition link.
[0068] In some optional implementations, the audio switching initiating module 310 is further configured to:
[0069] The data acquisition link for acquiring the initial audio data with the server is disconnected.
[0070] In some optional implementations, the audio playback device further includes an audio and video playback module, which is used to:
[0071] Before the current audio and video data is played, according to the audio and video data acquisition instruction of the user, requesting the server end for the video data associated with the audio and video data acquisition instruction and the data acquisition link of at least one corresponding audio data;
[0072] According to the user's initial audio data determination instruction, the initial audio data is determined in the at least one audio data, and the video data and the initial audio data are acquired as the current audio and video data through the corresponding data acquisition link.
[0073] In some optional implementations, the initial audio data and the target audio data are dubbing audio data in different languages matching the same video data.
[0074] The audio playback device provided in the embodiments of the present disclosure can execute the audio playback method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0075] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0076] Embodiment 4
[0077] Reference below Figure 4 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook 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. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0078] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 406 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0079] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0080] 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 a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 406, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the audio playback method of the embodiment of the present disclosure are executed.
[0081] The electronic device provided by the embodiment of the present disclosure and the audio playback method provided by the above embodiment belong to the same disclosed concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0082] Embodiment 5
[0083] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the audio playback method provided by the above embodiment is implemented.
[0084] 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 a flash memory (FLASH), 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, which 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, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs 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.
[0085] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0086] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0087] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0088] During the current audio and video data playback process, when an audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server;
[0089] Determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data;
[0090] At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played.
[0091] 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., through the Internet using an Internet service provider).
[0092] 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.
[0093] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The names of the units and modules do not, in some cases, limit the units and modules themselves. For example, the data generation module may also be described as a "video data generation module".
[0094] 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 Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
[0095] 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.
[0096] According to one or more embodiments of the present disclosure, [Example 1] provides an audio playback method, the method comprising:
[0097] During the current audio and video data playback process, when an audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server;
[0098] Determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data;
[0099] At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played.
[0100] According to one or more embodiments of the present disclosure, [Example 2] provides an audio playback method, further comprising:
[0101] In some optional implementations, determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data includes:
[0102] Determine, in the video data, a video key frame that is adjacent to the video image frame corresponding to the moment when the audio data switching instruction is obtained and has not been played;
[0103] The video playing time corresponding to the video key frame is used as the playing time of the target audio data.
[0104] According to one or more embodiments of the present disclosure, [Example 3] provides an audio playback method, including:
[0105] In some optional implementations, at the playing time, switching the initial audio data in the current audio and video data to the target audio data and playing the target audio data includes:
[0106] The cached data of the initial audio data after the playing time is cleared, and the cached data of the target audio data is read and played starting from the playing time.
[0107] According to one or more embodiments of the present disclosure, [Example 4] provides an audio playback method, further comprising:
[0108] In some optional implementations, when the audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server includes:
[0109] A data acquisition link for target audio data is established with a server, and the target audio data is acquired and cached based on the data acquisition link.
[0110] According to one or more embodiments of the present disclosure, [Example 5] provides an audio playback method, further comprising:
[0111] In some optional implementations, when the audio data switching instruction is obtained, the method further includes:
[0112] The data acquisition link for acquiring the initial audio data with the server is disconnected.
[0113] According to one or more embodiments of the present disclosure, [Example 6] provides an audio playback method, further comprising:
[0114] In some optional implementations, before the current audio and video data is played, the method further includes:
[0115] According to the audio and video data acquisition instruction of the user, requesting the server end for the video data associated with the audio and video data acquisition instruction and a data acquisition link of at least one corresponding audio data;
[0116] According to the user's initial audio data determination instruction, the initial audio data is determined in the at least one audio data, and the video data and the initial audio data are acquired as the current audio and video data through the corresponding data acquisition link.
[0117] According to one or more embodiments of the present disclosure, [Example 7] provides an audio playback method, further comprising:
[0118] In some optional implementations, the initial audio data and the target audio data are dubbing audio data in different languages matching the same video data.
[0119] According to one or more embodiments of the present disclosure, [Example 8] provides an audio playback device, including:
[0120] An audio switching start module is used to request target audio data associated with the audio data switching instruction from the server when an audio data switching instruction is obtained during the current audio and video data playback process;
[0121] An audio switching time positioning module, used to determine the playing time of the target audio data according to the key frame information of the video data in the current audio and video data;
[0122] The audio switching and playing module is used to switch the initial audio data in the current audio and video data to the target audio data at the playing time and play it.
[0123] According to one or more embodiments of the present disclosure, [Example 9] provides an audio playback device, further comprising:
[0124] In some optional implementations, the audio switching time positioning module is specifically used to:
[0125] Determine, in the video data, a video key frame that is adjacent to the video image frame corresponding to the moment when the audio data switching instruction is obtained and has not been played;
[0126] The video playing time corresponding to the video key frame is used as the playing time of the target audio data.
[0127] According to one or more embodiments of the present disclosure, [Example 10] provides an audio playback device, further comprising:
[0128] In some optional implementations, the audio switching and playing module is specifically used to:
[0129] The cached data of the initial audio data after the playing time is cleared, and the cached data of the target audio data is read and played starting from the playing time.
[0130] According to one or more embodiments of the present disclosure, [Example 11] provides an audio playback device, further comprising:
[0131] In some optional implementations, the audio switching initiation module is specifically used to:
[0132] A data acquisition link for target audio data is established with a server, and the target audio data is acquired and cached based on the data acquisition link.
[0133] According to one or more embodiments of the present disclosure, [Example 12] provides an audio playback device, further comprising:
[0134] In some optional implementations, the audio switching initiation module is further used to:
[0135] The data acquisition link for acquiring the initial audio data with the server is disconnected.
[0136] According to one or more embodiments of the present disclosure, [Example 13] provides an audio playback device, further comprising:
[0137] In some optional implementations, the audio playback device further includes an audio and video playback module, which is used to:
[0138] Before the current audio and video data is played, according to the audio and video data acquisition instruction of the user, requesting the server end for the video data associated with the audio and video data acquisition instruction and the data acquisition link of at least one corresponding audio data;
[0139] According to the user's initial audio data determination instruction, the initial audio data is determined in the at least one audio data, and the video data and the initial audio data are acquired as the current audio and video data through the corresponding data acquisition link.
[0140] According to one or more embodiments of the present disclosure, [Example 14] provides an audio playback device, further comprising:
[0141] In some optional implementations, the initial audio data and the target audio data are dubbing audio data in different languages matching the same video data.
[0142] 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 to form a technical solution.
[0143] 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.
[0144] Although the subject matter has been described in language specific to structural features and / or methodological logical 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.
Claims
1. An audio playback method, characterized in that: include: During the current audio and video data playback process, when an audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server; Determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data; At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played; The determining the playback time of the target audio data according to the key frame information of the video data in the current audio and video data includes: In the cached but unplayed video data, obtaining, in the time sequence of the video image frames, the first video key frame after the video image frame corresponding to the moment of the audio data switching instruction; The video playing time corresponding to the first video key frame is used as the playing time of the target audio data; At the playing time, the initial audio data in the current audio and video data is switched to the target audio data and played, including: While playing the target audio data from the playing time, the cached data of the initial audio data after the playing time is cleared.
2. The method according to claim 1, characterized in that When the audio data switching instruction is obtained, requesting the target audio data associated with the audio data switching instruction from the server includes: A data acquisition link for target audio data is established with a server, and the target audio data is acquired and cached based on the data acquisition link.
3. The method according to claim 2, characterized in that When the audio data switching instruction is obtained, the method further includes: The data acquisition link for acquiring the initial audio data with the server is disconnected.
4. The method according to claim 1, characterized in that: Before the current audio and video data is played, the method further includes: According to the audio and video data acquisition instruction of the user, requesting the server end for the video data associated with the audio and video data acquisition instruction and a data acquisition link of at least one corresponding audio data; According to the user's initial audio data determination instruction, the initial audio data is determined in the at least one audio data, and the video data and the initial audio data are acquired as the current audio and video data through the corresponding data acquisition link.
5. The method according to any one of claims 1 to 4, characterized in that: The initial audio data and the target audio data are dubbing audio data in different languages matching the same video data.
6. An audio playback device, characterized in that: The device comprises: An audio switching start module is used to request target audio data associated with the audio data switching instruction from the server when an audio data switching instruction is obtained during the current audio and video data playback process; An audio switching time positioning module, used to determine the playing time of the target audio data according to the key frame information of the video data in the current audio and video data; An audio switching and playing module, used for switching the initial audio data in the current audio and video data to the target audio data at the playing time and playing the target audio data; The audio switching time positioning module is specifically used for: In the cached but unplayed video data, obtaining, in the time sequence of the video image frames, the first video key frame after the video image frame corresponding to the moment of the audio data switching instruction; The video playing time corresponding to the first video key frame is used as the playing time of the target audio data; The audio switching and playing module is specifically used for: While playing the target audio data from the playing time, the cached data of the initial audio data after the playing time is cleared.
7. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the audio playback method as described in any one of claims 1-5.
8. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the audio playback method according to any one of claims 1 to 5 when executed by a computer processor.
Citation Information
Patent Citations
Video dubbing switching method, television and computer readable storage medium
CN107484016A
Cited By
Audio playing method and apparatus, electronic device and storage medium
WO2023165371A1