Media material processing method and apparatus, storage medium, and electronic device
By parsing and transcoding media materials locally in the browser, target materials that meet the browser's playback requirements are generated, solving the problem of low browser editing efficiency. This achieves efficient media material processing without server support and is suitable for various cloud computing and intelligent transportation applications.
Patent Information
- Application Number
- CN202211145862.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2042-09-20
AI Technical Summary
Browsers only support previewing and playing media materials in specific encoding formats, resulting in low editing efficiency and reliance on servers, which limits application scenarios.
The browser parses media asset management information locally, performs offline transcoding, generates target assets that meet the browser's playback requirements, and stores them in local storage space, supporting offline editing.
It improves the efficiency of importing and editing media materials. Browsers can play and edit target materials independently without relying on servers. It is suitable for public cloud, private cloud or hybrid cloud scenarios and is applicable to fields such as cloud technology, cloud gaming, cloud rendering, artificial intelligence, smart transportation, assisted driving, video media and smart communities.
Smart Images

Figure CN116992059B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and in particular, to a media material processing method and device, a storage medium and an electronic device. BACKGROUND
[0002] In the related art, the browser can support editing of media materials, and the media materials can be uploaded to a server through the browser. The editing of the media materials relies on preview and playback of the media materials. However, the browser can only support preview and playback of media materials in some specific encoding formats, which leads to that the editing of the browser relies more on the support of the server, reduces the editing efficiency of the browser, and limits the application scenarios of the browser media material editing. SUMMARY
[0003] To solve at least one of the above technical problems, embodiments of the present application provide a media material processing method and device, a storage medium and an electronic device.
[0004] In one aspect, a media material processing method is provided, which is applied to a browser, and the method comprises:
[0005] In a case where an import request of a media material is acquired, the media material is parsed to obtain media material management information, the media material management information comprising channel information of the media material and encoding information corresponding to each channel;
[0006] In a case where the channel information and each of the encoding information indicates that the media material does not meet the playback requirement of the browser, local transcoding processing is performed on the media material to obtain a target material, the target material is stored in a local storage space of the browser, and the target material meets the playback requirement of the browser;
[0007] In a case where an acquisition request of the media material is acquired, a destination address of the acquisition request is routed to the local storage space to obtain a response generated based on the target material in the local storage space.
[0008] In another aspect, a media material processing device is provided, and the device comprises:
[0009] A media material parsing module is configured to, in a case where an import request of a media material is acquired, parse the media material to obtain media material management information, the media material management information comprising channel information of the media material and encoding information corresponding to each channel;
[0010] An offline encoding module is configured to perform local transcoding processing on the media material to obtain target material in a case where the channel information and each of the encoding information indicates that the media material does not meet the browser playing requirement, and store the target material in a local storage space of the browser, wherein the target material meets the browser playing requirement.
[0011] A local routing module is configured to route a destination address of a request for the media material to the local storage space to obtain a response generated based on the target material in the local storage space in a case where the request for the media material is obtained.
[0012] In another aspect, the embodiments of the present application provide a computer readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the media material processing method.
[0013] In another aspect, the embodiments of the present application provide an electronic device, which includes at least one processor and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the media material processing method by executing the instructions stored in the memory.
[0014] In another aspect, the embodiments of the present application provide a computer program product, which includes a computer program or instructions, and the computer program or instructions are executed by a processor to implement the media material processing method.
[0015] The embodiments of the present application provide a media material processing method, which can fully analyze a media material locally in a browser, obtain media material management information of the media material, obtain target material corresponding to the media material based on the media material management information in an offline case, and store the target material in a local storage space of the browser, wherein the target material is a playable material in the browser, and the browser can support editing operation on the target material by accessing the target material in the local storage space. The media material processing method in the embodiments of the present application does not need to upload the media material to a server, and can make the browser have the ability to independently obtain and play the target material without relying on the server, and the browser can support editing on the target material without relying on the server, thereby improving the import efficiency and editing efficiency of the media material. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, and the advantages thereof, below will briefly introduce the drawings needed to be used in the embodiments or the related art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 is a media material editing method flowchart provided by the embodiments of the present specification;
[0018] Figure 2 is a feasible implementation framework diagram of the media material processing method provided by the embodiments of the present application;
[0019] Figure 3 is a flowchart of the media material processing method provided by the embodiments of the present application;
[0020] Figure 4 is a schematic diagram of the browser interface for importing media material provided by the embodiments of the present application;
[0021] Figure 5 is a browser transcoding scene diagram provided by the embodiments of the present application;
[0022] Figure 6 is a process diagram of intercepting a request and generating a response provided by the embodiments of the present application;
[0023] Figure 7 is a media material processing method architecture diagram provided by the embodiments of the present application;
[0024] Figure 8 is a media material processing method time consumption effect comparison diagram provided by the embodiments of the present application Figure 1 ;
[0025] Figure 9 is a media material processing method time consumption effect comparison diagram provided by the embodiments of the present application Figure 2 ;
[0026] Figure 10 is a block diagram of a media material processing device provided by the embodiments of the present application;
[0027] Figure 11 is a hardware structure diagram of a device for implementing the method provided by the embodiments of the present application. DETAILED DESCRIPTION
[0028] With reference to the drawings and embodiments described below, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the embodiments of the present application.
[0029] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or units need not be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products or devices.
[0030] In order to make the purposes, technical solutions and advantages of the present application more clear, the embodiments of the present application are further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0031] Hereinafter, the terms "first" and "second" are used only for descriptive purposes, and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "a plurality of" is two or more. In order to facilitate the understanding of the technical solutions and the technical effects generated by the above-mentioned technical solutions of the present application, the present application first explains the related professional terms:
[0032] Cloud technology: refers to the series of resources such as hardware, software, network, etc. in the wide area network or local area network are unified, realize the data calculation, storage, processing and sharing of a kind of hosting technology. Based on the network technology, information technology, integration technology, management platform technology, application technology of cloud computing business model application, can constitute resource pool, on demand, flexible and convenient. Cloud computing technology will become an important support. The background service of technical network system needs a lot of computing and storage resources, such as video website, picture website and more portal website. With the high development and application of Internet industry, every item may have its own identification mark in the future, which needs to be transmitted to the background system for logical processing. Different levels of data will be processed separately, and various industry data need strong system support, which can only be realized through cloud computing.
[0033] Intelligent Traffic System (ITS), also known as Intelligent Transportation System, is to effectively integrate advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control and vehicle manufacturing, to strengthen the connection between vehicles, roads and users, so as to form a comprehensive transportation system that ensures safety, improves efficiency, improves environment and saves energy.
[0034] Intelligent Vehicle Infrastructure Cooperative Systems (IVICS), simply referred to as vehicle infrastructure cooperative system, is a development direction of intelligent transportation system (ITS). Vehicle infrastructure cooperative system is to use advanced wireless communication and new generation Internet technology to implement dynamic real-time information interaction between vehicles and roads in all directions, and to carry out vehicle active safety control and road cooperative management based on full-time and space dynamic traffic information collection and fusion, to fully realize the effective cooperation of man, vehicle and road, to ensure traffic safety and improve traffic efficiency, so as to form a safe, efficient and environmentally friendly road traffic system.
[0035] Artificial Intelligence (AI) is the theory, method, technology and application system of using digital computer or machine controlled by digital computer to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0036] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0037] Machine Learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and example-based learning.
[0038] Deep learning: the concept of deep learning comes from the research of artificial neural networks. Multi-layer perceptron with multiple hidden layers is a deep learning structure. Deep learning forms more abstract high-level representation attributes or features by combining low-level features to discover distributed feature representation of data.
[0039] Convolutional Neural Networks (CNN) is a class of feedforward neural networks containing convolutional computation and having deep structure, which is one of the representative algorithms of deep learning. Convolutional neural networks have the ability of feature learning and can perform shift-invariant classification on input information according to its hierarchical structure, so it is also called "shift-invariant artificial neural network".
[0040] With the development of multimedia interaction technology and Internet technology, related applications that support users to edit media materials by themselves and provide media material interaction services based on the media materials edited by users have developed rapidly. Such applications support users to edit media materials by themselves and publish or manage the media materials. Please refer to Figure 1 Fig. 1 shows a flowchart of a method for editing media materials in the related art. Generally, a user can import media materials into a browser of such an application and upload the media materials to a server. After the server performs transcoding and parsing operations on the media materials, target materials can be obtained, which have a file format and an encoding format that can be supported by the browser to play. After the server sends the target materials to the browser, the browser can play the target materials. On the premise that the target materials can be played, the user can perform editing operations such as clipping and synthesizing on the target materials in the browser, thereby fully meeting the user's self-editing needs.
[0041] According to the foregoing, in the related art, media materials located in the local of a browser need to be uploaded to a server first, and then returned to the browser as target materials that can be played. Only then can the user perform editing operations in the browser, which is time-consuming. Moreover, for batch media materials, the browser needs to perform a batch upload task, and the batch upload task usually needs to perform single file upload processing, which is time-consuming for each file, resulting in low efficiency of the batch upload task.
[0042] Therefore, the embodiments of the present application provide a media material processing method, which can fully analyze media materials in the local of a browser, obtain media material management information of the media materials, obtain target materials corresponding to the media materials based on the media material management information in an offline manner, and store the target materials in a storage space in the local of the browser. The target materials are materials that can be played in the local of the browser. The browser can support editing operations on the target materials by accessing the target materials in the local storage space. The media material processing method in the embodiments of the present application does not need to upload media materials to a server, and can enable the browser to independently obtain and play target materials without relying on the server. The browser can also support editing of the target materials without relying on the server, thereby improving the import efficiency and editing efficiency of media materials.
[0043] The embodiments of the present application can be applied to public cloud, private cloud or hybrid cloud scenarios. For example, the media material that can be directly played by a browser in the present application, or the target material obtained by transcoding the media material that cannot be directly played by the browser, can be uploaded to a server and stored in a cloud space, which can be a public cloud, a private cloud or a hybrid cloud. The private cloud (Private Cloud) is to create a cloud infrastructure and software and hardware resources within a firewall for sharing resources in a data center by departments of an institution or enterprise. The public cloud (Public Cloud) generally refers to the cloud provided by a third party provider for users to use. The public cloud can be used through the Internet and can be free or low cost. The core attribute of the public cloud is shared resource service. There are many instances of such a cloud that can provide services in the entire open public network today. The hybrid cloud (Hybrid Cloud) combines the public cloud (Public Cloud) and the private cloud (Private Cloud) and is the main mode and development direction of cloud computing in recent years. The private cloud is mainly for enterprise users. For security reasons, enterprises prefer to store data in a private cloud, but also want to obtain the computing resources of a public cloud. In this case, the hybrid cloud is increasingly used. It combines and matches the public cloud and the private cloud to obtain the best results. This personalized solution achieves the purpose of saving money and safety.
[0044] Please refer to Figure 2 , Figure 2 is a feasible implementation framework diagram of the media material processing method provided by the embodiments of the present application, as shown in Figure 2 The browser 10 and the server 20 communicate through the network 30. The browser 10 can parse the media material to obtain media material management information including channel information of the media material and corresponding encoding information of each channel when obtaining an import request of the media material. In the case that the channel information and each encoding information of the media material do not meet the browser playback requirements, the media material is locally transcoded to obtain target material, which is stored in the local storage space of the browser. The target material meets the browser playback requirements. In the case that an acquisition request of the media material is obtained, the destination address of the acquisition request is routed to the local storage space to obtain a response generated based on the target material in the local storage space.
[0045] The process of importing media material by the browser 10 to obtain the target material can be implemented offline, thereby providing the user with a play, preview and edit service without relying on the server 20, and on this basis, the target material obtained by transcoding can be uploaded to the server 20, and the target material can be edited, and the editing result can be uploaded to the server 20. Of course, in the case that the media material meets the browser play requirements, the media material or the editing result for the media material can be directly uploaded to the server 20 without specific transcoding. The server 20 can provide more media material processing services for the browser 10 by communicating with the browser 10.
[0046] The above framework of the embodiment of the application can provide the media material processing capability required by various applications, including but not limited to cloud technology, cloud game, cloud rendering, artificial intelligence, intelligent transportation, assisted driving, video media, intelligent community, instant messaging and the like. The components in the framework can be terminal devices or servers. The terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminal devices and the like.
[0047] A media material processing method provided by an embodiment of the application is introduced below, Figure 3 A flowchart of a media material processing method provided by an embodiment of the application is shown, and the media material processing method can be executed based on the browser 10 described above. The embodiment of the application provides the method operation steps as described above in the embodiment or flowchart, but more or fewer operation steps can be included based on conventional or non-creative labor. The order of the steps listed in the embodiment is only one of the many execution orders, and does not represent the only execution order. When the system, terminal device or server product is executed in practice, the method order shown in the embodiment or the drawing can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment), and the above method can include:
[0048] S101. In the case that the import request of the media material is obtained, the media material is parsed to obtain media material management information, and the media material management information includes channel information of the media material and encoding information corresponding to each channel.
[0049] The embodiment of the application does not limit the method of the media resource material, please refer to Figure 4 which shows a schematic diagram of importing media material by a browser interface. Figure 4 The left drawing can import a single media material alone, Figure 4 The right drawing can import media material in batches. The single media material import is taken as an example for description in the embodiment of the application.
[0050] The execution result of the importing operation of the media material in the embodiments of the present application is that, in the case that the media material can be directly previewed and played by the browser, the media material is stored locally in the browser, in the case that the media material cannot be directly previewed and played, the target material which can be directly previewed and played by the browser is obtained through transcoding and is stored locally in the browser, and the browser actually supports the application operation of the user on the browser by interacting with the locally stored media material or target material. In some embodiments, the media material which can be directly played by the browser or the target material obtained through transcoding by the browser can also be uploaded to the server after the importing operation, in which case, the execution result of the uploading operation can also be directly executed as the execution result of the importing operation.
[0051] In fact, in the embodiments of the present application, in the case that the browser obtains the target media resource which can be played, Figure 4 The left figure can display the result of successful importing and support preview, play and clipping of the target media resource, in the case that the imported media material can be directly played, the target media resource is the media material, and in the case that the imported media material cannot be directly played and needs to be transcoded, the target media resource is the target material obtained through transcoding.
[0052] The embodiments of the present application do not limit the type of media material, which can be audio material or video material in various encoding formats.
[0053] In some embodiments, the media material management information can include fingerprint information, the fingerprint information is the unique identifier of the media material in the embodiments of the present application, and the fingerprint information should be unique. In order to obtain the fingerprint information with uniqueness while reducing the time resources consumed by the generation of the fingerprint information and improving the generation efficiency of the fingerprint information, the embodiments of the present application provide a fingerprint information generation method, which comprises the following steps:
[0054] S201. Fuse the first byte information and the second byte information, and perform hash calculation on the fusion result to obtain a first hash value, the first byte information is the information corresponding to the first number of bytes at the head of the media material, and the second byte information is the information corresponding to the second number of bytes at the tail of the media material.
[0055] In the embodiments of the present application, the binary file corresponding to the media material can be obtained first, the binary file records the byte information corresponding to the content of the media material, the first number of bytes at the head of the binary file is extracted to obtain the first byte information, and the second number of bytes at the tail of the binary file is extracted to obtain the second byte information. The embodiments of the present application do not limit the first number and the second number, which can be set according to actual conditions.
[0056] S202. Hashing the attribute information of the media file to obtain a second hash value, the attribute information including at least one of the following: file name, file modification time, and file size.
[0057] S203. Determining the fingerprint information according to the first hash value and the second hash value.
[0058] Embodiments of the present application do not limit the specific method of determining the fingerprint information based on the first hash value and the second hash value. For example, in the embodiments of the present application, the first hash value and the second hash value can be spliced to obtain the fingerprint information, or the spliced result can be hashed again to obtain the fingerprint information. This method of generating the fingerprint information only needs to load the first byte information and the second byte information into the browser, and the fingerprint information can be generated by combining the attribute information, without loading the entire binary file, and the consumption of the storage space related to the browser is also reduced.
[0059] In some embodiments, the media material management information further includes type information, which can be used to indicate whether the media material is an audio material or a video material. In some embodiments, the file type can be read through a file type reading interface, such as file.type. However, since the field read by the interface can be written in a self-defined manner when the file is generated, the reliability of the type information obtained based on the interface is not high. Therefore, some embodiments of the present application use another method, which includes: parsing the media material to obtain byte information of the media material; extracting a magic number representing encoding information in the byte information; and determining the type information according to the extraction result.
[0060] When the media material is generated, the magic number associated with the encoding information corresponding to the media material is written into the file of the media material, and the magic number will not be easily changed. Therefore, the accurate file type can be obtained based on the magic number.
[0061] In some embodiments, based on the type information corresponding to the media material, the media material can be further parsed to obtain the channel information of the media material and the encoding information corresponding to each channel. Embodiments of the present application do not limit the specific content of the encoding information, which can include at least one of the following: encoding format, code rate, and resolution parameter.
[0062] In some embodiments, metadata of the media material can also be parsed, which represents some inherent attributes of the media material, such as the cover content, resolution or length of the media material, etc. The metadata can also be stored in the media material management information, which can be used when the browser edits the media material or the target material corresponding to the media material, such as displaying the cover content of the target material corresponding to the media material first when previewing the target material, and playing based on the resolution or determining the length of the target material when playing the target material.
[0063] In some embodiments, whether the media material meets the browser playback requirements can be determined according to the above channel information and each of the above encoding information. Specifically, it can include determining whether the media material meets the browser playback requirements according to the type information, the channel information and each of the encoding information.
[0064] In many scenarios, the browser can only support the playback of media materials in a specific encoding format. If there is at least one channel in the media material, and the encoding format of the at least one channel does not belong to the specific encoding format, it can be determined that the media material does not meet the browser playback requirements.
[0065] Please refer to Figure 5 , which shows a browser transcoding scenario diagram. Wherein mp4 and mp3 are Moving Picture Experts Group, namely dynamic image expert group (MPEG for short) third and fourth generation audio and video information compression encoding standards. 264 is H.264, which is the tenth part of the fourth generation standard of MPEG, which is proposed by the joint video group composed of video coding expert group and dynamic image expert group. Ogg is an audio compression format, and ogv is a video format homologous to Ogg. Theora is an open and free video compression encoding technology. WebM is an open and free media file format proposed by Google. VP8 / 9 is also an open image compression format proposed by Google. At present, most browsers support online preview and playback of media materials in the above specific encoding format, while media materials in other encoding formats do not meet the browser playback requirements and need to be converted to a specific encoding format supported by the browser for playback.
[0066] S102. In the case where the above channel information and each of the above encoding information indicates that the above media material does not meet the above browser playback requirements, the above media material is locally transcoded to obtain a target material, and the above target material is stored in the local storage space of the above browser. The target material meets the browser playback requirements.
[0067] In order to enable the browser to preview and play the media material that does not meet the above-mentioned browser playback requirements without relying on server support, thereby supporting the user's editing operation in an offline state, the embodiment of the present application can perform local transcoding processing on the above-mentioned media material in the browser to obtain target material, store the above-mentioned target material in the local storage space of the above-mentioned browser, and the above-mentioned target material meets the above-mentioned browser playback requirements, so that the browser can directly preview and play or support editing operations. The embodiment of the present application can determine whether the above-mentioned media material meets the playback requirements of the above-mentioned player based on the above-mentioned channel information and each of the above-mentioned encoding information, that is, if the above-mentioned channel information and each of the above-mentioned encoding information do not meet the playback requirements of the above-mentioned media material in the above-mentioned browser, step S102 will be implemented.
[0068] Before the above-mentioned local transcoding processing on the above-mentioned media material to obtain the target material, the encoding format converter can be compiled, and the above-mentioned encoding format converter is used to convert the media resource in a preset encoding format into target resource in a target format, the above-mentioned preset encoding format is an encoding format that the above-mentioned browser does not support to play, and the above-mentioned target format is an encoding format that the above-mentioned browser supports to play.
[0069] In one embodiment, the encoding format converter can be compiled based on FFmpeg WebAssembly technology. FFmpeg is a set of open source computer programs that can be used to record, convert digital audio, video, and convert them into streams. WebAssembly is a new encoding method that can run in modern web browsers. It is a low-level assembly-like language with a compact binary format that can run at near-native performance and provides a compilation target for object-based coding languages to run in a browser environment. The encoding format converter is obtained based on FFmpeg WebAssembly, which makes it possible for the front-end page of the browser to directly perform transcoding processing on the media material. Specifically, the encoding format converter can be used to transcode the media material that the browser does not support to preview and play, and uniformly convert it into target material in h264 encoding format. The embodiment of the present application does not use the open source library of ffmpeg.js, but compiles the ffmpeg-core.wasm library by itself, thereby significantly improving the transcoding speed and transcoding performance, and in the compilation process, the zscale library is fused, where zscale is a third-party open source library that optimizes the encoding effect of ffmpeg. Such a compilation method can enable the obtained encoding format converter to solve the problem of color distortion of the video obtained by high dynamic range imaging.
[0070] The encoding information is input into the encoding format converter, the media material is transcoded by the encoding format converter, and the target material is output.
[0071] In some embodiments, the storing the target material in the local storage space of the browser includes: determining a play link corresponding to the media material based on the fingerprint information, the play link pointing to an address in the local storage space; storing the target material in the address pointed to by the play link; and storing the media material management information and the play link in a local database, the local database being located in the local storage space.
[0072] In some embodiments, the local database can include a first data table and a second data table, the first data table being used to manage local data of the browser, and the second data table being used to manage a correspondence between the local data of the browser and server data. The media material management information and the play link can be stored in the first data table of the local database in correspondence, and the play link and a material identifier can be stored in the second data table of the local database in correspondence, the material identifier being an identifier corresponding to the target material on the server.
[0073] Of course, if the media material meets the playback requirements of the browser, it does not need to be transcoded, but the processing method thereof is based on the same inventive concept as the processing method of the target material, and the embodiments of the present application are described taking the processing of the target material as an example. Of course, the processing of the target material as the processing object is also applicable to the processing of the media material meeting the playback requirements of the browser, and is not described again.
[0074] S103. In the case where the acquisition request of the media material is acquired, the destination address of the acquisition request is routed to the local storage space, and a response generated based on the target material in the local storage space is obtained.
[0075] In some embodiments, before the destination address of the acquisition request of the media material is routed to the local storage space to obtain the response generated based on the target material in the local storage space, the method includes: intercepting the acquisition request of the media material by a network agent.
[0076] In the case that the obtaining request of the media material is obtained, the destination address of the obtaining request is routed to the local storage space, and a response generated based on the target material in the local storage space is obtained, including: obtaining the destination address by analyzing the request header of the obtaining request; routing the destination address to a target position, the target position corresponding to the storage address of the target material; opening the target material based on the target position; and performing streaming segmentation loading on the target material to obtain a response corresponding to each target material segment.
[0077] Please refer to Figure 6 , which shows the process of intercepting the obtaining request and generating the response. In the embodiments of the present application, the request of a page can be intercepted by using a network proxy. If the obtaining request of the media material is intercepted, the request header can be analyzed and the destination address can be redirected to a target position, i.e. Figure 6 videosrc in . The browser can access the target material based on the target position, thereby completing the streaming loading of the target material and improving the page performance and response speed.
[0078] In some embodiments, after the destination address of the obtaining request is routed to the local storage space in the case that the obtaining request of the media material is obtained, and the response generated based on the target material in the local storage space is obtained, the method further includes: in the case that an application request of the media material is obtained, performing an operation corresponding to the application request on the target material; and the operation includes at least one of previewing, playing, editing, synthesizing, modifying, and uploading. That is, the obtaining of the material is a prerequisite. After the material that can be previewed and played in the browser is obtained, any operation such as previewing, playing, editing, synthesizing, modifying, and uploading can be performed subsequently.
[0079] Please refer to Figure 7 , which shows the processing method of the media material in the embodiments of the present application. Figure 7For the obtained media material, media material management information corresponding to the media material can be parsed, which can include fingerprint information, type information, encoding information and metadata. In the case of obtaining media material management information, it can be judged whether the media material is a material supported by the browser for playing. If it is, there is no need for transcoding, if it is not, the encoding format converter can be called for transcoding to obtain the target material supported by the browser for playing. The target material and the media material management information are written into the local storage space for management. In the case of user triggering the above media material acquisition request, the media material acquisition request can be intercepted through the network proxy, and the local storage space is accessed to obtain the response corresponding to the acquisition request, so that the target material supported by the browser for playing can be obtained without accessing the server, and then the editing operation can be performed without interacting with the server, thereby significantly improving the speed of importing material to material editable. This makes the embodiment of the application have more prominent advantages in a network environment or a weak network environment. Of course, in the case of obtaining the target material supported by the browser for playing, the target material can also be uploaded, cloud synthesized, and the editing result obtained by in-track editing of the target material can be uploaded through interaction with the server.
[0080] In the embodiment of the application, concurrent media resource uploading can be supported. The media resource can include media material that can be played on the browser side, or target material obtained by transcoding media material that cannot be played on the browser side. That is, the media resource is all composed of material that can be played on the browser, so that the server can directly obtain the material that can be played on the browser, without the need to additionally provide the ability to transcode the material that cannot be played on the browser to the material that can be played on the browser, thereby reducing the server burden. Moreover, the embodiment of the application significantly improves the uploading efficiency of the media resource and reduces the time cost by supporting concurrent uploading.
[0081] In order to implement the media material processing method mentioned in the foregoing, the embodiment of the application optimizes the implementation architecture corresponding to the method. Specifically, three classes are constructed in the embodiment of the application, namely a material processing class, an upload management class and a transcoding class. The material processing class is used to encapsulate subsequent operations of the media material from import to the browser. The transcoding class is used to transcode each media resource. The upload management class is used to manage the state information of each media resource or the processing progress information of each media resource, and control the concurrent uploading of the media resource in the browser.
[0082] Specifically, for each media material to be imported, a material processing object corresponding to the media material can be instantiated based on the media material, and each processing action related to the media material can be performed by the material processing object. In the case of transcoding, the material processing object can call a transcoding object based on the media material to perform transcoding processing, and the target material fed back by the transcoding object can be obtained. The transcoding object is an instantiation result of a transcoding class.
[0083] In the embodiments of the present application, a material processing object corresponding to each media material to be imported can be instantiated, and each material processing object can call the transcoding object to perform transcoding processing. Of course, the processing process of each media material can be managed by an upload management object, which is an instantiation result of an upload management class. Based on the upload management object, upload management information can be obtained, which includes state information of any media resource or processing progress information of the media resource. The media resource can be a media material to be imported or a target material corresponding to the media material to be imported.
[0084] Please refer to Figure 7 which shows a media material processing method architecture diagram. For each media material to be imported, a material processing object (Uploader) can be generated. The Uploader object can be used to implement at least one of the following operations: asynchronously extracting information of the media material, determining whether transcoding is needed, using a transcoding module for transcoding processing if transcoding is needed, directly storing if transcoding is not needed, and uploading the storage result to a server. The processing status and progress in the whole process are synchronized to the display list of the browser through event communication with the upload management object UploadManager.
[0085] The transcoding object Transcoder can maintain a transcoding queue and perform corresponding transcoding processing for various video formats. After transcoding is completed, the Transcoder communicates with the Uploader to return the transcoded target material.
[0086] The UploadManager is responsible for maintaining an upload file queue, providing application programming interfaces for adding uploads, canceling uploads, querying uploads, and other operations, and controlling multiple Uploader to perform concurrent uploads of materials.
[0087] In the embodiments of the present application, three classes are reasonably planned, and corresponding objects can be obtained by instantiating the three classes. The method in the present application is implemented by cooperation between the objects, so that the implementation framework of the method in the present application is efficient and reasonable, the hierarchy is clear, and the method in the embodiments of the present application is easy to extend, update and maintain.
[0088] In the embodiment of the application, the offline file transcoding and material caching are implemented, so that the waiting time for using local audio and video materials for editing is reduced, the network bandwidth is saved, and the editing performance is improved. The scheme has more advantages in a weak network. By intercepting the local material request through the network proxy, the streaming material loading mode can be simulated, which not only reduces the network waiting time for material preview and playback, but also improves the smooth experience of editing. In addition, the parallel multi-material uploading scheme can reduce the waiting time for multi-file uploading and solve the lag problem of batch file uploading, thereby improving the smooth experience of editing.
[0089] Please refer to Figure 8 , which shows a media material processing method time consumption effect comparison diagram Figure 1 . Figure 8 The left graph shows that the related art processes a media material (file 1) of 500 MB in size, so that the material import to the material reaches an editable state in 1 minute and 20 seconds. The right graph shows that the embodiment of the application processes the same media material, which only takes 8 seconds, so the embodiment of the application can significantly improve the processing speed of the media material. Figure 8
[0090] Please refer to Figure 9 , which shows a media material processing method time consumption effect comparison diagram Figure 2 . Generally, the average time consumption required for the browser front end to process media materials to reach an editable state of the material through interaction with the server is 300 milliseconds to 400 milliseconds. The embodiment of the application can generally be completed within 6 milliseconds, and the speed-up effect is very prominent.
[0091] Please refer to Figure 10 , which shows a block diagram of a media material processing device in the embodiment, applied to a browser, the device comprising:
[0092] The media material analysis module 101 is configured to, in the case of obtaining a media material import request, analyze the media material to obtain media material management information, wherein the media material management information comprises channel information of the media material and encoding information corresponding to each channel.
[0093] The offline encoding module 102 is configured to, in the case that the channel information and each encoding information indicate that the media material does not meet the browser playback requirements, perform local transcoding processing on the media material to obtain a target material, and store the target material in the local storage space of the browser, wherein the target material meets the browser playback requirements.
[0094] The local routing module 103 is configured to, in response to obtaining a request for the media material, route a destination address of the request to the local storage space, and obtain a response generated based on the target material in the local storage space.
[0095] In an embodiment, the apparatus further comprises an application module configured to perform the following operations:
[0096] In response to obtaining an application request for the media material, the target material is subjected to an operation corresponding to the application request.
[0097] The operation includes at least one of previewing, playing, editing, synthesizing, modifying, and uploading.
[0098] In an embodiment, the offline encoding module 102 is configured to perform the following operations:
[0099] Compiling an encoding format converter, the encoding format converter is configured to convert a media resource in a preset encoding format into a target resource in a target format, the preset encoding format is an encoding format that is not supported by the browser for playing, and the target format is an encoding format supported by the browser for playing;
[0100] The encoding information is input into the encoding format converter, the media material is transcoded by the encoding format converter, and the target material is output.
[0101] In an embodiment, the media material parsing module 101 is configured to perform the following operations:
[0102] Fusing first byte information and second byte information, and performing hash calculation on the fusion result to obtain a first hash value, the first byte information is information corresponding to a first number of bytes at the beginning of the media material, and the second byte information is information corresponding to a second number of bytes at the end of the media material;
[0103] Performing hash calculation on attribute information of the media file to obtain a second hash value, the attribute information includes at least one of the following: file name, file modification time, and file size;
[0104] Determining the fingerprint information according to the first hash value and the second hash value;
[0105] Determining a playing link corresponding to the media material based on the fingerprint information, the playing link points to an address in the local storage space;
[0106] Storing the target material in the address pointed to by the playing link;
[0107] The media material management information and the play link are stored in a local database, and the local database is located in the local storage space.
[0108] In one embodiment, the media material parsing module 101 is configured to perform the following operations:
[0109] The media material is parsed to obtain byte information of the media material.
[0110] The magic number representing the encoding information in the byte information is extracted.
[0111] The type information is determined according to the extraction result.
[0112] The device further includes a judgment module configured to determine whether the media material meets the browser play requirement according to the type information, the channel information, and each encoding information.
[0113] In one embodiment, the media material parsing module 101 is configured to perform the following operations:
[0114] The media material management information and the play link are stored in a first data table of the local database, and the first data table is configured to manage local data of the browser.
[0115] The play link and the material identifier are stored in a second data table of the local database, and the second data table is configured to manage the correspondence between the local data and the server data of the browser, and the material identifier is an identifier corresponding to the target material on the server.
[0116] In one embodiment, the local routing module 103 is configured to perform the following operations:
[0117] The acquisition request of the media material is intercepted through a network agent.
[0118] In a case where the acquisition request of the media material is acquired, the destination address of the acquisition request is routed to the local storage space to obtain a response generated based on the target material in the local storage space, including:
[0119] The request header of the acquisition request is parsed to obtain the destination address.
[0120] The destination address is routed to a target position, and the target position corresponds to a storage address of the target material.
[0121] The target material is opened based on the target position.
[0122] The target material is loaded in a streaming manner to obtain a response corresponding to each target material segment.
[0123] In an embodiment, the device further comprises a framework optimization module configured to obtain a material processing object, the material processing object being an instantiation result of a material processing class corresponding to the media material, the material processing class being configured to encapsulate subsequent operations of the media material from being imported into the browser.
[0124] In an embodiment, the framework optimization module is further configured to cause the material processing object to invoke a transcoding object based on the media material to perform transcoding processing, and obtain the target material fed back by the transcoding object, the transcoding object being an instantiation result of a transcoding class, the transcoding class being configured to transcode each media resource.
[0125] In an embodiment, the framework optimization module is further configured to obtain upload management information based on an upload management object, the upload management information including state information of the media resource or processing progress information of the media resource.
[0126] In an embodiment, the upload management information is an instantiation result of an upload management class, the upload management class being configured to manage state information of each media resource or processing progress information of each media resource, and control concurrent uploading of the media resource in the local browser.
[0127] The device part in the embodiments of the present application and the method embodiments are based on the same inventive concept, and will not be described here.
[0128] Further, Figure 11 A hardware structure schematic diagram of a device for implementing the method provided in the embodiments of the present application is shown, and the device can participate in constituting or containing the device or system provided in the embodiments of the present application. As shown in the figure, Figure 11 The device 10 can include one or more processors 102 (the processor 102 can include but is not limited to a microprocessor MCU or a programmable logic device FPGA processing device), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 11 The structure shown in the figure is only a schematic, and it does not limit the structure of the above-mentioned electronic device. For example, the device 10 can include more or fewer components than those shown in the figure, or have different arrangements of the components from those shown in the figure. Figure 11 The structure shown in the figure is only a schematic, and it does not limit the structure of the above-mentioned electronic device. For example, the device 10 can include more or fewer components than those shown in the figure, or have different arrangements of the components from those shown in the figure.Figure 11 different configurations.
[0129] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry." The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module or incorporated in whole or in part within any of the other elements of the device 10 (or mobile device). As referred to in embodiments of the present application, the data processing circuitry functions as a processor to control, for example, selection of variable resistance terminal paths connected to the interface.
[0130] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the method described above in embodiments of the present application. The processor 102 can execute various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e., implement the media material processing method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory disposed remotely with respect to the processor 102, which can be connected to the device 10 through a network. Examples of the network can include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0131] The transmission device 106 is configured to receive or send data via a network. Examples of the network can include, but are not limited to, a wireless network provided by a communication provider of the device 10. In one example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0132] The display can be, for example, a touch screen type liquid crystal display (LCD) that can enable a user to interact with a user interface of the device 10 (or mobile device).
[0133] It should be noted that the above-mentioned embodiments of the present application are in the order of description only, and do not represent the advantages and disadvantages of the embodiments. And the above describes the specific embodiments of the embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired result. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.
[0134] Each of the embodiments in the embodiments of the present application is described in a progressive manner, and the same and similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0135] A person of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program to instruct relevant hardware. The above-mentioned program can be stored in a computer readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk.
[0136] The instructions in the above-mentioned storage medium can execute a media material processing method, and the above-mentioned method comprises:
[0137] In the case of obtaining the import request of the media material, the media material is parsed to obtain media material management information, and the media material management information comprises channel information of the media material and encoding information corresponding to each channel;
[0138] In the case that the channel information and each encoding information indicate that the media material does not meet the browser playback requirement, the media material is locally transcoded to obtain a target material, and the target material is stored in the local storage space of the browser. The target material meets the browser playback requirement;
[0139] In the case of obtaining the acquisition request of the media material, the destination address of the acquisition request is routed to the local storage space to obtain a response generated based on the target material in the local storage space.
[0140] In one embodiment, after the above-mentioned in the case of obtaining the acquisition request of the media material, the destination address of the acquisition request is routed to the local storage space, and the response generated based on the target material in the local storage space is obtained, the method further comprises:
[0141] In the case of obtaining an application request of the media material, the target material is subjected to an operation corresponding to the application request;
[0142] The operation includes at least one of preview, play, clip, synthesis, modification, and upload.
[0143] In one embodiment, before the local transcoding of the media material, the method further includes:
[0144] Compiling a codec converter for converting a media resource in a preset encoding format into a target resource in a target format, the preset encoding format being an encoding format not supported by the browser for playing, and the target format being an encoding format supported by the browser for playing;
[0145] The local transcoding of the media material to obtain the target material includes inputting the encoding information into the codec converter and converting the media material by the codec converter to output the target material.
[0146] In one embodiment, the media material management information further includes fingerprint information, and the parsing of the media material to obtain the media material management information includes:
[0147] Fusing first byte information and second byte information to obtain a first hash value by hash calculation on the fusion result, the first byte information being information corresponding to a first number of bytes at the beginning of the media material, and the second byte information being information corresponding to a second number of bytes at the end of the media material;
[0148] Hash calculating a second hash value on attribute information of the media file, the attribute information including at least one of a file name, a file modification time, and a file size;
[0149] Determining the fingerprint information according to the first hash value and the second hash value;
[0150] The storing of the target material in the local storage space of the browser includes:
[0151] Determining a playing link corresponding to the media material based on the fingerprint information, the playing link pointing to an address in the local storage space;
[0152] Storing the target material in the address pointed to by the playing link;
[0153] Storing the media material management information and the playing link in a local database, the local database being located in the local storage space.
[0154] In one embodiment, the media material management information further comprises type information, and the parsing of the media material to obtain the media material management information comprises:
[0155] The media material is parsed to obtain byte information of the media material;
[0156] The magic number representing the encoding information in the byte information is extracted;
[0157] The type information is determined according to the extraction result;
[0158] The method further comprises: determining whether the media material meets the browser playback requirement according to the type information, the channel information, and each encoding information.
[0159] In one embodiment, the storing of the media material management information and the playback link in the local database comprises:
[0160] The media material management information and the playback link are stored in a first data table of the local database, and the first data table is used to manage local data of the browser;
[0161] The playback link and the material identifier are stored in a second data table of the local database, and the second data table is used to manage the correspondence between the local data and the server data of the browser, and the material identifier is an identifier corresponding to the target material on the server.
[0162] In one embodiment, before the destination address of the acquisition request of the media material is routed to the local storage space to obtain a response generated based on the target material in the local storage space, the method comprises:
[0163] The acquisition request of the media material is intercepted by a network agent;
[0164] The destination address of the acquisition request of the media material is routed to the local storage space to obtain a response generated based on the target material in the local storage space, comprising:
[0165] The request header of the acquisition request is parsed to obtain the destination address;
[0166] The destination address is routed to a target position, and the target position corresponds to a storage address of the target material;
[0167] The target material is opened based on the target position;
[0168] The target material is loaded in a streaming manner to obtain a response corresponding to each target material segment.
[0169] In an embodiment, the method is implemented by a material processing object, the material processing object being an instantiation result of a material processing class corresponding to the media material, the material processing class being used to encapsulate subsequent operations of the media material from being imported into the browser.
[0170] In an embodiment, the local transcoding of the media material to obtain the target material includes:
[0171] The material processing object calls a transcoding object based on the media material to perform transcoding processing, and obtains the target material fed back by the transcoding object, the transcoding object being an instantiation result of a transcoding class, and the transcoding class being used to transcode each media resource.
[0172] In an embodiment, the method further includes:
[0173] Based on the upload management object, upload management information is obtained, the upload management information including state information of the media resource or processing progress information of the media resource;
[0174] The upload management information is an instantiation result of an upload management class, the upload management class being used to manage state information of each media resource or processing progress information of each media resource, and control concurrent uploading of the media resource locally in the browser.
[0175] The above is only a preferred embodiment of the present application, and is not intended to limit the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A method for processing media materials, characterized in that, Applied to a browser, the method includes: Upon receiving a media material import request, the media material is parsed to obtain media material management information, which includes the channel information of the media material and the encoding information corresponding to each channel. If the channel information and each of the encoding information indicate that the media material does not meet the browser's playback requirements, the media material is subjected to local transcoding to obtain target material, and the target material is stored in the browser's local storage space. The target material meets the browser's playback requirements. Upon receiving a request to acquire the media material, the destination address of the acquisition request is routed to the local storage space to obtain a response generated based on the target material in the local storage space.
2. The method according to claim 1, characterized in that, Upon receiving a request to acquire the media material, the method further includes routing the destination address of the acquisition request to the local storage space, and obtaining a response generated based on the target material in the local storage space. Upon receiving an application request for the media material, the operation corresponding to the application request is performed on the target material; The operations include at least one of the following: previewing, playing, editing, compositing, modifying, and uploading.
3. The method according to claim 1 or 2, characterized in that, Before performing local transcoding on the media material to obtain the target material, the method further includes: A compilation encoding format converter is used to convert media materials in a preset encoding format into target resources in a target format. The preset encoding format is an encoding format that the browser does not support for playback, and the target format is an encoding format that the browser supports for playback. The step of performing local transcoding on the media material to obtain the target material includes: inputting the encoding information into the encoding format converter, having the encoding format converter transcode the media material, and outputting the target material.
4. The method according to claim 1, characterized in that, The media material management information also includes fingerprint information. Parsing the media material to obtain the media material management information includes: The first byte information and the second byte information are merged, and a hash calculation is performed on the merging result to obtain a first hash value. The first byte information is the information corresponding to the first number of bytes in the header of the media material, and the second byte information is the information corresponding to the second number of bytes in the tail of the media material. A second hash value is obtained by hashing the attribute information of the media file, wherein the attribute information includes at least one of the following: file name, file modification time, and file size; The fingerprint information is determined based on the first hash value and the second hash value; The step of storing the target material in the browser's local storage space includes: The playback link corresponding to the media material is determined based on the fingerprint information, and the playback link points to an address in the local storage space; The target material is stored at the address pointed to by the playback link; The media material management information and the playback link are stored in a local database, which is located in the local storage space.
5. The method according to claim 4, characterized in that, The media material management information also includes type information. Parsing the media material to obtain the media material management information includes: The media material is parsed to obtain its byte information; Extract the magic number representing the encoded information from the byte information; Based on the extraction results, the type information is determined; The method further includes: determining whether the media material meets the browser playback requirements based on the type information, the channel information, and each of the encoding information.
6. The method according to claim 5, characterized in that, The step of storing the media material management information and the playback link in a local database includes: The media material management information and the playback link are stored in a first data table in the local database, and the first data table is used to manage the browser's local data. The playback link and the material identifier are stored in the second data table of the local database. The second data table is used to manage the correspondence between the browser's local data and the server data. The material identifier is the identifier of the target material on the server.
7. The method according to claim 6, characterized in that, Before routing the destination address of the acquisition request to the local storage space and obtaining a response based on the target material in the local storage space when the acquisition request for the media material is received, the method includes: The request to acquire the media material is intercepted through a network proxy; When a request to acquire the media material is received, the destination address of the acquisition request is routed to the local storage space to obtain a response based on the target material in the local storage space, including: Parse the request header of the acquisition request to obtain the destination address; The destination address is routed to the target location, which corresponds to the storage address of the target material; Open the target material based on the target location; The target material is loaded in a streaming, segmented manner to obtain the response corresponding to each target material segment.
8. The method according to claim 1, characterized in that, The method is implemented through a media processing object, which is the unique instantiation result corresponding to the media material obtained by instantiating the media processing class. The media processing class is used to encapsulate the subsequent operations after the media material is imported into the browser.
9. The method according to claim 8, characterized in that, The process of performing local transcoding on the media material to obtain the target material includes: The media processing object calls the transcoding object to perform transcoding processing based on the media media, and obtains the target media returned by the transcoding object. The transcoding object is an instantiation of the transcoding class, which is used to transcode each media media.
10. The method according to claim 8 or 9, characterized in that, The method further includes: Based on the upload management object, the upload management information is obtained, including the status information of the media material or the processing progress information of the media material; The upload management information is an instantiation of the upload management class, which is used to manage the status information of each media material or the processing progress information of each media material, as well as control the concurrent upload of media materials on the browser's local machine.
11. A media material processing device, characterized in that, Applied to a browser, the device includes: The media material parsing module is used to parse the media material upon receiving an import request and obtain media material management information, which includes the channel information of the media material and the encoding information corresponding to each channel. An offline encoding module is used to perform local transcoding on the media material when the channel information and each of the encoding information indicate that the media material does not meet the browser's playback requirements, to obtain target material, and to store the target material in the browser's local storage space, wherein the target material meets the browser's playback requirements; The local routing module is used to route the destination address of the media material acquisition request to the local storage space when the acquisition request is received, so as to obtain a response generated based on the target material in the local storage space.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement a media material processing method as described in any one of claims 1 to 10.
13. An electronic device, characterized in that, The method includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements a media material processing method as described in any one of claims 1 to 10 by executing the instructions stored in the memory.
14. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement a media material processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Digital media terminal material downloading method and device
CN104202630A
Information stream transcoding device and method
CN107133306A