CN110545463B - Play control method and device based on media file conversion and storage medium - Google Patents

Play control method and device based on media file conversion and storage medium Download PDF

Info

Publication number
CN110545463B
CN110545463B CN201810533539.1A CN201810533539A CN110545463B CN 110545463 B CN110545463 B CN 110545463B CN 201810533539 A CN201810533539 A CN 201810533539A CN 110545463 B CN110545463 B CN 110545463B
Authority
CN
China
Prior art keywords
media
media file
file
data
capacity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810533539.1A
Other languages
Chinese (zh)
Other versions
CN110545463A (en
Inventor
银国徽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201810533539.1A priority Critical patent/CN110545463B/en
Publication of CN110545463A publication Critical patent/CN110545463A/en
Application granted granted Critical
Publication of CN110545463B publication Critical patent/CN110545463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a play control method, device and storage medium based on media file conversion, the method includes: sending a network request aiming at media data in a media file to a server through a player embedded in a webpage, wherein the media file adopts a non-streaming media format; receiving a segmented media file returned by the server, wherein the segmented media file is constructed based on the extracted media data after the server extracts the media data based on the network request; and sending the segmented media file to the media element of the webpage for playing through a media source expansion interface of the webpage.

Description

Play control method and device based on media file conversion and storage medium
Technical Field
The present disclosure relates to media playing technologies, and in particular, to a playing control method and apparatus based on media file conversion, and a storage medium.
Background
Currently, Streaming media video technologies such as Streaming media frames using HyperText Markup Language (HLS) Live Streaming (HTTP Live Streaming), flv (flash video) and the like are mainly used for playing HyperText Markup Language (HTML) 5 pages, and when the resolution of a video stream is switched (e.g., from high definition to ultra-definition), seamless switching of Streaming media files with different resolutions can be rapidly completed without delay (e.g., black screen and flicker of a picture) perceived by a user. However, the internet video generally uses a Moving Picture Expert Group (MPEG) -4 format, and the MP4 is not in a streaming media format, cannot adopt a mode of playing while transmitting, and can only download a complete MP4 file to the front end to play; when playing an MP4 file through a web page, if the resolution is switched (e.g., from a high definition source MP4 file to an ultra definition MP4 source file), it is necessary to restart loading of an MP4 file of the corresponding resolution, a serious delay inevitably occurs.
Disclosure of Invention
In view of this, the present disclosure provides a play control method, an apparatus, and a storage medium based on media file conversion, which can convert a non-streaming media format media file into a segmented media file for playing in a webpage, thereby avoiding a delay in resolution switching and ensuring real-time performance of resolution switching.
The technical scheme of the embodiment of the disclosure is realized as follows:
in a first aspect, an embodiment of the present disclosure provides a play control method based on media file conversion, including:
sending a network request aiming at media data in a media file through a player embedded in a webpage, wherein the player plays the media file in the webpage, and the media file adopts a non-streaming media format;
receiving a returned segmented media file, wherein the segmented media file is constructed based on the extracted media data after the media data is extracted based on the network request;
and sending the segmented media file to a media element of the webpage for decoding and playing through a media source expansion interface of the webpage.
In a second aspect, an embodiment of the present disclosure provides a play control method based on media file conversion, including:
receiving a network request aiming at media data in a media file, wherein the media file is played through a webpage and adopts a non-streaming media format;
extracting the media data in the media file based on the network request;
constructing a segmented media file based on the extracted media data;
and sending the segmented media file, wherein the segmented media file is used for decoding and playing the media elements of the webpage after being received by a media source expansion interface.
In a third aspect, an embodiment of the present disclosure provides a playback control apparatus based on media file conversion, including:
a sending unit, configured to send a network request for media data in a media file through a player embedded in a web page, where the player plays the media file in the web page, and the media file is in a non-streaming media format;
a receiving unit, configured to receive a returned segmented media file, where the segmented media file is constructed based on the extracted media data after the media data is extracted based on the network request;
and the processing unit is used for sending the segmented media file to the media element of the webpage for playing through a media source expansion interface of the webpage.
In a fourth aspect, an embodiment of the present disclosure provides a playback control apparatus based on media file conversion, including:
a memory for storing executable instructions;
and the processor is used for realizing the playing control method based on media file conversion in the embodiment of the disclosure when the executable instruction is executed. The executable instructions may be, among others, installation packages, programs, code, plug-ins, libraries (dynamic/static libraries).
In a fifth aspect, the present disclosure provides a storage medium storing executable instructions, which when executed, implement the play control method based on media file conversion according to the present disclosure.
The application of the above embodiment of the present disclosure has the following beneficial effects:
1) and in the process of playing the media file through the webpage, if the user switches the resolution, the media data of the media file with the target resolution is retrieved, and the retrieved media data is converted into the segmented media file to realize playing, so that the delay condition during resolution switching is avoided, and the real-time performance of resolution switching is ensured.
2) The player only needs to receive the segmented media file pushed to the front end and send the segmented media file to the media element of the webpage through the media source expansion interface of the webpage for decoding and playing, playing load is small, terminal hardware capacity is not limited, endurance is guaranteed, meanwhile, a service background of the media file playing does not need to store the segmented media file, and saving of storage space can be achieved when a large-scale online playing service is deployed.
Drawings
FIG. 1 is a schematic view of an alternative construction of a container provided in accordance with an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an alternative package structure of an MP4 file according to an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a media data container storing media data in a media file according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an alternative package structure of a segmented MP4 file according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a first composition of a playback control apparatus based on media file conversion according to an embodiment of the present disclosure;
fig. 6 is a first flowchart illustrating a playing control method based on media file conversion according to an embodiment of the present disclosure;
FIG. 7 is a schematic flow chart illustrating packaging of a segmented media file according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a player playing a segmented media file through a media source extension interface of a web page according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of converting an MP4 file into an FMP4 file and playing the file through a media source extension interface according to an embodiment of the present disclosure;
fig. 10 is a second flowchart illustrating a playing control method based on media file conversion according to an embodiment of the disclosure;
fig. 11 is a schematic structural diagram of a second composition of the playback control apparatus based on media file conversion according to the embodiment of the present disclosure.
Detailed Description
The present disclosure will be described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the examples provided herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are some embodiments for implementing the disclosure, not all embodiments for implementing the disclosure, and the technical solutions described in the embodiments of the disclosure may be implemented in any combination without conflict.
It should be noted that, in the embodiments of the present disclosure, the terms "comprises," "comprising," or any other variation thereof are intended to cover a non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the explicitly recited elements but also other elements not explicitly listed or inherent to the method or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other related elements in a method or apparatus including the element (e.g., steps in a method or elements in an apparatus, such as units that may be part of a circuit, part of a processor, part of a program or software, etc.).
For example, the playing control method based on media file conversion provided by the embodiment of the present disclosure includes a series of steps, but the playing control method based on media file conversion provided by the embodiment of the present disclosure is not limited to the described steps, and similarly, the playing control device based on media file conversion provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to include the explicitly described units, and may also include units that are required to be set for acquiring relevant information or performing processing based on the information.
Before further detailed description of the embodiments of the present disclosure, terms and expressions referred to in the embodiments of the present disclosure are explained, and the terms and expressions referred to in the embodiments of the present disclosure are applied to the following explanations.
1) A media file, a file storing encoded media data (e.g., at least one of audio data and video data) in a container (Box), includes metadata, i.e., data describing the media data, and carries media information to ensure that the media data is decoded correctly.
For example, a media file formed by packaging media data in a Moving Picture Experts Group (MPEG) -4 packaging format is called an MP4 file, and typically, the MP4 file stores therein Video data encoded by Advanced Video Coding (AVC, h.264) or MPEG-4(Part 2) specification and Audio data encoded by Advanced Audio Coding (AAC), without excluding other encoding modes of Video and Audio.
2) The container (Box), also called a Box, an object-oriented component defined by a unique type identifier and a length, see fig. 1, is an optional structural diagram of the container provided by the embodiment of the present disclosure, and includes a container Header (Box Header) and container Data (Box Data), which are filled with binary Data to express various information.
The container header includes a size (size) and a type (type), the size indicates a size (also referred to as a capacity or a length herein) of a storage space occupied by the container, the type indicates a type of the container, and fig. 2 is a schematic diagram of an alternative package structure of an MP4 file provided by an embodiment of the present disclosure, and basic container types referred to in an MP4 file include a file type container (ftyp box), a metadata container (moov box), and a media data container (mdat box).
The container data portion may store specific data, where the container is referred to as a "data container," and may further encapsulate other types of containers, where the container is referred to as a "container of a container.
3) A Track (Track), also called a Stream (Stream), a time-ordered sequence of related samples (Sample) in a container of media data, a Track representing a sequence of video frames or a sequence of audio frames for media data, and possibly a subtitle Track synchronized with the sequence of video frames, a set of consecutive samples in the same Track being called a Chunk (Chunk).
4) A file type container, a container for storing the capacity (i.e. length of occupied bytes) and type of a file in a media file, as shown in fig. 2, binary data stored in the file type container describes the type and capacity of the container according to the specified byte length.
5) A metadata container, a container in a media file for storing metadata (i.e., data describing media data stored in the media data container), and information expressed by binary data stored in the metadata container in the MP4 file are referred to as media information.
As shown in fig. 2, the header of the metadata container represents the type of the container as "moov box" using binary data, and the container data part encapsulates an mvhd container for storing general information of an MP4 file, is independent of an MP4 file, and is related to the playing of an MP4 file, including a time length, a creation time, a modification time, and the like.
The media data container of the media file may include sub-containers corresponding to a plurality of tracks, such as an audio track container (audio track box) and a video track container (video track box), in which references and descriptions of media data of the corresponding tracks are included, and the necessary sub-containers include: a container (denoted tkhd box) for describing the characteristics and overall information of the track (e.g. duration, width, height), and a container (denoted mdia box) for recording media information of the track (e.g. information of media type and sample).
As for the sub-containers packaged in the mdia box, it may include: recording the relevant attributes and content of the track (denoted mdhd box), recording the playing procedure information of the media (denoted hdlr box), describing the media information of the media data in the track (denoted minf box); the minf box in turn has a sub-container (denoted as dinf box) for explaining how to locate the media information, and a sub-container (denoted as stbl box) for recording all the time information (decoding time/display time), position information, codec etc. of the samples in the track.
Referring to fig. 3, which is a schematic structural diagram of a media data container in a media file for storing media data according to an embodiment of the present disclosure, the time, type, capacity and location of a sample in the media data container can be interpreted by using media information identified from binary data in a stbl box container, and each sub-container in the stbl box is described below.
The stsd box contains a sample description (sample description) table, and there may be one or more description tables in each media file according to different coding schemes and the number of files storing data, and the description information of each sample can be found through the description tables, and the description information can ensure correct decoding of the sample, and different media types store different description information, for example, the description information is the structure of the image in the case of video media.
The stts box stores the duration information of the samples and provides a table to map time (decoding time) and the serial numbers of the samples, and the samples at any time in the media file can be located through the sttx box; the stts box also uses other tables to map the sample size and pointers, where each entry in the table provides the serial number of consecutive samples within the same time offset and the offset of the sample, and increments these offsets to build a complete time-sample mapping table, and the calculation formula is as follows:
DT(n+1)=DT(n)+STTS(n) (1)
where STTS (n) is the nth item of information of the STTS without compression, DT is the display time of the nth sample, the arrangement of samples is ordered according to the time sequence, so that the offset is always non-negative, DT generally starts with 0, and DT is calculated as follows:
DT(i)=SUM(for j=0to i-1 of delta(j)) (2)
the sum of all offsets is the duration of the media data in the track.
The stss box records the sequence number of the key frame in the media file.
The stsc box records the mapping relation between the samples and the blocks for storing the samples, the relation between the serial numbers of the samples and the serial numbers of the blocks is mapped through a table, and the blocks containing the specified samples can be found through table lookup.
The stco box defines the position of each block in the track, expressed in terms of the offset of the starting byte in the media data container, and the length (i.e., the size) relative to the starting byte.
The stsz box records the size (i.e., size) of each sample in the media file.
6) A media data container, a container for storing media data in a media file, for example, a media data container in an MP4 file, as shown in fig. 3, a sample is a unit stored in the media data container, and is stored in a block of the media file, and the lengths of the block and the sample may be different from each other.
7) And segmenting the media files, wherein the media files are divided into subfiles, and each segmented media file can be independently decoded.
Taking an MP4 file as an example, media data in an MP4 file is divided according to key frames, the divided media data and corresponding metadata are packaged to form a segmented MP4(FMP4, Fragmented MP4) file, and metadata in each FMP4 file can ensure that the media data is correctly decoded.
For example, when the MP4 file shown in fig. 2 is converted into multiple FMP4 files, referring to fig. 4, which is an optional packaging structure diagram of a segmented MP4(FMP4) file provided in the embodiment of the present disclosure, one MP4 file may be converted into multiple FMP4 files, and each FMP4 file includes three basic containers: moov containers, moof containers, and mdat containers.
The moov container includes MP4 file level metadata describing all media data in the MP4 file from which the FMP4 file is derived, such as the duration, creation time, and modification time of the MP4 file.
The moof container stores segment-level metadata describing media data packaged in the FMP4 file where it is located, ensuring that the media data in the FMP4 can be decoded.
The 1 moof container and the 1 mdat container constitute 1 segment of the segment MP4 file, and 1 or more such segments may be included in the 1 segment MP4 file, and the metadata encapsulated in each segment ensures that the media data encapsulated in the segment can be independently decoded.
8) Media resource Extensions (MSE) interface, player-oriented interface implemented in web pages, interpreted by the browser's interpreter during loading in the web page, implemented by executing a front-end programming language (e.g., JavaScript), provides the player with the functionality to call the play Media stream of hypertext markup language (HTML) Media elements (Media elements), for example, to implement the play functionality of video/audio using video Element < video > and audio Element < audio >.
9) The streaming media format encapsulates media data into a media file of the streaming media, and the media file can be decoded and played without complete downloading and extra transcoding, namely, native support is provided for an encapsulation technology of downloading and playing simultaneously. A typical file in streaming media format includes: TS media file fragments based on HTTP Live Streaming (HLS, HTTP Live Streaming) technology, FLV (flash video) files, and the like.
10) Non-streaming media format, which is a packaging technique that packages media data into media files and the media files can be decoded and played after being completely downloaded, a typical file in non-streaming media format includes: MP4 files, Windows Media Video (WMV) files, MKV file formats (MKV, MKV file formats), Advanced Streaming Format (ASF) files, and the like.
It should be noted that the MP4 file does not natively support streaming media format playback, but the technical effect of filling invalid binary data in the transcoded media stream of the player after online transcoding or the missing part of the partially downloaded MP4 file (for example, in the case of full download of ftyp container and moov container, the missing part of the filled mdat container is replaced by invalid binary data) can also be achieved in one-download one-pass playback, and the package format of such file that natively does not support streaming media is referred to as non-streaming media format herein.
First, a play control device based on media file conversion according to an embodiment of the present disclosure is described, and the play control device based on media file conversion may be provided in a hardware, software, or a combination of hardware and software.
The following describes an implementation of a software and hardware combination of a playback control apparatus based on media file conversion, referring to fig. 5, fig. 5 is a schematic diagram of an optional component structure of the playback control apparatus based on media file conversion according to the embodiment of the present disclosure, and the playback control apparatus based on media file conversion according to the embodiment of the present disclosure may be implemented in various forms, such as: the method is implemented independently by terminals such as a smart phone, a tablet computer and a desktop computer, or implemented cooperatively by the terminals and a server. In the following, a detailed description is given of a hardware structure of the playback control apparatus based on media file conversion according to the embodiment of the present disclosure, it is understood that fig. 5 only shows an exemplary structure of the playback control apparatus based on media file conversion, and not a whole structure, and a part of the structure or the whole structure shown in fig. 5 may be implemented as needed.
The playback control apparatus 100 based on media file conversion provided by the embodiment of the present disclosure includes: at least one processor 101, memory 102, a user interface 103, and at least one network interface 104. The various components in the playback control apparatus 100 based on media file conversion are coupled together by a bus system 105. It will be appreciated that the bus system 105 is used to enable communications among the components of the connection. The bus system 105 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 105 in fig. 5.
The user interface 103 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 102 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory.
The memory 102 in the embodiment of the present disclosure is used to store various types of data to support the operation of the play control apparatus 100 based on media file conversion. Examples of such data include: any executable instructions for operating on the media file conversion-based play control apparatus 100, such as executable instructions 1021, a program implementing the media file conversion-based play control method according to the embodiment of the disclosure may be included in executable instructions 1021.
The playing control method based on media file conversion disclosed by the embodiment of the disclosure can be applied to the processor 101, or implemented by the processor 101. The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the playback control method based on media file conversion may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The Processor 101 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 101 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present disclosure. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium located in the memory 102, and the processor 101 reads the information in the memory 102, and completes the steps of the playback control method based on media file conversion provided by the disclosed embodiment in combination with the hardware thereof.
The following describes a pure hardware implementation of the playback control apparatus based on media file conversion, and the playback control apparatus based on media file conversion according to the embodiments of the present disclosure may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components, and is used to implement the playback control method based on media file conversion provided by the embodiments of the present disclosure.
The following describes a pure software implementation of the playback control apparatus based on media file conversion, and the playback control apparatus based on media file conversion according to the embodiments of the present disclosure may be an application program or a plug-in, or may be implemented by using a combination of the two.
As an example, the application program may be a client dedicated to playing the media file, or may be a client that takes the media file playing function as an optional function, and is implemented by installing a corresponding plug-in.
As an example, the plug-in may be implemented as a function upgrade installation package of an application program, superimposing the function of media file playing in a specific application program; or elements in a webpage played by the media are realized by adopting a front-end language, and the function of playing the media file in the webpage is realized by directly interpreting and executing the elements by the webpage.
Next, taking an example that the player is embedded in a web page, and the player plays a media file by using a HyperText Markup Language (HTML) 5 media element of the web page, a description is given to the playback control method based on media file conversion provided in the embodiment of the present disclosure, where the web page in the embodiment of the present disclosure may be a web page of a browser, or may be a web page of an Application (APP) embedded in a browser kernel, and the web page implements a player example by analyzing and executing js (javascript) codes of the player.
Fig. 6 is a schematic flow chart illustrating an alternative method for controlling playback based on media file conversion according to an embodiment of the present disclosure, and referring to fig. 6, the method for controlling playback based on media file conversion according to the embodiment of the present disclosure involves steps 201 to 204, which are described below.
Step 201: the player sends a network request for media data in the media file to the server.
Here, the player is embedded in the web page, and plays the media file in the web page, wherein the media file adopts a non-streaming media format. The non-streaming media format may be an MPEG-4/MKV/WMV/ASF packaging format, and MPEG-4 is taken as an example in the embodiment of the present disclosure, and the implementation according to MPEG-4 can be easily applied to other non-streaming media formats.
In one embodiment, the player may send a network request for media data in the media file to the server by:
determining two key frames in the media file to be played based on real-time playing points in the playing process of the media file; and sending a network request to a server, wherein the network request is used for requesting to acquire the media data between the two key frames in the media file.
The determination of two key frames based on the play point is explained. In the process of playing the media file, the player loads the data between the key frames to realize the playing of the media file, namely, the player takes the media data between the two key frames as a playing loading unit. As for the play point, it may be a play time that is reached by continuously playing the media file (i.e., naturally playing without user intervention), for example, from a play point of 30 th minute to a play point of 40 th minute; or, the media file may reach the playing time of the media file by means of jumping (i.e., the user clicks the progress bar through the cursor to realize page jumping), where for example, the original playing point is 20% of the playing progress, and the jumping playing point is 30% of the playing progress.
In practical applications, the two key frames determined based on the playing point may be two adjacent key frames in the media file, or one or more other key frames exist between the two key frames, and the number of the key frames between the two key frames may be determined according to the cache performance (such as the available cache capacity) of the browser, the network performance (network bandwidth), and the like, and may also be set according to actual needs.
In one embodiment, a manner of determining two key frames (a first key frame and a second key frame after the first key frame in decoding time) is described according to a case where a video frame corresponding to a playback point is a normal frame or a key frame, in a case where the playback point is a playback time that arrives by continuously playing a media file.
Case 1) the video frame corresponding to the playing point is a normal frame, and since the player uses the media data between two key frames as a basic playing loading unit, the media data after the playing point and before the first key frame (the key frame whose decoding time is later than the decoding time of the key frame of the playing point and closest to the playing point) after the playing point is the loaded media data, and in order to avoid repeatedly acquiring the loaded media data, the first key frame in the two key frames at a given time interval is: the first key frame of the media file with the decoding time after the playing point; the second key frame of the two key frames is: key frames in the media file that are decoded later in time than the first key frame.
Case 2) the video frame corresponding to the playing point is a key frame, and the first key frame of the two key frames is: the key frame corresponding to the playing point, namely the key frame aligned with the playing point in time; the second key frame of the two key frames is: key frames in the media file that are decoded later in time than the first key frame.
In case 1), the key frame crossing the playing point is used as the end point of the media data, so that it can be ensured that the video frame corresponding to the playing point has enough information for correct decoding, and frame skipping due to lack of decoded data (i.e. key frame) does not occur.
In another embodiment, the manner of determining two key frames (a first key frame and a second key frame after the first key frame in decoding time) is described according to the case that the video frame corresponding to the play point is a normal frame or a key frame, for the case that the play point is the play time that arrives by means of jumping.
Case 1) the video frame corresponding to the play point is a normal frame, and since the play point is reached by jumping, the first key frame before the play point and the media data between the play point are not loaded, and the first key frame is: searching a key frame with decoding time earlier than the starting time of a given period and closest to the starting time in the first key frame before a playing point in the media file, namely the time of media data (namely, the corresponding relation between the sequence number represented by the media information and the decoding time of the frame); the second key frame of the two key frames is: key frames in the media file that are decoded later in time than the first key frame. The media data between the extra request playing point and the key frame before the playing point can ensure that the jumping to any playing point can be decoded normally, and the condition that the frame jumping occurs because the frame can not be decoded when the playing point corresponds to the common frame is avoided.
Case 2) the video frame corresponding to the play point is a key frame, and the first key frame is: a key frame corresponding to the play point, that is, a key frame whose decoding time is aligned with the play point time, which is searched from the time of the media data (that is, a corresponding relationship between the sequence number represented by the media information and the decoding time of the frame); the second key frame of the two key frames is: key frames in the media file that are decoded later in time than the first key frame.
In case 1), the key frame crossing the playing point is used as the end point of the media data, so that it can be ensured that the video frame corresponding to the playing point has enough information for correct decoding, and frame skipping due to lack of decoded data (i.e. key frame) does not occur.
In case 2), the media data to be acquired is defined by aligning the key frames of the playing points, so that on the premise that the playing points can be correctly decoded, unnecessary media data acquisition is reduced to the greatest extent, occupation of connection and traffic is reduced, and real-time performance of non-media playing services in the webpage is ensured.
In one embodiment, the network request sent by the player to the server carries the offset and the capacity of the media data between the two requested key frames, so that the server extracts the media data which starts from the offset and conforms to the capacity from the media file, and returns the media data to the player. Therefore, before sending the network request, the player needs to determine the offset and capacity of the media data in the media file according to the media information (i.e. the position of the video/audio frame, the offset, the decoding time, etc.) identified from the metadata of the media file. And media information is first identified from the metadata of the media file before determining the offset and the size.
Next, the player identification media information will be explained. In one embodiment, the player may identify media information from the media file by: and according to the set offset and the set capacity, requesting data in the media file corresponding to the set offset and the set capacity (namely data requesting fixed capacity) from the server, identifying metadata in a metadata container from the data returned by the server, and analyzing the identified metadata to obtain media information for describing the media data packaged in the media data container of the media file.
The set capacity can be obtained according to the statistics of the capacities of the file type container and the metadata container of the existing media file, so that the set capacity can cover the sum of the capacities of the file type container and the metadata container of the set proportion (such as all) media files, and when the packaging structure of the media files is the file type container, the metadata container and the media data container which are packaged in sequence, the metadata packaged in the complete metadata container can be obtained through one request, the occupation condition of connection during network transmission is saved, and the condition that the response is delayed due to the fact that connection cannot be used in non-media playing services in a webpage due to connection occupation is avoided.
Taking an example that a media file is an MP4 file, metadata packaged in a metadata container acquired by a player is binary data packaged in a moov box in an MP4 file, and when a package structure of an MP4 file is a fytp box, a moov box, and an mdat box packaged in sequence, a set capacity can be obtained by statistics according to the ftyp box and moov box capacities of an existing MP4 file, so that the set capacity can cover the sum of the binary data of the ftyp box and the moov box of the MP4 file with a set proportion (such as all), and it is ensured that complete binary data can be included in the moov box requested from a server at one time in most cases.
In one embodiment, the player obtains the capacity of the file type container by reading the container header, knows the type and the capacity of the next container by reading the second container header, and indicates that the binary data requested from the server by the set offset and the set capacity contains the metadata packaged in the metadata container when the second container type is the metadata container and the returned binary data capacity is not less than the sum of the file type container capacity and the metadata container capacity; when the type of the second container is the metadata container and the volume of the returned binary data is smaller than the sum of the volume of the file type container and the volume of the metadata container, it indicates that the binary data requested from the server by the set offset and volume does not contain the metadata packaged in the metadata container. When the binary data requested by the player from the server through the set offset and the set capacity does not contain the metadata in the complete metadata container, the player needs to read the capacity of the container from the binary data returned by the server, calculate the offset and the capacity of the metadata container according to the head of the metadata container, carry the calculated offset and the calculated capacity in a network request to request the metadata from the server, and the server starts to read the binary data from the offset calculated in the media file according to the request, wherein the read binary data conforms to the calculated capacity, and returns the data to the player.
For example, the player reads the volume of the container from the binary data returned by the server, and calculates the offset and the volume of the metadata container according to the header of the metadata container, which involves the following two cases:
case 1) when the type of a container read from the remaining binary data (i.e., data other than the binary data of the file type container among the returned binary data) is a metadata container and the capacity of the remaining binary data is smaller than the capacity of the metadata container, calculating a difference between the capacity of the metadata container and the capacity of the remaining binary data as a new capacity of a secondary request, and requesting the binary data from the server a second time with the sum of the offset and the capacity of the primary request as a new offset;
case 2) when the type of the container read from the remaining binary data is a media data container, the sum of the capacity of the media data container and the file type container capacity is calculated as a new offset of the secondary request, and the binary data is requested for the second time from the server at a set capacity (which may be an empirical value capable of covering the capacity of the metadata container).
Taking the media file as an MP4 file as an example, the binary data requested by the player from the server through the set offset and capacity does not include the binary data of the complete moov box, at this time, the player needs to read the type and capacity of the container from the binary data returned by the server, and determine the offset and capacity of the moov box in the MP4 file;
the binary data of the MP4 file, the initial byte always corresponds to the ftyp box, the binary data of the fytp box is identified from the returned binary data, the length of the ftypbox can be known from the header of the ftypbox, so that the binary data of the next box is read from the rest binary data according to the specified length of the header, and the following cases are included according to the type of the container represented by the header:
1) when the type of the container read from the remaining binary data (i.e., the data of the returned binary data excluding the binary data of the fytp box) is moov box and the capacity of the remaining binary data is not less than the capacity of the moov box, obtaining, from the server, moov data in the MP4 file starting with the offset of the moov box in the MP4 file and conforming to the capacity of the moov box in the MP4 file, according to the determined offset and capacity;
2) when the type of the container read from the remaining binary data is moov box and the capacity of the remaining binary data is less than the capacity of the moov box, calculating a difference value between the capacity of the moov box and the capacity of the remaining binary data as a new capacity of a secondary request, and requesting the binary data for a second time from the server with the sum of the offset and the capacity of the first request as the new offset of the secondary request;
3) when the type of the container read from the remaining binary data is the mdat box, the sum of the capacity of the mdat box and the capacity of the ftyp box is calculated as a new offset of the secondary request, and the binary data is requested for the second time from the server at the set capacity.
Therefore, no matter what packaging structure the media file is, namely, no matter what packaging sequence of the file type container, the metadata container and the media data container in the media file is, the player can be guaranteed to obtain the metadata in the metadata container from the server by two requests at most, and the metadata obtaining efficiency is improved.
For example, for an MP4 file, the binary data returned by the server, according to the package specification of the MP4 file, a piece of binary data starting from zero bytes corresponds to the ftyp box, and according to the package specification of the header of the box, the size (i.e., length) of the ftyp box and the size of the complete MP4 file can be read from the header of the ftyp box; assuming that the capacity of the ftyp box is a (in bytes), reading the header information of the subsequent container from a +1 to obtain the type and capacity of the subsequent container, and if the ftyp box is followed by the moov box by reading and the capacity of the remaining binary data (the capacity of the set capacity-ftyp box) is greater than the capacity of the moov box, indicating that the complete binary data of the moov box has been retrieved, extracting the metadata in the moov box from the remaining binary data according to the offset and capacity of the moov box.
After the player obtains the metadata encapsulated in the metadata container from the server, analyzing the nested structure of the child container in the metadata container, and reading the binary data in each child container according to the nested structure of the child container; and analyzing the media information of the media data represented by each sub-container from the read binary data. In practical applications, the media information may include information such as offset, capacity, decoding time, etc. of video frames and/or audio frames in the media file.
Taking a media file as an MP4 file as an example, the metadata container is a moov box, as shown in fig. 2, it can be seen that mvhd box and track box are encapsulated in the moov box, wherein information such as creation time, modification time, time measurement scale, playable time length, default volume, etc. of the MP4 file can be obtained by analyzing binary data of the mvhd box; the moov box includes a plurality of track boxes, records description information specific to each media track, for example, for a video track, a plurality of sub-containers are nested in multiple layers in the video track, and based on the nested structure of the video track, the corresponding binary data is parsed to obtain video frame information of the MP4 file and corresponding picture information.
In one embodiment, the player may parse the acquired metadata to obtain the media information as follows: sequentially analyzing binary data corresponding to the standard length of the container head in the binary data of the metadata container to obtain the container type of a sub-container in the metadata container and the length of the container data of the sub-container; and calling a parser with a type corresponding to the container type of the sub-container, and sequentially parsing binary data corresponding to the length of the container data in the unresolved data to obtain the media information represented by the container data.
The player is used for solving the problem that a plurality of sub-containers are nested in the metadata container, the offset of each reading of binary data is the sum of the lengths of the identified sub-containers, and the length of the read binary data conforms to the standard length of the container header, so that the type and the length of the currently processed sub-container can be analyzed.
For example, when reading for the first time, the binary data is read from zero bytes of the binary data of the metadata container, and the length of the read binary data conforms to the specified length of the container header, so that the type and length of the first sub-container can be parsed; and in the second reading, the binary data is read by taking the length of the first read sub-container as an offset, and the length of the read binary data conforms to the specified length of the container header, so that the type and the length of the second sub-container can be analyzed.
The binary data is read in the mode, the condition of backspacing caused by multi-reading can not occur, the condition of secondary reading caused by less reading can not occur, and the analysis efficiency and the accuracy can be ensured.
In one embodiment, a typical container type nested in the metadata container is pre-marked for indicating whether the container is directly used for packaging binary data or is further packaged with a container, for example, a container is further packaged with a mark such as mvhd box, audio track box and video track box shown in fig. 2, and a container is directly packaged with binary data with a mark such as stts box, stsd box shown in fig. 2.
Setting parsers corresponding to the container types one by one for the container types marked as directly encapsulating the binary data, wherein the parsers are used for parsing the represented media information according to the binary data; comparing the container type of the parsed sub-container with the container type of the pre-marked sub-container involves the following two cases.
Case 1) when it is determined through comparison that the container type of the child container is pre-marked and is pre-marked for directly encapsulating binary data, invoking a parser corresponding to the container type of the child container, and parsing the container data in the child container through the parser to obtain the media information represented by the container data.
Case 2) when it is determined through comparison that the container type of the sub-container is pre-marked and is pre-marked for continuously packaging containers, recursively analyzing the binary data corresponding to the sub-container according to the canonical length of the container header in the media file until the container type of the container packaged in the sub-container is pre-marked and is pre-marked for directly packaging the binary data, invoking an analyzer corresponding to the container type of the container packaged in the sub-container, analyzing the binary data byte by byte, where the length of the analyzed binary data corresponds to the length of the container data of the container packaged in the sub-container, to obtain the media information represented by the container data of the container packaged in the sub-container.
In one embodiment, a method for recording media information in a process of parsing a metadata container is described, when binary data corresponding to a standard length of a container header in binary data of the metadata container is sequentially parsed to obtain a container type of a child container in the metadata container, an object is established according to a nesting relationship between the child container and an attributed container and a nesting relationship between the child container and an encapsulated container, when the container type of the child container is pre-marked to be used for directly encapsulating the binary data, an array including the media information is stored in the object established corresponding to the child container, and the stored media information is represented by the container data of the child container.
For example, in fig. 2, when the type of the parsed sub-container is stts box, since the stts box is pre-marked as direct package binary data, an array including media information is stored in an object created corresponding to the stts box, where the media information is duration information represented by container data of the stts box.
In an embodiment, a manner of recording a nesting relationship between child containers in a process of parsing a metadata container is described, when binary data corresponding to a canonical length of a container header in binary data of the metadata container is sequentially parsed to obtain a container type of a child container in the metadata container, if the container type is pre-marked as directly encapsulating binary data, recording the parsed child container in the invoked parser; setting the recorded instances of the child containers into child container attributes, wherein the child container attributes are included in the containers to which the child containers belong, and are used for describing the nesting relationship between the child containers and the belonged containers.
For example, in fig. 2, when the type of the parsed sub-container is stsd box, since stsd box is pre-marked as directly encapsulating binary data, stsd box is recorded in the parser corresponding to the stsd box, an instance of stsd box is set to the stbl box sub-container attribute, and so on, and finally a plurality of sub-containers nested in stbl box, such as stsd box, stts box, stsc box, etc., are recorded in the sub-container attribute of stsd box.
In one embodiment, when it is determined through comparison that the container type of the sub-container is not pre-marked, or the container type of the sub-container is pre-marked to directly package binary data but a parser of a corresponding type is not called, the binary data corresponding to the parsed sub-container is ignored, and according to the length of the sub-container, a part of the binary data corresponding to a next sub-container is skipped to continue parsing.
In practical application, a user-defined container type can appear in a media file, the progress of the overall analysis of a metadata container can not be influenced in a skipping mode, and meanwhile, when the container type of the metadata container changes, the latest metadata container can be compatible and analyzed quickly by adding, deleting and modifying analyzers of corresponding types, and the media file has the advantages of being flexible and quick to upgrade.
Based on the above description of media information identification, the following description is provided for determining the offset and capacity of the media data in the media file based on the identified media information, and in one embodiment, the player may determine the offset and capacity of the media data in the media file by: determining, based on the identified media information, an offset and a capacity in the media file of video frames of the media data (i.e., video frames between the first key frame and the second key frame), and an offset and a capacity in the media file of audio frames aligned with the video frames; determining the offset and the capacity of a target interval (an interval consisting of the minimum offset and the maximum capacity) including the video frame and the audio frame according to the determined offset and the capacity; the target interval comprises the video frame and the audio frame.
Here, the alignment manner of the audio frame and the video frame in the embodiment of the present disclosure is explained: the method comprises the steps of positioning audio frames with synchronous time at video frames by taking the video frames as a reference according to the starting time and the duration of media data, ensuring that the decoding starting time of the first audio frame in the media data is not later than that of the first video frame, and the decoding time of the last audio frame is not earlier than that of the last video frame, so that the problem of inconsistent video and audio durations in media files can be solved, synchronous audio playing can be ensured when each frame of video is played, and the phenomenon that the existing picture has no sound can be avoided.
Next, the offset amount and the capacity of the determination target section will be explained: the method comprises the steps that the position of a video frame in a metadata container is located through the offset and the capacity of the video frame between a first key frame and a second key frame in two key frames in a media file, the position of an audio frame in the metadata container is located through the offset and the capacity of the audio frame aligned with the video frame in the media file, and an interval formed by the upper limit and the lower limit of the position is taken as a target interval, namely an interval formed by the minimum offset and the maximum capacity; the offset and the capacity corresponding to the upper limit of the position are the offset and the capacity corresponding to the upper limit of the target interval, and the offset and the capacity corresponding to the lower limit of the position are the offset and the capacity corresponding to the lower limit of the target interval. In practical applications, the target interval is the minimum interval for storing video frames and audio frames in the media data container of the target resolution media file, for example: and the offset of the video frame between the first key frame and the second key frame at the position of the target resolution media file corresponds to [ a, b ] (addresses are in ascending order), the offset of the audio frame at the position of the target resolution media file corresponds to [ c, d ] (addresses are in ascending order), and then the interval formed by the upper limit and the lower limit of the position is [ min (a, c), max (b, d) ]. Therefore, the player sends a network request carrying the offset and the capacity of the target interval to the server to request the media data of the target interval, the server extracts the media data in the media file based on the offset and the capacity of the target interval and then returns the media data of the target interval at one time, secondary acquisition is not needed, the request times of the player are reduced, and the processing efficiency is improved.
Step 202: the server extracts media data in the media file based on the network request, and constructs a segmented media file based on the extracted media data.
Here, the server receives a network request from the player and analyzes the network request to obtain an offset and a capacity corresponding to the media data requested by the player, and extracts media data that corresponds to the capacity from the media file starting from the offset based on the offset and the capacity.
After the server extracts the media data, the segmented media file can be constructed by the following method: the server calculates the metadata of the level of the segmented media file according to the media information of the media data, and then fills the metadata of the level of the segmented media file and the media data according to the packaging format of the segmented media file to obtain the segmented media file.
In an embodiment, the server does not perform conversion of the segmented media files for all media files in the non-streaming media format requested by the player, for example, the server may perform conversion only for a specific media file (e.g., a hot spot file), the server stores an identifier of a media file to be converted (e.g., a hot spot file), the network request carries the identifier of the media file, the server obtains the identifier of the media file after analyzing the network request, determines whether the media file is the media file to be converted based on the identifier of the media file, extracts media data and constructs the segmented media file when the media file is determined to be the media file to be converted, and does not construct the segmented media file for the extracted media data if the media file corresponding to the media data requested by the player is determined not to be the media file to be converted based on the identifier of the media file.
In one embodiment, the server does not segment all of the media data in the media file, e.g., the server segments only media data of a particular portion of the media file (e.g., the second half of the media file). The network request carries the offset and the capacity of the media data in the media file, and the offset and the capacity are used for positioning the position of the media data in the media file by the server based on the offset and the capacity; and when the server confirms that the media data requested by the player is the media data to be converted in the media file based on the position obtained by positioning, constructing a segmented media file based on the extracted media data, and if the server confirms that the media data requested by the player is not the media data to be converted based on the position obtained by positioning, directly returning the media data without constructing the segmented media file.
In an embodiment, the network request may further carry authentication information for the server to perform authentication of user validity, for example, the authentication information may be login information (user name, password) of the user, the server performs authentication of the user validity based on the login information of the user after analyzing the network request, and when the server passes the authentication of the user validity based on the authentication information, the server returns a segmented media file constructed based on the extracted media data.
And explaining the segmented media file obtained after filling the metadata and the media data of the segmented media file level according to the packaging format of the segmented media file. In an embodiment of the present disclosure, referring to fig. 7, fig. 7 is an alternative flow chart of packaging a segmented media file provided by an example of the present disclosure, which will be described with reference to the steps shown in fig. 7.
Step 301, filling data representing the type and compatibility of the segmented media file into a file type container of the segmented media file.
For example, taking as an example an FMP4 file packaged to form a package structure as shown in fig. 4, the type and length of a container (representing the entire length of the ftyp box) are filled in the header of the file type container of the FMP4 file, that is, the ftyp box, and data (binary data) representing that the file type is FMP4 and a compatible protocol is generated by filling in the data portion of the ftyp box.
Step 302 fills metadata representing the file level of the segmented media file into a metadata container of the segmented media file.
In one embodiment, the metadata describing the media data required to fill the nested structure is calculated from the nested structure of the metadata container in the segmented media file, based on the media data to be filled into the encapsulation structure of the segmented media file.
Still taking fig. 4 as an example, metadata representing the file level of the FMP4 file is calculated and filled into a metadata container (i.e., moov box) of the FMP4, in which three containers of mvhd, track, and video extension (mvex) are nested.
Wherein, the metadata packaged in the mvhd container is used for representing the media information related to the playing of the segmented media file, including the position, the duration, the creation time, the modification time, and the like; the sub-containers nested in the track container represent references and descriptions of corresponding tracks in the media data, for example, a container (denoted as tkhd box) in which characteristics and overall information (such as duration and width) describing the tracks, and a container (denoted as mdia box) in which media information (such as information of media type and sample) of the tracks are nested in the track container.
Step 303, correspondingly filling the extracted media data and the metadata describing the media data into a media data container and a metadata container at a segment level in a segment container of the segmented media file.
In one embodiment, one or more segments (fragments) may be encapsulated in a segmented media file, and for media data to be filled, one or more segmented media data containers (i.e., mdat boxes) of the segmented media file may be filled, and a segment-level metadata container (denoted as moof box) is encapsulated in each segment, wherein the filled metadata is used to describe the media data filled in the segment, so that the segments can be independently decoded.
In conjunction with fig. 4, for example, the media data to be filled is filled into 2 segments of the packaging structure of the FMP4 file, and each segment is filled with the media data; the metadata that needs to be filled into the metadata container (i.e., moof box) of the segmentation level of the corresponding segment is calculated and correspondingly filled into the child containers nested in the moof box, wherein the head of the moof box is called moof box, and the filled binary data is used to indicate the type of the container as "moof box" and the length of the moof box.
In one embodiment of filling data into the corresponding container in steps 301 to 303, when the filling operation is performed, a write operation function of the calling class completes writing and merging of binary data in the memory buffer of the child container, and returns an instance of the class, where the returned instance is used for merging the child container and the child container having the nested relationship.
As an example of the stuffing data, a class MP4 for implementing a package function is established, and each sub-container in the segmented media file is packaged as a static method of class Stream; establishing class streams for realizing binary data operation functions, wherein each class Stream is provided with a memory buffer area for storing binary data to be filled; converting multi-byte decimal data to be padded into binary data by a static method provided by Stream; merging and filling binary data to be filled into the sub-containers in the memory buffer area through a write operation function provided by the Stream-like instance; the static method provided by Stream returns a new Stream instance, and the merging of the current child container and other child containers with nested relation can be realized.
Step 203: the server returns the segmented media file to the player.
The server converts the media data into the segmented media file and pushes the segmented media file to the front-end player, the front-end player does not need to convert, the playing load is small, the capability of terminal hardware does not need to be limited, and the endurance is guaranteed.
Step 204: and sending the segmented media file to the media element of the webpage for playing through a media source expansion interface of the webpage.
In an embodiment, the sending, by the player through the media source extension interface of the web page, the segmented media file to the media element of the web page for playing may include: the player adds the segmented media file to the media source object in the MSE interface; calling MSE to create a virtual address corresponding to the media source object; and transmitting a virtual address to the media element of the webpage, wherein the virtual address is used for playing the media element by taking the media source object as a data source. The media element may be a Video element and/or an Audio element of a web page, and the media element acquires the media source object through the virtual address to play.
Referring to fig. 8, fig. 8 is an optional schematic diagram of a player playing a segmented Media file through a Media Source extended interface of a web page according to the embodiment of the present disclosure, where when the player receives a play event of the Media file in a play window (corresponding to the play window) of the web page, the player creates a Media Source object by performing a Media Source method through MSE; executing an addSource buffer method packaged in a media source expansion interface to create a buffer of a MediaSource object, namely a Source buffer (Source buffer) object, wherein one MediaSource object has one or more Source buffer objects, and each Source buffer object can be used for corresponding to a playing window in a webpage and is used for receiving a segmented media file to be played in the window.
In the process of playing the media file, a Parser (Parser) in the player continuously constructs a new segmented media file by parsing newly acquired media data, and adds the segmented media file to a SourceBuffer object of the same MediaSource object by executing an appdbuffer method of the SourceBuffer object.
And after the player adds the constructed segmented media file to the media source object in the media resource expansion interface, calling the media resource expansion interface to create a virtual address corresponding to the media source object. For example, the player executes the createObjectURL method encapsulated in the media source extension interface, and creates a virtual address, i.e. a virtual Uniform Resource Locator (URL), of the corresponding media source object, in which the Blob-type segmented media file is encapsulated.
In addition, the player sets the MediaSource object as the source (src) attribute of the virtual URL, i.e., binds the virtual URL with a media element in the web page, such as a video/audio element, which is also referred to as associating the media source object to the media element in the web page.
In the embodiments of the present disclosure, the segmented media file added to the media source object is also: a currently playing segmented media file. For example, when the segmented media file 1 is played currently, and the subsequent segmented media files 2 and 3 are already constructed, the constructed segmented media files 2 and 3 are added to the Source Buffer of the MSE for preloading, and correspondingly, the first key frame of the two key frames corresponding to the media data acquired by the player is the first key frame appearing after the segmented media file 1.
For the virtual address passed by the player to the media element of the web page, the player includes a statement for calling the media element to play the virtual URL, for example: < audio > virtual URL. When the webpage explains the corresponding statement in the player embedded in the webpage, the media element of the webpage reads the segmented media file from the SourceBuffer object bound by the virtual URL, and the segmented media file is decoded and played.
The following describes a process in which the player converts the MP4 file into the FMP4 file and plays the web page through the media source extension interface.
Referring to fig. 9, fig. 9 is a schematic diagram of converting an MP4 file provided by the embodiment of the present disclosure into an FMP4 file and playing the file through a media source extension interface, where the player requests to obtain partial media data in an MP4 file from a server based on a real address (http:// www.toutiao.com/a/b. MP4) of the media file, for example, data with a decoding time in a given time period for a subsequent playing point.
The player constructs an FMP4 file based on the acquired media data, and then adds the FMP4 file to a Source buffer object corresponding to the MediaSource object, because the virtual URL is bound to the MediaSource object, when the player calls the code of the audio/video element to be executed, the audio/video element reads a new FMP4 file which is added continuously from the Source buffer object of the MediaSource object, decodes the new FMP4 file, and realizes the continuous playing of the media file. The media elements of the webpage are used for acquiring the media source object based on the virtual URL, so that the media file is played, and the media data is not acquired based on the real address of the media file, so that the real address of the media file is protected.
Next, taking an example that the player is embedded in the web page, and the player plays the MP4 file using the HTML5Video element + Audio element of the web page, the playback control method based on media file conversion according to the embodiment of the present disclosure will be described, and according to the implementation of the MP4, the method can be easily applied to other non-streaming media formats. Fig. 10 is a schematic flow chart illustrating an alternative flow of a playing control method based on media file conversion according to an embodiment of the present disclosure, and referring to fig. 10, the playing control method based on media file conversion according to the embodiment of the present disclosure includes:
step 401: the player requests the data in the fixed-capacity MP4 file from the server according to the set offset and capacity.
The player sends a data request carrying the set offset and capacity to the server to obtain binary data which starts from zero bytes in the MP4 file and conforms to the set capacity. Taking the case that the MP4 file package structure includes fytp box, moov box and mdat box packaged in sequence as an example, the set capacity may be obtained by statistics of the ftyp box and moov box capacities of the existing MP4 file, so that the set capacity can cover the sum of the ftyp box and the moov box of the MP4 file with a set ratio (e.g., all), and it is ensured that complete moov box binary data can be requested from the server at one time. And if the complete moov data is not obtained through the primary request, recalculating the offset and the capacity, and further performing secondary request.
Step 402: the player receives the data returned by the server and identifies the media information of the MP4 file from the data returned by the server.
The media information of the MP4 file includes information of offset, capacity, decoding time, etc. of video/audio frames in the MP4 file.
In one embodiment, the player may implement the identification of the media information of the MP4 file by: recognizing binary data of the fytp box from the data returned by the server, and reading the type and the capacity of the container from the rest binary data; when the type of the read container is moov box and the capacity of the remaining binary data is not less than that of the moov box, the media information is parsed from the remaining binary data. Here, for the binary data returned by the server, the first piece of binary data is necessarily corresponding to the ftyp box, and according to the package specification of the ftyp box, the capacity (i.e. length) of the ftyp box and the capacity of the complete MP4 file can be read; for example, the capacity a (in bytes) of the ftyp box, the header information of the subsequent container is read from a +1 to obtain the type and capacity of the container, if the container is a moov box and the capacity (set to be the capacity of the ftyp box) is greater than the capacity of the moov box, which indicates that the complete binary data of the moov box has been retrieved, the binary data can be parsed according to the packaging structure to restore the media information.
In one embodiment, when the binary data returned by the server does not include complete moov data, reading the capacity of the container from the acquired binary data, and determining the offset and the capacity of the moov box in the MP4 file; according to the determined offset and capacity, when the type of the container read from the remaining binary data is moov box and the capacity of the remaining binary data is not less than the capacity of the moov box, obtaining, from the server, moov data in the MP4 file, starting with the offset of the moov box in the MP4 file and conforming to the capacity of the moov box in the MP4 file; when the type of the container read from the remaining binary data is moov box and the capacity of the remaining binary data is less than the capacity of the moov box, calculating a difference between the capacity of the moov box and the capacity of the remaining binary data as a new capacity of the secondary request, and requesting the binary data to the server a second time with the sum of the offset and the capacity of the primary request as a new offset.
In practical applications, there are cases where the packaging structure of the MP4 file is fytp box, mdat box, moov box packaged sequentially, and when the type of the container read from the remaining binary data is mdat box, the sum of the capacity of mdat box and the capacity of moov box is calculated as a new offset of the secondary request, and the binary data is requested for the second time from the server at the set capacity.
Step 403: during the playing process of the MP4 file by the player through the web page, two key frames in the MP4 file are positioned according to the identified media information and the current playing point.
In the embodiment of the present disclosure, the player plays with the media data (including at least video data, and may further include audio data) between two key frames as a loading unit, that is, the player plays the MP4 file by loading the media data between two key frames, there may be only a common frame between two key frames, that is, two key frames are adjacent key frames, and there may also be other key frames between two key frames.
Taking the example of reaching the playing point of the MP4 file by jumping, the player locates the first key frame as follows: the first key frame of the MP4 file with decoding time before the playing point locates the second key frame as: key frames in the MP4 file that are decoded later in time than the first key frame. Here, the video frame of the media file corresponding to the playing point includes two cases, i.e., a normal frame and a key frame, and when the video frame corresponding to the playing point is just the key frame, the first key frame of the MP4 file whose decoding time is before the playing point is the key frame corresponding to the playing point, i.e., the first key frame in the media data requested by the player at this time is the key frame corresponding to the playing point.
Two key frames in the player location MP4 file include: and determining the offset and the capacity of the first key frame and the second key frame based on the identified media information and the current playing point, and further requesting the media data between the first key frame and the second key frame from the server based on the offset and the capacity.
Step 404: media data between two located key frames is requested from the server.
In actual implementation, the player sends a network request to the server to request media data between two key frames located in the MP4 file, where the network request carries an offset and a capacity of a target interval corresponding to the two key frames.
Here, the player locates the position of the video frame in mdat by the offset and the capacity of the video frame between the first key frame and the second key frame in the MP4 file, locates the position of the audio frame in mdat by the offset and the capacity of the audio frame aligned with the video frame in the MP4 file, takes a section formed by an upper limit and a lower limit of the position as a target section, the offset and the capacity corresponding to the upper limit of the position as the offset and the capacity corresponding to the upper limit of the target section, and the offset and the capacity corresponding to the lower limit of the position as the offset and the capacity corresponding to the lower limit of the target section.
Step 405: the server extracts media data between the two key frames in the MP4 file and constructs a segmented media file in FMP4 format based on the extracted media data.
In practical implementation, the server calculates metadata at the level of the segmented media file according to the media information of the media data, and then fills the metadata at the level of the segmented media file and the media data according to the packaging format of the segmented media file in the FMP4 format to obtain the segmented media file in the FMP4 format.
Step 406: returning the constructed segmented media file to the player.
The server realizes the conversion from the MP4 format file to the segmented media file in the FMP4 format, and pushes the segmented media file to the front-end player, the front-end player does not need to convert, the playing load is small, the hardware capability of the terminal does not need to be limited, and the endurance of the terminal is ensured.
Step 407: the player adds the segmented media file to the media source object in the MSE interface.
Step 408: the player passes the virtual address to the media element of the web page.
The virtual address is used for the media element (video element + Audio element) to play video by using the media source object as a data source.
Continuing with the description of the playback control apparatus based on media file conversion, in practical implementation, the playback control apparatus based on media file conversion may also adopt a software implementation manner, as a software implementation example of the playback control apparatus based on media file conversion, fig. 11 is a schematic structural diagram of the playback control apparatus based on media file conversion according to an embodiment of the present disclosure, and referring to fig. 11, the playback control apparatus 800 based on media file conversion includes:
a sending unit 81, configured to send a network request for media data in a media file through a player embedded in a web page, where the player plays the media file in the web page, and the media file adopts a non-streaming media format;
a receiving unit 82, configured to receive a returned segmented media file, where the segmented media file is constructed based on the extracted media data after the media data is extracted based on the network request;
and the processing unit 83 is configured to send the segmented media file to the media element of the web page for playing through the media source extension interface of the web page.
In an embodiment, the network request carries an identifier of the media file, and is used for the server to determine whether the media file is a to-be-converted media file based on the identifier of the media file;
the receiving unit is further configured to receive a segmented media file constructed based on the extracted media data and returned by the server when the server confirms that the media file is a media file to be converted.
In an embodiment, the network request carries an offset and a capacity of the media data in the media file, and is used for the server to locate the position of the media data in the media file based on the offset and the capacity;
the receiving unit is further configured to receive a segmented media file constructed based on the extracted media data, which is returned by the server, when the server confirms that the media data is media data to be converted in the media file based on the position obtained by positioning.
In an embodiment, the network request carries authentication information for the server to perform user validity authentication;
the receiving unit is further configured to receive a segmented media file constructed based on the extracted media data, which is returned by the server, when the server passes the validity of the authentication of the user based on the authentication information.
In an embodiment, the segmented media file is obtained by filling metadata at a segmented media file level and the media data into the server according to a packaging format of the segmented media file;
wherein the metadata at the segmented media file level is calculated for the server from the media information of the media data to be filled.
In an embodiment, the sending unit is further configured to determine two key frames in the media file to be played based on a real-time playing point in the playing process of the media file;
and sending a network request to the server, wherein the network request is used for requesting to acquire the media data between the two key frames in the media file.
In one embodiment, when the playing point of the media file is reached by continuous playing,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time is after the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
In one embodiment, when the play point of the media file is reached by jumping,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time precedes the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
In an embodiment, the processing unit is further configured to determine, according to media information identified from metadata of the media file, an offset and a capacity of a video frame of the media data in the media file, and an offset and a capacity of an audio frame aligned with the video frame in the media file;
and determining the offset and the capacity of the interval comprising the video frame and the audio frame according to the determined offset and the capacity.
In an embodiment, the sending unit is further configured to, before sending the network request for the media data,
requesting metadata in the media file from the server based on the set offset and capacity, wherein the requested metadata starts from the offset in the media file and conforms to the capacity;
the processing unit is further used for identifying media information from the metadata returned by the server;
the media information is used to locate an offset and a volume of the requested media data in the media file.
In one embodiment, the processing unit is further configured to calculate an offset and a capacity of the metadata container according to a header of the metadata container when complete media information is not identified from metadata requested by a server through the set offset and capacity;
the sending unit is further configured to request the metadata in the media file from the server, where the requested metadata starts from the offset in the media file and conforms to the capacity;
the processing unit is further configured to identify and obtain corresponding media information from the acquired metadata.
In an embodiment, the processing unit is further configured to add the received segmented media file to a media source object in a media resource extension interface;
creating a virtual address corresponding to the media source object;
and transmitting the virtual address to the media element of the webpage, wherein the virtual address is used for playing the media element by taking the media source object as a data source.
By applying the embodiment of the present disclosure, the following beneficial effects are achieved:
1. the media data in the media file in the non-streaming media format is converted into the segmented media file, and the segmented media file is sent to the media element of the webpage for decoding and playing through the media source expansion interface of the webpage, so that the media file in the non-streaming media format is played through the webpage, and the limitation that the file in the non-streaming media packaging format can be independently played after being completely downloaded is overcome.
2. The conversion from the media file in the non-streaming media format to the segmented media file supporting the streaming media playing is realized by the server instead of the player, the player only needs to receive the segmented media file pushed to the front end by the server and send the segmented media file to the media element of the webpage for decoding playing through the media source expansion interface of the webpage, the playing load is small, the hardware capability of the terminal does not need to be limited, and the endurance is ensured.
3. In the process of playing the media file through the webpage, when a user switches the resolution, the media data of the media file with the target resolution is retrieved, and the retrieved media data is converted into the segmented media file to be played, so that the delay condition during resolution switching is avoided, and the real-time performance of resolution switching is ensured.
4. The media elements of the webpage acquire the segmented media files through the media source expansion interface to be decoded and played, and the media elements are not played after acquiring media data based on the real address of the media files, so that the real address of the media files is protected.
The disclosed embodiment also provides a readable storage medium, which may include: various media that can store program codes, such as a removable Memory device, a Random Access Memory (RAM), a Read-Only Memory (ROM), a magnetic disk, and an optical disk. The readable storage medium stores executable instructions;
the executable instruction is used for realizing the playing control method based on the media file conversion when being executed by the processor.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (25)

1. A play control method based on media file conversion is characterized by comprising the following steps:
sending a network request aiming at media data in a media file through a player embedded in a webpage;
the network request carries offset and capacity corresponding to the media data, the player plays a media file in the webpage, and the media file adopts a non-streaming media format;
receiving a returned segmented media file, wherein the segmented media file is constructed based on the extracted media data after the media data which is based on the network request and begins from the offset and accords with the capacity is extracted from the media file;
adding the received segmented media file to a media source object in a media resource extension interface;
calling a media resource expansion interface to create a virtual address corresponding to the media source object;
and transmitting the virtual address to the media element of the webpage, wherein the virtual address is used for playing the media element by taking the media source object as a data source.
2. The method of claim 1, wherein receiving the returned segmented media file comprises:
the network request carries an identifier of the media file, and the identifier of the media file is used for judging whether the media file is a media file to be converted;
and when the media file is confirmed to be the media file to be converted based on the identification of the media file, receiving a returned segmented media file constructed based on the extracted media data.
3. The method of claim 1, wherein receiving the returned segmented media file comprises:
the network request carries the offset and the capacity of the media data in the media file, and the offset and the capacity are used for positioning the position of the media data in the media file;
and when the media data are confirmed to be the media data to be converted in the media files based on the positions obtained by positioning, receiving the returned segmented media files constructed based on the extracted media data.
4. The method of claim 1, wherein receiving the returned segmented media file comprises:
the network request carries authentication information, and the authentication information is used for authenticating the legality of the user;
and when the legality of the user is passed based on the authentication information, receiving the returned segmented media file constructed based on the extracted media data.
5. The method of claim 1,
the segmented media file is obtained by filling metadata of the segmented media file level and the media data according to the packaging format of the segmented media file;
wherein the metadata of the segmented media file level is calculated according to the media information of the media data to be filled.
6. The method of claim 1, wherein sending the network request for media data in the media file comprises:
determining two key frames in the media file to be played based on the real-time playing point in the playing process of the media file;
and sending a network request, wherein the network request is used for requesting to acquire the media data between the two key frames in the media file.
7. The method of claim 6,
when the playing point of the media file is reached by means of continuous playing,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time is after the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
8. The method of claim 6,
when the play point of the media file is reached by jumping,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time precedes the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
9. The method of claim 1, further comprising:
determining the offset and the capacity of a video frame of the media data in the media file and the offset and the capacity of an audio frame aligned with the video frame in the media file according to the media information identified from the metadata of the media file;
and determining the offset and the capacity of the interval comprising the video frame and the audio frame according to the determined offset and the capacity.
10. The method of claim 1, further comprising:
prior to sending a network request for the media data,
requesting metadata in the media file based on the set offset and capacity, wherein the requested metadata starts from the offset in the media file and conforms to the capacity;
identifying media information from the returned metadata;
the media information is used to locate an offset and a volume of the requested media data in the media file.
11. The method of claim 10, further comprising:
when the complete media information is not identified from the returned metadata,
calculating the offset and the capacity of the metadata container according to the header of the metadata container;
requesting the metadata in the media file based on the calculated offset and capacity, the requested metadata starting from the offset in the media file and conforming to the capacity;
and identifying and obtaining corresponding media information from the acquired metadata.
12. A play control method based on media file conversion is characterized by comprising the following steps:
receiving a network request aiming at media data in a media file, wherein the network request carries offset and capacity corresponding to the media data, the media file is played through a webpage, and the media file adopts a non-streaming media format;
extracting media data which starts from the offset and conforms to the capacity in the media file based on the network request;
constructing a segmented media file based on the extracted media data;
sending the segmented media file, wherein the segmented media file is used for receiving the segmented media file and adding the segmented media file to a media source object in a media resource expansion interface; calling a media resource expansion interface to create a virtual address corresponding to the media source object; and transmitting the virtual address to the media element of the webpage, wherein the virtual address is used for playing the media element by taking the media source object as a data source.
13. A playback control apparatus based on media file conversion, comprising:
the sending unit is used for sending a network request aiming at the media data in the media file through a player embedded in a webpage; the network request carries offset and capacity corresponding to the media data, the player plays a media file in the webpage, and the media file adopts a non-streaming media format;
a receiving unit, configured to receive a returned segmented media file, where the segmented media file is constructed based on the extracted media data after extracting media data that starts from the offset and conforms to the capacity from the media file based on the network request;
the processing unit is used for adding the received segmented media file to a media source object in a media resource expansion interface; calling a media resource expansion interface to create a virtual address corresponding to the media source object; and transmitting the virtual address to the media element of the webpage, wherein the virtual address is used for playing the media element by taking the media source object as a data source.
14. The apparatus of claim 13,
the network request carries an identifier of the media file, and the identifier of the media file is used for judging whether the media file is a media file to be converted;
the receiving unit is further configured to receive a returned segmented media file constructed based on the extracted media data when the media file is determined to be a media file to be converted based on the identifier of the media file.
15. The apparatus of claim 13,
the network request carries the offset and the capacity of the media data in the media file, and the offset and the capacity are used for positioning the position of the media data in the media file;
the receiving unit is further configured to receive a returned segmented media file constructed based on the extracted media data when the media data is determined to be media data to be converted in the media file based on the position obtained by positioning.
16. The apparatus of claim 13,
the network request carries authentication information, and the authentication information is used for authenticating the legality of the user;
the receiving unit is further configured to receive a returned segmented media file constructed based on the extracted media data when the user authentication based on the authentication information passes validity.
17. The apparatus of claim 13,
the segmented media file is obtained by filling metadata of the segmented media file level and the media data according to the packaging format of the segmented media file;
wherein the metadata of the segmented media file level is calculated according to the media information of the media data to be filled.
18. The apparatus of claim 13,
the sending unit is further configured to determine two key frames in the media file to be played based on a real-time playing point in the playing process of the media file;
and sending a network request, wherein the network request is used for requesting to acquire the media data between the two key frames in the media file.
19. The apparatus of claim 18,
when the playing point of the media file is reached by means of continuous playing,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time is after the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
20. The apparatus of claim 18,
when the play point of the media file is reached by jumping,
the first key frame of the two key frames is: the first key frame in the media file whose decoding time precedes the play point,
the second key frame of the two key frames is: key frames in the media file that are decoded later than the first key frame.
21. The apparatus of claim 13,
the processing unit is further used for determining the offset and the capacity of the video frame of the media data in the media file and the offset and the capacity of the audio frame aligned with the video frame in the media file according to the media information identified from the metadata of the media file;
and determining the offset and the capacity of the interval comprising the video frame and the audio frame according to the determined offset and the capacity.
22. The apparatus of claim 13,
the sending unit is further configured to, before sending the network request for the media data,
requesting metadata in the media file based on the set offset and capacity, wherein the requested metadata starts from the offset in the media file and conforms to the capacity;
the processing unit is further used for identifying media information from the returned metadata;
the media information is used to locate an offset and a volume of the requested media data in the media file.
23. The apparatus of claim 22,
the processing unit is further used for calculating the offset and the capacity of the metadata container according to the head of the metadata container when the complete media information is not identified from the returned metadata;
the sending unit is further configured to request the metadata in the media file based on the calculated offset and the calculated capacity, where the requested metadata starts from the offset and conforms to the capacity in the media file;
the processing unit is further configured to identify and obtain corresponding media information from the acquired metadata.
24. A playback control apparatus based on media file conversion, comprising:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions stored in the memory to implement the method for controlling playback based on media file conversion according to any of claims 1 to 11.
25. A storage medium storing executable instructions for implementing the method of playing control based on media file conversion according to any one of claims 1 to 11 when executed.
CN201810533539.1A 2018-05-29 2018-05-29 Play control method and device based on media file conversion and storage medium Active CN110545463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810533539.1A CN110545463B (en) 2018-05-29 2018-05-29 Play control method and device based on media file conversion and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810533539.1A CN110545463B (en) 2018-05-29 2018-05-29 Play control method and device based on media file conversion and storage medium

Publications (2)

Publication Number Publication Date
CN110545463A CN110545463A (en) 2019-12-06
CN110545463B true CN110545463B (en) 2021-03-16

Family

ID=68701606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810533539.1A Active CN110545463B (en) 2018-05-29 2018-05-29 Play control method and device based on media file conversion and storage medium

Country Status (1)

Country Link
CN (1) CN110545463B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110996162A (en) * 2019-12-12 2020-04-10 国微集团(深圳)有限公司 Seamless switching playing method of multi-program audio and video stream and media player

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106961613A (en) * 2017-03-30 2017-07-18 上海七牛信息技术有限公司 A kind of streaming real-time transcoding order method and system
CN107613029A (en) * 2017-11-05 2018-01-19 深圳市青葡萄科技有限公司 A kind of virtual desktop remote method and system suitable for mobile terminal or Web ends
CN107979783A (en) * 2016-10-25 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of stream data analytic method, device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654933B1 (en) * 1999-09-21 2003-11-25 Kasenna, Inc. System and method for media stream indexing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979783A (en) * 2016-10-25 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of stream data analytic method, device and electronic equipment
CN106961613A (en) * 2017-03-30 2017-07-18 上海七牛信息技术有限公司 A kind of streaming real-time transcoding order method and system
CN107613029A (en) * 2017-11-05 2018-01-19 深圳市青葡萄科技有限公司 A kind of virtual desktop remote method and system suitable for mobile terminal or Web ends

Also Published As

Publication number Publication date
CN110545463A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN110545483B (en) Method, device and storage medium for playing media file by switching resolution in webpage
CN110545466B (en) Webpage-based media file playing method and device and storage medium
CN110545456B (en) Synchronous playing method and device of media files and storage medium
CN110545490B (en) Media file conversion method, device and storage medium
CN110545491B (en) Network playing method, device and storage medium of media file
CN110545479B (en) Loading control method and device for media playing and storage medium
US11025991B2 (en) Webpage playing method and device and storage medium for non-streaming media file
CN110545448B (en) Media playing method and device based on data encryption and storage medium
JP2021510991A5 (en)
CN110545460B (en) Media file preloading method and device and storage medium
CN110545254B (en) Method and device for analyzing metadata container and storage medium
CN110545463B (en) Play control method and device based on media file conversion and storage medium
CN110545471B (en) Playing control method and device based on offline conversion and storage medium
CN110545468B (en) Media file playing method and device based on parameter encapsulation and storage medium
CN110545461A (en) Resolution switching method and device of media file and storage medium
CN110545464A (en) Media file resolution switching method and device and storage medium
CN110545467A (en) Media file loading control method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.