CN117012207A - Audio file detection method and device and computing equipment - Google Patents

Audio file detection method and device and computing equipment Download PDF

Info

Publication number
CN117012207A
CN117012207A CN202311214185.1A CN202311214185A CN117012207A CN 117012207 A CN117012207 A CN 117012207A CN 202311214185 A CN202311214185 A CN 202311214185A CN 117012207 A CN117012207 A CN 117012207A
Authority
CN
China
Prior art keywords
audio file
detection
audio
decoder
frames
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311214185.1A
Other languages
Chinese (zh)
Other versions
CN117012207B (en
Inventor
唐鹏
吴志刚
侯磊
王翊存
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202311214185.1A priority Critical patent/CN117012207B/en
Publication of CN117012207A publication Critical patent/CN117012207A/en
Application granted granted Critical
Publication of CN117012207B publication Critical patent/CN117012207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/10537Audio or video recording
    • G11B2020/10546Audio or video recording specifically adapted for audio data

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The application discloses an audio file detection method, an audio file detection device and a computing device, relates to the technical field of audio file detection of media players, and aims to solve the problem that an existing detection mode is easy to cause abnormal play of the media players and poor user experience. The method comprises the following steps: in response to the audio file being added to the playlist of the media playing software, parameter detection is performed on the audio file using the multimedia decoding library: if the detection is passed, the first frames of the audio file are sent to a decoder, and the number of frames received by the decoder is matched with the number of decoded frames; if the parameter detection fails or the matching fails, judging that the audio file is invalid, and obviously prompting the invalid audio file in the play list. According to the method and the device for detecting the validity of the audio file, the validity of the audio file is detected when the audio file is added to the play list, so that the detection speed is high, abnormal play of the player can be avoided, and the user experience is more friendly.

Description

Audio file detection method and device and computing equipment
Technical Field
The application relates to the technical field of audio file detection of media players, in particular to an audio file detection method, an audio file detection device and computing equipment.
Background
When playing invalid audio files (such as damaged audio files or malformed audio files), the media player can play abnormally, and when the situation is serious, the media player can crash.
Most of the media players on the market detect whether the file is valid when playing the audio file, and the playing flow is shown in fig. 1. Firstly, the player reads the audio file, decodes the audio file, and finally plays the audio file. When an error condition is met in the playing process, the player can prompt that the file is damaged and cannot be played, and for the audio file with serious damage, the media playing program can exit abnormally, so that a bad experience effect is caused for a user.
In summary, for invalid audio files, the above existing detection method may cause abnormal playing of the media player, even abnormal exiting, resulting in poor user experience.
Disclosure of Invention
To this end, the present application provides an audio file detection method, apparatus and computing device in an effort to solve or at least alleviate at least one of the problems presented above.
According to an aspect of the present application, there is provided an audio file detection method, which is performed in media playing software, the audio file detection method including: in response to an audio file being added to a playlist of the media playing software, parameter detection is performed on the audio file using a multimedia decoding library: if the parameter detection is not passed, judging that the audio file is invalid; if the parameter detection is passed, transmitting the first frames of the audio file to a decoder for decoding, and matching the number of frames transmitted to the decoder with the number of frames decoded by the decoder; if the matching fails, judging that the audio file is invalid; in the playlist, invalid audio files are significantly prompted.
Optionally, in the audio file detection method according to the present application, the performing parameter detection on the audio file using a multimedia decoding library includes: judging whether the audio file can be opened or not; if the audio file can be opened, the parameter detection is carried out on the audio file according to the context stream information of the multimedia format content of the audio file, the index of the stream, the sampling frequency and the audio channel.
Optionally, in the audio file detection method according to the present application, the determining whether the audio file can be opened includes: judging whether the context pointer data of the multimedia format content of the audio file is empty or not, and if the context pointer data of the multimedia format content of the audio file is empty, judging that the audio file cannot be opened.
Optionally, in the audio file detection method according to the present application, performing parameter detection on the audio file according to the multimedia format content context stream information of the audio file includes: if the context stream information of the multimedia format content of the audio file is smaller than 0, the parameter detection is not passed.
Optionally, in the audio file detection method according to the present application, performing parameter detection on the audio file according to an index of a stream of the audio file includes: if the index value of the stream of the audio file is smaller than 0, the parameter detection is failed.
Optionally, in the audio file detection method according to the present application, performing parameter detection on the audio file according to a sampling frequency of the audio file includes: judging whether the sampling frequency is in a preset frequency range, if not, the parameter detection is failed.
Optionally, in the audio file detection method according to the present application, performing parameter detection on the audio file according to an audio channel of the audio file includes: and judging whether the value of the audio channel is in a preset range, and if not, failing to pass the parameter detection.
Optionally, in the audio file detecting method according to the present application, the matching of the number of frames to be transmitted to the decoder with the number of frames decoded by the decoder includes: if the difference between the number of frames sent to the decoder and the number of frames decoded by the decoder exceeds a preset range, the matching fails.
According to another aspect of the present application, there is also provided another audio file detection method, including: performing parameter detection on the audio file by utilizing a multimedia decoding library; if the parameter detection is not passed, judging that the audio file is invalid; if the parameter detection is passed, transmitting the first frames of the audio file to a decoder for decoding, and matching the number of frames transmitted to the decoder with the number of frames decoded by the decoder; if the matching fails, judging that the audio file is invalid.
According to another aspect of the present application, there is also provided an audio file detection apparatus including: a parameter detection unit adapted to perform parameter detection on an audio file using a multimedia decoding library in response to the audio file being added to a playlist of media playing software; the decoding unit is suitable for sending the first frames of the audio file to a decoder for decoding if the parameter detection is passed, and matching the number of frames sent to the decoder with the number of frames decoded by the decoder; and the prompting unit is suitable for obviously prompting invalid audio files in the play list if the matching fails.
According to another aspect of the present application, there is also provided a computing device including: at least one processor and a memory storing program instructions; the program instructions, when read and executed by a processor, cause the computing device to perform the audio file detection method as described above.
According to still another aspect of the present application, there is also provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the audio file detection method as above.
According to the audio file detection method, the audio file detection device and the computing equipment, at least one of the following beneficial effects can be achieved: the application realizes the detection method of the audio damaged file or the malformed file, detects when the audio file is added to the play list, avoids abnormal exit of the music player in the play process and sharp noise in the play process, and ensures that the user experience is more friendly; in addition, the audio file detection method, the device and the computing equipment only extract partial audio frames of the audio file for decoding detection, so that the detection speed is obviously higher than that of the traditional detection method.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above, as well as additional objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 illustrates a flow chart of a portion of a media player playing an audio file in accordance with the background of the application;
FIG. 2 shows a schematic diagram of a computing device 200 according to one embodiment of the application;
FIG. 3 illustrates a flow chart of an audio file detection method 300 according to one embodiment of the application;
FIG. 4 shows a flow chart of step 310 according to one embodiment of the application;
FIG. 5 shows a flowchart of step 320, according to one embodiment of the application;
fig. 6 shows a schematic structural diagram of an audio file detection apparatus 600 according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Aiming at the problem that the existing audio file detection technology is easy to cause abnormal playing or abnormal exit of a media player in the process of detecting the audio file, the application provides an audio file detection method which can detect the audio file before playing and can effectively avoid the situation that the media player is abnormally or abnormally exited due to the damage of the audio file.
FIG. 2 shows a schematic diagram of a computing device 200 according to one embodiment of the application. It should be noted that the computing device 200 shown in fig. 2 is only an example, and in practice, the computing device for implementing the audio file detection method of the present application may be any type of device, and the hardware configuration of the computing device may be the same as the computing device 200 shown in fig. 2 or may be different from the computing device 200 shown in fig. 2. In practice, the computing device for implementing the audio file detection method of the present application may add or delete hardware components of the computing device 200 shown in fig. 2, and the present application is not limited to the specific hardware configuration of the computing device.
As shown in fig. 2, computing device 200 typically includes memory 210, one or more processors 220, and speakers 230.
Depending on the desired configuration, processor 220 may be any type of processor, including, but not limited to: microprocessor (μp), microcontroller (μc), digital information processor (DSP), or any combination thereof.
Depending on the desired configuration, memory 210 may be any type of memory, including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The memory 210 includes at least a media player 211, a multimedia decoding library 212, an encoder 213, a decoder 214, program instructions 215 for performing audio file detection methods, and one or more audio files 216.
Computing device 200 may be implemented as a server, such as a file server, database server, application server, WEB server, etc., as well as a personal computer including desktop and notebook computer configurations. Of course, computing device 200 may also be implemented as part of a small-sized portable (or mobile) electronic device. In an embodiment according to the application, the computing device 200 is configured to perform the audio file detection method 300 according to the application.
The audio file detection method 300 according to an embodiment of the present application includes: in response to the audio file being added to the playlist of the media playing software, parameter detection is performed on the audio file using the multimedia decoding library: if the parameter detection is not passed, judging that the audio file is invalid; if the parameter detection is passed, transmitting the first frames of the audio file to a decoder for decoding, and matching the number of frames transmitted to the decoder with the number of frames decoded by the decoder; if the matching fails, judging that the audio file is invalid; in the playlist, invalid audio files are significantly prompted.
Fig. 3 shows a flow chart of an audio file detection method 300 according to one embodiment of the application. The audio file detection method 300 is performed in a computing device (e.g., the aforementioned computing device 200). As shown in fig. 3, the audio file detection method 300 begins at step 310.
In step 310, in response to the audio file being added to the playlist of the media playing software, parameter detection is performed on the audio file using the multimedia decoding library.
The playlist refers to a playlist of the media player 211. Detecting some parameters of the audio file 216 by using the multimedia decoding library 212 when the audio file is added to the play list of the media player 211, and if the parameter detection is not passed, indicating that the audio file 216 is damaged, determining that the audio file is invalid at this time; if the parameter detection passes, the audio file 216 is determined to be valid, and step 320 is next entered.
The multimedia decoding library 212 may be an FFmpeg multimedia decoding library, which is the most basic decoding library with which some information of the lowest hardware of the computing device 200 may be obtained.
In order to more accurately determine whether the audio file 216 is damaged, the above parameters may be detected one by one, and after all the parameters are detected, the parameter detection of the audio file 216 is indicated to pass, and if any parameter detection is not passed, the audio file 216 is indicated to be damaged. The specific mode is as shown in fig. 4: after the audio file is imported, the audio file is opened by using an avformat_open_input function, multimedia format content context (AVFormatContext) pointer data is obtained, if the AVFormatContext pointer data is empty, the audio file 216 is indicated as being unable to be opened, and the audio file 216 is considered to be damaged at the moment; if the AVFormatContext pointer data is not null, the audio file 216 can be opened normally, then the avformat_find_stream_info function is used to obtain stream information, if the found stream information is less than zero, the audio file 216 is damaged; if the found stream information is greater than or equal to zero, circularly searching the stream information contained in the audio file, comparing the codec_type type with the found stream of the audio type to obtain the index of the stream, and if the index value of the found stream is smaller than zero, indicating that the audio file 216 is damaged; if the index value of the found stream is greater than or equal to zero, then the encoder 213 is searched by using the average_find_decoder function, then the encoder 213 is turned on to obtain the average value of the index value of the stream, and it is determined whether the sampling frequency (sample_rate) in the average value of the index value of the stream is within the normal range, the sampling frequency is the number of times of obtaining sound samples per second, the higher the sampling frequency is, the better the quality of sound is, the more realistic the restoration of sound is, and the common audio application standard is as follows: the sampling frequency of the telephone tone quality is 8kHz, the sampling frequency of the cd audio is 44.1kHz, the sampling frequency of the high definition tone quality is 48kHz or 96kHz, and the sampling frequency of the dvd tone quality is 96kHz, then the normal range of the sampling frequency can be set to include four frequencies of 8kHz, 44.1kHz, 48kHz, 96kHz, and if it is detected that the sampling frequency in the AVCodecContext pointer data is not equal to any one of the above four frequencies, it indicates that the sampling frequency is not within the normal range, at which time the audio file 216 is considered to be damaged; if the sampling frequency is within the normal range, then it is determined whether the value of the audio channel (channels) in the avcdeccontext is within the normal range, where the audio channel is that the audio source can be collected and played, and sound can be collected from multiple audio sources at the same time and output to different speakers, where the number of channels generally indicates the number of audio sources during sound recording or the number of speakers corresponding to the number of speakers during playback, and the common audio channel includes four types, i.e., mono, stereo (two channels), 5.1 channel, and 7.1 channel, and if the value of the audio channel does not belong to any one of the four types, it indicates that the audio channel is not within the normal range, where the audio file 216 is considered to be damaged, and if the value of the audio channel is within the normal range, it indicates that the audio file is not damaged, then step 320 is entered.
Next, in step 320, the first frames of the audio file 216 are sent to the decoder for decoding, and the number of frames sent to the decoder is matched to the number of frames decoded by the decoder.
The specific flow is shown in fig. 5: the first several audio frames (e.g., the first 300 audio frames) are read using the read_frame function, each time an audio frame is read, the audio frame is sent to the decoder 214 using the average_send_packet function, if the return value of the average_send_packet function is not zero, the decode count (sendCount) is sent plus 1, the decode result is obtained from the decoder 214 using the average_receiver_frame function, the return value of the average_receiver_frame function is not zero, the decode count (receiver count) is received plus 1, then the algorithm determines if the sender value and the receiver count value match, if a large deviation of the two values occurs (e.g., more than 30 frames), indicating that the audio file 216 is corrupted, and then step 330 is entered.
In the decoding process, the function average_send_frame () and the function average_receiver_packet () are used simultaneously, the function average_send_frame () is called first to send an audio frame to be encoded to the decoder 214, and then the function average_receiver_packet () is called to obtain an encoded data packet. For data processing, the two functions are not synchronized in time sequence. In general, when several tens of audio frames are sent through the average_send_frame () at the beginning of decoding, no data packet is output by the corresponding average_receive_packet (), after enough frames are sent, the average_receive_packet () starts to output the encoded data packet corresponding to the frame sent first to the decoder 214, and when no video frame is sent last, the average_send_frame () is called to send an empty frame to drive the encoding module to continue encoding the data in the buffer, and at this time, the average_receive_packet () still has data packet output until the average_eof is returned to indicate that all audio frames are encoded. The function of the function average_receiver_packet () is to extract the encoded data packet from the internal buffer of the encoder, and in the common return value, 0 indicates that the encoded data packet can be extracted; AVERROR (EAGAIN) shows that the current coding has no problem, but the input audio frame is insufficient, so that no packet is output currently, and the frame needs to be continuously sent for coding; AVERROR_EOF indicates that the data in the internal buffer area is completely encoded, and no encoded data packet is output; other coding errors.
Next, in step 330, invalid audio files are prompted significantly in the playlist.
Each playlist corresponds to a folder, and files in each playlist are stored in the corresponding folder. After the user adds an audio file to the playlist, the audio file detection method 300 detects the audio file in the playlist. If the playlist is created before the media player is started this time, the audio file detection method 300 starts to detect all audio files in the folder corresponding to the playlist before the media player plays the audio files in the playlist.
Before the audio file is detected by the media player, a new thread is started to perform the processing of the steps of the audio file detection method 300, where the new thread is different from the thread of the main thread, so as to avoid the occurrence of a jam during the operation of the main thread.
The audio file detection method 300 quickly determines whether an audio file is valid by combining the results of checking audio parameters and attempting to decode the previous frames when the audio file is imported into a playlist, deletes the audio file from the playlist if it is detected that the audio file is damaged, and pops up all damaged audio files. The detection mechanism of the audio file detection method 300 only extracts part of audio frames during decoding, so that not only is the judgment of the validity of the audio file accelerated, but also program breakdown or sharp noise of a media player in a playing state is avoided, and the user experience is improved.
Embodiments of the present application also provide an audio file detection apparatus 600 capable of performing the respective step processes of the audio file detection method 300 as described above. Next, the above-described audio file detection apparatus 600 is described with reference to fig. 6.
As shown in fig. 6, the audio file detecting apparatus 600 includes a parameter detecting unit 610, a decoding unit 620, and a prompting unit 630.
The parameter detection unit 610 is adapted to perform parameter detection on the audio files using the multimedia decoding library in response to the audio files being added to a playlist of the media playing software.
The decoding unit 620 is adapted to send the first frames of the audio file to a decoder for decoding if the parameter detection passes, and to match the number of frames sent to the decoder with the number of frames decoded by the decoder.
The prompting unit 630 is adapted to prompt significantly invalid audio files in the playlist if the matching fails.
As a preferred embodiment of the present application, the parameter detection unit 610 includes a file opening subunit and a parameter detection subunit.
The file opening subunit is adapted to determine whether an audio file can be opened in response to the audio file being added to the playlist.
The parameter detection subunit is adapted to perform parameter detection on the audio file according to the multimedia format content context stream information, the index of the stream, the sampling frequency and the audio channel of the audio file if the parameter detection subunit is openable.
As a preferred embodiment of the present application, the determining whether the audio file can be opened includes: judging whether the context pointer data of the multimedia format content of the audio file is empty or not, and if the context pointer data of the multimedia format content of the audio file is empty, judging that the audio file cannot be opened.
As a preferred embodiment of the present application, performing parameter detection on the audio file according to the multimedia format content context stream information of the audio file includes: if the context stream information of the multimedia format content of the audio file is smaller than 0, the parameter detection is not passed.
As a preferred embodiment of the present application, performing parameter detection on the audio file according to an index of a stream of the audio file includes: if the index value of the stream of the audio file is smaller than 0, the parameter detection is failed.
As a preferred embodiment of the present application, performing parameter detection on the audio file according to the sampling frequency of the audio file includes: judging whether the sampling frequency is in a preset frequency range, if not, the parameter detection is failed.
As a preferred embodiment of the present application, performing parameter detection on the audio file according to the audio channel of the audio file includes: and judging whether the value of the audio channel is in a preset range, and if not, failing to pass the parameter detection.
As a preferred embodiment of the present application, the matching of the number of frames transmitted to the decoder with the number of frames decoded by the decoder includes: if the difference between the number of frames sent to the decoder and the number of frames decoded by the decoder exceeds a preset range, the matching fails.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present application, or certain aspects or portions of the methods and apparatus of the present application, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the application.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the audio file detection method of the present application in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with examples of the application. The required structure for a construction of such a system is apparent from the description above. In addition, the present application is not directed to any particular programming language. It should be appreciated that the teachings of the present application as described herein may be implemented in a variety of programming languages and that the foregoing descriptions of specific languages are provided for disclosure of preferred embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification, and all processes or units of any method or apparatus so disclosed, may be employed, except that at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the application has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the application as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter.

Claims (11)

1. An audio file detection method, executed in media playing software, characterized in that the audio file detection method comprises:
in response to an audio file being added to a playlist of the media playing software, parameter detection is performed on the audio file using a multimedia decoding library:
if the parameter detection is not passed, judging that the audio file is invalid;
if the parameter detection is passed, transmitting the first frames of the audio file to a decoder for decoding, and matching the number of frames transmitted to the decoder with the number of frames decoded by the decoder;
if the matching fails, judging that the audio file is invalid;
in the playlist, invalid audio files are significantly prompted.
2. The audio file detection method of claim 1, wherein the performing parameter detection on the audio file using a multimedia decoding library comprises:
judging whether the audio file can be opened or not;
if the audio file can be opened, the parameter detection is carried out on the audio file according to the context stream information of the multimedia format content of the audio file, the index of the stream, the sampling frequency and the audio channel.
3. The audio file detection method of claim 2, wherein the determining whether the audio file can be opened comprises:
and judging whether the context pointer data of the multimedia format content of the audio file is empty or not, and if so, judging that the audio file cannot be opened.
4. The audio file detecting method according to claim 2, wherein performing parameter detection on the audio file based on the multimedia format content context stream information of the audio file comprises:
if the context stream information of the multimedia format content of the audio file is smaller than 0, the parameter detection is not passed.
5. The audio file detection method of claim 2, wherein parameter detecting the audio file based on an index of a stream of the audio file comprises:
if the index value of the stream of the audio file is smaller than 0, the parameter detection is failed.
6. The audio file detection method of claim 2, wherein performing parameter detection on the audio file according to a sampling frequency of the audio file comprises:
judging whether the sampling frequency is in a preset frequency range, if not, the parameter detection is failed.
7. The audio file detection method of claim 2, wherein parameter detecting the audio file from an audio channel of the audio file comprises:
and judging whether the value of the audio channel is in a preset range, and if not, failing to pass the parameter detection.
8. The audio file detection method of claim 2, wherein the matching of the number of frames to be transmitted to the decoder with the number of frames decoded by the decoder comprises:
if the difference between the number of frames sent to the decoder and the number of frames decoded by the decoder exceeds a preset range, the matching fails.
9. An audio file detection apparatus, comprising:
a parameter detection unit adapted to perform parameter detection on an audio file using a multimedia decoding library in response to the audio file being added to a playlist of media playing software;
the decoding unit is suitable for sending the first frames of the audio file to a decoder for decoding if the parameter detection is passed, and matching the number of frames sent to the decoder with the number of frames decoded by the decoder;
and the prompting unit is suitable for obviously prompting invalid audio files in the play list if the matching fails.
10. A computing device, comprising:
at least one processor and a memory storing program instructions;
the program instructions, when read and executed by the processor, cause the computing device to perform the audio file detection method of any of claims 1-8.
11. A readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the audio file detection method of any of claims 1-8.
CN202311214185.1A 2023-09-20 2023-09-20 Audio file detection method and device and computing equipment Active CN117012207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311214185.1A CN117012207B (en) 2023-09-20 2023-09-20 Audio file detection method and device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311214185.1A CN117012207B (en) 2023-09-20 2023-09-20 Audio file detection method and device and computing equipment

Publications (2)

Publication Number Publication Date
CN117012207A true CN117012207A (en) 2023-11-07
CN117012207B CN117012207B (en) 2023-12-29

Family

ID=88572973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311214185.1A Active CN117012207B (en) 2023-09-20 2023-09-20 Audio file detection method and device and computing equipment

Country Status (1)

Country Link
CN (1) CN117012207B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1056297A2 (en) * 1999-05-24 2000-11-29 Agilent Technologies Inc. Multimedia decoder with error detection
US20040078383A1 (en) * 2002-10-16 2004-04-22 Microsoft Corporation Navigating media content via groups within a playlist
US20060080104A1 (en) * 2004-10-08 2006-04-13 Hon Hai Precision Industry Co., Ltd. Method for testing an audio device associated to a computer
US20090138109A1 (en) * 2007-11-06 2009-05-28 Lg Electronics Inc. Apparatus providing function to delete files and method for deleting files thereof
CN107295401A (en) * 2017-08-10 2017-10-24 四川长虹电器股份有限公司 A kind of method detected from the violation information in media audio-video frequency content
WO2020103008A1 (en) * 2018-11-21 2020-05-28 深圳市欢太科技有限公司 Audio detection method, computer readable storage medium, and electronic device
US20200335125A1 (en) * 2019-04-19 2020-10-22 Raytheon Company Detection of audio anomalies
CN113488068A (en) * 2021-07-19 2021-10-08 歌尔光学科技有限公司 Audio anomaly detection method and device and computer-readable storage medium
CN115827911A (en) * 2022-11-01 2023-03-21 深圳开鸿数字产业发展有限公司 Audio file updating method, intelligent device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1056297A2 (en) * 1999-05-24 2000-11-29 Agilent Technologies Inc. Multimedia decoder with error detection
US20040078383A1 (en) * 2002-10-16 2004-04-22 Microsoft Corporation Navigating media content via groups within a playlist
US20060080104A1 (en) * 2004-10-08 2006-04-13 Hon Hai Precision Industry Co., Ltd. Method for testing an audio device associated to a computer
US20090138109A1 (en) * 2007-11-06 2009-05-28 Lg Electronics Inc. Apparatus providing function to delete files and method for deleting files thereof
CN107295401A (en) * 2017-08-10 2017-10-24 四川长虹电器股份有限公司 A kind of method detected from the violation information in media audio-video frequency content
WO2020103008A1 (en) * 2018-11-21 2020-05-28 深圳市欢太科技有限公司 Audio detection method, computer readable storage medium, and electronic device
US20200335125A1 (en) * 2019-04-19 2020-10-22 Raytheon Company Detection of audio anomalies
CN113488068A (en) * 2021-07-19 2021-10-08 歌尔光学科技有限公司 Audio anomaly detection method and device and computer-readable storage medium
CN115827911A (en) * 2022-11-01 2023-03-21 深圳开鸿数字产业发展有限公司 Audio file updating method, intelligent device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周晶: "移动端音乐播放器系统设计与音频处理算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN117012207B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
KR101943295B1 (en) Adaptive processing with multiple media processing nodes
US7653538B2 (en) Playback apparatus and playback method
KR20050061594A (en) Improved audio data fingerprint searching
KR20160088449A (en) Audio encoder and decoder with program information or substream structure metadata
KR101427647B1 (en) Method and apparatus for packet creating and precessing
JP4736201B2 (en) Information retrieval apparatus and method, and storage medium
CN117012207B (en) Audio file detection method and device and computing equipment
CN109640165B (en) Multimedia playing method for switching audio tracks, terminal equipment and readable storage medium
US20060072827A1 (en) Apparatus, method, and computer program for processing information
US8374712B2 (en) Gapless audio playback
JP2005157388A (en) Method and circuit for searching for sync word in compressed audio bit stream and recording medium where same method is recorded
US20100286989A1 (en) Recording/reproduction device
CN102522088B (en) Decoding method and device of audio frequency
CN109584891B (en) Audio decoding method, device, equipment and medium in embedded environment
US8391467B2 (en) Methods and systems for encoding and decoding audio signals
CN114125469A (en) MP4 file repair method and device, electronic equipment and storage medium
WO2005093750A1 (en) Digital dubbing device
US10515624B2 (en) Content processing method and system using audio signal of advertisement data
US20050201495A1 (en) Reproducing apparatus and method for controlling the same
US8731368B2 (en) Video data processing apparatus and video data processing method
KR100844194B1 (en) Method and device for decodig digital audio data, and recoded medium for performing method of decoding digital audio data
US20050197830A1 (en) Method for calculating a frame in audio decoding
JP4211356B2 (en) Data reading apparatus and method
US8050155B2 (en) Disc playback apparatus
JP2002108399A (en) Voice editing system

Legal Events

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