CN114501149A - Method, device and equipment for decoding audio/video file and readable medium - Google Patents

Method, device and equipment for decoding audio/video file and readable medium Download PDF

Info

Publication number
CN114501149A
CN114501149A CN202210125659.4A CN202210125659A CN114501149A CN 114501149 A CN114501149 A CN 114501149A CN 202210125659 A CN202210125659 A CN 202210125659A CN 114501149 A CN114501149 A CN 114501149A
Authority
CN
China
Prior art keywords
decoding
file
decoded
audio
video
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.)
Pending
Application number
CN202210125659.4A
Other languages
Chinese (zh)
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.)
Tianmai Tuodao Beijing Technology Co ltd
Original Assignee
Tianmai Tuodao Beijing 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 Tianmai Tuodao Beijing Technology Co ltd filed Critical Tianmai Tuodao Beijing Technology Co ltd
Priority to CN202210125659.4A priority Critical patent/CN114501149A/en
Publication of CN114501149A publication Critical patent/CN114501149A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof

Abstract

The embodiment of the specification discloses a method, a device, equipment and a readable medium for decoding an audio/video file, and the scheme comprises the following steps: receiving a file to be decoded; acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result; if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side; and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.

Description

Method, device and equipment for decoding audio/video file and readable medium
Technical Field
The present application relates to the field of audio/video file decoding technologies, and in particular, to a method, an apparatus, a device, and a readable medium for decoding an audio/video file.
Background
In the current field of audio and video decoding, most of online audio and video decoding adopts a mode of online cloud server centralized decoding, the scheme is based on the premise that a large number of GPU server groups are required to be purchased and deployed in the early stage, and although the problem of unified user data conversion is solved through a cloud mode, the scheme has the defects that the cost is extremely high, any enterprise which wants to provide an online non-editing function needs to spend a large amount of funds and manpower, and a large number of cloud GPU server groups are deployed.
Therefore, it is necessary to provide a method for effectively decoding the audio/video file to be decoded at low cost.
Disclosure of Invention
Embodiments of the present specification provide a method, an apparatus, a device and a readable medium for decoding an audio/video file, so as to decode the audio/video file to be decoded with low cost and high efficiency.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a method for decoding an audio/video file, where the method includes:
receiving a file to be decoded;
acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result;
if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side;
and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
An embodiment of this specification provides an audio/video file decoding apparatus, including:
the file receiving module is used for receiving a file to be decoded;
the judging module is used for acquiring the coding information of the file to be decoded, and judging whether the local browser supports the decoding processing of the file to be decoded or not based on the coding information to obtain a judging result;
the decoding module determining module is used for receiving a decoding plug-in corresponding to the coding information sent by the server side if the judgment result is negative;
and the decoding module is used for decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
An embodiment of this specification provides an audio/video file decoding apparatus, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving a file to be decoded;
acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result;
if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side;
and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
Embodiments of the present specification provide a computer readable medium having stored thereon computer readable instructions executable by a processor to implement a method for decoding an audio/video file.
At least one embodiment provided in this specification can achieve the following advantageous effects:
according to the technical scheme, when the audio/video file to be decoded is decoded, the CPU and the GPU of the current computer equipment of the user are directly used, local computing power is concentrated, the decoding work of the audio/video file can be completed without depending on the cloud, even under the condition of completely separating from the network, so that the use scene of a terminal user is greatly enriched, and the user can separate from the network to limit the completion of transcoding non-coding work. Moreover, the decoding of the audio/video file in the technical scheme of the embodiment is completed through the browser, so that any client software does not need to be installed, and the installation cost of a user can be lightened to the greatest extent. When the local browser does not support decoding of the audio/video file to be decoded, the decoding plug-in corresponding to the coding information of the audio/video file to be decoded can be obtained from the server side, namely, when the local browser does not support decoding of the audio/video file to be decoded, the corresponding decoding plug-in is dynamically loaded, on one hand, decoding work of the browser side can be supported, and on the other hand, due to the fact that only the decoding plug-ins but not all decoding plug-ins packed decoding controls are transmitted to the browser side by the server side, fine granularity is high, and flow bandwidth is controllable.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a flowchart illustrating a method for decoding an audio/video file according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an audio/video file decoding apparatus corresponding to FIG. 1;
fig. 3 is a schematic diagram illustrating parallel encoding of sub-files in a method for decoding an audio/video file according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for decoding an audio/video file according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of one or more embodiments of the present disclosure more apparent, the technical solutions of one or more embodiments of the present disclosure will be described in detail and completely with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present specification, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of one or more embodiments of the present specification.
Fig. 1 is a flowchart illustrating a method for decoding an audio/video file according to an embodiment of the present disclosure. From the viewpoint of the program, the execution subject of the flow may be a program installed in an application server or an application terminal.
As shown in fig. 1, the process may include the following steps:
step S102: a file to be decoded is received.
In the technical scheme of this embodiment, the browser end receives a file to be decoded distributed by the server end, where the file to be decoded may be an audio file or a video file, and in a specific scenario, the file to be decoded may be an audio/video file that a user selects to play. The server side can rapidly and stably distribute the file to be decoded to the browser side through the content distribution network.
Step S104: and acquiring the coding information of the file to be decoded, and judging whether the local browser supports the decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result.
Before transmitting an audio/video file through a network, the audio/video file to be transmitted needs to be encoded through a specific compression technology, that is, an audio/video file in a certain format is converted into an audio/video file in another format, and then the encoded audio/video file is transmitted. For example, the most important coding standards in video streaming are h.261, h.263, and h.264 of the international telecommunication union, M-JPEG of the moving picture experts group, and MPEG series standards of the moving picture experts group of the international organization for standardization. After the compressed audio/video file is acquired through the network, it needs to be decoded so as to be played locally.
Therefore, the encoding information in the technical scheme of the embodiment may refer to an encoding mode adopted in the encoding process of the file to be decoded, so that the file to be decoded can be conveniently decoded by adopting a corresponding decoding mode in the subsequent process.
The existing commercial browser generally supports playing of audio/video files with a plurality of coding standards, so that after the coding information of the file to be decoded is obtained in the step, whether the local browser can decode the file to be decoded can be judged based on the coding information of the file to be decoded, and a judgment result is obtained.
Step S106: and if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side.
When the local browser does not support decoding of the file to be decoded, in the technical scheme of the embodiment of the invention, the browser end acquires the corresponding decoding plug-in from the server end, namely the plug-in capable of decoding the file to be decoded. In the invention, because the files to be decoded may be audio files or video files, and the decoding support conditions of each browser for the audio files or video files adopting different coding standards are different, in the technical scheme of the invention, the decoding module can be extracted from the existing decoding software, a plurality of decoding plug-ins are constructed and then independently stored, namely the decoding plug-ins are not packaged into a uniform large decoding control. For example, as many decoding controls as possible are extracted from multiple decoding software such as ffmpeg, and a decoding plug-in library is constructed and stored in the server in advance.
In step S104, it is obtained whether the browser can decode the file to be decoded, and on the basis of the determination result, if the determination result is negative, that is, the local browser cannot decode the file to be decoded, the decoding plug-in corresponding to the encoding information and sent by the server side may be received, so as to decode the file to be decoded.
Step S108: and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
According to the technical scheme, when the audio/video file to be decoded is decoded, the CPU and the GPU of the current computer equipment of the user are directly used, local computing power is concentrated, the decoding work of the audio/video file can be completed without depending on the cloud, even under the condition of completely separating from the network, so that the use scene of a terminal user is greatly enriched, and the user can separate from the network to limit the completion of transcoding non-coding work. Moreover, the decoding of the audio/video file in the technical scheme of the embodiment is completed through the browser, so that any client software does not need to be installed, and the installation cost of a user can be lightened to the greatest extent. When the local browser does not support decoding of the audio/video file to be decoded, the decoding plug-in corresponding to the coding information of the audio/video file to be decoded can be obtained from the server side, namely, when the local browser does not support decoding of the audio/video file to be decoded, the corresponding decoding plug-in is dynamically loaded, on one hand, decoding work of the browser side can be supported, and on the other hand, due to the fact that only the decoding plug-ins but not all decoding plug-ins packed decoding controls are transmitted to the browser side by the server side, fine granularity is high, and flow bandwidth is controllable.
In the technical solution of an optional embodiment, before receiving the file to be decoded, the method includes: a coding information list of local browser self-supporting codes is constructed in advance;
the decoding plug-in is prefabricated by the server side and specifically comprises the following steps:
based on the existing decoding module, a plurality of decoding plug-ins are manufactured in advance, and each decoding plug-in the plurality of decoding plug-ins is independently stored in the server side.
In the technical solution of an optional embodiment, before the obtaining of the encoding information of the file to be decoded, the method includes:
and constructing a lock-free annular buffer data queue, setting a first pointer and a second pointer, wherein the first pointer points to the position of the next reading, the second pointer points to the position of the next writing, and the lock-free annular buffer data queue is used for storing the file to be decoded.
In the technical solution of the optional embodiment, the acquiring the coding information of the file to be decoded specifically includes:
based on the first pointer and the second pointer, pointing the first pointer to the file header of the file to be decoded, pointing the second pointer to the file tail of the file to be decoded, and reading a byte stream contained in the file header and/or the file tail of the file to be decoded by using an unpacking module so as to obtain the encoding information of the file to be decoded; and storing the file to be decoded based on the lock-free annular buffer data queue.
Because all audio files or video files are stored in binary form in the medium, the files are mainly divided into three major parts, namely a file header, a data body and a file tail (possibly none), and different files are identified by the file header and the file tail. The file head and tail are data located at the beginning or tail of the file, which undertakes certain tasks and records file attribute information. According to the technical scheme of the embodiment of the invention, the offset position of the media file is mapped to the specific offset position of the media file through the pointer mapping mode, and because the byte number ratio occupied by the head and the tail of the media file is small, the mode can effectively reduce the occupation of the physical memory of the browser end and avoid the memory loading of the whole media file.
In the technical solution of the optional embodiment, if the file to be decoded is a video file, the decoding plug-in based on the file to be decoded decodes the file to be decoded to obtain a decoding result, which specifically includes:
cutting the file to be decoded to obtain a plurality of video frame sequences;
for any video frame in the video frame sequences, parallelly decoding the parallelly decodable data points corresponding to the any video frame; or the like, or, alternatively,
and processing any one video frame according to the GOP frame segment, processing one GOP frame segment by each thread in a multithreading mode, and performing segmentation parallel accelerated decoding.
In the technical solution of the alternative embodiment, if the file to be decoded is an audio file,
after the decoding plug-in is used for decoding the file to be decoded and a decoding result is obtained, the method further comprises the following steps: carrying out frequency conversion, speed change or sound mixing processing on the decoding result; or the like, or, alternatively,
if the file to be decoded is a video file, the decoding module is used for decoding the file to be decoded to obtain a decoding result, and the method further comprises the following steps: and carrying out layering, filtering or transition processing on the video frame in the decoding result.
In the technical solution of the optional embodiment, the encoding the audio/video file obtained after decoding further includes, after the obtaining of the decoding result, specifically including:
cutting the decoded audio/video file to obtain a subfile sequence, wherein any subfile in the subfile sequence comprises a plurality of continuous byte streams;
for any two subfiles with continuous sequence numbers in the subfile sequence, the subfile with the small sequence number is a first subfile, the subfile with the large sequence number is a second subfile, and a plurality of coincident byte streams exist at the tail of the first subfile and the head of the second subfile;
and decoding the first subfile by using a first sub-thread to obtain a first decoding result, decoding the second subfile by using a second sub-thread to obtain a second decoding result, and performing parallel operation on the first sub-thread and the second sub-thread.
For an audio file, in the prior art, an AAC encoding early stage has a packet loss phenomenon, so that the prior art generally adopts linear encoding instead of a parallel encoding scheme, because the parallel encoding scheme is adopted, due to the early stage of the packet loss phenomenon, an encoding result may be incomplete. Therefore, the present invention designs the scheme shown in fig. 2, which first cuts the whole audio file to be encoded to obtain a sequence of subfiles, and explains the parallel encoding scheme of the present invention with two continuous word files, i.e. the first subfile and the second subfile. The byte streams processed by the first thread and the second thread have an overlapping part, specifically, the second thread can redundantly store a certain number (more than 2 x 1024 bytes) of audio bytes to buffer lost packets at the initial stage of AAC coding, the algorithm can accelerate coding in parallel and can ensure no loss of key data, and therefore the first thread and the second thread can perform coding processing in parallel, namely the first thread processes the first subfile, and meanwhile, the second thread processes the second subfile, and after a coding result is obtained, splicing is performed. In the splicing process, since the positions of the overlapped portions of the first thread and the second thread are known in advance (from the perspective of the first subfile, the position of the overlapped portion in the first subfile can be known, and from the perspective of the second subfile, the position of the overlapped portion in the second subfile can also be known), splicing can be smoothly achieved according to the positions of the overlapped portions, and details are not repeated here.
For a video file, the RGB format data can be converted into YUV format in the gpu layer by using a shader script, and then the gpu layer data is exchanged into the memory of the cpu layer through readPixels. Video coding this block uses two schemes, the first scheme: the YUV data can be coded by a simd algorithm of h264, and in addition, multithreading mode processing is adopted during coding, and 1080P (1024 × 1920) video frame coding can be actually tested to be close to 1-time speed. In the second scheme, a webcodec module provided by a browser kernel is adopted, coding is accelerated by using a coding module in the browser, and the coding module can fully utilize the capability of a GPU coder to achieve the effect of accelerating coding.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 3 is a schematic structural diagram of a decoding apparatus for audio/video files corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus may include:
a file receiving module 302, configured to receive a file to be decoded;
a determining module 304, configured to obtain encoding information of the file to be decoded, and determine, based on the encoding information, whether a local browser supports decoding processing of the file to be decoded, so as to obtain a determination result;
a decoding module determining module 306, configured to receive, if the determination result is negative, a decoding plug-in corresponding to the encoded information sent by the server;
the decoding module 308 is configured to decode the file to be decoded based on the decoding plug-in to obtain a decoding result.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method.
Fig. 4 is a schematic structural diagram of a decoding device for an audio/video file corresponding to fig. 1 provided in an embodiment of this specification. As shown in fig. 4, the apparatus 400 may include:
at least one processor 410; and the number of the first and second groups,
a memory 430 communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory 430 stores instructions 420 executable by the at least one processor 410, the instructions being executed by the at least one processor 410.
The instructions may enable the at least one processor 410 to:
receiving a file to be decoded;
acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result;
if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side;
and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital character system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for decoding an audio/video file is applied to a browser end, and is characterized by comprising the following steps:
receiving a file to be decoded;
acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result;
if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side;
and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
2. The method for decoding an audio/video file according to claim 1,
before receiving the file to be decoded, the method comprises the following steps: a coding information list of local browser self-supporting codes is constructed in advance;
the decoding plug-in is prefabricated by the server side and specifically comprises the following steps:
based on the existing decoding module, a plurality of decoding plug-ins are manufactured in advance, and each decoding plug-in the plurality of decoding plug-ins is independently stored in the server side.
3. The method for decoding an audio/video file according to claim 1, wherein before the obtaining the coding information of the file to be decoded, the method comprises:
and constructing a lock-free annular buffer data queue, setting a first pointer and a second pointer, wherein the first pointer points to the position of the next reading, the second pointer points to the position of the next writing, and the lock-free annular buffer data queue is used for storing the file to be decoded.
4. The method for decoding an audio/video file according to claim 3, wherein the obtaining the coding information of the file to be decoded specifically comprises:
based on the first pointer and the second pointer, pointing the first pointer to the file header of the file to be decoded, pointing the second pointer to the file tail of the file to be decoded, and reading a byte stream contained in the file header and/or the file tail of the file to be decoded by using an unpacking module so as to obtain the encoding information of the file to be decoded; and storing the file to be decoded based on the lock-free annular buffer data queue.
5. The method for decoding an audio/video file according to claim 1, wherein if the file to be decoded is a video file, the decoding plug-in decodes the file to be decoded to obtain a decoding result, and specifically includes:
cutting the file to be decoded to obtain a plurality of video frame sequences;
for any video frame in the video frame sequences, parallelly decoding the parallelly decodable data points corresponding to the any video frame; or the like, or, alternatively,
and processing any one video frame according to the GOP frame segment, processing one GOP frame segment by each thread in a multithreading mode, and performing segmentation parallel accelerated decoding.
6. The method for decoding an audio/video file according to claim 1, wherein if the file to be decoded is an audio file,
after the decoding plug-in is used for decoding the file to be decoded and a decoding result is obtained, the method further comprises the following steps: carrying out frequency conversion, speed change or sound mixing processing on the decoding result; or the like, or, alternatively,
if the file to be decoded is a video file, the decoding module is used for decoding the file to be decoded to obtain a decoding result, and the method further comprises the following steps: and carrying out layering, filtering or transition processing on the video frame in the decoding result.
7. The method for decoding an audio/video file according to claim 1, wherein the step of obtaining the decoding result further comprises encoding the audio/video file obtained after decoding, and specifically comprises:
cutting the decoded audio/video file to obtain a subfile sequence, wherein any subfile in the subfile sequence comprises a plurality of continuous byte streams;
for any two subfiles with continuous sequence numbers in the subfile sequence, the subfile with the small sequence number is a first subfile, the subfile with the large sequence number is a second subfile, and a plurality of coincident byte streams exist at the tail of the first subfile and the head of the second subfile;
and decoding the first subfile by using a first sub-thread to obtain a first decoding result, decoding the second subfile by using a second sub-thread to obtain a second decoding result, and performing parallel operation on the first sub-thread and the second sub-thread.
8. An apparatus for decoding an audio/video file, comprising:
the file receiving module is used for receiving a file to be decoded;
the judging module is used for acquiring the coding information of the file to be decoded, and judging whether the local browser supports the decoding processing of the file to be decoded or not based on the coding information to obtain a judging result;
the decoding module determining module is used for receiving a decoding plug-in corresponding to the coding information sent by the server side if the judgment result is negative;
and the decoding module is used for decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
9. An apparatus for decoding an audio/video file, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving a file to be decoded;
acquiring coding information of the file to be decoded, and judging whether a local browser supports decoding processing of the file to be decoded or not based on the coding information to obtain a judgment result;
if the judgment result is negative, receiving a decoding plug-in corresponding to the coding information sent by the server side;
and decoding the file to be decoded based on the decoding plug-in to obtain a decoding result.
10. A computer readable medium having stored thereon computer readable instructions executable by a processor to implement the method of decoding an audio/video file according to any one of claims 1 to 7.
CN202210125659.4A 2022-02-10 2022-02-10 Method, device and equipment for decoding audio/video file and readable medium Pending CN114501149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210125659.4A CN114501149A (en) 2022-02-10 2022-02-10 Method, device and equipment for decoding audio/video file and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210125659.4A CN114501149A (en) 2022-02-10 2022-02-10 Method, device and equipment for decoding audio/video file and readable medium

