The present disclosure relates to multimedia services, in particular to a virtual Microsoft Smooth Streaming (MSS) chunking method for an MP4 file, an MSS adapter, a media server and a non-transitory computer-readable storage medium.
Moving Picture Experts Group 4 Part 14 (MPEG-4 Part 14 or MP4) is a common multimedia file format, which is widely used in various terminal devices. MP4 files can be used as storage containers for various video files, and stored in terminal devices or network servers. Various MP4 files can be played on demand by using MP4 players in terminal devices.
In order to shorten the buffer time for MP4 file playing, the MSS protocol is becoming more and more popular. In the MSS protocol, a large MP4 file is converted into many small media file chunks which can be loaded fast, so that the problem of long buffer time for MP4 file playing can be solved. However, many small-size media file chunks are just like tiny file fragments, which are difficult to manage and affect the performance of the server where the files are stored. Therefore, it's important to improve the management of MP4 files for streaming media.
Embodiments of the present disclosure provide a virtual MSS chunking method for an MP4 file, an MSS adapter, a media server and a non-transitory computer-readable storage medium.
In accordance with an aspect of the present disclosure, an embodiment provides a virtual MSS chunking method for an MP4 file, which may include: receiving an MSS download request sent by an MSS player, the MSS download request being configured to request download of at least one MSS chunk of a first MP4 file; determining, according to MSS chunk indexes and virtual chunk indexes of the first MP4 file, data segments in the first MP4 file corresponding to data of the at least one MSS chunk, each MSS chunk index containing a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index containing a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file; sending a data segment download request to a media server and receiving data segments of the first MP4 file sent by the media server, the data segment download request being configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk; and assembling the data segments to generate the at least one MSS chunk and sending the at least one MSS chunk to the MSS player.
In accordance with an aspect of the present disclosure, an embodiment provides a virtual MSS chunking method for an MP4 file, which may include: receiving a data segment download request sent by an MSS adapter, the data segment download request being configured to request download of data segments of a first MP4 file corresponding to at least one MSS chunk; and sending data segments of the first MP4 file to the MSS adapter.
In accordance with an aspect of the present disclosure, an embodiment provides an MSS adapter, which may include a processor and a memory, where the processor is configured to execute program instructions stored in the memory to implement the virtual MSS chunking method for a MP4 file as mentioned above.
In accordance with an aspect of the present disclosure, an embodiment provides a media server, which may include a processor and a memory, where the processor is configured to execute program instructions stored in the memory to implement the virtual MSS chunking method for a MP4 file as mentioned above.
In accordance with an aspect of the present disclosure, an embodiment provides a non-transitory computer-readable storage medium storing a computer program which, when executed by a processor, cause the processor to implement the virtual MSS chunking method for a MP4 file as mentioned above.
The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
An MP4 file is the most common multimedia file format. The structure of the MP4 file is shown in
When the size of the MP4 file is large, the number of the video frames and the audio frames is also large, so a large volume of index data need to be stored in MoovBox, which leads to a long buffer time for MP4 file playing because the player needs to read the index data in MoovBox before playing the MP4 file. In order to shorten the buffer time for MP4 file playing, the MSS protocol is currently used for chunking the MP4 file. According to the MSS protocol, a large number of audio frames and video frames in the MP4 file are segmented, the whole MP4 file is converted into several smaller media file chunks, and each file chunk contains data of one or more video frames and audio frames. In this way, a loading speed of each small media file chunk is fast, which solves the problem of long buffer time for MP4 file playing. However, many small-size media file chunks are just like tiny file fragments, which are difficult to manage and affect the performance of the server where the files are stored. An embodiment of the present disclosure provides a virtual MSS chunking method for an MP4 file to solve the above problem.
At step S2010, an MSS download request sent by an MSS player is received, where the MSS download request is configured to request download of at least one MSS chunk of a first MP4 file.
The virtual MSS chunking method for a MP4 file provided by this embodiment is applied to an MSS adapter, which is a device or module for converting between MP4 files and MSS files. The MSS adapter can be an independent device, or can be arranged in a terminal device that plays MP4 files, or can be arranged in a media server that stores MP4 files. Storing MP4 files in the media server will lead to a long buffer time when large-size MP4 files are played on a terminal device, while storing MSS chunks obtained after segmenting the MP4 files according to the MSS protocol in the media server will affect the performance of the media server as too many fragmented files are stored in the media server.
Therefore, in this embodiment, the MSS adapter is configured separately, and the MSS adapter is used for converting between MP4 files and MSS chunks, so that the media server only needs to store the complete MP4 file, instead of storing the MSS chunks obtained after segmenting the MP4 file. In the terminal device, a player based on the MSS protocol can be used for playing, thus reducing the long buffer time required for playing MP4 files. In order to realize the above-mentioned functions of the MSS adapter, the MP4 file is virtualized as MSS chunks in the MSS adapter, that is, virtual MSS chunks are established in the MSS adapter, a correspondence between the virtual MSS chunks and the MP4 file is established, and the virtual MSS chunks are provided to an MSS player in the terminal device. When the MSS player needs to play the MSS chunks, the MSS adapter determines a correspondence between an MSS chunk to be played and audio frames and video frames in the MP4 file stored in the media player, downloads corresponding audio frame and video frame data from the media player, and assembles the data to obtain the MSS chunk, so that the MSS chunk requested by the MSS player can be provided to the MSS player for playing.
First, when the MSS player needs to play the MSS chunk, the MSS adapter receives an MSS download request sent by the MSS player. The MSS download request is configured to request download of at least one MSS chunk of a first MP4 file. The MSS download request is sent by the MSS player according to an MSS chunk index of the first MP4 file. Each MSS chunk index of the first MP4 file contains a playing address of a respective MSS chunk of the first MP4 file. After determining the MSS chunk to be played according to the MSS chunk index, the MSS player sends the MSS download request to the MSS adapter. Each MSS chunk contains data of at least one video frame and a corresponding audio frame. In order to ensure the normal play of the MSS chunks, each MSS chunk should contain at least one key video frame, and the key video frame should be a first video frame of the MSS chunk.
At step S2020, data segments in the first MP4 file corresponding to data of the at least one MSS chunk are determined according to MSS chunk indexes and virtual chunk indexes of the first MP4 file, each MSS chunk index containing a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index containing a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file.
The MSS chunk indexes of the first MP4 file and the virtual chunk indexes of the first MP4 file are stored in the MSS adapter. Herein, each MSS chunk index contains a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index contains a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file. That is, the MSS adapter stores the MSS chunk indexes to be provided to the MSS player, which is the same as index files provided to the MSS player when the MSS chunks are stored in the media server, so the MSS player does not need additional upgrade or change. The virtual chunk index stored in the MSS adapter is an index file used for indicating the correspondence between the data of each MSS chunk index and the data in the first MP4 file. Because the MP4 file in the media server is not actually segmented, but only such index file as the virtual chunk index is used for establishing the correspondence with the MSS index file, the MP4 file stored in the media server does not need to be segmented, and the complete MP4 file can still be stored in the media server, thus avoiding the influence of excessive file fragments stored in the media server on the working efficiency of the media server. The virtual chunk index contains the correspondence between the audio frame and video frame data of each MSS chunk and the audio frame and video frame data in the first MP4 file. Through the virtual chunk indexes, positions of each audio frame and each video frame in the MSS chunk requested to be downloaded in the MSS download request sent by the MSS player in the first MP4 file can be determined. Then the MSS adapter can determine, according to the MSS chunk indexes and the virtual chunk indexes of the first MP4 file, data segments in the first MP4 file corresponding to data of the at least one MSS chunk.
In an embodiment, determining, according to MSS chunk indexes and virtual chunk indexes of the first MP4 file, data segments in the first MP4 file corresponding to data of the at least one MSS chunk includes: according to a virtual chunk index corresponding to an index of the at least one MSS chunk, calculating an actual data position range of the data of the at least one MSS chunk in the first MP4 file.
When segmenting the MP4 file, the data in the MP4 file are segmented according to timestamps of the video frames and the audio frames in the MP4 file, as shown in
At step S2030, a data segment download request is sent to a media server, and data segments of the first MP4 file sent by the media server are received, where the data segment download request is configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk.
After determining the data segments corresponding to the data of at least one MSS chunk in the first MP4 file, the MSS adapter can send the data segment download request to the media server to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk. The data segment download request contains address information of each data segment to be downloaded in the first MP4 file. Each data segment contains at least one video frame and a corresponding audio frame.
After receiving the data segment download request, the media server determines positions of video frame and audio frame data in the data segments to be downloaded in the first MP4 file, and then assemblies the video frames and audio frames of each data segment requested to be downloaded into each data segment and sends them to the MSS adapter.
At step S2040, contents of the data segments are assembled to generate the at least one MSS chunk, and the at least one MSS chunk is sent to the MSS player.
After receiving the data segments sent by the media server, the MSS adapter needs to reassemble the video frame and audio frame data in each data segment into a data format conforming to the MSS protocol, that is, assemble the contents of the data segments to generate the at least one MSS chunk. Only in this way can the MSS chunks requested by the MSS player be sent to the MSS player, so that the MSS player can play the MSS chunks normally.
The virtual MSS chunking method for a MP4 file provided by the embodiment of the present disclosure is applied to the MSS adapter. Firstly, the MSS download request sent by the MSS player is received, and the MSS download request is configured to request download of at least one MSS chunk of the first MP4 file. Then, data segments in the first MP4 file corresponding to data of the at least one MSS chunk are determined according to the MSS chunk indexes and virtual chunk indexes of the first MP4 file, each MSS chunk index containing a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index containing a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file. The data segments of the first MP4 file sent by the media server are received after the data segment download request is sent to the media server, where the data segment download request is configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk. Then, contents of the data segments can be assembled to generate the at least one MSS chunk, and the at least one MSS chunk can be sent to the MSS player. In this way, the MSS player arranged in a terminal device can directly play MSS chunks specified by the MSS protocol without upgrading or changing, and the media server where the MP4 files are stored does not need to store a large number of MSS chunks, so that the influence of storing a large number of file fragments in the media server on its performance is avoided while reducing the buffer time for playback of the MP4 file.
At 55010, a first MSS playlist request sent by an MSS player is received, where the MSS playlist request is configured to request MSS chunk indexes of a first MP4 file.
In order to play MSS chunks of the first MP4 file, the MSS player in a terminal device first needs to acquire a first MSS chunk index of the first MP4 file, that is, a playing address of each MSS chunk in the first MP4 file. The MSS chunk indexes are index files required by the MSS player to play the MSS chunks conforming to the MSS protocol. Then, when the MSS player needs to play the MSS chunks of the first MP4 file, it first needs to send the first MSS playlist request to the MSS adapter, and the MSS adapter receives the first MSS playlist request sent by the MSS player, where the MSS playlist request is configured to request the MSS chunk indexes of the first MP4 file.
At S5020, a second MSS playlist request is sent to a media server, and the MSS chunk indexes and virtual chunk indexes of the first MP4 file sent by the media server are received, where the second MSS playlist request is configured to request the MSS chunk indexes and the virtual chunk indexes of the first MP4 file.
Since the MSS adapter does not store actual media files, which are MP4 files stored in the media server, the MSS adapter needs to send the second MSS playlist request to the media server after the MSS player sends the first MSS playlist request to the MSS adapter. The second MSS playlist request is configured to request the MSS chunk indexes and the virtual chunk indexes of the first MP4 file. In order to enable the first MP4 file stored therein to be played by the MSS player of the terminal device, the media server needs to segment video frames and audio frames in the first MP4 file on the basis of storing the first MP4 file to obtain a plurality of data segments, and each data segment contains at least one video frame and a corresponding audio frame. Corresponding relationships between data in each data segment and MSS chunk data are established, that is, the virtual chunk indexes of the first MP4 file. In the media server, instead of segmenting the first MP4 file into a plurality of actual data segments, the first MP4 file is virtually segmented and the virtual chunk indexes are established. In addition, the media server also establishes the MSS chunk indexes of the first MP4 file, and each MSS chunk index of the first MP4 file contains a playing address of a respective MSS chunk of the first MP4 file. The purpose of the MSS adapter sending the second MSS playlist request to the media server is to obtain the MSS chunk indexes and the virtual chunk indexes of the first MP4 file stored in the media server.
At S5030, the MSS chunk indexes of the first MP4 file are sent to the MSS player.
After receiving the MSS chunk indexes and the virtual chunk indexes of the first MP4 file sent by the media server, the MSS adapter stores the virtual chunk indexes and the MSS chunk indexes of the first MP4 file and sends the MSS chunk indexes of the first MP4 file to the MSS player. In this way, the MSS player in the terminal device can obtain the MSS chunk indexes conforming to the MSS protocol, and the MSS player can download and play an MSS chunk to be played according to the obtained MSS chunk indexes. The MSS adapter stores the virtual chunk indexes and the MSS chunk indexes of the first MP4 file. After the playback request sent by the MSS player is received, positions of the MSS chunks that the MSS player requests to play in the first MP4 file can be determined by querying the virtual chunk indexes of the first MP4 file, and then the media server that stores the first MP4 file is requested to download corresponding video frames and audio frames in the first MP4 file, which are then assembled into the MSS chunk in the MSS adapter and sent to the MSS player, so as to realize the normal playing of the MSS player.
At S5040, an MSS download request sent by the MSS player is received, where the MSS download request is configured to request download of at least one MSS chunk of the first MP4 file.
After the MSS player obtains the MSS chunk indexes of the first MP4 file, and the MSS chunk indexes and the virtual chunk indexes of the first MP4 file are stored in the MSS adapter, the MSS player can play the MSS chunks, that is, perform steps S5050-S5100. Steps S5050-S5100 are performed in the same way as steps S2010-S2060, so they will not be repeated here.
At S5050, data segments in the first MP4 file corresponding to data of the at least one MSS chunk are determined according to MSS chunk indexes and virtual chunk indexes of the first MP4 file, each MSS chunk index containing a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index containing a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file.
At S5060, a data segment download request is sent to a media server, and data segments of the first MP4 file sent by the media server are received, where the data segment download request is configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk.
At S5070, contents of the data segments are assembled to generate the at least one MSS chunk, and the at least one MSS chunk is sent to the MSS player.
At S6010, a data segment download request sent by an MSS adapter is received, where the data segment download request is configured to request download of data segments of a first MP4 file corresponding to at least one MSS chunk.
The virtual MSS chunking method for a MP4 file provided in this embodiment is applied to a media server, which is a server for storing media files, and can be located in the cloud or local to users. Storing MP4 files in the media server will lead to a long buffer time when large-size MP4 files are played on a terminal device, while storing MSS chunks obtained after segmenting the MP4 files according to the MSS protocol in the media server will affect the performance of the media server as too many fragmented files are stored in the media server.
Therefore, in this embodiment, the MSS adapter is configured, which is a device or module for converting between MP4 files and MSS files. The MSS adapter can be an independent device, or can be arranged in a terminal device that plays MP4 files, or can be arranged in a media server that stores MP4 files. Therefore, the media server only needs to store the complete MP4 file, instead of storing the MSS chunks obtained after segmenting the MP4 file. In the terminal device, a player based on the MSS protocol can be used for playing, thus reducing the long buffer time required for playing MP4 files. In order to realize the above-mentioned functions of the MSS adapter, the MP4 file is virtualized as MSS chunks in the MSS adapter, that is, virtual MSS chunks are established in the MSS adapter, a correspondence between the virtual MSS chunks and the MP4 file is established, and the virtual MSS chunks are provided to an MSS player in the terminal device. When the MSS player needs to play the MSS chunks, the MSS adapter determines a correspondence between an MSS chunk to be played and audio frames and video frames in the MP4 file stored in the media player, downloads corresponding audio frame and video frame data from the media player, and assembles the data to obtain the MSS chunk, so that the MSS chunk requested by the MSS player can be provided to the MSS player for playing.
First, when the MSS player needs to play the MSS chunk, the MSS adapter receives an MSS download request sent by the MSS player. The MSS download request is configured to request download of at least one MSS chunk of a first MP4 file. The MSS download request is sent by the MSS player according to an MSS chunk index of the first MP4 file. Each MSS chunk index of the first MP4 file contains a playing address of a respective MSS chunk of the first MP4 file. After determining the MSS chunk to be played according to the MSS chunk index, the MSS player sends the MSS download request to the MSS adapter. Each MSS chunk contains data of at least one video frame and a corresponding audio frame. In order to ensure the normal play of the MSS chunks, each MSS chunk should contain at least one key video frame, and the key video frame should be a first video frame of the MSS chunk.
The media server receives the data segment download request sent by the MSS adapter, where the data segment download request is configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk. The data segment download request sent by the MSS adapter is sent after the MSS adapter determines, according to the MSS chunk indexes and the virtual chunk indexes of the first MP4 file, the data segments in the first MP4 file corresponding to the data of the at least one MSS chunk. The MSS chunk indexes of the first MP4 file and the virtual chunk indexes of the first MP4 file are stored in the MSS adapter. Herein, each MSS chunk index contains a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index contains a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file. That is, the MSS adapter stores the MSS chunk indexes to be provided to the MSS player, which is the same as index files provided to the MSS player when the MSS chunks are stored in the media server, so the MSS player does not need additional upgrade or change. The virtual chunk index stored in the MSS adapter is an index file used for indicating the correspondence between the data of each MSS chunk index and the data in the first MP4 file. Because the MP4 file in the media server is not actually segmented, but only such index file as the virtual chunk index is used for establishing the correspondence with the MSS index file, the MP4 file stored in the media server does not need to be segmented, and the complete MP4 file can still be stored in the media server, thus avoiding the influence of excessive file fragments stored in the media server on the working efficiency of the media server. The virtual chunk index contains the correspondence between the audio frame and video frame data of each MSS chunk and the audio frame and video frame data in the first MP4 file. Through the virtual chunk indexes, positions of each audio frame and each video frame in the MSS chunk requested to be downloaded in the MSS download request sent by the MSS player in the first MP4 file can be determined. Then the MSS adapter can determine, according to the MSS chunk indexes and the virtual chunk indexes of the first MP4 file, data segments in the first MP4 file corresponding to data of the at least one MSS chunk.
At S6020, data segments of the first MP4 file are sent to the MSS adapter.
After receiving the data segment download request, the media server determines positions of video frame and audio frame data in the data segments to be downloaded in the first MP4 file, and then assemblies the video frames and audio frames of each data segment requested to be downloaded into each data segment and sends them to the MSS adapter. After receiving the data segments sent by the media server, the MSS adapter needs to reassemble the video frame and audio frame data in each data segment into a data format conforming to the MSS protocol, that is, assemble contents of the data segments to generate the at least one MSS chunk. Only in this way can the MSS chunks requested by the MSS player be sent to the MSS player, so that the MSS player can play the MSS chunks normally.
The virtual MSS chunking method for a MP4 file provided by the embodiment of the present disclosure is applied to the media server. Firstly, the data segment download request sent by the MSS adapter is received, and the data segment download request is configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk. Then, the data segments of the first MP4 file are sent to the MSS adapter, the contents of the data segments are then assembled to generate the at least one MSS chunk, and the at least one MSS chunk is sent to the MSS player. In this way, the MSS player arranged in a terminal device can directly play MSS chunks specified by the MSS protocol without upgrading or changing, and the media server where the MP4 files are stored does not need to store a large number of MSS chunks, so that the influence of storing a large number of file fragments in the media server on its performance is avoided while reducing the buffer time for playback of the MP4 file.
At S7010, an MSS playlist request sent by an MSS adapter is received, the MSS playlist request being configured to request MSS chunk indexes and virtual chunk indexes of a first MP4 file, where each MSS chunk index contains a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index contains a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file.
In order to play MSS chunks of the first MP4 file, the MSS player in a terminal device first needs to acquire a first MSS chunk index of the first MP4 file, that is, a playing address of each MSS chunk in the first MP4 file. The MSS chunk indexes are index files required by the MSS player to play the MSS chunks conforming to the MSS protocol. Then, when the MSS player needs to play the MSS chunks of the first MP4 file, it first needs to request the MSS adapter to send the MSS chunk indexes of the first MP4 file. Since the MSS adapter does not store actual media files, which are MP4 files stored in the media server, the MSS adapter needs to send the MSS playlist request to the media server after the MSS player sends the request to the MSS adapter. The MSS playlist request is configured to request the MSS chunk indexes and the virtual chunk indexes of the first MP4 file. In order to enable the first MP4 file stored therein to be played by the MSS player of the terminal device, the media server needs to segment video frames and audio frames in the first MP4 file on the basis of storing the first MP4 file to obtain a plurality of data segments, and each data segment contains at least one video frame and a corresponding audio frame. Corresponding relationships between data in each data segment and MSS chunk data are established, that is, the virtual chunk indexes of the first MP4 file. In the media server, instead of segmenting the first MP4 file into a plurality of actual data segments, the first MP4 file is virtually segmented and the virtual chunk indexes are established. In addition, the media server also establishes the MSS chunk indexes of the first MP4 file, and each MSS chunk index of the first MP4 file contains a playing address of a respective MSS chunk of the first MP4 file. The purpose of the MSS adapter sending the MSS playlist request to the media server is to obtain the MSS chunk indexes and the virtual chunk indexes of the first MP4 file stored in the media server.
In an embodiment, the virtual chunk index contains an actual data position range of the data of the at least one MSS chunk in the first MP4 file. As shown in
At S7020, the MSS chunk indexes and the virtual chunk indexes of the first MP4 file are sent to the MSS adapter.
According to the MSS playlist request sent by the MSS adapter, the media server finds the MSS chunk indexes and the virtual chunk indexes of the first MP4 file, and then sends them to the MSS adapter. After receiving the MSS chunk indexes and the virtual chunk indexes of the first MP4 file sent by the media server, the MSS adapter stores the virtual chunk indexes and the MSS chunk indexes of the first MP4 file and sends the MSS chunk indexes of the first MP4 file to the MSS player. In this way, the MSS player in the terminal device can obtain the MSS chunk indexes conforming to the MSS protocol, and the MSS player can download and play an MSS chunk to be played according to the obtained MSS chunk indexes. The MSS adapter stores the virtual chunk indexes and the MSS chunk indexes of the first MP4 file. After the playback request sent by the MSS player is received, positions of the MSS chunks that the MSS player requests to play in the first MP4 file can be determined by querying the virtual chunk indexes of the first MP4 file, and then the media server that stores the first MP4 file is requested to download corresponding video frames and audio frames in the first MP4 file, which are then assembled into the MSS chunk in the MSS adapter and sent to the MSS player, so as to realize the normal playing of the MSS player.
At S7030, a data segment download request sent by an MSS adapter is received, where the data segment download request is configured to request download of data segments of a first MP4 file corresponding to at least one MSS chunk.
At S7040, data segments of the first MP4 file are sent to the MSS adapter.
Steps S7030-S7040 are performed in the same way as steps S6010-S6020, so they will not be repeated here.
At S8010, an MSS player requests an MSS adapter to download an xxx.isml file.
At S8020, the MSS adapter requests a media server to download an xxx.isml file and an xxx.index file.
At S8030, the media server sends the xxx.isml file and the xxx.index file to the MSS adapter.
At S8040, the MSS adapter sends the xxx.isml file to the MSS player.
At S8050, the MSS player sends a 0.m4s download request to the MSS adapter.
At S8060, the MSS adapter calculates an actual address range of a segment seg-0 corresponding to 0.m4s in the MP4 file according to the xxx.isml file and the xxx.index file. At S8070, the MSS adapter requests the media server to download data within the determined actual address range, that is, audio frame and video frame data corresponding to seg-0.
At S8080, the media server sends content corresponding to seg-0 in the MP4 file to the MSS adapter.
At S8090, the MSS adapter parses the received audio frame and video frame data and assembles them into a 0.m4s chunk.
At S8100, the MSS adapter sends the 0.m4s chunk to the MSS player.
The interactive flowchart provided by this embodiment shows the whole process of the MSS player playing the MP4 file stored in the media server through the MSS adapter, the MP4 file is stored in the media server, and the xxx.isml and xxx.index files as shown in
The virtual MSS chunking apparatus for the MP4 file provided in this embodiment is arranged in an MSS adapter, and is used for realizing the virtual MSS chunking method for a MP4 file in the embodiment shown in
The virtual MSS chunking apparatus for the MP4 file provided in this embodiment is arranged in a media server, and is used for realizing the virtual MSS chunking method for a MP4 file in the embodiment shown in
The memory 112, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the virtual MSS chunking method for a MP4 file in the embodiments of
In an implementation, the memory 112 include a storage program area and a storage data area, where the storage program area may store an operating system and application program(s) required by at least one function, and the storage data area may store data created according to the use of the MSS adapter, etc. In addition, the memory 112 may include a high-speed random access memory and a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or another non-volatile solid-state storage device.
The transmitter 113 is a combination of modules or devices capable of transmitting data to the MSS player or media server in the terminal device through any kind of wired or wireless network. The receiver 114 is a combination of modules or devices that receive data sent by the MSS player or media server in the terminal device through any kind of wired or wireless network.
The memory 122, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the virtual MSS chunking method for a MP4 file in the embodiments of
In an implementation, the memory 122 include a storage program area and a storage data area, where the storage program area may store an operating system and application program(s) required by at least one function, and the storage data area may store data created according to the use of the media server, etc. In addition, the memory 122 may include a high-speed random access memory and a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or another non-volatile solid-state storage device.
The transmitter 123 is a combination of modules or devices capable of transmitting data to the MSS player or media server in the terminal device through any kind of wired or wireless network. The receiver 124 is a combination of modules or devices that receive data sent by the MSS player or media server in the terminal device through any kind of wired or wireless network.
A further embodiment of the present disclosure provides a computer-readable storage medium containing computer-executable instructions, which, when executed by a computer processor, cause the processor to perform a virtual MSS chunking method for an MP4 file, and the method includes: receiving an MSS download request sent by an MSS player, the MSS download request being configured to request download of at least one MSS chunk of a first MP4 file; determining, according to MSS chunk indexes and virtual chunk indexes of the first MP4 file, data segments in the first MP4 file corresponding to data of the at least one MSS chunk, each MSS chunk index containing a playing address of a respective MSS chunk of the first MP4 file, and each virtual chunk index containing a correspondence between the data of a respective MSS chunk and a respective one of data segments of the first MP4 file; sending a data segment download request to a media server and receiving data segments of the first MP4 file sent by the media server, the data segment download request being configured to request download of the data segments of the first MP4 file corresponding to the at least one MSS chunk; and assembling contents of the data segments to generate the at least one MSS chunk and sending the at least one MSS chunk to the MSS player.
A further embodiment of the present disclosure provides a computer-readable storage medium containing computer-executable instructions, which, when executed by a computer processor, cause the computer processor to implement a virtual MSS chunking method for an MP4 file, and the method includes: receiving a data segment download request sent by an MSS adapter, the data segment download request being configured to request download of data segments of a first MP4 file corresponding to at least one MSS chunk; and sending data segments of the first MP4 file to the MSS adapter.
The virtual MSS chunking method for a MP4 file, the MSS adapter, the media server and the computer-readable storage medium provided by the embodiments of the present disclosure can not only reduce the buffer time for MP4 file playing, but also avoid the influence of a large number of file fragments stored in the media server on performance.
The above embodiments are only some of the embodiments of the present disclosure, and are not intended to limit the scope of protection of the present disclosure.
Those having ordinary skill in the art should understand that the term “user terminal” covers any suitable type of wireless user equipment, such as mobile phones, portable data processing equipment, portable web browsers or vehicle-mounted mobile stations.
Generally speaking, various embodiments of the present disclosure can be implemented in hardware or dedicated circuits, software, logic or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor or another computing device. However, the present disclosure is not limited thereto.
Embodiments of the present disclosure can be implemented by a data processor of a mobile device executing computer program instructions, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data or source code or object code written in any combination of one or more programming languages.
The block diagram of any logic process in the drawings of the present disclosure can represent program steps, or can represent interconnected logic circuits, modules and functions, or can represent a combination of program steps and logic circuits, modules and functions. The computer program may be stored in a memory. The memory may be of any type that is suitable for a local technical environment and can be implemented using any suitable data storage technology, for example but not limited to, a read-only memory (ROM), a random-access memory (RAM), optical storage devices and systems (a digital versatile disk (DVD) or a compact disk (CD)). The computer-readable medium may include a non-transitory computer-readable storage medium. The data processor may be any type suitable for the local technical environment, for example but not limited to, a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) and a processor based on a multi-core processor architecture.
Number | Date | Country | Kind |
---|---|---|---|
201911315661.2 | Dec 2019 | CN | national |
This application is a national stage filing under 35 U. S.C. § 371 of international application number PCT/CN2020/137122, filed on Dec. 17, 2020, which claims priority to Chinese patent application No. 201911315661.2 filed on Dec. 19, 2019. The contents of these applications are incorporated herein by reference in their entirety.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/137122 | 12/17/2020 | WO |