CN116320616A - Multimedia file processing method and device, electronic equipment and storage medium - Google Patents

Multimedia file processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116320616A
CN116320616A CN202310271960.0A CN202310271960A CN116320616A CN 116320616 A CN116320616 A CN 116320616A CN 202310271960 A CN202310271960 A CN 202310271960A CN 116320616 A CN116320616 A CN 116320616A
Authority
CN
China
Prior art keywords
multimedia file
target
format
file
determining
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
CN202310271960.0A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310271960.0A priority Critical patent/CN116320616A/en
Publication of CN116320616A publication Critical patent/CN116320616A/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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium

Abstract

The disclosure provides a multimedia file processing method, a device, an electronic device and a storage medium, relates to the field of artificial intelligence, in particular to cloud computing, cloud storage and CDN technology, and can be applied to an intelligent cloud scene. The specific implementation scheme is as follows: determining a file size of the multimedia file in response to determining that an initial storage format of the multimedia file requested to be played is different from a target play format; determining file content according to the file size; and generating a processing task according to the file content, wherein the processing task is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format.

Description

Multimedia file processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to cloud computing, cloud storage, and CDN (Content Delivery Network ) technologies, which may be applied in an intelligent cloud scenario, and in particular, to a multimedia file processing method, apparatus, electronic device, and storage medium.
Background
Multimedia is an integration of multiple media including text, sound, and images. In a computer system, multimedia refers to a man-machine interactive information communication and propagation medium that combines two or more media. The media used include text, pictures, photos, sounds, animations and movies, and interactive functions provided by the program. The multimedia technology is a technology for storing and managing various information such as language characters, data, audio frequency, video frequency and the like through a computer, so that a user can communicate real-time information with the computer through various senses.
Disclosure of Invention
The disclosure provides a multimedia file processing method, a device, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a multimedia file processing method, including: determining a file size of the multimedia file in response to determining that an initial storage format of the multimedia file requested to be played is different from a target play format; determining file content according to the file size; and generating a processing task according to the file content, wherein the processing task is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format.
According to another aspect of the present disclosure, there is provided a multimedia file processing apparatus including: the first determining module is used for determining the file size of the multimedia file in response to the fact that the initial storage format of the multimedia file requested to be played is different from the target playing format; the second determining module is used for determining file content according to the file size; and the generating module is used for generating a processing task according to the file content, wherein the processing task is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the multimedia file processing method of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the multimedia file processing method of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, which when executed by a processor, implements the multimedia file processing method of the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture to which multimedia file processing methods and apparatus may be applied, according to embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of multimedia file processing in accordance with an embodiment of the present disclosure;
FIG. 3A schematically illustrates a diagram of transcoding and playing a multimedia file requesting playback according to an embodiment of the present disclosure;
FIG. 3B schematically illustrates a timing diagram for requesting playback of a multimedia file in accordance with an embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a multimedia file processing apparatus according to an embodiment of the disclosure; and
fig. 5 illustrates a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing, applying and the like of the personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
When recording video, the background stores the recorded video stream as a video file. When a user wants to play the video, the background pulls the video at the corresponding time point from the video file to play.
The inventors found that the efficiency of video real-time playback is not high in implementing the disclosed concept.
Fig. 1 schematically illustrates an exemplary system architecture to which the multimedia file processing method and apparatus may be applied according to an embodiment of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the multimedia file processing method and apparatus may be applied may include a terminal device, but the terminal device may implement the multimedia file processing method and apparatus provided by the embodiments of the present disclosure without interaction with a server.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 via the network 104 using the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages etc. Various communication client applications, such as a knowledge reading class application, a web browser application, a search class application, an instant messaging tool, a mailbox client and/or social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (merely an example) providing support for content browsed by the user with the first terminal apparatus 101, the second terminal apparatus 102, the third terminal apparatus 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, the method for processing a multimedia file provided in the embodiment of the present disclosure may be generally performed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the multimedia file processing apparatus provided by the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
Alternatively, the multimedia file processing method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the multimedia file processing apparatus provided in the embodiments of the present disclosure may be generally disposed in the server 105. The multimedia file processing method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the multimedia file processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
For example, when the user requests to play the multimedia file based on the first terminal device 101, the second terminal device 102, and the third terminal device 103, an initial storage format of the multimedia file requested to be played may be determined based on the first terminal device 101, the second terminal device 102, and the third terminal device 103, and then the initial storage format is transmitted to the server 105, the file size of the multimedia file is determined by the server 105 in response to determining that the initial storage format of the multimedia file requested to be played is different from the target play format, file content is determined according to the file size, and a processing task for transcoding the format of the multimedia file stored in the initial storage format into the target play format is generated according to the file content. Or by a server or a server cluster capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105, and to perform the generation processing task.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flowchart of a multimedia file processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S230.
In operation S210, in response to determining that the initial storage format of the multimedia file requested to be played is different from the target play format, a file size of the multimedia file is determined.
In operation S220, file contents are determined according to the file size.
In operation S230, a processing task for transcoding the format of the multimedia file stored in the initial storage format into the target play format is generated according to the file content.
According to an embodiment of the present disclosure, the multimedia file may include at least one file of text, picture, audio, video, and the like, and may not be limited thereto. Both the initial storage format and the target storage format may include video formats such as H264 (a high-performance video codec technology), H265 (a codec video standard), MPEG2 (a video image compression standard for DVD/supervcd), MPEG4 (a network video image compression standard), AVI (Audio Video Interleave, a multimedia file format that combines voice and video synchronously), image formats such as MP3 (an audio compression technology), AAC (advanced audio coding), OGG (an audio compression format), FLAC (Free Lossless Audio Codec, a free audio compression coding), AC3 (AudioCoding 3), and JPEG (Joint Photographic Experts Group, an image format), PNG (a bitmap slice format that is not limited thereto).
It should be noted that the initial storage format and the target storage format are the same type of formats, for example, all video formats, all audio formats, all image formats, all text formats, etc., and may not be limited thereto.
According to embodiments of the present disclosure, the initial storage format may characterize the storage format of the source file of the multimedia file. The target play format may characterize the format in which the multimedia file is requested to be played. The file size may characterize the byte size of the multimedia file. The file content may include any of the following: binary byte stream information of the source file, storage address of the source file, file name of the source file, and the like, and may not be limited thereto. The processing task may be characterized by not any of the following forms: stain, request, instruction, etc., and may not be so limited. The processing tasks may be performed in a local server storing the source file of the multimedia file, or may be transmitted to other servers and performed by the other servers, as long as the local server and the other servers have transcoding functions therein. The other servers may be, for example, transcoding servers.
According to the embodiment of the disclosure, in the case that the initial storage format of the multimedia file requested to be played is determined to be different from the target playing format, the file content of the generated processing task can be determined according to the file size of the multimedia file. For example, a threshold for distinguishing multimedia files as large files or small files may be set first. Then, file contents to be used for generating the processing task are determined according to the result of the threshold determination, and the processing task is generated. Transcoding of multimedia files may be accomplished by performing processing tasks.
Through the embodiment of the disclosure, various multimedia files with different target playing formats and initial storage formats can be generated according to the file sizes, processing tasks suitable for completing transcoding processing of the corresponding multimedia files are generated, transcoding is realized, effective playing of the multimedia files with various formats and sizes can be realized, and playing efficiency of the multimedia files can be effectively improved.
The method shown in fig. 2 is further described below in connection with the specific examples.
According to an embodiment of the present disclosure, before performing the above operation S210, the target play format may be first determined, which may be determined by: and responding to the received multimedia file playing request initiated by the user based on the player, and acquiring the hypertext transfer protocol information of the multimedia file playing request, wherein the hypertext transfer protocol information comprises first parameter information representing the playing format of the player. And analyzing the hypertext transfer protocol information to obtain first parameter information. And determining a target playing format according to the first parameter information.
According to an embodiment of the present disclosure, the player may be an application program having at least one of a video play function, an audio play function, an image browsing function, a text browsing function, etc., on various terminal devices. The multimedia file play request may be an HTTP (HyperText Transfer Protocol ) request with HTTP information, i.e., hypertext transfer protocol information. The HTTP information may include storage side information of the requested multimedia file, user identification information of a user using the player, file information of the requested multimedia file, request type, request command, and the like, and may not be limited thereto. The file information may include, but is not limited to, information of a storage address, a file name, etc. of the multimedia file. The request type may characterize the type of the request and may include, for example, types of frame-cut requests, transcoding requests, and the like. In this embodiment, the request type may be video/codec, for example, which indicates that the request is a video codec request. The request command may include a transcode format that characterizes the desired play format of the player and may be used to determine a target play format. For example, f_h264 may be configured in the request command as the first parameter information, f may represent a transcoding format, f_h264 may represent that the request is used to request for transcoding the initial storage format into the H264 format, and accordingly, it may be determined that the target playing format corresponding to the request is H264.
For example, the user may select video content that is desired to be played based on the player. In the case where the user requests to play the video content, a multimedia file play request including the above HTTP information may be generated. The local server for storing the multimedia file may receive the request and parse the request to obtain HTTP information, and then may determine a target play format to be transcoded according to the HTTP information.
Through the embodiment of the disclosure, the multimedia file processing method disclosed by the disclosure can be applied to various players, and by transcoding according to the playing requirements of various players, the efficient playing of the multimedia file can be realized in various players, and the user experience is improved.
According to an embodiment of the present disclosure, the HTTP information may further include second parameter information that characterizes a transcoding manner as hardware transcoding.
According to the embodiment of the disclosure, whether hardware transcoding is needed or not can be configured in the request command of the HTTP information. For example, p_1 may be configured in the request command as the second parameter information, p may indicate priority, and setting p_1 indicates that the request is prioritized for hardware transcoding.
Through the above embodiment of the present disclosure, transcoding is performed by using a hardware transcoding manner, so that transcoding efficiency can be effectively improved, playing efficiency of a player is further improved, and user experience is improved.
According to an embodiment of the present disclosure, after obtaining a target play format by parsing a multimedia file play request and determining that the target play format is different from an initial storage format, the above-described operation S220 may be performed.
According to an embodiment of the present disclosure, the above operation S220 may include: in response to determining that the file size is less than or equal to a first preset threshold, binary byte stream information of the multimedia file is determined as file content.
According to embodiments of the present disclosure, multimedia files may be stored in the form of a binary byte stream in a storage area of a local server. The first preset threshold may be determined according to the data stream transmission speed and the pressure that the memory of the server can withstand. For example, the first preset threshold may be determined according to a file size corresponding to an appropriate pressure and a transfer speed.
According to an embodiment of the present disclosure, when it is determined that the multimedia file is small based on the first preset threshold, binary byte stream information of the multimedia file may be used as file content for generating the processing task. For example, the file size of the ts file of 2s is in a single digit M (mega), and the binary byte stream information of the ts file of 2s can be determined as the file content by judging that the file size is smaller than the first preset threshold.
According to the embodiment of the invention, for the multimedia file with smaller file size, binary byte stream information of the multimedia file can be used as file content for generating processing tasks, and based on the mode, efficient transcoding of the small file can be realized, the method is applicable to various scenes needing real-time transcoding, and the real-time playing capability of videos is improved.
According to an embodiment of the present disclosure, the above operation S220 may further include: in response to determining that the file size is greater than a second preset threshold, a storage address for the multimedia file is determined. The storage address is determined as the file content.
According to an embodiment of the present disclosure, the second preset threshold may be equal to or greater than the first preset threshold. When it is determined that the multimedia file is large based on the second preset threshold, the storage address of the multimedia file may be used as file content for generating the processing task.
Through the embodiment of the disclosure, for the multimedia file with larger file size, the processing task with smaller data stream can be generated according to the storage address, so that the pressure of the machine memory can be effectively relieved, the transmission rate is improved, the transcoding efficiency is further improved, and the real-time playing capability of the video is improved.
According to an embodiment of the present disclosure, after determining the file content, the above-described operation S230 may be performed.
According to an embodiment of the present disclosure, the above operation S230 may include: in response to determining that the user identification has processing rights for the multimedia file, a target processing interface to be invoked is determined according to the file size. And generating processing tasks according to at least one of the target processing interface and the hypertext transfer protocol information and the file content.
According to embodiments of the present disclosure, the processing rights may include play rights, play progress rights, and other rights related to processing multimedia files, etc., and may not be limited thereto. The target processing interface may be an interface to connect to a transcoding service. The number of target processing interfaces may be one or more, and may include, for example, a first processing interface and a second processing interface, which may be used to receive different types of processing tasks. By invoking the target processing interface, a flow of executing processing tasks may be entered.
For example, the first processing interface may be invoked when it is determined that the multimedia file requested to be played is small based on a first preset threshold. In this case, the processing task may include binary byte stream information of the multimedia file and at least one of the first processing interface and the hypertext transfer protocol information. The processing task can be processed by calling the first processing interface, a transcoding process is executed, and a transcoding result is obtained.
For example, the second processing interface may be invoked when it is determined that the multimedia file requested to be played is large based on a second preset threshold. In this case, the processing task may include a storage address of the multimedia file and at least one of the second processing interface and the hypertext transfer protocol information. The processing task can be processed by calling the second processing interface, the transcoding process is executed, and the transcoding result is obtained.
According to the embodiment of the disclosure, in the case that a local server for storing a multimedia file receives a multimedia file playing request initiated by a user based on a player, the authority of the multimedia file playing request can be first identified based on an ACL (Access Control List ), and the process is mainly used for judging whether the current user has the authority of requesting to play the corresponding multimedia video. In the case that it is determined that the current user has the right to request to play the current multimedia video according to the user identification, a subsequent generation processing task and a flow of executing the processing task may be performed.
By introducing the user authority identification process through the embodiment of the invention, the security of the request flow can be effectively improved.
According to an embodiment of the present disclosure, the processing task may be transferred to the transcoding server by calling the target processing interface, and executed by the transcoding server. The processing tasks described above may also be performed in a local server. In the case that it is determined that the HTTP information of the multimedia file playing request includes the second parameter information characterizing that the transcoding manner is hardware transcoding according to the parsing result of the multimedia file playing request, the method for executing the processing task based on the local server or the transcoding server may include: in response to determining that the processing task has been started, the format of the multimedia file stored in the initial storage format is transcoded into the target play format based on the manner of hardware transcoding.
Through the above embodiment of the present disclosure, transcoding is performed by using a hardware transcoding manner, so that transcoding efficiency can be effectively improved, playing efficiency of a player is further improved, and user experience is improved.
According to an embodiment of the present disclosure, after successful execution for a processing task including binary byte stream information, the above-described multimedia file processing method may further include: and in response to the successful execution of the processing task, acquiring the processed target binary byte stream information, wherein the format of the target binary byte stream information is a target playing format. And sending the target binary byte stream information to a player requesting to play the multimedia file.
According to the embodiment of the disclosure, in the process of executing the processing task including the binary byte stream information, the binary byte stream information in the format of the initial storage format can be transcoded, and the target binary byte stream information in the format of the target playing format can be obtained. The target binary byte stream information may then be sent to a player requesting to play the multimedia file for play.
Through the embodiment of the disclosure, transcoding and playing of multimedia files in various formats can be realized, the playing efficiency is improved, and the user experience is improved.
According to an embodiment of the present disclosure, after successful execution of a processing task for a storage address including a multimedia file, the above-described multimedia file processing method may further include: and in response to the successful execution of the processing task, acquiring the target storage address of the target multimedia file obtained by processing, wherein the format of the target multimedia file is a target playing format. And acquiring the target multimedia file based on the target storage address. And sending the target multimedia file to a player requesting to play the multimedia file.
According to an embodiment of the present disclosure, in performing a processing task including a storage address, a multimedia file in a format of an initial storage format may be first acquired according to the storage address. Then, the multimedia file is transcoded, a target multimedia file with a target playing format can be obtained, and the target multimedia file can be stored in a new storage address. And then, determining a target storage address according to the new storage address, obtaining a target multimedia file according to the target storage address, and sending the target multimedia file to a player requesting to play the multimedia file for playing.
It should be noted that, the target multimedia file may be stored in a storage area of a local server for storing the multimedia file in the initial storage format, or may be stored in a storage area of another server, so long as the local server and the other server are guaranteed to have the same region.
Through the embodiment of the disclosure, transcoding and playing of multimedia files in various formats can be realized, the playing efficiency is improved, and the user experience is improved.
Fig. 3A schematically illustrates a diagram of transcoding and playing a multimedia file requesting playing according to an embodiment of the present disclosure.
As shown in fig. 3A, the system 300 includes a player 310, a local server 320, a transcoding server 330, an nginnx (a high performance HTTP and reverse proxy server) 340, and a billing platform 350. Local server 320 may include a control module 321, a processing module 322, an ACL module 323, and a storage module 324. The transcoding server 330 may include therein a first processing interface 331, a second processing interface 332, etc., and may not be limited thereto.
According to embodiments of the present disclosure, the local server 320 may be used to implement functions of storing, uploading, downloading, pushing links of multimedia files to the transcoding server 330, pushing multimedia files to the player 310, and so on. The transcoding server 330 may be used to implement a transcoding function of transcoding the format of the multimedia file stored in the initial storage format into the target play format. The nmginx 340 may support functions of flow control, modification requests, and the like. Local server 320 may include various types of software and hardware devices that support the activation and authentication of instant transcoding services, as well as support the resolution of user requests, and the transmission of corresponding instant transcoding requests.
According to an embodiment of the present disclosure, a billing platform may also be connected to at least one of the local server 320 and the transcoding server 330. The charging platform can be used for realizing the functions of sending corresponding charging information according to the user identification, marking whether the corresponding user defaults and needs to suspend the service, and the like.
According to an embodiment of the present disclosure, a user may request to play a multimedia file at the player 310, and the player 310 may generate a multimedia file play request based on a selection operation of the user. The multimedia file play request may be first transmitted to the control module 321 of the local server 320. The control module 321 may perform parameter analysis on the multimedia file playing request to obtain HTTP information. The HTTP information may include request type information, request command information, user identification information, third parameter information indicating whether the multimedia file play request is a real-time transcoding request, etc. of the multimedia file play request, and is not limited thereto. In this process, ACL information and description information of multimedia files may also be obtained in parallel based on ACL module 323 and storage module 324. The control module 321 can perform authority identification on the multimedia file playing request according to the ACL information. If it is determined that the user has the processing authority for the multimedia file and successfully obtains the description information of the multimedia file, the related requirements in the multimedia file playing request can be determined based on the third parameter information, and if it is determined that the multimedia file playing request is a real-time transcoding request, the HTTP information can be forwarded to the processing module 322 for processing. In this process, the control module 321 may also send a flag to the processing module 322 according to the file size, so as to determine which interface of the transcoding server the processing module 322 calls for subsequent transcoding processing.
According to embodiments of the present disclosure, after receiving the authenticated HTTP information, the processing module 322 may generate processing tasks based on the HTTP information and the flags and file contents determined based on the file size. In the process, a temporary authority can be given to the processing task, so that transcoding processing is realized on the basis of the authority, and the safety is improved.
In accordance with an embodiment of the present disclosure, in the case where it is determined that the multimedia file requested to be played is small, the processing module 322 may obtain binary byte stream information of the multimedia file in the format of the initial storage format according to the received HTTP information. The first transcoding request is then constructed from the binary byte stream information and sent 313 to the transcoding server 330 by calling the first processing interface 331 in the transcoding server 330. The transcoding server 330 may transcode the binary byte stream information to obtain target binary byte stream information, and may return the target binary byte stream information to the control module 321 via the processing module 322. The control module 321 may construct the return information according to the target binary byte stream information and the information such as the size, the transcoding time, and the charging operation, and may return the return information including the target binary byte stream information to the player 310 for playing via the nginnx 340.
In accordance with an embodiment of the present disclosure, in the case where it is determined that the multimedia file requested to be played is large, the processing module 322 may obtain the URL (Universal Resource Locator, uniform resource locator) of the multimedia file in the format of the initial storage format according to the received HTTP information. The second transcoding request is then constructed from the URL and sent to the transcoding server 330 by invoking the second processing interface 332 in the transcoding server 330. The transcoding server 330 may obtain the multimedia file based on the URL and transcode the multimedia file to obtain the target multimedia file. The transcoding server 330 may also store the target multimedia file in the storage module 324 of the local server 320, and may generate a target URL according to the target storage address of the target multimedia file, and may return the target URL to the control module 321 via the processing module 322. The control module 321 may parse the target URL to obtain a storage location and a file name of the target multimedia file, and may construct the return information according to the parsed content. The target multimedia file may be sent to the player 310 for playback by adjusting the parameters of the returned information so that it is no longer authenticated twice.
For a multimedia file with a larger file size, in the case where the transcoded multimedia file required by the player is already stored in the local server 320, when the user requests to play the multimedia file again based on the player 310, the multimedia file may be directly obtained based on the URL of the multimedia file and returned to the player 310 for playing via the nginnx 340.
Fig. 3B schematically illustrates a timing diagram for requesting playback of a multimedia file according to an embodiment of the present disclosure.
As shown in fig. 3B, when a user requests to play a multimedia file based on the player 310, a multimedia file play instruction may be first transmitted to the local server 320 for storing the multimedia file. In the case where the local server 320 includes cache information of the multimedia file requested to be played by the user, the cache information may be returned to the player 310 for playing. In the case that the local server 320 does not include the multimedia file requested to be played by the user, the local server 320 may make a transcoding request with the transcoding server 330, and the transcoding server 330 may transcode the multimedia file requested to be played by the user and return the transcoded target secondary byte stream file or URL to the player 310 via the local server 320 for playing. In the process, the transcoding server may also send billing data for the user to billing platform 340.
Through the embodiment of the disclosure, the implementation of transcoding of the multimedia file requested to be played can be realized, and the playing efficiency of the multimedia file is improved.
Fig. 4 schematically illustrates a block diagram of a multimedia file processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the multimedia file processing apparatus 400 includes a first determination module 410, a second determination module 420, and a generation module 430.
The first determining module 410 is configured to determine a file size of the multimedia file in response to determining that the initial storage format of the multimedia file requested to be played is different from the target playing format.
The second determining module 420 is configured to determine file content according to the file size.
The generating module 430 is configured to generate a processing task according to the file content, where the processing task is configured to transcode a format of the multimedia file stored in the initial storage format into a target playing format.
According to an embodiment of the disclosure, the second determination module comprises a first determination unit.
And a first determining unit for determining binary byte stream information of the multimedia file as file content in response to determining that the file size is less than or equal to a first preset threshold.
According to an embodiment of the disclosure, the multimedia file processing apparatus further includes a first acquisition module and a first transmission module.
The first acquisition module is used for responding to the successful execution of the processing task and acquiring the processed target binary byte stream information, wherein the format of the target binary byte stream information is a target playing format.
And the first sending module is used for sending the target binary byte stream information to a player requesting to play the multimedia file.
According to an embodiment of the present disclosure, the second determination module includes a second determination unit and a third determination unit.
And a second determining unit, configured to determine a storage address of the multimedia file in response to determining that the file size is greater than a second preset threshold.
And a third determining unit for determining the storage address as the file content.
According to an embodiment of the disclosure, the multimedia file processing apparatus further includes a second acquisition module, a third acquisition module, and a second transmission module.
And the second acquisition module is used for acquiring the target storage address of the target multimedia file obtained by processing in response to the successful execution of the processing task, wherein the format of the target multimedia file is a target playing format.
And the third acquisition module is used for acquiring the target multimedia file based on the target storage address.
And the second sending module is used for sending the target multimedia file to a player requesting to play the multimedia file.
According to an embodiment of the disclosure, the multimedia file processing apparatus further includes a fourth acquisition module, an analysis module, and a third determination module.
And the fourth acquisition module is used for responding to the received multimedia file playing request initiated by the user based on the player, and acquiring the hypertext transfer protocol information of the multimedia file playing request, wherein the hypertext transfer protocol information comprises first parameter information representing the playing format of the player.
And the analysis module is used for analyzing the hypertext transfer protocol information to obtain first parameter information.
And the third determining module is used for determining a target playing format according to the first parameter information.
According to an embodiment of the present disclosure, the hypertext transfer protocol information further includes a user identification of the user. The generation module includes a fourth determination unit and a generation unit.
And a fourth determining unit, configured to determine, according to the file size, a target processing interface to be invoked in response to determining that the user identifier has processing rights for the multimedia file.
And the generating unit is used for generating processing tasks according to file contents and at least one of the target processing interface and the hypertext transfer protocol information.
According to an embodiment of the present disclosure, the hypertext transfer protocol information further includes second parameter information characterizing a transcoding mode as hardware transcoding.
According to an embodiment of the present disclosure, the multimedia file processing apparatus further includes a transcoding module.
And the transcoding module is used for transcoding the format of the multimedia file stored in the initial storage format into a target playing format based on a hardware transcoding mode in response to determining that the processing task is started.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the multimedia file processing method of the present disclosure.
According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the multimedia file processing method of the present disclosure.
According to an embodiment of the present disclosure, a computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, the computer program implementing the multimedia file processing method of the present disclosure when executed by a processor.
Fig. 5 illustrates a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The various components in the device 500 are connected to an input/output (I/O) interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the respective methods and processes described above, for example, a multimedia file processing method. For example, in some embodiments, the multimedia file processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When a computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the multimedia file processing method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the multimedia file processing method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs being executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (21)

