WO2023087816A1 - Media file aggregation method, playback method, cdn system, terminal and storage medium - Google Patents

Media file aggregation method, playback method, cdn system, terminal and storage medium Download PDF

Info

Publication number
WO2023087816A1
WO2023087816A1 PCT/CN2022/113393 CN2022113393W WO2023087816A1 WO 2023087816 A1 WO2023087816 A1 WO 2023087816A1 CN 2022113393 W CN2022113393 W CN 2022113393W WO 2023087816 A1 WO2023087816 A1 WO 2023087816A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
media
aggregation
aggregated
segment
Prior art date
Application number
PCT/CN2022/113393
Other languages
French (fr)
Chinese (zh)
Inventor
易鹤声
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023087816A1 publication Critical patent/WO2023087816A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Definitions

  • the present application relates to but is not limited to the field of video media services, for example, it relates to a media file aggregation method, a playback method, a CDN system, a terminal, and a storage medium.
  • CDN Content Delivery Network
  • a common CDN system consists of an origin station and a CDN node.
  • the CDN node is located at the edge of the network closer to the user terminal, and the source station is usually recorded at the CDN node.
  • the live segment of the live broadcast provides media data to the user terminal through the CDN node during access, which can effectively improve the real-time performance and performance of the playback, and reduce the pressure on the source station and the bearer network.
  • VR videos have been widely used in various industries.
  • VR videos usually have multiple viewing angles, and each viewing angle corresponds to an independent video.
  • each view of the VR video corresponds to a code stream, and each code stream will be cut into several fragments at the source station, and the CDN node will record the fragments locally Provide streaming services to users.
  • the number of fragments is usually large.
  • the fragments of all views at the same time are usually aggregated into an aggregate file, and the offset of each fragment in the aggregate file is recorded through the media offset file.
  • Embodiments of the present application provide a media file aggregation method, playback method, CDN system, terminal, and storage medium, which can reduce the number of file reads during playback and improve file read performance while keeping the viewing angle unchanged.
  • the embodiment of the present application provides a media file aggregation method, which is applied to a CDN system, and the method includes: recording at least two media segments according to a preset duration, wherein at least two of the media segments are recorded For the same video code stream, at least two of the media fragments are continuous in time; the at least two of the media fragments are aggregated into an aggregated file.
  • the embodiment of the present application provides a method for playing a media file, which is applied to a CDN node, and the CDN node is communicatively connected to a terminal, and the CDN node stores an aggregation file, and the aggregation file is based on the first aspect
  • the media file aggregation method is obtained, and the method includes: determining the segment to be played from the media segment of the aggregated file; sending the segment to be played to the terminal, so that the terminal plays the segment to be played Play fragments.
  • the embodiment of the present application provides a method for playing a media file, which is applied to a terminal, and the terminal is communicatively connected to a CDN node, and the CDN node stores an aggregation file, and the aggregation file is based on the method described in the first aspect
  • the media file aggregation method is obtained, and the media file playing method includes: obtaining the segment to be played sent by the CDN node, wherein the segment to be played is obtained from the media segment of the aggregation file; playing the Segment to be played.
  • an embodiment of the present application provides a CDN system, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the following when executing the computer program.
  • an embodiment of the present application provides a terminal, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the third method when executing the computer program.
  • a terminal including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the third method when executing the computer program.
  • the embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the media file aggregation method as described in the first aspect, or to implement the method as described in The media file playing method described in the second aspect, or, realize the media file playing method described in the third aspect.
  • Fig. 1 is the flow chart of the media file aggregation method that one embodiment of the present application provides
  • Fig. 2 is a flowchart of adding offset description information provided by another embodiment of the present application.
  • Fig. 3 is a flowchart of adding offset description information provided by another embodiment of the present application.
  • Fig. 4 is a flow chart of determining the video code stream to be recorded provided by another embodiment of the present application.
  • Fig. 5 is a flow chart of generating an aggregation index file provided by another embodiment of the present application.
  • Fig. 6 is the flow chart of the media file playing method that another embodiment of the present application provides.
  • FIG. 7 is a flow chart of determining a segment to be played provided by another embodiment of the present application.
  • FIG. 8 is a flowchart of a media file playing method provided in another embodiment of the present application.
  • Fig. 9 is a flow chart of determining a segment to be played provided by another embodiment of the present application.
  • FIG. 10 is a schematic diagram of a CDN network topology in an example of the present application.
  • Figure 11 is a flow chart of Example 1 of the present application.
  • Fig. 12 is a flow chart of Example 2 of the present application.
  • Fig. 13 is a device diagram of a CDN system provided by another embodiment of the present application.
  • Fig. 14 is an apparatus diagram of a terminal provided by another embodiment of the present application.
  • the present application provides a media file aggregation method, a playback method, a CDN system, a terminal, and a storage medium.
  • the media file aggregation method includes: recording at least two media fragments according to a preset duration, wherein at least two of the media fragments Recording in the same video code stream, at least two of the media fragments are continuous in time; at least two of the media fragments are aggregated into an aggregated file.
  • the media fragments in the aggregation file are continuously recorded in the same video code stream, and each video code stream corresponds to a viewing angle.
  • Aggregation files are continuously read media slices for playback, which effectively reduces the number of file switching and improves file reading performance.
  • FIG. 1 is a flowchart of a media file aggregation method provided by an embodiment of the present application.
  • the media file aggregation method is applied to a CDN system, including but not limited to steps S110 and S120.
  • Step S110 recording at least two media segments according to a preset duration, wherein at least two media segments are recorded in the same video stream, and at least two media segments are continuous in time.
  • the preset duration can be any value. For example, if it is set to 10 minutes, multiple media segments are recorded from a video stream according to a 10-minute period, so that each aggregated file corresponds to 10 minutes of the same viewing angle. Video, the specific value can be adjusted according to actual needs, and there are no limitations here.
  • the number of media fragments is at least two, and the specific number is determined according to the preset duration of recording to ensure that it is recorded from the same video stream in the form of continuous recording, and at time Just continue on.
  • each viewing angle video of a VR video corresponds to a video code stream, and the media fragments are recorded from the same video code stream and are continuous in time, so that the obtained media fragments can be obtained without changing the viewing angle. It can become continuously played content, thus providing a data basis for file aggregation in the time dimension.
  • Step S120 aggregate at least two media fragments into an aggregated file.
  • the content requested by the terminal comes from the same video code stream. Based on the above description, at least two media fragments are recorded in the same video code stream. Therefore, at a fixed viewing angle
  • recording media segments according to the preset duration can be performed any number of times. For example, if the duration of the video stream is 60 minutes and the preset duration is 10 minutes, six 10-minute recordings can be performed for the video stream. And aggregate the media fragments recorded every 10 minutes into one aggregation file, so as to obtain 6 aggregation files corresponding to the video code stream, so as to ensure that the video code stream can be completely recorded to the CDN node, thereby improving the real-time performance of playback And performance, of course, in the case of multiple video streams, it is enough to record and aggregate each video stream separately, so I won’t repeat them here.
  • step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
  • Step S210 determining the offset description information of the media segment in the aggregation file
  • Step S220 adding offset description information to the media offset file of the aggregation file.
  • the offset description information is commonly used description information in the aggregation technology, and is used to describe the position of each media fragment in the aggregation file. This embodiment does not make too many limitations on the generation method and form of the offset description information .
  • step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
  • Step S310 determining the offset description information of the media segment in the aggregation file
  • Step S320 adding offset description information to the playing link parameters of the aggregated media segments.
  • the offset description information is commonly used description information in the aggregation technology, and details are not repeated here.
  • CDN nodes can also use HTTP live Streaming (HLS) technology to record media fragments.
  • HLS HTTP live Streaming
  • the index information of media fragments is stored in the playback connection parameters, so after obtaining the offset description information, the offset description information can also be added to the playback connection parameters after media fragment aggregation, so as to realize the HLS index.
  • the playback connection parameter can be the file name of the media segment, and the specific description method can be adjusted according to actual needs, as long as the index of the media file can be realized.
  • the CDN node communicates with the source station.
  • the CDN node before performing step S110 of the embodiment shown in FIG. 1 , it also includes but is not limited to the following steps:
  • Step S410 obtaining the code stream index file of the source site
  • Step S420 determine at least two video code streams to be recorded according to the code stream index file, wherein at least two video code streams to be recorded belong to the same VR video.
  • the stream index file needs to record at least two video streams to be recorded.
  • the format can be pre-configured according to the specific recording method. For example, the DASH technology or HLS technology described in the above embodiment is used for recording. This embodiment does not make too many restrictions on the specific form of the code stream index file. In the case of index files, it is well known how to request the video code stream from the source site to the CDN node, so I won’t go into details here.
  • the CDN node can process each video code stream according to the preset duration and obtain multiple aggregated files. For example, if a VR video has 24 viewing angles, it can be determined that there are 24 video Code stream, the CDN node can request the above 24 video code streams from the source station according to the code stream index file, and perform the operation of the embodiment shown in Figure 1 for each video code stream to ensure the media fragmentation in the obtained aggregated file It comes from the same video code stream, which provides a file basis for reducing the number of file jumps in the reading process.
  • step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
  • Step S510 generating an aggregated index file, wherein the aggregated index file records the media information of each aggregated file corresponding to each video code stream, and the media information includes media file links and offset description information.
  • timing of generating the aggregation index file may be after the recording of the VR video is completed, or after receiving an index request from the terminal, which is not limited in this embodiment.
  • the identification information of each video code stream can be added to the media of the aggregated file.
  • the aggregated file is also named according to the video stream to which it belongs. It only needs to be able to determine the video stream to which the aggregated file belongs. The method can be selected according to actual needs, and there is no limitation here.
  • offset description information may also be added to the media information in order to facilitate the terminal to quickly determine the storage location of the media fragments.
  • media fragments can be recorded to the local disk of the CDN node for storage, and media information can be stored in the database, which is convenient for terminals to read.
  • another embodiment of the present application also provides a method for playing a media file, which is applied to a CDN node, and the CDN node communicates with the terminal.
  • the CDN node stores aggregated files, and the aggregated files are aggregated according to the media files described in the above-mentioned embodiments. The method is obtained.
  • the method for playing a media file includes but is not limited to step S610 and step S620.
  • Step S610 determining the segment to be played from the media segment of the aggregation file
  • Step S620 sending the segment to be played to the terminal, so that the terminal plays the segment to be played.
  • the terminal since the media segments of the same aggregation file are recorded in the same video stream and are continuous in time, the terminal only needs to Request media fragments from an aggregated file to play as fragments to be played, which effectively reduces the number of file jumps and improves the performance of file reading.
  • step S610 of the embodiment shown in FIG. 6 also includes but is not limited to the following steps:
  • Step S710 generate an aggregation index file, wherein the aggregation index file records the media information of each aggregation file corresponding to at least two video code streams, the media information includes media file links and offset description information, and at least two video code streams belong to the same VR video;
  • Step S720 sending the aggregation index file to the terminal, so that the terminal generates a play data request, wherein the play data request carries target offset description information and a target media file link;
  • Step S730 obtain the playback data request, determine the target aggregate file according to the link of the target media file, and determine the segment to be played from the media segments of the target aggregate file according to the target offset description information.
  • the number of aggregated files is large, and the video code streams involved in the VR video are large, so before the terminal requests media fragmentation, the aggregated index can be delivered to the terminal file, so that the terminal can determine the target aggregation file according to the media file link in the aggregation index file, and then determine the media segment to be played according to the offset description information of the target aggregation file, so that according to the obtained target media file link and target offset
  • the description information generates a playback data request.
  • the terminal usually requests specific fragments according to the viewing angle and time of playback. This is a technology well known to those skilled in the art.
  • the offset description information and the media file link can be used to locate the segment to be played.
  • the terminal needs to continuously request the segment to be played for playback, so it will continuously send the target offset description information and the target media file link to the CDN node, and when the viewing angle remains unchanged, these The target offset description information and the target media file link are both for the same aggregate file within the preset time period. Therefore, even if the number of fragmentation requests is not reduced, the read operations are all for the same aggregate file. You only need After reading all the media fragments of an aggregated file, jump to the aggregated file corresponding to the next time period to read the media fragments, which can effectively reduce the number of file jump reads and improve file reading. performance.
  • another embodiment of the present application also provides a method for playing a media file, which is applied to a terminal.
  • the terminal communicates with a CDN node, and the CDN node stores an aggregation file.
  • the aggregation file is based on the media file aggregation method described in the above-mentioned embodiment. Obtained, referring to FIG. 8 , the method for playing a media file includes but is not limited to step S810 and step S820.
  • Step S810 obtaining the segment to be played sent by the CDN node, wherein the segment to be played is obtained from the media segment of the aggregation file.
  • Step S820 playing the segment to be played.
  • step S810 of the embodiment shown in FIG. 8 is executed, the following steps are also included but not limited to:
  • Step S910 obtain the aggregated index file sent by the CDN node, wherein the aggregated index file records the media information of each aggregated file corresponding to at least two video code streams, the media information includes media file links and offset description information, at least two video streams belong to the same VR video;
  • Step S920 generating a play data request, wherein the play data request carries target offset description information and a target media file link;
  • Step S930 sending the play data request to the CDN node, so that the CDN node determines the target aggregation file according to the link of the target media file, and determines the segment to be played from the media segments of the target aggregation file according to the target offset description information.
  • the network topology shown in Figure 10 includes source stations, CDN nodes, and terminals, where the CDN nodes are respectively Communicate with the source station and the terminal.
  • Example 1 DASH recording scene, refer to Figure 11, in this example, including but not limited to the following steps:
  • Step S1110 the CDN node obtains the DASH index file sent by the source station, and analyzes it to determine the video code stream of each viewing angle of the VR video;
  • Step S1120 the CDN node requests the media fragments of each video code stream from the source station, aggregates the media fragments of the same video code stream into aggregated files according to the preset duration, and saves them to the local disk;
  • Step S1130 obtaining the offset description information of the aggregated media fragments, writing the offset description information into the media offset file of the aggregated file, and saving the media offset file to the database;
  • Step S1140 when the terminal's index request is obtained, the CDN node writes the offset description information and the media offset file into a new DASH index file, and sends the DASH index file to the terminal;
  • Step S1150 the terminal determines the required media file link and offset description information from the DASH index file according to the playback requirement, and generates a playback data request;
  • Step S1160 the CDN node determines the corresponding media segment according to the media file link and offset description information carried in the playback data request, and feeds back to the terminal for playback.
  • Example 2 HLS recording scene, refer to Figure 12, in this example, including but not limited to the following steps:
  • Step S1210 the CDN node obtains the HLS index file sent by the source station, and analyzes it to determine the video code stream of each viewing angle of the VR video;
  • Step S1220 the CDN node requests the media fragments of each video code stream from the source station, aggregates the media fragments of the same video code stream into aggregated files according to the preset duration, and saves them to the local disk;
  • Step S1230 obtaining the offset description information of the aggregated media fragments, writing the offset description information into the file name of the aggregated media fragments, and saving it to a local database;
  • Step S1240 when the terminal's index request is obtained, the CDN node forms a new HLS index file from the locally aggregated media file information, and sends the HLS index file to the terminal;
  • Step S1250 the terminal determines the required media file link and offset description information from the HLS index file according to the playback requirement, and generates a playback data request;
  • Step S1260 the CDN node determines the corresponding media segment according to the media file link and offset description information carried in the playback data request, and feeds back to the terminal for playback.
  • the CDN system 1300 includes: a memory 1310 , a processor 1320 , and a computer program stored in the memory 1310 and operable on the processor 1320 .
  • the processor 1320 and the memory 1310 may be connected through a bus or in other ways.
  • the non-transitory software programs and instructions required to realize the media file aggregation method of the above-mentioned embodiment are stored in the memory 1310.
  • the media file aggregation method in the above-mentioned embodiment is executed, for example, the above-described method is executed.
  • Method step S110 to step S120 in Fig. 1, method step S210 to step S220 in Fig. 2, method step S310 to step S320 in Fig. 3, method step S410 to step S420 in Fig. 4, method step in Fig. 5 S510 alternatively, execute the method for playing a media file in the above embodiment, for example, execute the method steps S610 to S620 in FIG. 6 and the method steps S710 to S730 in FIG. 7 described above.
  • the terminal 1400 includes: a memory 1410 , a processor 1420 , and a computer program stored in the memory 1410 and operable on the processor 1420 .
  • the processor 1420 and the memory 1410 may be connected through a bus or in other ways.
  • the non-transitory software programs and instructions required to realize the media file aggregation method of the above-mentioned embodiment are stored in the memory 1410, and when executed by the processor 1420, the media file playing method in the above-mentioned embodiment is executed, for example, the above-described The method step S810 to step S820 in FIG. 8 , and the method step S910 to step S930 in FIG. 9 .
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • an embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or a controller, for example, by the above-mentioned Execution by a processor in the embodiment can cause the above-mentioned processor to execute the media file aggregation method in the above-mentioned embodiment, for example, execute the method steps S110 to S120 in FIG. 1 described above, and the method steps S210 to S210 in FIG. 2 described above.
  • Such software may reside on computer readable media, respectively, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present application provides a media file aggregation method, a playback method, a CDN system, a terminal and a storage medium. The media file aggregation method comprises: recording at least two media fragments according to a preset duration, the at least two media fragments being recorded in the same video code stream, and the at least two media fragments being temporally continuous (S110); and aggregating the at least two media fragments into an aggregated file (S120).

