Method, device, computing equipment and storage medium for processing audio and video files

By verifying whether the audio data in audio and video files contains time code information and setting it to a preset value, the problem of unexpected audio sounds in audio and video editing is solved and the stability of the editing process is improved.

CN114025229BActive Publication Date: 2025-01-21SHANGHAI IQIYI NEW MEDIA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111320302.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-01-21
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

During the audio and video editing process, the audio in the audio and video material may play unexpected sounds due to the existence of time code information, interfering with the work of the editor.

Method used

The target audio and video file is generated by obtaining the original audio and video file, verifying whether the audio data contains time code information, and setting the value of the audio data to a preset value when the time code information is detected.

Benefits of technology

It effectively reduces the possibility of unexpected sounds playing in audio and video files, reduces interference to editors, and ensures the stability of the editing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114025229B_ABST
    Figure CN114025229B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, computing device and storage medium for processing audio and video files, including: the computing device obtains the original audio and video file to be processed, and verifies whether the audio data in the original audio and video file includes time code information; when it is determined that the audio data in the original audio and video file includes time code information, the value of the audio and video data is set to a preset value, thereby obtaining a target audio and video file. In this way, when the subsequent editor performs editing processing on the target audio and video file, since the value of the audio data in the target audio and video file has been set to the preset value, the audio in the target audio and video file usually does not play unexpected sounds, but only plays the sound corresponding to the preset value or no sound (the preset value is 0 at this time), thereby avoiding the audio in the audio and video file from playing unexpected sounds due to the existence of the time code information, and avoiding interference to the editor as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to a method, apparatus, computing device and storage medium for processing audio and video files. Background Art

[0002] In the audio and video editing scene, a large number of audio and video materials may be edited and synthesized. For example, in the recording scene of a variety show, multiple cameras are usually used for multi-directional and multi-angle shooting to avoid monotonous program content and visual fatigue caused by long single-shot time, so that multiple audio and video materials can be captured based on multiple shooting devices on multiple cameras; accordingly, the digital imaging technician (DIT) needs to add multiple audio and video materials to the editing software, and edit a variety show video including audio based on the multiple audio and video materials.

[0003] Typically, in the process of using multiple shooting devices to obtain multiple audio and video materials, time code (TC) information is usually added to the audio data in each audio and video material. The time code information refers to the time code recorded for each image in the process of capturing the image signal, so that the audio and video materials captured by the multiple shooting devices can be synchronized and aligned based on a unified time axis, thereby facilitating editors to edit the multiple audio and video materials.

[0004] However, when an editor is editing an audio or video material including TC information, the audio in the audio or video material may play unexpected sounds, such as harsh noise, etc., thereby interfering with the editor. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, computing device and storage medium for processing audio and video files, aiming to reduce unexpected sounds in audio playback in later audio and video files by processing the audio and video files, thereby avoiding interference to editors as much as possible.

[0006] In a first aspect, an embodiment of the present application provides a method for processing an audio or video file, comprising:

[0007] Get the original audio and video files to be processed;

[0008] Verifying whether the audio data in the original audio and video file includes time code information;

[0009] When the audio data includes time code information, the value of the audio data in the original audio and video file is set to a preset value to obtain a target audio and video file.

[0010] In a possible implementation manner, the checking whether the audio data in the original audio and video file includes time code information includes:

[0011] Decapsulating the original audio and video files to obtain audio data;

[0012] Decoding the audio data to obtain pulse code modulation (PCM) data;

[0013] It is detected whether the PCM data includes time code information.

[0014] In a possible implementation manner, detecting whether the PCM data includes time code information includes:

[0015] Taking a preset duration as a unit, it is detected whether the target data in the PCM data includes time code information, the target data is a continuous segment of data in the PCM data, and the playback duration corresponding to the target data is the preset duration.

[0016] In a possible implementation, decapsulating the original audio and video file to obtain video data, and setting the value of the audio data in the original audio and video file to a preset value to obtain the target audio and video file includes:

[0017] The value of the audio data in the original audio and video file is set to a preset value to obtain target audio data;