Publications (1)

Publication Number Publication Date
CN114501149A true CN114501149A (en) 2022-05-13

Family

ID=81479347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210125659.4A Pending CN114501149A (en) 2022-02-10 2022-02-10 Method, device and equipment for decoding audio/video file and readable medium

Country Status (1)

Country Link
CN (1) CN114501149A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979775A (en) * 2022-05-18 2022-08-30 北京达佳互联信息技术有限公司 Video decoding method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889894A (en) * 2019-03-13 2019-06-14 苏州科达科技股份有限公司 Media file coding/decoding method, device and storage medium
CN112653700A (en) * 2020-12-23 2021-04-13 武汉烽火众智数字技术有限责任公司 Website video communication method based on WEBRTC
CN113038292A (en) * 2021-03-19 2021-06-25 佳都新太科技股份有限公司 System, method and device for monitoring audio and video transmission and playing based on browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889894A (en) * 2019-03-13 2019-06-14 苏州科达科技股份有限公司 Media file coding/decoding method, device and storage medium
CN112653700A (en) * 2020-12-23 2021-04-13 武汉烽火众智数字技术有限责任公司 Website video communication method based on WEBRTC
CN113038292A (en) * 2021-03-19 2021-06-25 佳都新太科技股份有限公司 System, method and device for monitoring audio and video transmission and playing based on browser

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979775A (en) * 2022-05-18 2022-08-30 北京达佳互联信息技术有限公司 Video decoding method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
KR101477434B1 (en) Out-of-order command execution in a multimedia processor
TWI393065B (en) Method and system of operating frame buffer manager, decoding and displaying compressed video data
CN112437345B (en) Video double-speed playing method and device, electronic equipment and storage medium
JP2007221323A (en) Method for processing information, method for displaying thumbnail of moving picture, decoding device, and information processor
US11128879B2 (en) Hybrid decoding
CN109819317A (en) A kind of method for processing video frequency, device, terminal and storage medium
CN114071226B (en) Video preview graph generation method and device, storage medium and electronic equipment
CN116210221A (en) Time alignment of MPEG and GLTF media
CN114501149A (en) Method, device and equipment for decoding audio/video file and readable medium
US20190246117A1 (en) Encoding data arrays
CN113473126A (en) Video stream processing method and device, electronic equipment and computer readable medium
CN104219555A (en) Video displaying device and method for Android system terminals
CN114299972A (en) Audio processing method, device, equipment and storage medium
US8612981B2 (en) Task distribution method
CN104091608A (en) Video editing method and device based on IOS equipment
US7848610B2 (en) Data processing system, reproduction apparatus, computer, reproduction method, program, and storage medium
US8300701B2 (en) Offspeed playback in a video editing system of video data compressed using long groups of pictures
CN108600813A (en) a kind of media file playing method, device and media play system
CN113271467A (en) Ultra-high-definition video layered coding and decoding method supporting efficient editing
US8280220B2 (en) Reproduction apparatus, data processing system, reproduction method, program, and storage medium
CN113923507B (en) Low-delay video rendering method and device for Android terminal
CN111866542B (en) Audio signal processing method, multimedia information processing device and electronic equipment
CN111355960A (en) Method and device for synthesizing video file, mobile terminal and storage medium
CN105992018A (en) Streaming media transcoding method and apparatus thereof
CN115484494A (en) Method, device and equipment for processing digital twin video stream

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