Description

媒体文件聚合方法、播放方法、CDN***、终端、存储介质Media file aggregation method, playback method, CDN system, terminal, storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111355200.5、申请日为2021年11月16日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202111355200.5 and a filing date of November 16, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及但不限于视频媒体服务领域,例如涉及一种媒体文件聚合方法、播放方法、CDN***、终端、存储介质。The present application relates to but is not limited to the field of video media services, for example, it relates to a media file aggregation method, a playback method, a CDN system, a terminal, and a storage medium.
背景技术Background technique
内容分发网络(Content Delivery Network,CDN)是流媒体服务的重要技术,常见的CDN***由源站和CDN节点组成,CDN节点位于与用户终端更加接近的网络边缘,通常会在CDN节点录制源站的直播分片,在访问时通过CDN节点向用户终端提供媒体数据,能够有效提高播放的实时性和性能,并降低源站和承载网络的压力。Content Delivery Network (CDN) is an important technology for streaming media services. A common CDN system consists of an origin station and a CDN node. The CDN node is located at the edge of the network closer to the user terminal, and the source station is usually recorded at the CDN node. The live segment of the live broadcast provides media data to the user terminal through the CDN node during access, which can effectively improve the real-time performance and performance of the playback, and reduce the pressure on the source station and the bearer network.
虚拟现实(Virtual Reality,VR)视频已经在各行各业得到了广泛的应用,VR视频通常具有多个视角,每个视角对应一个独立视频。在通过CDN***提供VR视频媒体服务的场景下,VR视频的每个视角视频对应一个码流,并且会在源站将每个码流切成若干个分片,CDN节点将分片录制到本地为用户提供流媒体服务。而分片数量通常较多,为了减少媒体文件的个数,通常会将同一时间内所有视角的分片聚合成一个聚合文件,通过媒体偏移文件记载每个分片在聚合文件的偏移。这种录制方式虽然能够减少文件的数量,但是播放过程中,即使终端的视角保持不变,也需要不断切换聚合文件,影响文件读取的性能。Virtual reality (Virtual Reality, VR) videos have been widely used in various industries. VR videos usually have multiple viewing angles, and each viewing angle corresponds to an independent video. In the scenario of providing VR video media services through the CDN system, each view of the VR video corresponds to a code stream, and each code stream will be cut into several fragments at the source station, and the CDN node will record the fragments locally Provide streaming services to users. However, the number of fragments is usually large. In order to reduce the number of media files, the fragments of all views at the same time are usually aggregated into an aggregate file, and the offset of each fragment in the aggregate file is recorded through the media offset file. Although this recording method can reduce the number of files, during playback, even if the viewing angle of the terminal remains unchanged, it is necessary to continuously switch aggregated files, which affects the performance of file reading.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例提供了一种媒体文件聚合方法、播放方法、CDN***、终端、存储介质,能够在保持视角不变的情况下减少播放时文件读取的次数,提高文件读取性能。Embodiments of the present application provide a media file aggregation method, playback method, CDN system, terminal, and storage medium, which can reduce the number of file reads during playback and improve file read performance while keeping the viewing angle unchanged.
第一方面,本申请实施例提供了一种媒体文件聚合方法,应用于CDN***,所述方法包括:根据预设时长录制至少两个媒体分片,其中,至少两个所述媒体分片录制于同一个视频码流,至少两个所述媒体分片在时间上连续;将至少两个所述媒体分片聚合成聚合文件。In the first aspect, the embodiment of the present application provides a media file aggregation method, which is applied to a CDN system, and the method includes: recording at least two media segments according to a preset duration, wherein at least two of the media segments are recorded For the same video code stream, at least two of the media fragments are continuous in time; the at least two of the media fragments are aggregated into an aggregated file.
第二方面,本申请实施例提供了一种媒体文件播放方法,应用于CDN节点,所述CDN节点与终端通信连接,所述CDN节点存储有聚合文件,所述聚合文件根据第一方面所述的媒体文件聚合方法得到,所述方法包括:从聚合文件的所述媒体分片中确定待播放分片;将所述待播放分片发送至所述终端,以使所述终端播放所述待播放分片。In the second aspect, the embodiment of the present application provides a method for playing a media file, which is applied to a CDN node, and the CDN node is communicatively connected to a terminal, and the CDN node stores an aggregation file, and the aggregation file is based on the first aspect The media file aggregation method is obtained, and the method includes: determining the segment to be played from the media segment of the aggregated file; sending the segment to be played to the terminal, so that the terminal plays the segment to be played Play fragments.
第三方面,本申请实施例提供了一种媒体文件播放方法,应用于终端,所述终端与CDN节点通信连接,所述CDN节点存储有聚合文件,所述聚合文件根据第一方面所述的媒体文件聚合方法得到,所述媒体文件播放方法包括:获取所述CDN节点发送的待播放分片,其中,所述待播放分片获取于所述聚合文件的所述媒体分片;播放所述待播放分片。In the third aspect, the embodiment of the present application provides a method for playing a media file, which is applied to a terminal, and the terminal is communicatively connected to a CDN node, and the CDN node stores an aggregation file, and the aggregation file is based on the method described in the first aspect The media file aggregation method is obtained, and the media file playing method includes: obtaining the segment to be played sent by the CDN node, wherein the segment to be played is obtained from the media segment of the aggregation file; playing the Segment to be played.
第四方面,本申请实施例提供了一种CDN***,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所 述的媒体文件聚合方法,或者,实现如第二方面所述的媒体文件播放方法。In a fourth aspect, an embodiment of the present application provides a CDN system, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the following when executing the computer program. The method for aggregating media files described in one aspect, or, the method for playing media files described in the second aspect.
第五方面,本申请实施例提供了一种终端,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第三方面所述的媒体文件播放方法。In the fifth aspect, an embodiment of the present application provides a terminal, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the third method when executing the computer program. The media file playing method described in the aspect.
第六方面,本申请实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如第一方面所述的媒体文件聚合方法,或者,实现如第二方面所述的媒体文件播放方法,或者,实现如第三方面所述的媒体文件播放方法。In the sixth aspect, the embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the media file aggregation method as described in the first aspect, or to implement the method as described in The media file playing method described in the second aspect, or, realize the media file playing method described in the third aspect.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1是本申请一个实施例提供的媒体文件聚合方法的流程图;Fig. 1 is the flow chart of the media file aggregation method that one embodiment of the present application provides;
图2是本申请另一个实施例提供的添加偏移描述信息的流程图;Fig. 2 is a flowchart of adding offset description information provided by another embodiment of the present application;
图3是本申请另一个实施例提供的添加偏移描述信息的流程图;Fig. 3 is a flowchart of adding offset description information provided by another embodiment of the present application;
图4是本申请另一个实施例提供的确定待录制的视频码流的流程图;Fig. 4 is a flow chart of determining the video code stream to be recorded provided by another embodiment of the present application;
图5是本申请另一个实施例提供的生成聚合索引文件的流程图;Fig. 5 is a flow chart of generating an aggregation index file provided by another embodiment of the present application;
图6是本申请另一个实施例提供的媒体文件播放方法的流程图;Fig. 6 is the flow chart of the media file playing method that another embodiment of the present application provides;
图7是本申请另一个实施例提供的确定待播放分片的流程图;FIG. 7 is a flow chart of determining a segment to be played provided by another embodiment of the present application;
图8是本申请另一个实施例提供的媒体文件播放方法的流程图;FIG. 8 is a flowchart of a media file playing method provided in another embodiment of the present application;
图9是本申请另一个实施例提供的确定待播放分片的流程图;Fig. 9 is a flow chart of determining a segment to be played provided by another embodiment of the present application;
图10是本申请示例的CDN网络拓扑示意图;FIG. 10 is a schematic diagram of a CDN network topology in an example of the present application;
图11是本申请示例一的流程图;Figure 11 is a flow chart of Example 1 of the present application;
图12是本申请示例二的流程图;Fig. 12 is a flow chart of Example 2 of the present application;
图13是本申请另一个实施例提供的CDN***的装置图;Fig. 13 is a device diagram of a CDN system provided by another embodiment of the present application;
图14是本申请另一个实施例提供的终端的装置图。Fig. 14 is an apparatus diagram of a terminal provided by another embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书、权利要求书或上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the schematic diagram of the device, and the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than the module division in the device or the flowchart in the flowchart. steps shown or described. The terms "first", "second" and the like in the specification, claims or the above-mentioned drawings are used to distinguish similar objects, and not necessarily used to describe a specific order or sequential order.
本申请提供了一种媒体文件聚合方法、播放方法、CDN***、终端、存储介质,媒体文件聚合方法包括:根据预设时长录制至少两个媒体分片,其中,至少两个所述媒体分片录制于同一个视频码流,至少两个所述媒体分片在时间上连续;将至少两个所述媒体分片聚合成聚合文件。根据本实施例的技术方案,聚合文件中的媒体分片连续录制于同一个视频码流, 而每个视频码流对应一个视角,因此,在终端保持视角不变的情况下,能够直接从一个聚合文件连续读媒体分片进行播放,有效减少了文件切换的次数,提高了文件读取性能。The present application provides a media file aggregation method, a playback method, a CDN system, a terminal, and a storage medium. The media file aggregation method includes: recording at least two media fragments according to a preset duration, wherein at least two of the media fragments Recording in the same video code stream, at least two of the media fragments are continuous in time; at least two of the media fragments are aggregated into an aggregated file. According to the technical solution of this embodiment, the media fragments in the aggregation file are continuously recorded in the same video code stream, and each video code stream corresponds to a viewing angle. Aggregation files are continuously read media slices for playback, which effectively reduces the number of file switching and improves file reading performance.
下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application will be further described below in conjunction with the accompanying drawings.
如图1所示,图1是本申请一个实施例提供的一种媒体文件聚合方法的流程图,该媒体文件聚合方法应用于CDN***,包括但不限于有步骤S110和步骤S120。As shown in FIG. 1, FIG. 1 is a flowchart of a media file aggregation method provided by an embodiment of the present application. The media file aggregation method is applied to a CDN system, including but not limited to steps S110 and S120.
步骤S110,根据预设时长录制至少两个媒体分片,其中,至少两个媒体分片录制于同一个视频码流,至少两个媒体分片在时间上连续。Step S110, recording at least two media segments according to a preset duration, wherein at least two media segments are recorded in the same video stream, and at least two media segments are continuous in time.
需要说明的是,预设时长的可以是任意数值,例如设置10分钟,按照10分钟的时间段从一个视频码流中录制多个媒体分片,使得每个聚合文件对应同一视角的10分钟的视频,具体数值根据实际需求调整即可,在此不多作限定。It should be noted that the preset duration can be any value. For example, if it is set to 10 minutes, multiple media segments are recorded from a video stream according to a 10-minute period, so that each aggregated file corresponds to 10 minutes of the same viewing angle. Video, the specific value can be adjusted according to actual needs, and there are no limitations here.
值得注意的是,在本实施例中,媒体分片的数量为至少两个,具体数量根据预设时长进行录制确定,确保以连续录制的方式从同一个视频码流中录制得到,且在时间上连续即可。It is worth noting that, in this embodiment, the number of media fragments is at least two, and the specific number is determined according to the preset duration of recording to ensure that it is recorded from the same video stream in the form of continuous recording, and at time Just continue on.
值得注意的是,VR视频的每个视角视频对应一个视频码流,媒体分片录制于从同一个视频码流且在时间上连续,使得得到的媒体分片在确保视角不变的情况下,能够成为连续播放的内容,从而为在时间维度进行文件聚合提供数据基础。It is worth noting that each viewing angle video of a VR video corresponds to a video code stream, and the media fragments are recorded from the same video code stream and are continuous in time, so that the obtained media fragments can be obtained without changing the viewing angle. It can become continuously played content, thus providing a data basis for file aggregation in the time dimension.
步骤S120,将至少两个媒体分片聚合成聚合文件。Step S120, aggregate at least two media fragments into an aggregated file.
需要说明的是,在具备多个媒体分片的情况下,本领域技术人员熟知如何进行文件聚合,从而将多个媒体分片聚合成为一个独立的聚合文件,本实施例对聚合方式不多作限定,能够实现聚合即可。It should be noted that, in the case of multiple media fragments, those skilled in the art are familiar with how to perform file aggregation, so as to aggregate multiple media fragments into an independent aggregated file. Limited, it is sufficient to be able to achieve aggregation.
需要说明的是,在视角保持不变的情况下,终端播放时请求的内容来自于同一个视频码流,基于上述描述,至少两个媒体分片录制于同一个视频码流,因此在固定视角播放时,以预设时长为10分钟为例,能够从一个聚合文件中请求连续10分钟的播放内容,并且在读取过程中只需要保持从该聚合文件中进行媒体分片的请求,通过文件聚合减少了录制文件的个数,并且在读取过程中无需跳跃读取文件,能够有效减少文件读取的次数,提高CDN***读取播放文件的性能。It should be noted that when the viewing angle remains unchanged, the content requested by the terminal comes from the same video code stream. Based on the above description, at least two media fragments are recorded in the same video code stream. Therefore, at a fixed viewing angle When playing, take the preset duration of 10 minutes as an example, you can request 10 minutes of continuous playback content from an aggregated file, and only need to keep the request for media fragmentation from the aggregated file during the reading process, through the file Aggregation reduces the number of recorded files, and there is no need to jump to read files during the reading process, which can effectively reduce the number of file reads and improve the performance of the CDN system for reading and playing files.
需要说明的是,根据预设时长录制媒体分片可以执行任意次数,例如视频码流的时长为60分钟,预设时长为10分钟,则可以针对该视频码流进行6次10分钟的录制,并将每10分钟录制得到的媒体分片聚合成一个聚合文件,从而得到与该视频码流所对应的6个聚合文件,以确保视频码流能够完全录制到CDN节点,从而提升播放的实时性和性能,当然,在具备多个视频码流的情况下,分别针对每个视频码流进行录制和聚合即可,在此不重复赘述。It should be noted that recording media segments according to the preset duration can be performed any number of times. For example, if the duration of the video stream is 60 minutes and the preset duration is 10 minutes, six 10-minute recordings can be performed for the video stream. And aggregate the media fragments recorded every 10 minutes into one aggregation file, so as to obtain 6 aggregation files corresponding to the video code stream, so as to ensure that the video code stream can be completely recorded to the CDN node, thereby improving the real-time performance of playback And performance, of course, in the case of multiple video streams, it is enough to record and aggregate each video stream separately, so I won’t repeat them here.
另外,参考图2,在一实施例中,在执行完图1所示实施例的步骤S120之后,还包括但不限于有以下步骤:In addition, referring to FIG. 2, in one embodiment, after step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
步骤S210,确定媒体分片在聚合文件中的偏移描述信息;Step S210, determining the offset description information of the media segment in the aggregation file;
步骤S220,将偏移描述信息添加至聚合文件的媒体偏移文件。Step S220, adding offset description information to the media offset file of the aggregation file.
需要说明的是,偏移描述信息是聚合技术中常用的描述信息,用于描述每个媒体分片在聚合文件中的位置,本实施例对偏移描述信息的生成方式和形式不作过多限定。It should be noted that the offset description information is commonly used description information in the aggregation technology, and is used to describe the position of each media fragment in the aggregation file. This embodiment does not make too many limitations on the generation method and form of the offset description information .
需要说明的是,在确定每个媒体分片的偏移描述信息后,为了便于索引,需要将偏移描述信息与聚合文件进行关联,例如,当采用超文本传输协议动态自适应流媒体(Dynamic Adaptive Streaming over Hypertext Transfer Protocol,DASH)技术进行录制,在得到聚 合文件之后,会生成每个聚合文件的媒体偏移文件,因此,可以将偏移描述信息添加至该媒体偏移文件,从而在进行seek操作时,能够根据偏移描述信息查找出对应的媒体分片进行读取。It should be noted that after determining the offset description information of each media fragment, in order to facilitate indexing, it is necessary to associate the offset description information with the aggregation file. Adaptive Streaming over Hypertext Transfer Protocol, DASH) technology for recording, after the aggregation file is obtained, the media offset file of each aggregation file will be generated, therefore, the offset description information can be added to the media offset file, so that the During the seek operation, the corresponding media fragment can be found and read according to the offset description information.
另外,参考图3,在一实施例中,在执行完图1所示实施例的步骤S120之后,还包括但不限于有以下步骤:In addition, referring to FIG. 3 , in one embodiment, after step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
步骤S310,确定媒体分片在聚合文件中的偏移描述信息;Step S310, determining the offset description information of the media segment in the aggregation file;
步骤S320,将偏移描述信息添加至聚合后的媒体分片的播放链接参数。Step S320, adding offset description information to the playing link parameters of the aggregated media segments.
需要说明的是,如图2实施例所述,偏移描述信息是聚合技术中常用的描述信息,在此不重复赘述。It should be noted that, as described in the embodiment of FIG. 2 , the offset description information is commonly used description information in the aggregation technology, and details are not repeated here.
需要说明的是,CDN节点还可以采用流媒体传输协议(HTTP live Streaming,HLS)技术进行媒体分片的录制,与DASH技术不同,通过HLS技术录制之后,媒体分片的索引信息保存在播放连接参数中,因此在得到偏移描述信息后,还可以将偏移描述信息添加到媒体分片聚合后的播放连接参数,从而实现HLS索引。It should be noted that CDN nodes can also use HTTP live Streaming (HLS) technology to record media fragments. Unlike DASH technology, after recording through HLS technology, the index information of media fragments is stored in the playback connection parameters, so after obtaining the offset description information, the offset description information can also be added to the playback connection parameters after media fragment aggregation, so as to realize the HLS index.
需要说明的是,播放连接参数可以是媒体分片的文件名,具体的描述方式根据实际需求调整,能够实现媒体文件的索引即可。It should be noted that the playback connection parameter can be the file name of the media segment, and the specific description method can be adjusted according to actual needs, as long as the index of the media file can be realized.
另外,在一实施例中,CDN节点与源站通信连接,参考图4,在一实施例中,在执行图1所示实施例的步骤S110之前,还包括但不限于有以下步骤:In addition, in one embodiment, the CDN node communicates with the source station. Referring to FIG. 4 , in one embodiment, before performing step S110 of the embodiment shown in FIG. 1 , it also includes but is not limited to the following steps:
步骤S410,获取源站的码流索引文件;Step S410, obtaining the code stream index file of the source site;
步骤S420,根据码流索引文件确定至少两个待录制的视频码流,其中,至少两个待录制的视频码流归属于同一个VR视频。Step S420, determine at least two video code streams to be recorded according to the code stream index file, wherein at least two video code streams to be recorded belong to the same VR video.
需要说明的是,VR视频与普通视频不同,在同一时刻具有多个视角的视频码流,因此,码流索引文件需要至少记载两个待录制的视频码流,源站的码流索引文件的格式可以根据具体的录制方式预先配置,例如采用上述实施例所描述的DASH技术或者HLS技术进行录制,本实施例对码流索引文件的具体形式不作过多限定,本领域技术人员在具备码流索引文件的情况下熟知如何从源站中请求视频码流至CDN节点,在此不再赘述。It should be noted that, unlike ordinary videos, VR videos have video streams from multiple perspectives at the same time. Therefore, the stream index file needs to record at least two video streams to be recorded. The format can be pre-configured according to the specific recording method. For example, the DASH technology or HLS technology described in the above embodiment is used for recording. This embodiment does not make too many restrictions on the specific form of the code stream index file. In the case of index files, it is well known how to request the video code stream from the source site to the CDN node, so I won’t go into details here.
需要说明的是,在确定视频码流之后,CDN节点可以根据预设时长对每个视频码流进行,并得到多个聚合文件,例如一个VR视频具备24个视角,则可以确定具有24个视频码流,CDN节点可以根据码流索引文件从源站请求上述24个视频码流,并针对每个视频码流分别执行图1所示实施例的操作,确保得到的聚合文件中的媒体分片来自于同一个视频码流,为读取过程减少文件跳跃次数提供文件基础。It should be noted that after the video code stream is determined, the CDN node can process each video code stream according to the preset duration and obtain multiple aggregated files. For example, if a VR video has 24 viewing angles, it can be determined that there are 24 video Code stream, the CDN node can request the above 24 video code streams from the source station according to the code stream index file, and perform the operation of the embodiment shown in Figure 1 for each video code stream to ensure the media fragmentation in the obtained aggregated file It comes from the same video code stream, which provides a file basis for reducing the number of file jumps in the reading process.
另外,参考图5,在一实施例中,在执行完图1所示实施例的步骤S120之后,还包括但不限于有以下步骤:In addition, referring to FIG. 5, in one embodiment, after step S120 of the embodiment shown in FIG. 1 is executed, the following steps are also included but not limited to:
步骤S510,生成聚合索引文件,其中,聚合索引文件记载有每个视频码流所对应的每个聚合文件的媒体信息,媒体信息包括媒体文件链接和偏移描述信息。Step S510, generating an aggregated index file, wherein the aggregated index file records the media information of each aggregated file corresponding to each video code stream, and the media information includes media file links and offset description information.
需要说明的是,聚合索引文件的生成时机可以是VR视频的录制完成,也可以是接收到终端的索引请求之后,本实施例对此不多作限定。It should be noted that the timing of generating the aggregation index file may be after the recording of the VR video is completed, or after receiving an index request from the terminal, which is not limited in this embodiment.
需要说明的是,基于图4所示实施例的描述,VR视频所对应的视频码流较多,在得到多个聚合文件之后,可以将每个视频码流的标识信息添加到聚合文件的媒体文件链接中,也根据所归属的视频码流对聚合文件进行命名,能够确定聚合文件所归属的视频码流即可,根据 方式可以根据实际需求选取,在此不多作限定。It should be noted that, based on the description of the embodiment shown in Figure 4, there are many video code streams corresponding to the VR video. After obtaining multiple aggregated files, the identification information of each video code stream can be added to the media of the aggregated file. In the file link, the aggregated file is also named according to the video stream to which it belongs. It only needs to be able to determine the video stream to which the aggregated file belongs. The method can be selected according to actual needs, and there is no limitation here.
需要说明的是,由于终端请求内容是以媒体分片为单位,因此,为了便于终端快速确定媒体分片的存储位置,也可以在媒体信息中添加偏移描述信息。It should be noted that since the content requested by the terminal is in units of media fragments, offset description information may also be added to the media information in order to facilitate the terminal to quickly determine the storage location of the media fragments.
值得注意的是,媒体分片可以录制到CDN节点的本地磁盘进行存储,媒体信息可以存储到数据库,便于终端进行读取。It is worth noting that media fragments can be recorded to the local disk of the CDN node for storage, and media information can be stored in the database, which is convenient for terminals to read.
另外,本申请的另一个实施例还提供了一种媒体文件播放方法,应用于CDN节点,CDN节点与终端通信连接,CDN节点存储有聚合文件,聚合文件根据上述实施例所述的媒体文件聚合方法得到,参照图6,该媒体文件播放方法包括但不限于有步骤S610和步骤S620。In addition, another embodiment of the present application also provides a method for playing a media file, which is applied to a CDN node, and the CDN node communicates with the terminal. The CDN node stores aggregated files, and the aggregated files are aggregated according to the media files described in the above-mentioned embodiments. The method is obtained. Referring to FIG. 6 , the method for playing a media file includes but is not limited to step S610 and step S620.
步骤S610,从聚合文件的媒体分片中确定待播放分片;Step S610, determining the segment to be played from the media segment of the aggregation file;
步骤S620,将待播放分片发送至终端,以使终端播放待播放分片。Step S620, sending the segment to be played to the terminal, so that the terminal plays the segment to be played.
需要说明的是,聚合文件的获取方法可以参考图1至图5所示实施例的描述,为了叙述简便在此不再重复赘述。It should be noted that, for the methods for obtaining aggregated files, reference may be made to the descriptions of the embodiments shown in FIG. 1 to FIG. 5 , and details are not repeated here for the sake of brevity.
值得注意的是,由于同一个聚合文件的媒体分片录制于同一个视频码流,且在时间上是连续的,因此,在保持视角不变的情况下,在预设时长内,终端只需要从一个聚合文件请求媒体分片作为待播放分片进行播放,有效减少了文件跳转的次数,提高了文件读取的性能。It is worth noting that since the media segments of the same aggregation file are recorded in the same video stream and are continuous in time, the terminal only needs to Request media fragments from an aggregated file to play as fragments to be played, which effectively reduces the number of file jumps and improves the performance of file reading.
另外,参考图7,在一实施例中,图6所示实施例的步骤S610,还包括但不限于有以下步骤:In addition, referring to FIG. 7, in one embodiment, step S610 of the embodiment shown in FIG. 6 also includes but is not limited to the following steps:
步骤S710,生成聚合索引文件,其中,聚合索引文件记载有至少两个视频码流所对应的每个聚合文件的媒体信息,媒体信息包括媒体文件链接和偏移描述信息,至少两个视频码流归属于同一个VR视频;Step S710, generate an aggregation index file, wherein the aggregation index file records the media information of each aggregation file corresponding to at least two video code streams, the media information includes media file links and offset description information, and at least two video code streams belong to the same VR video;
步骤S720,将聚合索引文件下发至终端,以使终端生成播放数据请求,其中,播放数据请求携带有目标偏移描述信息和目标媒体文件链接;Step S720, sending the aggregation index file to the terminal, so that the terminal generates a play data request, wherein the play data request carries target offset description information and a target media file link;
步骤S730,获取播放数据请求,根据目标媒体文件链接确定目标聚合文件,根据目标偏移描述信息从目标聚合文件的媒体分片中确定待播放分片。Step S730, obtain the playback data request, determine the target aggregate file according to the link of the target media file, and determine the segment to be played from the media segments of the target aggregate file according to the target offset description information.
需要说明的是,根据图5所示实施例的描述,聚合文件的数量较多,而且VR视频所涉及的视频码流较多,因此在终端请求媒体分片之前,可以向终端下发聚合索引文件,使得终端能够根据聚合索引文件中的媒体文件链接确定目标聚合文件,再根据目标聚合文件的偏移描述信息确定所需要播放的媒体分片,从而根据得到的目标媒体文件链接和目标偏移描述信息生成播放数据请求。It should be noted that, according to the description of the embodiment shown in Figure 5, the number of aggregated files is large, and the video code streams involved in the VR video are large, so before the terminal requests media fragmentation, the aggregated index can be delivered to the terminal file, so that the terminal can determine the target aggregation file according to the media file link in the aggregation index file, and then determine the media segment to be played according to the offset description information of the target aggregation file, so that according to the obtained target media file link and target offset The description information generates a playback data request.
需要说明的是,终端在播放过程中,通常会根据播放的视角和时间请求具体的分片,这是本领域技术人员所熟知的技术,本实施例对此不多作赘述,能够由终端根据偏移描述信息和媒体文件链接实现待播放分片的定位即可。It should be noted that during the playback process, the terminal usually requests specific fragments according to the viewing angle and time of playback. This is a technology well known to those skilled in the art. The offset description information and the media file link can be used to locate the segment to be played.
需要说明的是,在播放过程中,终端需要不断请求待播放分片进行播放,因此会向CDN节点不断发送目标偏移描述信息和目标媒体文件链接,而在视角保持不变的情况下,这些目标偏移描述信息和目标媒体文件链接在预设时长内都是针对同一个聚合文件的,因此,即使分片的请求次数没有得到减少,但是读取操作都是针对同一个聚合文件,只需要在读取完一个聚合文件的全部媒体分片后,跳转到下一个时间段所对应的聚合文件进行媒体分片的读取,能够有效减少了文件跳跃读取的次数,提高了文件读取的性能。It should be noted that during the playback process, the terminal needs to continuously request the segment to be played for playback, so it will continuously send the target offset description information and the target media file link to the CDN node, and when the viewing angle remains unchanged, these The target offset description information and the target media file link are both for the same aggregate file within the preset time period. Therefore, even if the number of fragmentation requests is not reduced, the read operations are all for the same aggregate file. You only need After reading all the media fragments of an aggregated file, jump to the aggregated file corresponding to the next time period to read the media fragments, which can effectively reduce the number of file jump reads and improve file reading. performance.
另外,本申请的另一个实施例还提供了一种媒体文件播放方法,应用于终端,终端与CDN 节点通信连接,CDN节点存储有聚合文件,聚合文件根据上述实施例所述的媒体文件聚合方法得到,参照图8,媒体文件播放方法包括但不限于有步骤S810和步骤S820。In addition, another embodiment of the present application also provides a method for playing a media file, which is applied to a terminal. The terminal communicates with a CDN node, and the CDN node stores an aggregation file. The aggregation file is based on the media file aggregation method described in the above-mentioned embodiment. Obtained, referring to FIG. 8 , the method for playing a media file includes but is not limited to step S810 and step S820.
步骤S810,获取CDN节点发送的待播放分片,其中,待播放分片获取于聚合文件的媒体分片。Step S810, obtaining the segment to be played sent by the CDN node, wherein the segment to be played is obtained from the media segment of the aggregation file.
步骤S820,播放待播放分片。Step S820, playing the segment to be played.
需要说明的是,本实施例的原理和方法可以参考图6所示实施例的描述,主要区别在于本实施例的执行主体为终端,为了叙述简便在此不重复赘述。It should be noted that the principle and method of this embodiment can refer to the description of the embodiment shown in FIG. 6 , the main difference is that the execution subject of this embodiment is a terminal, and for the sake of brevity, details are not repeated here.
另外,参考图9,在一实施例中,在执行完图8所示实施例的步骤S810之前,还包括但不限于有以下步骤:In addition, referring to FIG. 9, in one embodiment, before step S810 of the embodiment shown in FIG. 8 is executed, the following steps are also included but not limited to:
步骤S910,获取CDN节点发送的聚合索引文件,其中,聚合索引文件记载有至少两个视频码流所对应的每个聚合文件的媒体信息,媒体信息包括媒体文件链接和偏移描述信息,至少两个视频码流归属于同一个VR视频;Step S910, obtain the aggregated index file sent by the CDN node, wherein the aggregated index file records the media information of each aggregated file corresponding to at least two video code streams, the media information includes media file links and offset description information, at least two video streams belong to the same VR video;
步骤S920,生成播放数据请求,其中,播放数据请求携带有目标偏移描述信息和目标媒体文件链接;Step S920, generating a play data request, wherein the play data request carries target offset description information and a target media file link;
步骤S930,将播放数据请求发送至CDN节点,以使CDN节点根据目标媒体文件链接确定目标聚合文件,根据目标偏移描述信息从目标聚合文件的媒体分片中确定待播放分片。Step S930, sending the play data request to the CDN node, so that the CDN node determines the target aggregation file according to the link of the target media file, and determines the segment to be played from the media segments of the target aggregation file according to the target offset description information.
需要说明的是,本实施例的原理和方法可以参考图7所示实施例的描述,主要区别在于本实施例的执行主体为终端,为了叙述简便在此不重复赘述。It should be noted that the principle and method of this embodiment can refer to the description of the embodiment shown in FIG. 7 , the main difference is that the execution subject of this embodiment is a terminal, and for the sake of brevity, details are not repeated here.
为了更好地说明本申请的技术方案,以下结合图10所示的网络拓扑提出两个具体示例,在图10所示的网络拓扑中,包括源站、CDN节点和终端,其中,CDN节点分别与源站和终端通信连接。In order to better illustrate the technical solution of this application, two specific examples are proposed below in conjunction with the network topology shown in Figure 10. In the network topology shown in Figure 10, it includes source stations, CDN nodes, and terminals, where the CDN nodes are respectively Communicate with the source station and the terminal.
示例一:DASH录制场景,参照图11,在本示例中,包括但不限于有以下步骤:Example 1: DASH recording scene, refer to Figure 11, in this example, including but not limited to the following steps:
步骤S1110,CDN节点获取源站发送的DASH索引文件,并进行解析,确定VR视频的每个视角的视频码流;Step S1110, the CDN node obtains the DASH index file sent by the source station, and analyzes it to determine the video code stream of each viewing angle of the VR video;
步骤S1120,CDN节点从源站请求每个视频码流的媒体分片,将同一个视频码流的媒体分片按照预设时长聚合成聚合文件,并保存到本地磁盘;Step S1120, the CDN node requests the media fragments of each video code stream from the source station, aggregates the media fragments of the same video code stream into aggregated files according to the preset duration, and saves them to the local disk;
步骤S1130,获取聚合后的媒体分片的偏移描述信息,将偏移描述信息写入聚合文件的媒体偏移文件中,并将媒体偏移文件保存到数据库;Step S1130, obtaining the offset description information of the aggregated media fragments, writing the offset description information into the media offset file of the aggregated file, and saving the media offset file to the database;
步骤S1140,当获取到终端的索引请求,CDN节点将偏移描述信息和媒体偏移文件写入新的DASH索引文件,并将DASH索引文件下发至终端;Step S1140, when the terminal's index request is obtained, the CDN node writes the offset description information and the media offset file into a new DASH index file, and sends the DASH index file to the terminal;
步骤S1150,终端根据播放需求从DASH索引文件中确定所需要的媒体文件链接和偏移描述信息,并生成播放数据请求;Step S1150, the terminal determines the required media file link and offset description information from the DASH index file according to the playback requirement, and generates a playback data request;
步骤S1160,CDN节点根据播放数据请求中的所携带的媒体文件链接和偏移描述信息,确定对应的媒体分片,并反馈至终端进行播放。Step S1160, the CDN node determines the corresponding media segment according to the media file link and offset description information carried in the playback data request, and feeds back to the terminal for playback.
示例二:HLS录制场景,参照图12,在本示例中,包括但不限于有以下步骤:Example 2: HLS recording scene, refer to Figure 12, in this example, including but not limited to the following steps:
步骤S1210,CDN节点获取源站发送的HLS索引文件,并进行解析,确定VR视频的每个视角的视频码流;Step S1210, the CDN node obtains the HLS index file sent by the source station, and analyzes it to determine the video code stream of each viewing angle of the VR video;
步骤S1220,CDN节点从源站请求每个视频码流的媒体分片,将同一个视频码流的媒体分片按照预设时长聚合成聚合文件,并保存到本地磁盘;Step S1220, the CDN node requests the media fragments of each video code stream from the source station, aggregates the media fragments of the same video code stream into aggregated files according to the preset duration, and saves them to the local disk;
步骤S1230,获取聚合后的媒体分片的偏移描述信息,将偏移描述信息写入聚合后的媒体分片的文件名,并保存到本地数据库;Step S1230, obtaining the offset description information of the aggregated media fragments, writing the offset description information into the file name of the aggregated media fragments, and saving it to a local database;
步骤S1240,当获取到终端的索引请求,CDN节点将本地聚合后的媒体文件信息组成新的HLS索引文件,并将HLS索引文件下发至终端;Step S1240, when the terminal's index request is obtained, the CDN node forms a new HLS index file from the locally aggregated media file information, and sends the HLS index file to the terminal;
步骤S1250,终端根据播放需求从HLS索引文件中确定所需要的媒体文件链接和偏移描述信息,并生成播放数据请求;Step S1250, the terminal determines the required media file link and offset description information from the HLS index file according to the playback requirement, and generates a playback data request;
步骤S1260,CDN节点根据播放数据请求中的所携带的媒体文件链接和偏移描述信息,确定对应的媒体分片,并反馈至终端进行播放。Step S1260, the CDN node determines the corresponding media segment according to the media file link and offset description information carried in the playback data request, and feeds back to the terminal for playback.
另外,参照图13,本申请的一个实施例还提供了一种CDN***,该CDN***1300包括:存储器1310、处理器1320及存储在存储器1310上并可在处理器1320上运行的计算机程序。In addition, referring to FIG. 13 , an embodiment of the present application also provides a CDN system. The CDN system 1300 includes: a memory 1310 , a processor 1320 , and a computer program stored in the memory 1310 and operable on the processor 1320 .
处理器1320和存储器1310可以通过总线或者其他方式连接。The processor 1320 and the memory 1310 may be connected through a bus or in other ways.
实现上述实施例的媒体文件聚合方法所需的非暂态软件程序以及指令存储在存储器1310中,当被处理器1320执行时,执行上述实施例中的媒体文件聚合方法,例如,执行以上描述的图1中的方法步骤S110至步骤S120、图2中的方法步骤S210至步骤S220、图3中的方法步骤S310至步骤S320、图4中的方法步骤S410至步骤S420、图5中的方法步骤S510,或者,执行上述实施例中的媒体文件播放方法,例如,执行以上描述的图6中的方法步骤S610至步骤S620、图7中的方法步骤S710至步骤S730。The non-transitory software programs and instructions required to realize the media file aggregation method of the above-mentioned embodiment are stored in the memory 1310. When executed by the processor 1320, the media file aggregation method in the above-mentioned embodiment is executed, for example, the above-described method is executed. Method step S110 to step S120 in Fig. 1, method step S210 to step S220 in Fig. 2, method step S310 to step S320 in Fig. 3, method step S410 to step S420 in Fig. 4, method step in Fig. 5 S510, alternatively, execute the method for playing a media file in the above embodiment, for example, execute the method steps S610 to S620 in FIG. 6 and the method steps S710 to S730 in FIG. 7 described above.
另外,参照图14,本申请的一个实施例还提供了一种终端,该终端1400包括:存储器1410、处理器1420及存储在存储器1410上并可在处理器1420上运行的计算机程序。In addition, referring to FIG. 14 , an embodiment of the present application also provides a terminal. The terminal 1400 includes: a memory 1410 , a processor 1420 , and a computer program stored in the memory 1410 and operable on the processor 1420 .
处理器1420和存储器1410可以通过总线或者其他方式连接。The processor 1420 and the memory 1410 may be connected through a bus or in other ways.
实现上述实施例的媒体文件聚合方法所需的非暂态软件程序以及指令存储在存储器1410中,当被处理器1420执行时,执行上述实施例中的媒体文件播放方法,例如,执行以上描述的图8中的方法步骤S810至步骤S820、图9中的方法步骤S910至步骤S930。The non-transitory software programs and instructions required to realize the media file aggregation method of the above-mentioned embodiment are stored in the memory 1410, and when executed by the processor 1420, the media file playing method in the above-mentioned embodiment is executed, for example, the above-described The method step S810 to step S820 in FIG. 8 , and the method step S910 to step S930 in FIG. 9 .
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分别到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
此外,本申请的一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的媒体文件聚合方法,例如,执行以上描述的图1中的方法步骤S110至步骤S120、图2中的方法步骤S210至步骤S220、图3中的方法步骤S310至步骤S320、图4中的方法步骤S410至步骤S420、图5中的方法步骤S510,或者,执行上述实施例中的媒体文件播放方法,例如,执行以上描述的图6中的方法步骤S610至步骤S620、图7中的方法步骤S710至步骤S730、图8中的方法步骤S810至步骤S820、图9中的方法步骤S910至步骤S930。本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分别在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用 于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In addition, an embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or a controller, for example, by the above-mentioned Execution by a processor in the embodiment can cause the above-mentioned processor to execute the media file aggregation method in the above-mentioned embodiment, for example, execute the method steps S110 to S120 in FIG. 1 described above, and the method steps S210 to S210 in FIG. 2 described above. Step S220, method step S310 to step S320 in Fig. 3, method step S410 to step S420 in Fig. 4, method step S510 in Fig. 5, or, execute the media file playing method in the foregoing embodiment, for example, execute above Describe the method steps S610 to S620 in FIG. 6 , the method steps S710 to S730 in FIG. 7 , the method steps S810 to S820 in FIG. 8 , and the method steps S910 to S930 in FIG. 9 . Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may reside on computer readable media, respectively, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
以上是对本申请的若干实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请本质的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of several implementations of the present application, but the present application is not limited to the above-mentioned embodiments. Those skilled in the art can also make various equivalent deformations or replacements without violating the essence of the present application. Any modification or substitution is included within the scope defined by the claims of the present application.