[0018] Based on the target audio data and the video data, the target audio and video file is encapsulated.

[0019] In a possible implementation manner, the preset value is 0.

[0020] In a second aspect, the present application further provides a device for processing audio and video files, the device comprising:

[0021] An acquisition module is used to acquire the original audio and video files to be processed;

[0022] A verification module, used to verify whether the audio data in the original audio and video file includes time code information;

[0023] A setting module is used to set the value of the audio data in the original audio and video file to a preset value when the audio data includes time code information, so as to obtain a target audio and video file.

[0024] In a possible implementation, the verification module includes:

[0025] A decapsulation unit, used to decapsulate the original audio and video files to obtain audio data;

[0026] A decoding unit, used for decoding the audio data to obtain pulse code modulation PCM data;

[0027] The detection unit is used to detect whether the PCM data includes time code information.

[0028] In a possible implementation manner, the detection unit is specifically used to:

[0029] Taking a preset duration as a unit, it is detected whether the target data in the PCM data includes time code information, the target data is a continuous segment of data in the PCM data, and the playback duration corresponding to the target data is the preset duration.

[0030] In a possible implementation, the original audio and video file is decapsulated to obtain video data, and the setting module includes:

[0031] A setting unit, used to set the value of the audio data in the original audio and video file to a preset value to obtain target audio data;

[0032] The encapsulation unit is used to encapsulate the target audio and video files based on the target audio data and the video data.

[0033] In a possible implementation manner, the preset value is 0.

[0034] In a third aspect, an embodiment of the present application further provides a computing device, which may include a processor and a memory:

[0035] The memory is used to store computer programs;

[0036] The processor is used to execute the method described in the first aspect and any one of the embodiments of the first aspect according to the computer program.

[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above-mentioned first aspect and any one of the implementation methods of the first aspect.

[0038] In the above implementation of the embodiment of the present application, the computing device obtains the original audio and video file to be processed, and verifies whether the audio data in the original audio and video file includes time code information; when it is determined that the audio data in the original audio and video file includes time code information, the value of the audio and video data is set to a preset value, thereby obtaining a target audio and video file, and the value of the audio data in the target audio and video file is the preset value. In this way, when the subsequent editor performs editing processing on the target audio and video file, since the value of the audio data in the target audio and video file has been set to the preset value, the audio in the target audio and video file usually does not play unexpected sounds, but only plays the sound corresponding to the preset value or no sound (the preset value is 0 at this time), thereby avoiding the audio in the audio and video file from playing unexpected sounds due to the presence of time code information, and avoiding interference to the editor as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0040] Figure 1 This is a schematic diagram of an exemplary application scenario in an embodiment of the present application;

[0041] Figure 2 This is a flow chart of a method for processing audio and video files in an embodiment of the present application;

[0042] Figure 3 This is a schematic diagram of the structure of a device for processing audio and video files in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the hardware structure of a computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0044] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 In the application scenario shown, the client 101 may be in communication connection with the computing device 102. Furthermore, the client 101 may receive data provided by a user (such as an audio or video editor) and send the data to the computing device 102; the computing device 102 is used to process the received data accordingly and present the processed data to the user through the client 101.

[0045] The computing device 102 refers to a device with data processing capabilities, such as a terminal, a server, etc. The client 101 can be applied to a physical device independent of the computing device 102. For example, when the computing device 102 is implemented by a server, the client 101 can be run on a user terminal or other device on the user side. Alternatively, the client 101 can also be run on the computing device 101.

[0046] When multiple audio and video files (audio and video materials obtained by shooting devices) are edited based on the client 101 and the computing device 102, if the audio and video files include time code information (used for synchronization and alignment of multiple audio and video files in the time dimension), the existence of the time code information will cause the audio in the audio and video files to generate noise data, which may cause the audio in the audio and video files to play unexpected sounds, such as harsh noises, etc., which interfere with the editors.