1. A multimedia file processing method, comprising:
determining a file size of the multimedia file in response to determining that an initial storage format of the multimedia file requested to be played is different from a target play format;
determining file content according to the file size; and
and generating a processing task according to the file content, wherein the processing task is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format.
2. The method of claim 1, wherein the determining file content from the file size comprises:
in response to determining that the file size is less than or equal to a first preset threshold, binary byte stream information of the multimedia file is determined as the file content.
3. The method of claim 2, further comprising:
in response to determining that the processing task is successfully executed, acquiring target binary byte stream information obtained by processing, wherein the format of the target binary byte stream information is the target playing format; and
and sending the target binary byte stream information to a player requesting to play the multimedia file.
4. The method of claim 1, wherein the determining file content from the file size comprises:
determining a storage address of the multimedia file in response to determining that the file size is greater than a second preset threshold; and
and determining the storage address as the file content.
5. The method of claim 4, further comprising:
in response to determining that the processing task is successfully executed, acquiring a target storage address of a target multimedia file obtained through processing, wherein the format of the target multimedia file is the target playing format;
Acquiring the target multimedia file based on the target storage address; and
and sending the target multimedia file to a player requesting to play the multimedia file.
6. The method of any of claims 1-5, further comprising:
responding to a received multimedia file playing request initiated by a user based on a player, and acquiring hypertext transfer protocol information of the multimedia file playing request, wherein the hypertext transfer protocol information comprises first parameter information representing a playing format of the player;
analyzing the hypertext transfer protocol information to obtain the first parameter information; and
and determining the target playing format according to the first parameter information.
7. The method of claim 6, wherein the hypertext transfer protocol information further includes a user identification of the user; the generating processing tasks according to the file content comprises the following steps:
determining a target processing interface to be called according to the file size in response to determining that the user identification has processing rights for the multimedia file; and
and generating the processing task according to the file content and at least one of the target processing interface and the hypertext transfer protocol information.
8. The method according to claim 6 or 7, wherein the hypertext transfer protocol information further comprises second parameter information characterizing a transcoding mode as hardware transcoding.
9. The method of claim 8, further comprising:
in response to determining that execution of the processing task has begun, transcoding the format of the multimedia file stored in the initial storage format to the target play format based on a manner of hardware transcoding.
10. A multimedia file processing apparatus comprising:
the first determining module is used for determining the file size of the multimedia file in response to the fact that the initial storage format of the multimedia file requested to be played is different from the target playing format;
the second determining module is used for determining file content according to the file size; and
and the generating module is used for generating a processing task according to the file content, wherein the processing task is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format.
11. The apparatus of claim 10, wherein the second determination module comprises:
and the first determining unit is used for determining binary byte stream information of the multimedia file as the file content in response to determining that the file size is smaller than or equal to a first preset threshold value.
12. The apparatus of claim 11, further comprising:
the first acquisition module is used for responding to the successful execution of the processing task and acquiring the processed target binary byte stream information, wherein the format of the target binary byte stream information is the target playing format; and
and the first sending module is used for sending the target binary byte stream information to a player requesting to play the multimedia file.
13. The apparatus of claim 10, wherein the second determination module comprises:
a second determining unit, configured to determine a storage address of the multimedia file in response to determining that the file size is greater than a second preset threshold; and
and a third determining unit configured to determine the storage address as the file content.
14. The apparatus of claim 13, further comprising:
the second acquisition module is used for responding to the determination that the processing task is successfully executed, and acquiring a target storage address of a target multimedia file obtained through processing, wherein the format of the target multimedia file is the target playing format;
the third acquisition module is used for acquiring the target multimedia file based on the target storage address; and
And the second sending module is used for sending the target multimedia file to a player which requests to play the multimedia file.
15. The apparatus of any of claims 10-14, further comprising:
a fourth obtaining module, configured to obtain, in response to receiving a multimedia file playing request initiated by a user based on a player, hypertext transfer protocol information of the multimedia file playing request, where the hypertext transfer protocol information includes first parameter information characterizing a playing format of the player;
the analysis module is used for analyzing the hypertext transfer protocol information to obtain the first parameter information; and
and the third determining module is used for determining the target playing format according to the first parameter information.
16. The apparatus of claim 15, wherein the hypertext transfer protocol information further comprises a user identification of the user; the generation module comprises:
a fourth determining unit, configured to determine, in response to determining that the user identifier has processing rights for the multimedia file, a target processing interface to be invoked according to the file size; and
and the generating unit is used for generating the processing task according to the file content and at least one of the target processing interface and the hypertext transfer protocol information.
17. The apparatus according to claim 15 or 16, wherein the hypertext transfer protocol information further comprises second parameter information characterizing a transcoding mode as hardware transcoding.
18. The apparatus of claim 17, further comprising:
and the transcoding module is used for transcoding the format of the multimedia file stored in the initial storage format into the target playing format based on a hardware transcoding mode in response to determining that the processing task is started to be executed.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-9.
21. A computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, which, when executed by a processor, implements the method according to any one of claims 1-9.
CN202310271960.0A 2023-03-16 2023-03-16 Multimedia file processing method and device, electronic equipment and storage medium Pending CN116320616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310271960.0A CN116320616A (en) 2023-03-16 2023-03-16 Multimedia file processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310271960.0A CN116320616A (en) 2023-03-16 2023-03-16 Multimedia file processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116320616A true CN116320616A (en) 2023-06-23