Claims (12)

  1. 一种媒体文件聚合方法,应用于CDN节点,所述方法包括:A media file aggregation method, applied to a CDN node, said method comprising:
    根据预设时长录制至少两个媒体分片,其中,至少两个所述媒体分片录制于同一个视频码流,至少两个所述媒体分片在时间上连续;Record at least two media segments according to a preset duration, wherein at least two of the media segments are recorded in the same video stream, and at least two of the media segments are continuous in time;
    将至少两个所述媒体分片聚合成聚合文件。Aggregating at least two of the media segments into an aggregate file.
  2. 根据权利要求1所述的方法,其中,在所述将至少两个所述媒体分片聚合成聚合文件之后,所述方法还包括:The method according to claim 1, wherein, after said at least two media fragments are aggregated into an aggregated file, said method further comprises:
    确定所述媒体分片在所述聚合文件中的偏移描述信息;determining the offset description information of the media segment in the aggregation file;
    将所述偏移描述信息添加至所述聚合文件的媒体偏移文件。Add the offset description information to the media offset file of the aggregation file.
  3. 根据权利要求1所述的方法,其中,在所述将至少两个所述媒体分片聚合成聚合文件之后,所述方法还包括:The method according to claim 1, wherein, after said at least two media fragments are aggregated into an aggregated file, said method further comprises:
    确定所述媒体分片在所述聚合文件中的偏移描述信息;determining the offset description information of the media segment in the aggregation file;
    将所述偏移描述信息添加至聚合后的所述媒体分片的播放链接参数。Adding the offset description information to the playback link parameters of the aggregated media fragments.
  4. 根据权利要求2或3所述的方法,其中,所述CDN节点与源站通信连接,在所述根据预设时长录制至少两个媒体分片之前,所述方法还包括:The method according to claim 2 or 3, wherein the CDN node is communicatively connected to the source station, and before recording at least two media segments according to a preset duration, the method further comprises:
    获取所述源站的码流索引文件;Obtain the code stream index file of the source site;
    根据所述码流索引文件确定至少两个待录制的视频码流,其中,至少两个所述待录制的视频码流归属于同一个VR视频。Determine at least two video code streams to be recorded according to the code stream index file, wherein at least two video code streams to be recorded belong to the same VR video.
  5. 根据权利要求4所述的方法,其中,在所述将至少两个所述媒体分片聚合成聚合文件之后,所述方法还包括:The method according to claim 4, wherein, after said at least two media fragments are aggregated into an aggregated file, said method further comprises:
    当完成全部的所述待录制的视频码流的录制,生成聚合索引文件,其中,所述聚合索引文件记载有每个视频码流所对应的每个所述聚合文件的媒体信息,所述媒体信息包括媒体文件链接和所述偏移描述信息。When the recording of all the video code streams to be recorded is completed, an aggregated index file is generated, wherein the aggregated index file records the media information of each aggregated file corresponding to each video code stream, and the media The information includes the media file link and the offset description information.
  6. 一种媒体文件播放方法,应用于CDN节点,所述CDN节点与终端通信连接,所述CDN节点存储有聚合文件,所述聚合文件根据权利要求1至5任意一项所述的媒体文件聚合方法得到,所述媒体文件播放方法包括:A method for playing a media file, applied to a CDN node, the CDN node is communicatively connected to a terminal, and the CDN node stores an aggregation file, and the aggregation file is according to the media file aggregation method described in any one of claims 1 to 5 Obtained, the media file playing method comprises:
    从聚合文件的所述媒体分片中确定待播放分片;Determine the segment to be played from the media segment of the aggregation file;
    将所述待播放分片发送至所述终端,以使所述终端播放所述待播放分片。sending the segment to be played to the terminal, so that the terminal plays the segment to be played.
  7. 根据权利要求6所述的方法,其中,所述从聚合文件的所述媒体分片中确定待播放分片,包括:The method according to claim 6, wherein said determining the segment to be played from the media segment of the aggregation file comprises:
    生成聚合索引文件,其中,所述聚合索引文件记载有至少两个视频码流所对应的每个所述聚合文件的媒体信息,所述媒体信息包括媒体文件链接和偏移描述信息,至少两个所述视频码流归属于同一个VR视频;Generate an aggregated index file, wherein the aggregated index file records the media information of each of the aggregated files corresponding to at least two video code streams, the media information includes media file links and offset description information, at least two The video code stream belongs to the same VR video;
    将所述聚合索引文件下发至所述终端,以使所述终端生成播放数据请求,其中,所述播放数据请求携带有目标偏移描述信息和目标媒体文件链接;Sending the aggregation index file to the terminal, so that the terminal generates a play data request, wherein the play data request carries target offset description information and a target media file link;
    获取所述播放数据请求,根据所述目标媒体文件链接确定目标聚合文件,根据所述目标偏移描述信息从所述目标聚合文件的所述媒体分片中确定所述待播放分片。Acquire the playback data request, determine the target aggregate file according to the target media file link, and determine the segment to be played from the media segments of the target aggregate file according to the target offset description information.
  8. 一种媒体文件播放方法,应用于终端,所述终端与CDN节点通信连接,所述CDN节点 存储有聚合文件,所述聚合文件根据权利要求1至5任意一项所述的媒体文件聚合方法得到,所述媒体文件播放方法包括:A method for playing a media file, applied to a terminal, the terminal is communicatively connected to a CDN node, and the CDN node stores an aggregation file, and the aggregation file is obtained according to the media file aggregation method described in any one of claims 1 to 5 , the media file playing method includes:
    获取所述CDN节点发送的待播放分片,其中,所述待播放分片获取于所述聚合文件的所述媒体分片;Obtain the segment to be played sent by the CDN node, wherein the segment to be played is obtained from the media segment of the aggregation file;
    播放所述待播放分片。Play the segment to be played.
  9. 根据权利要求8所述的方法,其中,在所述获取所述CDN节点发送的待播放分片之前,所述方法还包括:The method according to claim 8, wherein, before acquiring the segment to be played sent by the CDN node, the method further comprises:
    获取所述CDN节点发送的聚合索引文件,其中,所述聚合索引文件记载有至少两个视频码流所对应的每个所述聚合文件的媒体信息,所述媒体信息包括媒体文件链接和偏移描述信息,至少两个所述视频码流归属于同一个VR视频;Obtain the aggregated index file sent by the CDN node, wherein the aggregated index file records the media information of each aggregated file corresponding to at least two video code streams, and the media information includes media file links and offsets Descriptive information, at least two of the video streams belong to the same VR video;
    生成播放数据请求,其中,所述播放数据请求携带有目标偏移描述信息和目标媒体文件链接;Generate a play data request, wherein the play data request carries target offset description information and a target media file link;
    将所述播放数据请求发送至所述CDN节点,以使所述CDN节点根据所述目标媒体文件链接确定目标聚合文件,根据所述目标偏移描述信息从所述目标聚合文件的所述媒体分片中确定所述待播放分片。Sending the playback data request to the CDN node, so that the CDN node determines the target aggregation file according to the target media file link, and from the media segment of the target aggregation file according to the target offset description information The segment to be played is determined in the segment.
  10. 一种CDN***,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至5中任意一项所述的媒体文件聚合方法,或者实现如权利要求6至7中任意一项所述的媒体文件播放方法。A CDN system, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein, when the processor executes the computer program, any one of claims 1 to 5 is realized The media file aggregation method, or realize the media file playing method as described in any one of claims 6-7.
  11. 一种终端,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求8至9中任意一项所述的媒体文件播放方法。A terminal, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein, when the processor executes the computer program, the computer program described in any one of claims 8 to 9 is implemented. The media file playback method described above.
  12. 一种计算机可读存储介质,存储有计算机可执行指令,其中,所述计算机可执行指令用于执行如权利要求1至6中任意一项所述的媒体文件聚合方法,或者执行如权利要求6至9中任意一项所述的媒体文件播放方法。A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the media file aggregation method according to any one of claims 1 to 6, or to execute the method according to claim 6 To the media file playing method described in any one of 9.