[0047] Based on this, the present application provides a method for processing audio and video files, and avoids interference to editors by processing the audio and video files accordingly. In specific implementation, the client 101 can receive one or more audio and video files provided by the editor, and send the audio and video files to the computing device 102. For each audio and video file, the computing device 102 can verify whether the audio data in the original audio and video file includes time code information, and when it is determined that the audio data in the original audio and video file includes time code information, the value of the audio and video data is set to a preset value, thereby obtaining a target audio and video file, and the value of the audio data in the target audio and video file is the preset value. In this way, when the subsequent editor performs editing processing on the target audio and video file, since the value of the audio data in the target audio and video file has been set to the preset value, the audio in the target audio and video file usually does not play unexpected sounds, but only plays the sound corresponding to the preset value or no sound (the preset value is 0 at this time), so that the audio in the audio and video file can be avoided from playing unexpected sounds due to the existence of time code information, and interference to the editor is avoided as much as possible.

[0048] Understandably, Figure 1 The architecture of the application scenario shown is only an example provided by the embodiment of the present application. In actual application, the embodiment of the present application can also be applied to other applicable scenarios, such as the editor can directly provide one or more audio and video files to the computing device 102, such as inserting a memory storing audio and video files into the computing device 102, so that the computing device 102 can obtain the audio and video files by accessing the memory. In short, the embodiment of the present application can be applied to any applicable data backup system, and is not limited to the above-mentioned scenario example.

[0049] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, various non-limiting implementation methods in the embodiments of the present application are exemplarily described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0050] See also Figure 2 , Figure 2 A schematic diagram of a method for processing audio and video files in an embodiment of the present application is shown. The method can be applied to Figure 1 The application scenarios shown in the figure may also be applied to other applicable application scenarios. Figure 1 The application scenario shown is used as an example for explanation. The method may specifically include:

[0051] S201: The computing device 102 obtains the original audio and video files to be processed.

[0052] The original audio and video file refers to a file including audio content and video content, which can be obtained by, for example, shooting with a camera equipped with a microphone, wherein the camera can record sound and obtain corresponding audio through the microphone during the process of shooting the video, and then encapsulate the audio and video to obtain an audio and video file. For the convenience of distinction and description, the original audio and video file is referred to as the original audio and video file below.

[0053] As an implementation example, the user can import the original audio and video file on the client 101, and the client 101 transmits the original audio and video file to the computing device 102 through the network, so that the computing device 102 can subsequently process the original audio and video file accordingly.

[0054] In another implementation example, the user may insert a storage device (such as a USB flash drive, etc.) carrying the original audio and video files into the computing device 102, so that the computing device 102 may obtain the original audio and video files to be processed by accessing the storage device.

[0055] Of course, in actual application, the computing device 102 may also obtain the original audio and video file in other ways, and this embodiment does not limit this.

[0056] S202: The computing device 102 checks whether the audio data in the original audio and video file includes time code information.

[0057] In actual application scenarios, there may be multiple cameras shooting the same scene. For example, in a variety show recording scenario, there are usually multiple cameras shooting the same stage. Therefore, each camera usually introduces time code information to enable each camera to shoot at the same time point, so as to facilitate the subsequent alignment and editing of multiple audio and video files. However, at the same time, the audio and video files shot by each camera will generate noise data in the audio due to the presence of time code information, which will interfere with the editor.

[0058] In this embodiment, the computing device 102 can verify whether the acquired original audio and video file includes time code information, so as to subsequently perform corresponding processing on the original audio and video file containing the time code information to reduce interference to the editor.

[0059] In a possible implementation, the computing device 102 may decapsulate the original audio and video file, and separate the audio data and the video data from the original audio and video file. If the original audio and video file includes time code information, the time code information is integrated into the audio data obtained by decapsulation. Then, the computing device 102 may decode the audio data obtained by decapsulation to obtain corresponding pulse code modulation (PCM) data (including multiple PCM data frames), so that the computing device 102 may detect whether the PCM data includes time code information. For example, the computing device 102 may write the PCM data into a time code processor, and the time code processor may detect whether the PCM data includes time code information, and when it is determined that the PCM data includes time code information, the time code processor may also give the value of the specific time code.