Family

ID=86779317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310271960.0A Pending CN116320616A (en) 2023-03-16 2023-03-16 Multimedia file processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116320616A (en)

Similar Documents

Publication Publication Date Title
CN108174248B (en) Video playing method, video playing control device and storage medium
CN108965907B (en) Method, device and system for playing video
CN109068153B (en) Video playing method and device and computer readable storage medium
JP2011018314A (en) Method, system and computer program for sharing web page
US9686506B2 (en) Method, apparatus, system, and storage medium for video call and video call control
CN111586164B (en) Sharing, succession and information processing method of remote cloud desktop and electronic equipment
KR102232900B1 (en) System for cloud streaming service, method of cloud streaming service using optumal gpu and apparatus for the same
WO2021082299A1 (en) Video playback method and device
CN111756847B (en) Method and device for supporting https protocol by website
EP3267331A1 (en) Method and apparatus for cloud streaming service
WO2019128357A1 (en) Picture requesting method, method for responding to picture request, and client
WO2020125381A1 (en) Method and apparatus for generating information
CN111093094A (en) Video transcoding method, device and system, electronic equipment and readable storage medium
WO2022110943A1 (en) Speech preview method and apparatus
CN104349177A (en) Method for turning to play multimedia file under desktop cloud, virtual machine and system
WO2020078050A1 (en) Comment information processing method and apparatus, and server, terminal and readable medium
WO2022142568A1 (en) Method and device for content displaying
CN114245175A (en) Video transcoding method and device, electronic equipment and storage medium
CN110113298A (en) Data transmission method, device, signal server and computer-readable medium
AU2018403361B2 (en) Data transmission
WO2023029846A1 (en) Multimedia resource uploading method and apparatus, electronic device, and readable storage medium
KR20140102838A (en) An apparatus for presenting cloud streaming services, a method thereof and a system thereof
CN114071190B (en) Cloud application video stream processing method, related device and computer program product
WO2022213801A1 (en) Video processing method, apparatus, and device
CN116320616A (en) Multimedia file processing method and device, electronic equipment and storage medium

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