PCT/CN2022/113393 2021-11-16 2022-08-18 Media file aggregation method, playback method, cdn system, terminal and storage medium WO2023087816A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111355200.5A CN116137670A (en) 2021-11-16 2021-11-16 Media file aggregation method, playing method, CDN system, terminal and storage medium
CN202111355200.5 2021-11-16

Publications (1)

Publication Number Publication Date
WO2023087816A1 true WO2023087816A1 (en) 2023-05-25

Family

ID=86332902

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113393 WO2023087816A1 (en) 2021-11-16 2022-08-18 Media file aggregation method, playback method, cdn system, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN116137670A (en)
WO (1) WO2023087816A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078847A (en) * 2012-12-24 2013-05-01 深圳市龙视传媒有限公司 Method for storing and reading multi-code-rate stream file and relevant device
US20140025836A1 (en) * 2012-07-23 2014-01-23 Adobe Systems Inc. Method and apparatus for performing server-side splicing for live streaming media
CN106331763A (en) * 2016-09-12 2017-01-11 北京小度互娱科技有限公司 Method of playing slicing media files seamlessly and device of realizing the method
CN106686411A (en) * 2015-11-10 2017-05-17 中兴通讯股份有限公司 Streaming media channel recording method and device, playback method and device and server
CN107295425A (en) * 2017-06-12 2017-10-24 北京达沃时代科技股份有限公司 A kind of method of quick splicing transcoding slicing files
CN109302621A (en) * 2017-07-24 2019-02-01 中兴通讯股份有限公司 A kind of file polymerization and server
CN112637616A (en) * 2020-12-08 2021-04-09 网宿科技股份有限公司 Object storage method, system and server
CN112714335A (en) * 2019-10-24 2021-04-27 中兴通讯股份有限公司 Live media stream recording method, system and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140025836A1 (en) * 2012-07-23 2014-01-23 Adobe Systems Inc. Method and apparatus for performing server-side splicing for live streaming media
CN103078847A (en) * 2012-12-24 2013-05-01 深圳市龙视传媒有限公司 Method for storing and reading multi-code-rate stream file and relevant device
CN106686411A (en) * 2015-11-10 2017-05-17 中兴通讯股份有限公司 Streaming media channel recording method and device, playback method and device and server
CN106331763A (en) * 2016-09-12 2017-01-11 北京小度互娱科技有限公司 Method of playing slicing media files seamlessly and device of realizing the method
CN107295425A (en) * 2017-06-12 2017-10-24 北京达沃时代科技股份有限公司 A kind of method of quick splicing transcoding slicing files
CN109302621A (en) * 2017-07-24 2019-02-01 中兴通讯股份有限公司 A kind of file polymerization and server
CN112714335A (en) * 2019-10-24 2021-04-27 中兴通讯股份有限公司 Live media stream recording method, system and computer readable storage medium
CN112637616A (en) * 2020-12-08 2021-04-09 网宿科技股份有限公司 Object storage method, system and server