[0060] As an implementation example, when the computing device 102 detects the time code information, it can specifically detect whether the target data in the PCM data includes the time code information in units of a preset duration, wherein the target data is any continuous data (such as continuous multi-frame data, etc.) in the PCM data, and the corresponding playback duration of the target data is the preset duration. In actual application, the computing device 102 can continuously input the PCM data into the time code processor, and the time code processor performs the detection. If the time code processor detects the time code information from the currently input part of the PCM data, the computing device 102 can determine that all the PCM data include the time code information. If the time code processor does not detect the time code information from the currently input part of the PCM data, the computing device 102 can determine whether the playback duration corresponding to the input part of the PCM data reaches the preset duration. If it reaches, the computing device 102 can determine that the part of the PCM data does not include the time code information, and continue to detect the remaining PCM data. If the playback duration does not reach the preset duration, the computing device 102 may not have a high enough detection accuracy for the part of the PCM data, which may easily lead to misjudgment. Therefore, the computing device 102 may continue to input the remaining PCM data into the time code processor, and the time code processor detects the currently input PCM data. When the playback duration corresponding to the input PCM data reaches the preset duration and the time code processor still does not detect the time code information, the computing device 102 may determine that the input PCM data does not include the time code information.

[0061] Among them, the preset duration can be determined according to the speed at which the computing device 102 decodes the video data. In actual application scenarios, while the computing device 102 decodes the audio and video in the original audio and video file, it can synchronously detect the time code information of the decoded audio. Since the speed at which the computing device 102 decodes the audio is usually faster than the speed at which the computing device 102 decodes the video, the computing device 102 can detect the time code information of the currently decoded unprocessed audio data, thereby waiting for the computing device 102 to decode the video. In this way, after completing the detection of this part of the audio data, the decoding progress of the computing device 102 for the video is basically the same as the decoding progress for the audio, so that the synchronous decoding of the audio and the video can be achieved. Accordingly, the value of the preset duration can be calculated according to the decoding speed of the computing device 102 for the video, so as to achieve the synchronous decoding of the audio and the video by the computing device 102.

[0062] S203: When the audio data includes time code information, the value of the audio data in the original audio and video file is set to a preset value to obtain a target audio and video file.

[0063] In this embodiment, when the time code processor detects that the audio data (i.e., PCM data) includes time code information, the computing device 102 can set the value of the audio data in the original audio and video file to a preset value, that is, the value in the PCM data corresponding to the audio data is set to a preset value. In specific implementation, the computing device 102 can input the PCM data into a corresponding filter so that the filter sets the value of the PCM data to a preset value. At the same time, after determining that the audio data includes time code information, the computing device 102 can also control the time code processor to stop working. In this way, in the target audio and video file obtained, the values ​​of the audio data are all uniform values, so that when the subsequent editor performs editing processing on the target audio and video file, it can be avoided that the audio in the target audio and video file will play unexpected abnormal sounds, thereby interfering with the editor.

[0064] Exemplarily, the preset value may be, for example, 0. Alternatively, the preset value may be other applicable values, such as 1. In this way, when playing the target audio and video file, the audio in the target audio and video file may not play sound, which is equivalent to the audio being in a muted state (the preset value is 0 in this case); or, the sound played by the audio in the target audio and video file is within the expectations of the editor, such as a very low sound or a continuous and stable sound, and no unexpected sound changes will occur.

[0065] In a possible implementation, the computing device 102, in the process of generating the target audio and video file, can first set the value of the audio data in the original audio and video file to a preset value, specifically set the value of the PCM data corresponding to the audio and video data to a preset value, and use a specified encoder to encode the processed PCM data. At the same time, the computing device 102 can also re-encode the decoded video. Then, the computing device 102 can package and encapsulate the audio data and video data obtained after encoding, such as encapsulating the audio data and video data based on the MOV format, so as to generate the target audio and video file. In actual application, the computing device 102 can also be based on other format encapsulation to obtain the target audio and video file, such as based on the MP4 format, the flv format, the ts format, etc., which is not limited in this embodiment.

