Nothing Special   »   [go: up one dir, main page]

CN109995743B - Multimedia file processing method and terminal - Google Patents

Multimedia file processing method and terminal Download PDF

Info

Publication number
CN109995743B
CN109995743B CN201810002941.7A CN201810002941A CN109995743B CN 109995743 B CN109995743 B CN 109995743B CN 201810002941 A CN201810002941 A CN 201810002941A CN 109995743 B CN109995743 B CN 109995743B
Authority
CN
China
Prior art keywords
address
original
fragment
multimedia
file
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.)
Active
Application number
CN201810002941.7A
Other languages
Chinese (zh)
Other versions
CN109995743A (en
Inventor
翁名为
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810002941.7A priority Critical patent/CN109995743B/en
Publication of CN109995743A publication Critical patent/CN109995743A/en
Application granted granted Critical
Publication of CN109995743B publication Critical patent/CN109995743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1045Proxies, e.g. for session initiation protocol [SIP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/764Media network packet handling at the destination 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • 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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream 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 or rendering scenes according to encoded video stream 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses a multimedia file processing method and a terminal, which are used for playing a multimedia file which cannot be identified by a player by the terminal. The embodiment of the invention provides a method for processing a multimedia file, which comprises the following steps: acquiring play source information, wherein the play source information comprises: at least one original index address; mapping at least one original index address according to a local address of the terminal to obtain at least one original playing address; carrying out inverse mapping processing on a first playing address requested by the player to obtain a first index address, wherein the first playing address is a playing address in at least one original playing address; acquiring a first multimedia fragment file corresponding to the first index address; performing encapsulation conversion processing on the first multimedia fragment file to obtain a first fragment encapsulation file; and playing the first fragment package file through the player.

Description

Multimedia file processing method and terminal
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a terminal for processing a multimedia file.
Background
The mobile terminal runs through an Operating System (OS), for example, a System version of iOS (english name: iPhone OS)11 may be installed on the mobile terminal, a Video player based on the System version of iOS11 may also be referred to as an iOS11 player, an iOS11 player is mainly used for an audio/Video service of a terminal of the iOS System, and an iOS11 player plays a Video stream using a High Efficiency Video Coding (HEVC) -based protocol.
Currently, the iOS11 player cannot play video streams encapsulated in formats other than the hvc1 and fMP4 (english name: fragmented mp4) formats of HEVC coding. In practical applications, because terminals compatible with operating systems such as Android (Android) need to be considered, terminals based on the HEVC protocol also have various other format packages, such as hev1 and Moving Picture Experts Group-Transport Stream (MPEG-TS), so that the iOS11 player cannot play these video streams.
In order to enable the iOS11 player to support video streams with multiple encoding formats, the following technical solutions are mainly adopted in the prior art: and the video server terminal forwards a video format meeting the requirements of the iOS11 player in advance, stores the video code stream after format conversion, and sends the video code stream to the terminal when the terminal makes a playing request.
The prior art solution has at least the following technical problems: the video server may need to perform format conversion processing on a large number of video code streams, which needs to occupy a large number of processing resources of the video server, and the video code streams after format conversion also need to be stored on the video server, which also occupies a storage space of the video server.
Disclosure of Invention
The embodiment of the invention provides a multimedia file processing method and a terminal, which are used for playing a multimedia file which cannot be identified by a player by the terminal.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for processing a multimedia file, including:
the terminal acquires play source information, wherein the play source information comprises: at least one original index address;
the terminal carries out mapping processing on the at least one original index address according to a local address of the terminal to obtain at least one original playing address;
the terminal performs inverse mapping processing on a first playing address requested by a player to obtain a first index address, wherein the first playing address is a playing address in the at least one original playing address;
the terminal acquires a first multimedia fragment file corresponding to the first index address;
the terminal performs encapsulation conversion processing on the first multimedia fragment file to obtain a first fragment encapsulation file;
and the terminal plays the first fragment encapsulation file through the player.
In a second aspect, an embodiment of the present invention further provides a terminal, including:
a broadcast source obtaining module, configured to obtain broadcast source information, where the broadcast source information includes: at least one original index address;
the mapping module is used for mapping the at least one original index address according to the local address of the terminal to obtain at least one original playing address;
the reverse mapping module is used for performing reverse mapping processing on a first playing address requested by the player to obtain a first index address, wherein the first playing address is a playing address in the at least one original playing address;
the fragment file acquisition module is used for acquiring a first multimedia fragment file corresponding to the first index address;
the package conversion module is used for performing package conversion processing on the first multimedia fragment file to obtain a first fragment package file;
and the playing module is used for playing the first fragment encapsulation file through the player.
In a third aspect, the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
In a fourth aspect, embodiments of the present invention provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspects.
In a fifth aspect, an embodiment of the present invention further provides a communication apparatus, where the communication apparatus may include an entity such as a terminal device or a chip, and the communication apparatus includes: a processor, a memory; the memory is to store instructions; the processor is configured to execute the instructions in the memory to cause the communication device to perform the method of any of the preceding aspects.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the present invention, after the playing source information is obtained, mapping processing may be performed on at least one original index address according to a local address of the terminal to obtain at least one original playing address, then inverse mapping processing may be performed on a first playing address requested by the player to obtain a first index address, a first multimedia fragment file corresponding to the first index address is obtained, a first multimedia fragment file is subjected to encapsulation processing to obtain a first fragment encapsulation file, and finally the first fragment encapsulation file may be played by the player. In the embodiment of the invention, the original index address can be mapped into the original playing address, the original playing address is related to the local address of the terminal, the player can request the fragment file to be played based on the original playing address, for example, the player can request the first playing address, so that the terminal can download the first multimedia fragment file, and can play the first fragment encapsulated file after the conversion encapsulation processing, therefore, the terminal can play the multimedia file which cannot be identified by the player, the file format conversion of the multimedia server is avoided, the multimedia server can also be prevented from storing the multimedia fragment files with various converted formats, and the load of the multimedia server is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings.
Fig. 1 is a schematic diagram of a system architecture to which a method for processing a multimedia file according to an embodiment of the present invention is applied;
fig. 2 is a schematic diagram of another system architecture to which the method for processing a multimedia file according to the embodiment of the present invention is applied;
fig. 3 is a schematic flowchart illustrating a method for processing a multimedia file according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a connection structure between a proxy component in a terminal and a video server, a transcoding-packaging module, and a player according to an embodiment of the present invention;
fig. 5-a is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 5-b is a schematic structural diagram of a mapping module according to an embodiment of the present invention;
fig. 5-c is a schematic diagram of a composition structure of a play address generation module according to an embodiment of the present invention;
fig. 5-d is a schematic diagram of a composition structure of another terminal according to an embodiment of the present invention;
fig. 5-e is a schematic structural diagram of another terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a composition of a terminal to which the method for processing a multimedia file according to the embodiment of the present invention is applied.
Detailed Description
The embodiment of the invention provides a multimedia file processing method and a terminal, which are used for playing a multimedia file which cannot be identified by a player by the terminal.
In order to make the features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one skilled in the art from the embodiments given herein are intended to be within the scope of the invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The following are detailed below.
Fig. 1 is a schematic diagram of a system architecture applied by the method for processing a multimedia file according to an embodiment of the present invention. The system architecture can comprise a terminal and a multimedia server, and the multimedia server can be specifically a streaming media server or a video server. The multimedia server stores multimedia files, which may be audio files or video files. The multimedia file stored in the multimedia server may specifically be in a plurality of different file formats, and specifically, the multimedia server selects the file format of the stored multimedia file according to the application scenario, where the file format may be a file format that some players can recognize, or a file format that some players cannot recognize, and is not limited herein. Specifically, the multimedia file stored by the multimedia server may be a plurality of multimedia fragment files, and the plurality of media fragment files may be in a standard file format or a non-standard file format, where the standard file format may be flexibly determined in different application scenarios. Taking a multimedia server, specifically a video server as an example, the video code stream stored by the video server and packaged by adopting hvc1 and fMP4 formats is in a standard file format, and the video code stream packaged by adopting hev1 and MPEG-TS formats is in a non-standard file format.
In the terminal shown in fig. 1, the terminal may include: the multimedia server comprises an agent component, a trans-encapsulation module and a player, wherein the agent component can be called as a local agent component, the agent component can be respectively connected with the trans-encapsulation module and the player, and the interaction between the terminal and the multimedia server can be realized through the interaction between the agent component and the multimedia server. The proxy component in the terminal can execute the multimedia file processing method provided by the embodiment of the invention. As shown in fig. 2, for another system architecture diagram applied by the method for processing a multimedia file according to the embodiment of the present invention, the terminal may include: the multimedia server comprises a local proxy server, a local proxy client, a trans-encapsulation module and a player, wherein the local proxy server can be respectively connected with the trans-encapsulation module, the player and the local client, and the interaction between the terminal and the multimedia server can be realized through the interaction between the local proxy client and the multimedia server. The local proxy server and the local proxy client in the terminal can execute the processing method of the multimedia file provided by the embodiment of the invention.
The embodiment of the method for processing the multimedia file can be particularly applied to a scene that the terminal uses the player to play the multimedia file, the player of the terminal can support the playing of the non-standard multimedia file, and the expandability is provided for the requirement that the player plays other non-standard audio and video formats. The multimedia server in the embodiment of the invention does not need to convert files, thereby reducing the load on the multimedia server.
Referring to fig. 3, a method for processing a multimedia file according to an embodiment of the present invention includes the following steps:
301. the terminal acquires play source information, wherein the play source information comprises: at least one original index address.
In this embodiment of the present invention, a terminal first obtains play source information, for example, a user triggers a video play command on a display interface of a player, and the terminal may detect the play source information that the player needs to play, where the play source information includes: at least one original index address. Wherein, the original index address is a storage address of the multimedia server for storing the multimedia original file. For example, the original index address may be an index file of a multimedia original file, for example, the index file may be an M3U file, wherein the M3U file is not a multimedia file per se, it is a list file of multimedia files, and it is a plain text file. The terminal opens the M3U file after downloading it, and the player does not play the M3U file, but finds the network address according to the record of the M3U file for online playing. The M3U file simply stores a multimedia playlist, provides an index to multimedia files at other locations, and the M3U file can view the address of the pointed file and the attributes of the file to select the appropriate player to play the multimedia file.
In some embodiments of the present invention, after the terminal acquires the play source information in step 301, the method for processing a multimedia file according to the embodiments of the present invention may further include the following steps:
the terminal detects whether the format of the fragment file requested to be played by the original index address can be correctly identified by the player;
when the format of the fragment file requested to be played by the original index address cannot be correctly identified by the player, the following step 302 is triggered to be executed: and the terminal carries out mapping processing on at least one original index address according to the local address of the terminal to obtain at least one original playing address.
After the terminal acquires the original index address, the terminal may detect the format of the fragmented file requested to be played by the original index address, for example, the terminal may use a video information detection tool to complete format detection of the fragmented file, the video information detection tool may be mediainfo, ffprobe, or the like, but not limited to, a multimedia file format detection module may be further disposed in the terminal, and format detection of the fragmented file may also be completed by the multimedia file format detection module. The terminal judges whether the format of the fragment file requested to be played by the original index address can be correctly identified by the player or not, wherein correct identification means that the player in the terminal can correctly decode the fragment file and successfully play the fragment file, and if the player cannot identify the format of the fragment file, the player identification fails. For example, a fragment file format that can be correctly identified by the player is defined as a standard file format, and if the fragment file format requested to be played by the original index address is the standard file format, the player may play the fragment file requested by the original index address. When the format of the fragment file requested to be played by the original index address cannot be correctly identified by the player, step 302 may be triggered to be executed, otherwise, the fragment file is directly downloaded from the multimedia server.
302. And the terminal carries out mapping processing on at least one original index address according to the local address of the terminal to obtain at least one original playing address.
In the embodiment of the present invention, after the terminal acquires the at least one original index address, the terminal may perform mapping processing on the at least one original index address according to the local address of the terminal, that is, the terminal performs address translation on the original index address, the address translation is implemented according to the local address of the terminal, and the at least one original playing address may be obtained by address mapping on the original index address. The original index address can be converted into an original broadcast address through step 302, and the original broadcast address is mapped by the local address of the terminal, so that at least one original index address obtained in step 301 can be mapped into at least one original broadcast address. When the multimedia file format corresponding to the original index address cannot be identified by the terminal player, if the terminal player uses the original index file to send a request to the multimedia server, the multimedia server may respond according to the request, and the multimedia server returns a multimedia file segment to the terminal player, but the player cannot analyze or decode, so that the playing cannot be performed. That is, the multimedia file can be downloaded but cannot be recognized to be played. However, by mapping the original index address according to the local address of the terminal in the embodiment of the present invention, the generated original playing address can be used for the player to request to play the multimedia file.
In some embodiments of the present invention, step 102, the mapping, by the terminal, of the at least one original index address according to the local address of the terminal to obtain the at least one original broadcast address includes:
the terminal modifies the base address of at least one original index address into the local address of the terminal to obtain the original index address after the base address modification;
the terminal acquires a multimedia original fragment address according to the original index address;
the terminal carries out mapping processing on the multimedia original fragment address according to a file format which can be identified by the player to obtain a mapped multimedia original fragment address;
and the terminal generates at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address.
The base address of the original index address refers to the same address field in each storage address when the multimedia server stores a plurality of multimedia original fragment files, for example, a certain original index address is http:// v.xx.com/play.m3u8, wherein the base address of the original index address may be v.xx.com. Assuming that the local address of the terminal is 127.0.0.1, the base address of the original index address may be modified to be 127.0.0.1, and the original index address after the base address modification may be http:// 127.0.0.1/play.m3u8.
After the terminal modifies the base address of the original index address, the terminal acquires a multimedia original fragment address according to the original index address, wherein the multimedia original fragment address is a storage address of a multimedia server for storing a multimedia original fragment file. The terminal can send an address request to the multimedia server according to the original index address, and the multimedia server can return a multimedia original fragment address to the terminal. For example, the multimedia original fragment address acquired by the terminal may be: # EXTINF:10,0. ts; # EXTINF:10,1. ts; 10 and 2.ts, wherein 0.ts, 1.ts and 2.ts refer to the storage addresses of three multimedia original fragment files. The terminal may then perform mapping processing on the multimedia original fragment address according to a file format that can be recognized by the player, for example, as follows, the file format that can be recognized by the player is fmp4, and the multimedia original fragment address may be: # EXTINF:10,0. ts; # EXTINF:10,1. ts; and # EXTINF:10,2.ts, the mapped multimedia original fragment address obtained by mapping is as follows: # EXTINF:10,0.fmp 4; # EXTINF:10,1.fmp 4; # EXTINF:10,2.fmp 4. And finally, the terminal can generate at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address, wherein the base address of the original index address is modified into the local address of the terminal, and the at least one original playing address can be obtained by address splicing of the local address and the mapped multimedia original fragment address.
Next, further exemplifying the generation manner of the original playing address, the terminal generates at least one original playing address according to the original index address modified by the base address and the mapped fragment address, including:
when the multimedia original fragment address is the multimedia original fragment relative address, the terminal carries out address splicing on the base address modified by the original index address and the multimedia original fragment relative address to obtain a multimedia original fragment absolute address;
and the terminal carries out mapping processing on the multimedia original fragment absolute address according to the preset index identifier and the port number of the terminal to obtain at least one original playing address.
The multimedia original fragment address may have two addresses: if the multimedia original fragment address is the multimedia original fragment absolute address, the terminal can map the multimedia original fragment absolute address according to a preset index identifier and a port number of the terminal to obtain at least one original playing address. When the multimedia original fragment address is the multimedia original fragment relative address, the terminal needs to convert the multimedia original fragment relative address to obtain the multimedia original fragment absolute address. For example, the relative addresses are as follows: 10,0.ts, address splicing is carried out on the base address after the original index address is modified and the relative address of the multimedia original fragment, and the obtained absolute address is as follows: # EXTINF:10, http:// v.xx.com/video/0. ts.
Further, in some embodiments of the present invention, the mapping processing, performed by the terminal, on the multimedia original fragment absolute address according to the preset index identifier and the port number of the terminal includes:
adding a port number of the terminal in the multimedia original fragment absolute address by the terminal to obtain the multimedia original fragment absolute address added with the port number;
and the terminal adds an index identifier in the multimedia original fragment absolute address added with the port number, and takes the multimedia original fragment absolute address added with the index identifier as at least one original playing address.
The terminal can map the absolute address of the multimedia original fragment, for example, a unique index identifier is allocated to each absolute address of the multimedia original fragment, for example, the index identifier is m3u8id, the index identifiers can be sequentially and incrementally allocated, if the absolute address of the multimedia original fragment is http:// v.xx.com/video/play.m3u8, and the allocated index identifier is 0, the mapped absolute address of the multimedia original fragment is http:// ip address: port number/m 3u8id/play.m3u8, and the mapped address is http:// 127.0.1: 12345/0/play.m3u8, where the address is the original play address set for the player.
In some embodiments of the present invention, after the step 302 of the terminal mapping at least one original index address according to the local address of the terminal to obtain at least one original playing address, the method for processing a multimedia file according to the embodiment of the present invention further includes:
and the terminal establishes an address mapping table according to the original index address and the original playing address.
In order to facilitate the terminal to perform mapping and inverse mapping, the terminal may establish an address mapping table after the address mapping is completed, where the address mapping table records a corresponding relationship between an original index address and an original broadcast address, and the address mapping table established by the terminal may be stored in a memory of the terminal, so that the terminal can call the address mapping table in real time.
303. The terminal performs inverse mapping processing on a first playing address requested by the player to obtain a first index address, wherein the first playing address is a playing address in at least one original playing address.
In this embodiment of the present invention, through the foregoing steps 301 and 302, the terminal may map at least one original index address to at least one original playing address, and when the player needs to play a multimedia file, the original playing address may be carried in a request sent by the player, for example, an agent component in the terminal may receive a playing request sent by the player, or a local agent server in the terminal may receive a playing request sent by the player, where the playing request may carry a first playing address, and the first playing address is a playing address in the at least one original playing address obtained in step 302, where the first playing address is an original playing address corresponding to a multimedia fragment file that needs to be played and requested by the player, and since the original playing address is an address obtained by mapping the original index address according to the local address by the terminal, when the player sends a request of a first play address, the terminal may obtain the first play address, so that the terminal performs inverse mapping processing on the first play address, where the inverse mapping processing in step 303 and the mapping processing in step 302 are two opposite address conversion manners, and the first play address may be converted into a first index address through the inverse mapping processing, where the first index address is one or more original index addresses of at least one original index address in step 301. In the embodiment of the present invention, the first play address requested by the player by the terminal is converted into the first index address, so that the terminal interacts with the multimedia server based on the first index address, which is described in the following step 304.
In the implementation scenario of establishing the address mapping table by the terminal, the step 303 of performing inverse mapping processing on the first play address requested by the player by the terminal to obtain the first index address includes:
the terminal uses the first playing address to inquire the address mapping table to obtain a first index address.
The address mapping table records the corresponding relationship between the original index address and the original playing address, after the terminal acquires the first playing address requested by the player, the terminal can use the first playing address to query the address mapping table, the searched first index address can be output through the address mapping table, and the terminal can quickly obtain the first index address through the table lookup mode.
304. And the terminal acquires a first multimedia fragment file corresponding to the first index address.
In this embodiment of the present invention, after the terminal generates the first index address in step 303, the terminal may obtain the first multimedia fragment file, for example, the terminal may obtain the first multimedia fragment file from a multimedia file database. For another example, the terminal may further send a fragment downloading request to the multimedia server, where the fragment downloading request includes a first index address, the multimedia server does not need to perform format conversion processing on the multimedia fragment file, the multimedia server searches for a first multimedia fragment file stored in the multimedia server according to the first index address, the multimedia server sends the first searched multimedia fragment file to the terminal, and the terminal receives the first multimedia fragment file returned by the multimedia server according to the first index address.
305. And the terminal performs encapsulation conversion processing on the first multimedia fragment file to obtain a first fragment encapsulation file.
In the embodiment of the present invention, after the terminal acquires the first multimedia fragment file, the terminal may further perform a transform encapsulation process on the first multimedia fragment file, for example, the terminal may use a transcoding transform encapsulation tool to complete transform encapsulation of the fragment file, where the transcoding transform encapsulation tool may be ffmpeg, mp4box, and the like, and without limitation, the terminal may further include a transform encapsulation module, and the transform encapsulation module may also complete transform encapsulation of the first multimedia fragment file, so that the first multimedia fragment file may be converted into a file format whose format meets the player requirement, and the obtained first fragment encapsulation file may be used for playing by the player.
In some embodiments of the present invention, the step 305 terminal performs decapsulation processing on the first multimedia fragment file, including:
the terminal carries out transcoding processing on the first multimedia fragment file to obtain the transcoded first multimedia fragment file;
and the terminal performs the trans-encapsulation processing on the trans-coded first multimedia fragment file to obtain a first fragment encapsulation file.
Before the terminal performs the transcoding process, the terminal may also perform transcoding process on the first multimedia fragment file, for example, the first multimedia fragment file is a non-standard HEVC fragment file, and the first multimedia fragment file may be converted into a standard HEVC fragment file through the transcoding process. For example, the terminal may use a transcoding and encapsulating tool, which may be ffmpeg, mp4box, or the like, to complete transcoding of the sliced file.
306. And the terminal plays the first fragment package file through the player.
In the embodiment of the present invention, the terminal generates the first fragment encapsulation file through the trans-encapsulation processing, the terminal can use a player configured in the terminal to play the first fragment encapsulation file, and the user can browse the multimedia file through the player of the terminal.
As can be seen from the above description of the embodiments of the present invention, after the playing source information is obtained, mapping processing may be performed on at least one original index address according to a local address of the terminal to obtain at least one original playing address, then inverse mapping processing may be performed on a first playing address requested by the player to obtain a first index address, a first multimedia fragment file corresponding to the first index address is obtained, a first multimedia fragment file is subjected to transform encapsulation processing to obtain a first fragment encapsulation file, and finally the first fragment encapsulation file may be played by the player. In the embodiment of the invention, the original index address can be mapped into the original playing address, the original playing address is related to the local address of the terminal, the player can request the fragment file to be played based on the original playing address, for example, the player can request the first playing address, so that the terminal can download the first multimedia fragment file, and can play the first fragment encapsulated file after the conversion encapsulation processing, therefore, the terminal can play the multimedia file which cannot be identified by the player, the file format conversion of the multimedia server is avoided, the multimedia server can also be prevented from storing the multimedia fragment files with various converted formats, and the load of the multimedia server is reduced.
In order to better understand and implement the above-mentioned schemes of the embodiments of the present invention, the following description specifically illustrates corresponding application scenarios.
Then, the terminal comprises: the proxy component and the player are exemplified, and the multimedia server is specifically a video server. Fig. 4 is a schematic diagram illustrating a connection structure between a proxy component in a terminal and a video server, a transcoding-packaging module, and a player according to an embodiment of the present invention. The terminal can enable a player of the terminal to support playing of a non-standard video distribution file based on the HLS technology of the HEVC protocol through a method of combining a proxy component with transcoding-packaging. The terminal in the embodiment of the invention can execute the task of transcoding to encapsulation, can reduce the processing load of the video server, and provides expandability for the requirement that a player in the terminal plays other non-standard audio and video formats.
The embodiment of the present invention may be applied to a video client of an iOS11 terminal, for example, a video iOS client is transparent to a user, and when the client detects that a video source to be played is a non-standard video slicing file based on the HEVC protocol HLS technology, the technical solution provided by the embodiment of the present invention may be used, which is described in the following. The video server serves as a background and can provide a video fragment file, the video fragment file based on the HLS technology of the HEVC protocol must be issued, and no special requirement is imposed on the packaging format. The terminal serves as a front end and can provide play support for the player, for example, the terminal may be an iOS client, and the processing flow executed by the terminal is as follows:
step 1, a terminal acquires a video playing source, for example, the terminal acquires the playing source from a video server.
And 2, the terminal acquires the original index address through a video information detection tool (such as mediainfo and ffprobe) and judges whether the original index address is in the standard HEVC HLS format.
Step 3, if the original index address is in the standard HEVC HLS format, a player in the terminal can be called to play, the process is ended, and otherwise, the step 4 is executed;
and 4, the terminal starts the proxy component to map the HLS address.
For example, the HLS address that the proxy component can obtain is: http:// v.xx.com/play.m3u8, the proxy component maps the address through the HLS according to the local address of the terminal, for example, the local address of the terminal is 127.0.0.1, and the mapped address is: http://127.0.0.1/task 1/play.m3u8.
Next, the request logic of the player in the terminal for the HLS address is illustrated, taking the original index address as the m3u8 address specifically, for example, the m3u8 address is http:// v.xx.com/video/play.m3u8, the address is obtained by the terminal from the video server, the terminal obtains the content of the m3u8 address, the fragment address of the multimedia original fragment file in m3u8 may have two addresses, one is a relative address, and the other is an absolute address, for example, as follows:
the relative addresses are:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
0.ts
#EXTINF:10,
1.ts
#EXTINF:10,
2.ts
#EXT-X-ENDLIST。
the absolute address is:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
http://v.xx.com/play/0.ts
#EXTINF:10,
http://v.xx.com/play/1.ts
#EXTINF:10,
http://v.xx.com/play/2.ts
#EXT-X-ENDLIST。
it should be noted that if the fragment address is a relative address, address splicing is required, and a base address of the m3u8 address is taken to be spliced with the relative address of the multimedia fragment file to form an absolute address, for example, the base address of the m3u8 address is http:// v.xx.com/video/, and the content of m3u8 may be:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
http://v.xx.com/video/0.ts
#EXTINF:10,
http://v.xx.com/video/1.ts
#EXTINF:10,
http://v.xx.com/video/2.ts
#EXT-X-ENDLIST。
after the terminal obtains the absolute address of each multimedia fragment file, the player sequentially requests the absolute address of each multimedia fragment file during playing, and the terminal plays the multimedia fragment files after obtaining the video content.
And 5, the proxy component acquires the multimedia original fragment address from the video server and then performs fragment address mapping.
The standard file format that the player can recognize is fmp4, and the proxy component performs fragment address mapping to the mapped multimedia original fragment address. The address mapping table may be table 1 as shown below, for example.
Figure BDA0001537641350000141
To illustrate the implementation of the proxy component, the terminal first starts a proxy component, and assumes that the ip address is 127.0.0.1 and the port number is 12345. The proxy component accesses the original m3u8 address (assumed to be http:// v.xx.com/video/play.m3u8), gets the m3u8 content, and gets the absolute address of each tile, assuming the following:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
http://v.xx.com/video/0.ts
#EXTINF:10,
http://v.xx.com/video/1.ts
#EXTINF:10,
http://v.xx.com/video/2.ts
#EXT-X-ENDLIST。
then the proxy component maps the m3u8 address, and can allocate a unique index identifier to each m3u8 address, where the index identifier is m3u8id, and the index identifier can be sequentially and incrementally allocated, and if the m3u8 address is http:// v.xx.com/video/play.m3u8 and the allocated index identifier is 0, the mapped m3u8 address is http:// ip address: port number/m 3u8id/play.m3u8, in this example, the mapped address is http://127.0.0.1:12345/0/play.m3u8, which is the play address set to the player in the terminal.
And 6, the proxy component sets the mapped HLS address to a player in the terminal for playing.
And 7, the proxy component acquires a received fragment request sent by a player in the terminal, determines an original fragment address according to an address mapping table, and requests to download an original fragment file from the video server according to the original fragment address, wherein the original fragment file is a non-standard HEVC fragment.
For example, as follows, the proxy component maps the fragment addresses, and may allocate a unique index identifier to each fragment address, and assuming that the fragment addresses adopt a relative address mode, the mapped fragment addresses are: fragment id. fmp 4.
For example, the mapped m3u8(http://127.0.0.1:12345/0/play.m3u8) list contents are:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
0.fmp4
#EXTINF:10,
1.fmp4
#EXTINF:10,
2.fmp4
#EXT-X-ENDLIST。
the corresponding absolute address is:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
http://127.0.0.1:12345/0/0.fmp4
#EXTINF:10,
http://127.0.0.1:12345/0/1.fmp4
#EXTINF:10,
http://127.0.0.1:12345/0/2.fmp4
#EXT-X-ENDLIST。
the proxy component may then determine the request forwarding relationship based on the address mapping table.
When the request received by the proxy component is http://127.0.0.1:12345/0/play.m3u8, the player needs to obtain m3u8 list content, and at the moment, the proxy component directly returns the mapped m3u8 list content to the player without obtaining the list from a video server. For example, the player requests the following playing addresses:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
0.fmp4
#EXTINF:10,
1.fmp4
#EXTINF:10,
2.fmp4
#EXT-X-ENDLIST。
when the request received by the proxy component is a fragment request of http://127.0.0.1:12345/0/0.fmp4, it indicates that the player needs to acquire the video fragment file. And inquiring an address mapping table, acquiring an original video fragment address (http:// v.xx.com/video/0.ts) corresponding to the address, acquiring the original video fragment content from the video server by the proxy component, sending the original video fragment content to a transcoding-packaging module for processing, and returning the original video fragment content to the player after the transcoding-packaging module finishes processing.
It should be noted that, in the embodiment of the present invention, the player does not directly communicate with the video server and perform data transmission. But through a proxy component that is a relay layer of network requests added between the player and the video server, which may include a local proxy server (address 127.0.0.1 in general) responsible for handling player requests and a local proxy client responsible for making data requests to the video server. The player does not directly communicate with the video server, but initiates an access request to the proxy component, and the proxy component accesses the storage address of the video server according to the predetermined address mapping relation to acquire the video fragment file and then returns the video fragment file to the player for playing.
And 8, after the agent component finishes downloading the original fragment file, processing the original fragment file by a transcoding-packaging module, converting the original fragment file into a standard HEVC fragment by using ffmpeg and mp4box as transcoding-packaging modules, and returning the standard HEVC fragment to a player in the terminal.
And 9, the agent component repeats the steps 7 to 8 until the playing is finished or the user quits actively.
By way of the foregoing example, in the embodiment of the present invention, the terminal may indirectly enable the iOS11 player to support the non-standard HEVC slice file.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
To facilitate a better implementation of the above-described aspects of embodiments of the present invention, the following also provides relevant means for implementing the above-described aspects.
Referring to fig. 5-a, a terminal 500 according to an embodiment of the present invention may include: a playing source obtaining module 501, a mapping module 502, an inverse mapping module 503, a slicing file obtaining module 504, a trans-encapsulation module 505 and a playing module 506, wherein,
a playing source obtaining module 501, configured to obtain playing source information, where the playing source information includes: at least one original index address;
a mapping module 502, configured to perform mapping processing on the at least one original index address according to the local address of the terminal to obtain at least one original broadcast address;
the inverse mapping module 503 is configured to perform inverse mapping processing on a first play address requested by the player to obtain a first index address, where the first play address is a play address in the at least one original play address;
a fragment file obtaining module 504, configured to obtain a first multimedia fragment file corresponding to the first index address;
a trans-encapsulation module 505, configured to perform trans-encapsulation processing on the first multimedia fragment file to obtain a first fragment encapsulation file;
a playing module 506, configured to play the first tile package file through the player.
In some embodiments of the present invention, referring to fig. 5-b, the mapping module 502 comprises:
a base address modification module 5021, configured to modify a base address of the at least one original index address into a local address of the terminal, so as to obtain an original index address after the base address is modified;
a fragment address obtaining module 5022, configured to obtain an original multimedia fragment address according to the original index address;
the fragment address mapping module 5023 is used for mapping the multimedia original fragment address according to a file format which can be identified by the player to obtain a mapped multimedia original fragment address;
a playing address generating module 5024, configured to generate the at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address.
In some embodiments of the present invention, referring to fig. 5-c, the play address generating module 5024 comprises:
the address splicing module 50241 is used for splicing the base address modified by the original index address and the relative address of the original multimedia fragment to obtain an absolute address of the original multimedia fragment when the original multimedia fragment address is the relative address of the original multimedia fragment;
an absolute address mapping module 50242, configured to map the absolute address of the multimedia original fragment according to a preset index identifier and the port number of the terminal, so as to obtain the at least one original playing address.
In some embodiments of the present invention, the absolute address mapping module 50242 is specifically configured to add the port number of the terminal to the multimedia original fragment absolute address to obtain the multimedia original fragment absolute address to which the port number is added; and adding the index identifier in the multimedia original fragment absolute address added with the port number, and taking the multimedia original fragment absolute address added with the index identifier as the at least one original playing address.
In some embodiments of the present invention, referring to fig. 5-d, the terminal 500 further includes: a mapping table establishing module 507, wherein,
the mapping table establishing module 507 is configured to, after the mapping module 502 performs mapping processing on the at least one original index address according to a local address of a terminal to obtain at least one original broadcast address, establish an address mapping table according to the original index address and the original broadcast address;
the inverse mapping module 503 is specifically configured to query the address mapping table by using the first play address to obtain the first index address.
In some embodiments of the present invention, referring to fig. 5-e, the terminal 500 further includes: a file format detecting module 508, configured to detect whether the fragmented file format requested to be played by the original index address can be correctly identified by the player after the playing source obtaining module 501 obtains the playing source information; and when the format of the fragment file requested to be played by the original index address cannot be correctly identified by the player, triggering and executing the mapping processing module.
In some embodiments of the present invention, the transcoding and packaging module 505 is specifically configured to transcode the first multimedia fragment file to obtain a transcoded first multimedia fragment file; and performing transcoding packaging processing on the transcoded first multimedia fragment file to obtain a first fragment packaged file.
As can be seen from the above description of the embodiments of the present invention, after the playing source information is obtained, mapping processing may be performed on at least one original index address according to the local address of the terminal to obtain at least one original playing address, then inverse mapping processing may be performed on the first playing address requested by the player to obtain the first index address, a first multimedia fragment file corresponding to the first index address is obtained, a first multimedia fragment file is subjected to transform encapsulation processing to obtain a first fragment encapsulation file, and finally the first fragment encapsulation file may be played by the player. In the embodiment of the invention, the original index address can be mapped into the original playing address, the original playing address is related to the local address of the terminal, the player can request the fragment file to be played based on the original playing address, for example, the player can request the first playing address, so that the terminal can download the first multimedia fragment file, and can play the first fragment encapsulated file after the conversion encapsulation processing, therefore, the terminal can play the multimedia file which cannot be identified by the player, the file format conversion of the multimedia server is avoided, the multimedia server can also be prevented from storing the multimedia fragment files with various converted formats, and the load of the multimedia server is reduced.
As shown in fig. 6, for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiment of the present invention. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the terminal as the mobile phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present invention. Referring to fig. 6, the handset includes: radio Frequency (RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (WiFi) module 1070, processor 1080, and power source 1090. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 6:
RF circuit 1010 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for processing downlink information of a base station after receiving the downlink information to processor 1080; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1010 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 1020 can be used for storing software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1020 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1030 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also referred to as a touch screen, may collect touch operations by a user (e.g., operations by a user on or near the touch panel 1031 using any suitable object or accessory such as a finger, a stylus, etc.) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1031 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 1030 may include other input devices 1032 in addition to the touch panel 1031. In particular, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, a joystick, or the like.
The display unit 1040 may be used to display information input by a user or information provided to the user and various menus of the cellular phone. The Display unit 1040 may include a Display panel 1041, and optionally, the Display panel 1041 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1031 can cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near the touch panel 1031, the touch operation is transmitted to the processor 1080 to determine the type of the touch event, and then the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in fig. 6, the touch panel 1031 and the display panel 1041 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1041 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1060, speaker 1061, microphone 1062 may provide an audio interface between the user and the handset. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and the electrical signal is converted into a sound signal by the speaker 1061 and output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, which is then processed by the audio data output processor 1080 and then sent to, for example, another cellular phone via the RF circuit 1010, or output to the memory 1020 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1070, which provides wireless broadband internet access for the user. Although fig. 6 shows the WiFi module 1070, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1080 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the mobile phone. Optionally, processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor, which handles primarily the operating system, user interfaces, applications, etc., and a modem processor, which handles primarily the wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1080.
The handset also includes a power source 1090 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1080 via a power management system to manage charging, discharging, and power consumption via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the embodiment of the present invention, the processor 1080 included in the terminal also has a function of controlling and executing the above method flow executed by the terminal.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and may also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, the implementation of a software program is a more preferable embodiment for the present invention. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
In summary, the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the above embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the above embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for processing a multimedia file, comprising:
acquiring play source information, wherein the play source information comprises: at least one original index address;
mapping the at least one original index address according to the local address of the terminal to obtain at least one original playing address, including: modifying the base address of the at least one original index address into a local address of the terminal to obtain an original index address after the base address is modified; acquiring a multimedia original fragment address according to the original index address; mapping the multimedia original fragment address according to a file format which can be identified by a player to obtain a mapped multimedia original fragment address; generating the at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address;
performing inverse mapping processing on a first playing address requested by a player to obtain a first index address, wherein the first playing address is a playing address in the at least one original playing address;
acquiring a first multimedia fragment file corresponding to the first index address;
performing encapsulation conversion processing on the first multimedia fragment file to obtain a first fragment encapsulation file;
playing the first fragmented packet file by the player;
wherein, the generating the at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address comprises:
when the multimedia original fragment address is a multimedia original fragment relative address, address splicing is carried out on the base address modified by the original index address and the multimedia original fragment relative address to obtain a multimedia original fragment absolute address; and mapping the multimedia original fragment absolute address according to a preset index identifier and the port number of the terminal to obtain the at least one original playing address.
2. The method according to claim 1, wherein the mapping the multimedia original fragment absolute address according to a preset index identifier and a port number of the terminal includes:
adding the port number of the terminal in the multimedia original fragment absolute address to obtain the multimedia original fragment absolute address added with the port number;
and adding the index identifier in the multimedia original fragment absolute address added with the port number, and taking the multimedia original fragment absolute address added with the index identifier as the at least one original playing address.
3. The method according to claim 1, wherein after the mapping process is performed on the at least one original index address according to the local address of the terminal to obtain at least one original broadcast address, the method further comprises:
establishing an address mapping table according to the original index address and the original playing address;
the inverse mapping processing is performed on the first playing address requested by the player to obtain a first index address, and the method includes:
and querying the address mapping table by using the first playing address to obtain the first index address.
4. The method of claim 1, wherein after obtaining the playback source information, the method further comprises:
detecting whether the format of the fragment file requested to be played by the original index address can be correctly identified by the player;
when the format of the fragment file requested to be played by the original index address cannot be correctly identified by the player, triggering and executing the following steps: and mapping the at least one original index address according to the local address of the terminal to obtain at least one original playing address.
5. The method according to any one of claims 1 to 4, wherein said performing a decapsulation process on the first multimedia slicing file comprises:
transcoding the first multimedia fragment file to obtain a transcoded first multimedia fragment file;
and performing transcoding packaging processing on the transcoded first multimedia fragment file to obtain a first fragment packaged file.
6. A terminal, comprising:
a broadcast source obtaining module, configured to obtain broadcast source information, where the broadcast source information includes: at least one original index address;
the mapping module is used for mapping the at least one original index address according to the local address of the terminal to obtain at least one original playing address;
the reverse mapping module is used for performing reverse mapping processing on a first playing address requested by the player to obtain a first index address, wherein the first playing address is a playing address in the at least one original playing address;
the fragment file acquisition module is used for acquiring a first multimedia fragment file corresponding to the first index address;
the package conversion module is used for performing package conversion processing on the first multimedia fragment file to obtain a first fragment package file;
a playing module, configured to play the first fragmented encapsulated file through the player;
the mapping module includes:
a base address modification module, configured to modify a base address of the at least one original index address into a local address of the terminal, so as to obtain an original index address after the base address is modified;
the fragment address acquisition module is used for acquiring a multimedia original fragment address according to the original index address;
the fragment address mapping module is used for mapping the multimedia original fragment address according to a file format which can be identified by the player to obtain a mapped multimedia original fragment address;
a playing address generating module, configured to generate the at least one original playing address according to the original index address modified by the base address and the mapped multimedia original fragment address;
the play address generation module includes:
the address splicing module is used for splicing the base address modified by the original index address and the multimedia original fragment relative address to obtain a multimedia original fragment absolute address when the multimedia original fragment address is the multimedia original fragment relative address;
and the absolute address mapping module is used for mapping the multimedia original fragment absolute address according to a preset index identifier and the port number of the terminal to obtain the at least one original playing address.
7. The terminal according to claim 6, wherein the absolute address mapping module is specifically configured to add a port number of the terminal to the multimedia original fragment absolute address to obtain a multimedia original fragment absolute address to which the port number is added; and adding the index identifier in the multimedia original fragment absolute address added with the port number, and taking the multimedia original fragment absolute address added with the index identifier as the at least one original playing address.
8. The terminal of claim 6, further comprising: a mapping table establishing module, wherein,
the mapping table establishing module is used for mapping the at least one original index address by the mapping module according to a local address of the terminal to obtain at least one original playing address and then establishing an address mapping table according to the original index address and the original playing address;
the reverse mapping module is specifically configured to query the address mapping table by using the first play address to obtain the first index address.
9. The terminal of claim 6, further comprising: the file format detection module is used for detecting whether the fragment file format requested to be played by the original index address can be correctly identified by the player after the playing source information is acquired by the playing source acquisition module; and when the format of the fragment file requested to be played by the original index address cannot be correctly identified by the player, triggering and executing the mapping processing module.
10. The terminal according to any one of claims 6 to 9, wherein the transcoding and packaging module is specifically configured to transcode the first multimedia fragmented file to obtain a transcoded first multimedia fragmented file; and performing transcoding packaging processing on the transcoded first multimedia fragment file to obtain a first fragment packaged file.
11. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 5.
CN201810002941.7A 2018-01-02 2018-01-02 Multimedia file processing method and terminal Active CN109995743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810002941.7A CN109995743B (en) 2018-01-02 2018-01-02 Multimedia file processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810002941.7A CN109995743B (en) 2018-01-02 2018-01-02 Multimedia file processing method and terminal

Publications (2)

Publication Number Publication Date
CN109995743A CN109995743A (en) 2019-07-09
CN109995743B true CN109995743B (en) 2021-11-05

Family

ID=67128779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810002941.7A Active CN109995743B (en) 2018-01-02 2018-01-02 Multimedia file processing method and terminal

Country Status (1)

Country Link
CN (1) CN109995743B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112243158B (en) * 2019-07-18 2023-07-14 腾讯科技(深圳)有限公司 Media file processing method and device, computer readable medium and electronic equipment
CN113206841B (en) * 2021-04-26 2022-08-23 杭州当虹科技股份有限公司 AES decryption agent method and system based on HLS protocol
CN113438513B (en) * 2021-06-25 2023-05-02 深圳Tcl新技术有限公司 Video resolution switching method, device, equipment and storage medium
CN114051152A (en) * 2022-01-17 2022-02-15 飞狐信息技术(天津)有限公司 Video playing method and device, storage medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036888A (en) * 2012-12-19 2013-04-10 南京视海网络科技有限公司 Self-adapting stream-media play method and self-adapting play unit

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088620B (en) * 2010-12-01 2014-06-18 中兴通讯股份有限公司南京分公司 Method for downloading media file in content distribution network and client
US20120284370A1 (en) * 2011-05-02 2012-11-08 Authentec, Inc. Method, system, or user device for adaptive bandwidth control of proxy multimedia server
EP3000237B1 (en) * 2013-06-21 2019-10-16 ARRIS Enterprises LLC Method and server for producing a dtcp protected hls streaming video in response to a dlna seek operation
US20150100667A1 (en) * 2013-10-08 2015-04-09 WePow, Inc. Optimizing content delivery
CN105142020A (en) * 2015-08-10 2015-12-09 合一网络技术(北京)有限公司 Method and system for converting video in unsupported format in mobile terminal
CN105898370A (en) * 2015-11-13 2016-08-24 乐视云计算有限公司 Multi-camera video player, playing system and playing method
CN106303754A (en) * 2016-08-04 2017-01-04 天脉聚源(北京)传媒科技有限公司 A kind of audio data play method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036888A (en) * 2012-12-19 2013-04-10 南京视海网络科技有限公司 Self-adapting stream-media play method and self-adapting play unit

Also Published As

Publication number Publication date
CN109995743A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US11355157B2 (en) Special effect synchronization method and apparatus, and mobile terminal
WO2021190166A1 (en) Network slice determination method and related apparatus
US20170302990A1 (en) Method, terminal, and system for processing data of video stream
US10643666B2 (en) Video play method and device, and computer storage medium
CN106412681B (en) Live bullet screen video broadcasting method and device
WO2017008627A1 (en) Multimedia live broadcast method, apparatus and system
CN109995743B (en) Multimedia file processing method and terminal
CN107995519B (en) Method, device and storage medium for playing multimedia file
CN107231159B (en) Radio frequency interference processing method, device, storage medium and terminal
TWI512525B (en) Method and system for associating two terminals with each other, terminal and computer-readable storage medium
CN105430424A (en) Video live broadcast method, device and system
WO2014206276A1 (en) Domain name resolution method, domain name server, and domain name access method, system and terminal
WO2015027823A1 (en) Method, binding server, terminal, and system for binding multiple terminals
CN104967865B (en) Video previewing method and device
US20150304701A1 (en) Play control method and device
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
WO2014032559A1 (en) Method and device for downloading file
CN105227598B (en) Resource sharing method, device and system based on cloud storage
WO2015117554A1 (en) Data processing method, apparatus, and terminal device
CN105608124A (en) Screen capturing method and apparatus
CN112691363A (en) Cross-terminal switching method and related device for cloud games
CN107277031A (en) A kind of Internet video method for down loading, device, storage medium and terminal
CN109495769B (en) Video communication method, terminal, smart television, server and storage medium
WO2018161788A1 (en) Multimedia data sharing method and device
CN111641864B (en) Video information acquisition method, device and equipment

Legal Events

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