Also Published As

Publication number Publication date
CN116137670A (en) 2023-05-19

Similar Documents

Publication Publication Date Title
JP6524362B1 (en) Storage method, reproduction method, storage device, and reproduction device
KR101138897B1 (en) Method for splitting and distributing a file
US20160227258A1 (en) Method for playing back live video and device
CN109729371B (en) Live broadcast time shifting system and method based on HLS protocol multilevel management
WO2012096372A1 (en) Content reproduction device, content reproduction method, delivery system, content reproduction program, recording medium, and data structure
CN105282627A (en) Method for acquiring a live video clip and server
WO2013075342A1 (en) Video processing method and device
JP6352931B2 (en) Apparatus and method for transmitting and receiving multimedia data in a hybrid network
JP2007060286A (en) Content-editing device and reproducing device thereof
WO2017080428A1 (en) Streaming media channel recording, reviewing method, device, server and storage medium
WO2018153237A1 (en) Caching method and system for replaying live broadcast, and playing method and system
WO2017041663A1 (en) Video control method and device
CN104936004A (en) Video recording method and device
US20150095483A1 (en) Communications terminal, transfer terminal, and content publication method
CN103220587A (en) Method and device for obtaining time shifting contents
WO2023087816A1 (en) Media file aggregation method, playback method, cdn system, terminal and storage medium
WO2019085243A1 (en) Audio and video data playback method and server and client terminal
WO2015018119A1 (en) Multimedia file generation method and multimedia device
WO2023082764A1 (en) Content recording method, content playing method, cdn system, and storage medium
JP2016189613A (en) Moving image data editing device, moving image data editing method, reproducer, and program
WO2020177468A1 (en) Method and apparatus for controlling content presentation, and server and storage medium
US20240185891A1 (en) Common Timeline Processing for Unique Manifests
CN111083573A (en) Video file processing method and device and storage node
US11212573B2 (en) Systems, methods, and devices for managing segmented media content
WO2021121303A1 (en) Mp4 file virtual mss fragmentation method, mss adapter, media server, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22894359

Country of ref document: EP

Kind code of ref document: A1