[0066] Furthermore, for the generated target audio and video file, the computing device 102 may also write it into a corresponding file for storage, so as to facilitate subsequent reading of the target audio and video file and implement editing of the target audio and video file based on user operations.

[0067] In this embodiment, for each audio and video file, the computing device 102 can verify whether the audio data in the original audio and video file includes time code information, and when it is determined that the audio data in the original audio and video file includes time code information, the value of the audio and video data is set to a preset value, thereby obtaining a target audio and video file, and the value of the audio data in the target audio and video file is the preset value. In this way, when the subsequent editor performs editing processing on the target audio and video file, since the value of the audio data in the target audio and video file has been set to the preset value, the audio in the target audio and video file usually does not play unexpected sounds, but only plays the sound corresponding to the preset value or no sound (the preset value is 0 at this time), thereby avoiding the audio in the audio and video file from playing unexpected sounds due to the existence of the time code information, and avoiding interference to the editor as much as possible.

[0068] In addition, the present application also provides a data backup device. Figure 3 , Figure 3 A schematic diagram of the structure of a data backup device in an embodiment of the present application is shown. Figure 3 The data backup device 300 shown can be applied to a computing device, the computing device is connected to a source storage device, the computing device includes a plurality of cache queues, and the data backup device 300 includes:

[0069] An acquisition module 301 is used to acquire the original audio and video files to be processed;

[0070] Verification module 302, used to verify whether the audio data in the original audio and video file includes time code information;

[0071] The setting module 303 is used to set the value of the audio data in the original audio and video file to a preset value to obtain a target audio and video file when the audio data includes time code information.

[0072] In a possible implementation, the verification module 302 includes:

[0073] A decapsulation unit, used to decapsulate the original audio and video files to obtain audio data;

[0074] A decoding unit, used for decoding the audio data to obtain pulse code modulation PCM data;

[0075] The detection unit is used to detect whether the PCM data includes time code information.

[0076] In a possible implementation manner, the detection unit is specifically used to:

[0077] Taking a preset duration as a unit, it is detected whether the target data in the PCM data includes time code information, the target data is a continuous segment of data in the PCM data, and the playback duration corresponding to the target data is the preset duration.

[0078] In a possible implementation, the original audio and video file is decapsulated to obtain video data, and the setting module 303 includes:

[0079] A setting unit, used to set the value of the audio data in the original audio and video file to a preset value to obtain target audio data;

[0080] The encapsulation unit is used to encapsulate the target audio and video files based on the target audio data and the video data.

[0081] In a possible implementation manner, the preset value is 0.

[0082] It should be noted that the information interaction, execution process, etc. between the modules and units of the above-mentioned device are based on the same concept as the method embodiment in the embodiments of the present application, and the technical effects they bring are the same as those of the method embodiment in the embodiments of the present application. For specific contents, please refer to the description in the method embodiment shown in the aforementioned embodiments of the present application, and will not be repeated here.

[0083] In addition, the present application embodiment also provides a computing device. Figure 4 , Figure 4 A schematic diagram of the hardware structure of a computing device in an embodiment of the present application is shown. The computing device 400 may include a processor 401 and a memory 402.

[0084] Wherein, the memory 402 is used to store computer programs;

[0085] The processor 401 is configured to execute the following steps according to the computer program:

[0086] Get the original audio and video files to be processed;

[0087] Verifying whether the audio data in the original audio and video file includes time code information;

[0088] When the audio data includes time code information, the value of the audio data in the original audio and video file is set to a preset value to obtain a target audio and video file.

[0089] In a possible implementation manner, the processor 401 is specifically configured to perform the following steps according to the computer program:

[0090] Decapsulating the original audio and video files to obtain audio data;

[0091] Decoding the audio data to obtain pulse code modulation (PCM) data;

[0092] It is detected whether the PCM data includes time code information.

[0093] In a possible implementation manner, the processor 401 is specifically configured to perform the following steps according to the computer program:

[0094] Taking a preset duration as a unit, it is detected whether the target data in the PCM data includes time code information, the target data is a continuous segment of data in the PCM data, and the playback duration corresponding to the target data is the preset duration.

[0095] In a possible implementation manner, after decapsulating the original audio and video file to obtain video data, the processor 401 is specifically configured to perform the following steps according to the computer program:

[0096] The value of the audio data in the original audio and video file is set to a preset value to obtain target audio data;

[0097] Based on the target audio data and the video data, the target audio and video file is encapsulated.

[0098] In a possible implementation manner, the preset value is 0.

[0099] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method for processing audio and video files described in the above method embodiment.

[0100] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0101] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0102] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A method for processing audio and video files, characterized in that: The method comprises: Get the original audio and video files to be processed; Verifying whether the audio data in the original audio and video file includes time code information; When the audio data includes time code information, the value of the audio data in the original audio and video file is set to a preset value to obtain a target audio and video file; The checking whether the audio data in the original audio and video file includes time code information includes: Decapsulating the original audio and video files to obtain audio data; Decoding the audio data to obtain pulse code modulation (PCM) data; Detecting whether the PCM data includes time code information; The detecting whether the PCM data includes time code information comprises: Taking a preset time length as a unit, continuously detecting whether the target data in the PCM data includes time code information, wherein the target data is a continuous segment of data in the PCM data, and the playback time length corresponding to the target data is the preset time length; If time code information is detected in a portion of the PCM data currently input at a certain moment, it is determined that all of the PCM data includes the time code information; If no time code information is detected in the partial PCM data currently input at a certain moment, it is further determined whether the playback duration corresponding to the partial PCM data that has been input has reached the preset duration. If so, it is determined that the partial PCM data that has been input does not include time code information, and the remaining PCM data continues to be detected; if the playback duration does not reach the preset duration, the remaining PCM data continues to be input, and the currently input PCM data is detected; when the playback duration corresponding to the input PCM data reaches the preset duration and the time code information is still not detected, it is determined that the input PCM data does not include time code information.

2. The method according to claim 1, characterized in that Decapsulating the original audio and video file to obtain video data, and setting the value of the audio data in the original audio and video file to a preset value to obtain a target audio and video file, including: The value of the audio data in the original audio and video file is set to a preset value to obtain target audio data; Based on the target audio data and the video data, the target audio and video file is encapsulated.

3. The method according to any one of claims 1 to 2, characterized in that: The preset value is 0.

4. A device for processing audio and video files, characterized in that: The device comprises: An acquisition module is used to acquire the original audio and video files to be processed; A verification module, used to verify whether the audio data in the original audio and video file includes time code information; A setting module, for setting the value of the audio data in the original audio and video file to a preset value to obtain a target audio and video file when the audio data includes time code information; The verification module comprises: A decapsulation unit, used to decapsulate the original audio and video files to obtain audio data; A decoding unit, used for decoding the audio data to obtain pulse code modulation PCM data; A detection unit, used for detecting whether the PCM data includes time code information; The detection of whether the PCM data includes time code information includes: taking a preset time length as a unit, continuously detecting whether the target data in the PCM data includes time code information, the target data being a continuous segment of data in the PCM data, and the playback time length corresponding to the target data being the preset time length; if time code information is detected in part of the PCM data currently input at a certain moment, it is determined that all PCM data include time code information; if time code information is not detected in part of the PCM data currently input at a certain moment, it is further determined whether the playback time length corresponding to the input part of the PCM data reaches the preset time length, if so, it is determined that the input part of the PCM data does not include time code information, and the remaining PCM data continues to be detected; and if the playback time length does not reach the preset time length, the remaining PCM data continues to be input, and the currently input PCM data is detected; when the playback time length corresponding to the input PCM data reaches the preset time length and the time code information is still not detected, it is determined that the input PCM data does not include time code information.

5. A device, characterized in that: The device comprises a processor and a memory: The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 3 according to the computer program.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Synchronization of audio and video content

    WO2014128360A1