CN105208440B - A kind of method and system that MP4 format video plays online - Google Patents
A kind of method and system that MP4 format video plays online Download PDFInfo
- Publication number
- CN105208440B CN105208440B CN201510609838.5A CN201510609838A CN105208440B CN 105208440 B CN105208440 B CN 105208440B CN 201510609838 A CN201510609838 A CN 201510609838A CN 105208440 B CN105208440 B CN 105208440B
- Authority
- CN
- China
- Prior art keywords
- file
- format video
- format
- index
- player
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 239000012634 fragment Substances 0.000 claims abstract description 90
- 230000005540 biological transmission Effects 0.000 abstract description 13
- 238000006243 chemical reaction Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 9
- 230000008901 benefit Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 4
- 238000005859 coupling reaction Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/4402—Processing 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/440218—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/84—Generation or processing of descriptive data, e.g. content descriptors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring 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
This application discloses a kind of methods that MP4 format video plays online, it include: that client receives the requested MP4 format video data returned after line playing request to server transmission MP4 format video file and corresponding description the file information, wherein, description the file information includes: that MP4 format video file is converted to information required for TS fragment;Client generates corresponding TS index file according to description the file information respectively and is sent to the player of client, generates the list of TS index file on a player;Player sends TS fragment playing request to client according to TS index file tab sequential;Client is converted to TS fragment according to the corresponding MP4 format video data of TS fragment playing request acquisition and is back to player;Player receives TS fragment and sequentially plays out.The first buffer time that MP4 format video file plays online is greatly reduced in the present invention.
Description
Technical Field
The present application relates to the field of video playing, and in particular, to a method and a system for playing MP4 format video online.
Background
Currently, a mobile terminal broadcasts videos from internet multimedia more and more widely, and the commonly used videos have various formats. Video format refers to the manner in which video data, audio data, and related information data in a video are organized. Video data is realized according to a certain specific format in the processes of storage and transmission, and the different video formats are realized in different modes. The video formats commonly used at present mainly include FLV, MP4, HLS, and the like.
MP4, called MPEG-4Part 14, is a multimedia computer file format using MPEG-4, with a sub-file name MP4, for storing digital audio and digital video. MP4 is a set of compression coding standards for audio and video information, and is established by the international organization for standardization (ISO) and the "Moving picture experts Group" (MPEG) under the International Electrotechnical Commission (IEC).
The MP4 file format is an open video format that can be used to describe almost all media structures, the media description in the MP4 file is separate from the media data, and the organization of the media data is free and does not need to be arranged in chronological order, even if the media data can directly refer to other files. Meanwhile, MP4 also supports streaming media, and MP4 is currently widely used to package h.264 video and AAC audio, which are representatives of high-definition video.
The most important two parts of a general MP4 file are a video information part with an MP4 file header, video key information including information such as the coding format of audio and video, the resolution of video, the sampling rate of audio/video, the sampling precision, the number of channels, the size information of each audio/video packet and the corresponding time stamp of each audio/video packet is stored in the video file, and the other part is actual MP4 format video data. When playing MP4 format video, the player of the mobile terminal will first request the video information part with MP4 file header.
HLS (HTTP Live streaming) is mainly used for audio and video services of PC and Apple terminals. The media playback method comprises an m3u (8) index file, a TS media fragment file and a key encryption string file, wherein the index file is used for a player to perform seek operation on the TS media fragment file, and the TS media fragment file comprises played video data.
The commonly used streaming media protocols mainly include HTTP progressive download and real-time streaming media protocol based on RTSP/RTP, which are basically completely different things, and currently, the HTTP progressive download method is more convenient and better.
Video processing using the MP4 format has the following benefits:
(1) different coding algorithms can be adopted for different audio/video objects, so that the compression efficiency of the audio/video is improved;
(2) the audio/video objects are relatively independent, so that the reusability of multimedia data is improved;
(3) the user is allowed to operate a single audio/video object, so that the interactive experience of the user is facilitated;
(4) allowing flexible allocation of code rates between different audio/video objects, it is possible to achieve how many bytes are allocated according to the degree of importance: more bytes can be allocated to important objects, and less bytes can be allocated to secondary objects, so that better effect can be obtained at low code rate.
(5) Natural audio/video objects and synthetic audio/video objects can be conveniently integrated.
Based on the above advantages, it is popular to store the video file in MP4 format on the server, and to distribute and play the video file after receiving the video playing request from the client. The client receives the video file sent by the server, downloads the video information part with the MP4 file header, and then downloads the actual MP4 format video data for playing.
MP4 is a popular video file format that can be played on multiple platforms. With the development of network technology, online playing of videos is more and more popular with people. However, since the video file in MP4 format contains information such as the indexes of all the audio and video frames in its header, the video file in MP4 format has a particularly large header, and the buffering time at the beginning of the video is particularly long when playing back the video file in MP4 format. If the MP4 file is played online, i.e. played at the bottom of the file, the downloading buffer time of the video start file header is long, and the length of the video start file header varies according to the total length of the video, which can generally reach 1M, and the experience of watching the MP4 video file online by the user is seriously affected.
The current solution is to complete the conversion of MP4 format video files by the server by:
(1) the video file format is converted into an FLV file format, and then the FLV file format is transmitted to a local player for playing, and the video playing starting fast buffer playing mode is carried out by utilizing the characteristic of small head of the FLV.
(2) The MP4 format video file is divided into a plurality of MP4 files of small video segments, so that the head of each small file is small, and the aim of quick playing can be achieved.
(3) And converting the MP4 format video file into a plurality of TS format video files, and playing the TS format video files by using the HLS technology.
If the format conversion process of the MP4 format video is completed entirely in the background server according to the above scheme, the following problems may occur:
(1) in the prior art, the video file in the MP4 format is converted into the video file in other format on the server, but the converted video file is converted into a plurality of formats to adapt to different video playing platforms, so that the storage capacity of the service is greatly increased, and the cost of the server is increased.
(2) In the prior art, the video file in the MP4 format is converted into the video file in other format on the server, so that the same video stores files in multiple formats on the server, which brings great troubles to the file management of the server.
(3) In the prior art, the video file in the MP4 format is converted into the video file in other format, that is, the fragmented video file, in the server, the data transmission of a plurality of small fragmented files may affect the transmission effect of the file, which is not favorable for playing the video of the client.
(4) In the prior art, the video file in the MP4 format is converted into the video file in another format on the server, and the efficiency of network transmission between the streaming module and the format conversion module of the server is low, which results in the problem that the client is not smooth when receiving the video file for playing.
Disclosure of Invention
In order to solve the problems in the prior art, the present invention provides a method and system for playing MP4 format video online.
The invention provides a method for playing MP4 format video on line, which comprises the following steps:
the client receives the requested MP4 format video data and the corresponding description file information which are returned after the client sends an MP4 format video file online playing request to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing;
the client generates corresponding TS index files according to the description file information and sends the TS index files to a player of the client, and a TS index file list is generated on the player;
the player sends a TS fragment playing request to a client according to the TS index file list sequence;
the client acquires corresponding MP4 format video data according to the TS fragment playing request, converts the video data into TS fragments and returns the TS fragments to the player;
and the player receives the TS fragments and plays the TS fragments in sequence.
Further, the client receives the requested MP4 format video data and the corresponding description file information, which are returned after the MP4 format video file online playing request is sent to the server, and further includes:
after the server receives an MP4 format video source file, the file headers of the MP4 format video source file are dispersed into respective file header fragments according to the key frames of the MP4 format video source file, and the fragments are stored in respective corresponding positions in the MP4 format video source file;
and generating corresponding MP4 index files according to the file header fragments, and sequentially saving all the generated MP4 index files in front of the MP4 format video file with the file header fragments to form the description file information.
Further, wherein the description file information further includes:
the description file information records key frame information required for generating the TS index file, wherein,
the TS index file is further an m3u8 file.
Further, the TS index file records an offset of each key frame in the current TS slice.
Further, the sending, by the player, a TS segment playing request to the client according to the TS index file list sequence, further includes:
and the player sends an HTTP request for TS fragment playing to the client according to the TS index file.
A system for online playing of MP4 format video, the system being provided on a client, the system comprising: a receiving module, a processing module and a player,
the receiving module is used for receiving the requested MP4 format video data and the corresponding description file information which are returned after the MP4 format video file online playing request is sent to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing;
the processing module is used for respectively generating corresponding TS index files according to the description file information and sending the TS index files to a player of the client, and generating a TS index file list on the player;
acquiring corresponding MP4 format video data according to the TS fragment playing request, converting the video data into TS fragments and returning the TS fragments to the player;
the player is used for sending a TS fragment playing request to a client according to the TS index file list sequence; and
and receiving the TS fragments and playing the TS fragments in sequence.
Further, wherein the description file information further includes:
after the MP4 format video source file is received by the server, the file header of the MP4 format video source file is dispersed into respective file header fragments according to the key frame of the MP4 format video source file, and the fragments are stored in the corresponding positions of the MP4 format video source file;
and generating corresponding MP4 index files according to the file header fragments, and sequentially saving all the generated MP4 index files in front of the MP4 format video file with the file header fragments to form the MP4 index files.
Further, wherein the description file information further includes:
the description file information records key frame information required for generating the TS index file, wherein,
the TS index file is further an m3u8 file.
Further, the TS index file records an offset of each key frame in the current TS slice.
Further, wherein the player is further configured to:
and sending an HTTP request of TS slicing playing to the client according to the TS index file.
Compared with the prior art, the method and the system for playing the MP4 format video on line have the following advantages:
(1) the method disperses file headers of MP4 format video files to corresponding positions on a server according to key frames, adds file header information to the MP4 format video files according to the dispersed file headers, returns the file header information according to an online video playing request of a client, generates TS fragment index files by the client, converts downloaded MP4 video files into TS fragment video files according to the generated index files and sends the TS fragment video files to a player for playing, so that the file header information prepared in advance on the server only carries information such as video key frame positions required for converting the TS index files, and the first buffer time of online playing of the MP4 format video files is greatly shortened compared with the method of downloading large file headers of MP 4.
(2) The invention processes the MP4 format video file on the server and converts the MP4 format video file on the client, thereby not only reducing the format conversion management on the server, but also reducing the management of storing a plurality of format video files on the server and reducing the server cost.
(3) The invention processes the MP4 format video file on the server, and performs format conversion of the MP4 format video file on the client, the MP4 format video file stored on the server is a complete video file comprising a file header and video data, the transmission of the complete video file can reduce the influence of the transmission on the video file, and the client can be ensured to receive the complete video file for conversion and play.
(4) According to the invention, the MP4 format video file is processed on the server, and the format conversion of the MP4 format video file is carried out on the client, so that the problem that the client is not smooth when receiving the video file for playing due to low network transmission performance efficiency between the streaming module and the format conversion module caused by the video format conversion on the server is solved.
(5) The invention processes the MP4 format video file on the server, and converts the MP4 format video file on the client, and transmits a single MP4 file on the network, and can use P2P technology to accelerate the transmission.
Of course, it is not necessary for any one product to achieve all of the above-described technical effects simultaneously.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of the method for online playing MP4 video according to the present invention;
fig. 2 is a schematic flow chart of a method for playing MP4 format video online according to embodiment 2 of the present invention;
fig. 3 is a block diagram of the system structure of MP4 format video online playing of the present invention.
Detailed Description
As used in the specification and in the claims, certain terms are used to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This specification and claims do not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. "substantially" means within an acceptable error range, and a person skilled in the art can solve the technical problem within a certain error range to substantially achieve the technical effect. Furthermore, the term "coupled" is intended to encompass any direct or indirect electrical coupling. Thus, if a first device couples to a second device, that connection may be through a direct electrical coupling or through an indirect electrical coupling via other devices and couplings. The description which follows is a preferred embodiment of the present application, but is made for the purpose of illustrating the general principles of the application and not for the purpose of limiting the scope of the application. The protection scope of the present application shall be subject to the definitions of the appended claims.
The present application will be described in further detail below with reference to the accompanying drawings, but the present application is not limited thereto.
Example 1:
as shown in fig. 1, a method for playing a video in MP4 format online in embodiment 1 of the present invention includes:
step 101, the client receives the requested MP4 format video data and the corresponding description file information which are returned after the client sends an MP4 format video file online playing request to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing; wherein,
the header of a typical MP4 format video file is relatively large, and includes not only video key information, but also information such as audio/video encoding format, video resolution, audio/video sampling rate, sampling accuracy, channel number, size information of each audio/video packet, and a timestamp corresponding to each audio/video packet in the video file.
When an MP4 format video file is stored on a server, the file header of the MP4 format video source file is dispersed into respective file header fragments according to the key frame of the MP4 format video source file and is stored to the corresponding position in the MP4 format video source file; the description file information recording offset information of each key frame in the MP4 format video file is added in front of the header of the MP4 format video file.
When the client plays online, the description file information is downloaded first, so that an index file of the TS fragment is generated, and the file header of the video source file in the MP4 format does not need to be downloaded when the video playing is started. Compared with the file header of the video source file in the MP4 format, the description file information only needs to record the information required for generating the TS fragment index file, so the size of the description file information is greatly reduced.
102, the client generates corresponding TS index files according to the description file information and sends the TS index files to a player of the client, and a TS index file list is generated on the player; wherein,
the generated TS index file records the offset information of each key frame in the MP4 format video file to be converted, and when a player plays seek operation, the TS fragment file can be quickly found.
And 103, the player sends a TS fragment playing request to the client according to the TS index file list sequence.
Step 104, the client acquires corresponding MP4 format video data according to the TS fragment playing request, converts the video data into TS fragments and returns the TS fragments to the player; wherein,
the video files in the MP4 format all have a large file header, which is inconvenient for the client to buffer and play quickly, and convert the video files into a file header, i.e. a TS index file, and a format video in a small TS fragment, so that the client can buffer the first video file quickly when playing online.
And 105, the player receives the TS fragments and plays the TS fragments in sequence.
Example 2:
as shown in fig. 2, on the basis of embodiment 1, the method for playing MP4 format video online according to the present invention includes:
step 201, the client receives the requested MP4 format video data and the corresponding description file information, which are returned after the MP4 format video file online playing request is sent to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing;
the storage process of the MP4 format video file in the server is as follows:
after the server receives an MP4 format video source file, the file headers of the MP4 format video source file are dispersed into respective file header fragments according to the key frames of the MP4 format video source file, and the fragments are stored in respective corresponding positions in the MP4 format video source file;
and generating corresponding MP4 index files according to the file header fragments, and sequentially saving all the generated MP4 index files in front of the MP4 format video file with the file header fragments to form the description file information.
The MP4 header fragment contains information about the number and size of all frames before each key frame, and adds key frame index to the TS index file generated for convenience.
Step 202, the client generates corresponding TS index files according to the description file information and sends the TS index files to a player of the client, and a TS index file list is generated on the player;
the description file information records information required for generating a TS index file, wherein the TS index file is further an m3u8 file; the description file information is generated according to the file header of the MP4 format video when the MP4 format video file is saved by the server;
the TS index file records the offset of each key frame in the current TS fragment file.
Step 203, the player sends a TS fragment playing request to a client according to the sequence of the TS index file list; the TS fragment playing request is an HTTP request sent by a local server, for example, the player requests playing to a client local server by HTTP://127.0.0.1/vod.m3u8 link.
And step 204, the client acquires corresponding MP4 format video data according to the TS fragment playing request, converts the video data into TS fragments, and returns the TS fragments to the player.
Step 205, when the player plays the video, the player plays the video sequentially according to the received TS segments.
Example 3:
as shown in fig. 3, the system for playing MP4 format video online according to the present invention is provided on a client, and the system includes: a receiving module 301, a processing module 302 and a player 303.
The receiving module 301, coupled to the processing module 302, is configured to receive requested MP4 format video data and corresponding description file information, where the requested MP4 format video data and the corresponding description file information are returned after an MP4 format video file online playing request is sent to a server,
the description file information includes: the MP4 format video file is converted into information required for TS slicing.
The processing module 302 is coupled to the receiving module 301 and the player 303, and configured to generate corresponding TS index files according to the description file information, send the TS index files to the player of the client, and generate a TS index file list on the player;
and acquiring corresponding MP4 format video data according to the TS fragment playing request, converting the video data into the TS fragments and returning the TS fragments to the player.
The player 303 is coupled to the processing module 302, and configured to send a TS fragment playing request to a client according to the sequence of the TS index file list;
and receiving the TS fragments and playing the TS fragments in sequence.
In this embodiment, the receiving the requested MP4 format video data and the corresponding description file information returned after sending the MP4 format video file online playing request to the server further includes:
after receiving an MP4 format video source file, dispersing the file header of the MP4 format video source file into respective file header fragments according to the key frames of the MP4 format video source file, and storing the file header fragments to respective corresponding positions in the MP4 format video source file;
and generating corresponding MP4 index files according to the file header fragments, and sequentially saving all the generated MP4 index files in front of the MP4 format video file with the file header fragments to form the description file information.
The description file information further comprises:
the description file information records key frame information required for generating the TS index file, wherein,
the TS index file is further an m3u8 file.
Further, the TS index file records the offset of each key frame in the current TS slice.
The player is further configured to:
and sending an HTTP request of TS slicing playing to the client according to the TS index file.
Compared with the prior art, the method and the system for playing the MP4 format video on line have the following advantages:
(1) the method disperses file headers of MP4 format video files to corresponding positions on a server according to key frames, adds file header information to the MP4 format video files according to the dispersed file headers, returns the file header information according to an online video playing request of a client, generates TS fragment index files by the client, converts downloaded MP4 video files into TS fragment video files according to the generated index files and sends the TS fragment video files to a player for playing, so that the file header information prepared in advance on the server only carries information such as video key frame positions required for converting the TS index files, and the first buffer time of online playing of the MP4 format video files is greatly shortened compared with the method of downloading large file headers of MP 4.
(2) The invention processes the MP4 format video file on the server and converts the MP4 format video file on the client, thereby not only reducing the format conversion management on the server, but also reducing the management of storing a plurality of format video files on the server and reducing the server cost.
(3) The invention processes the MP4 format video file on the server, and performs format conversion of the MP4 format video file on the client, the MP4 format video file stored on the server is a complete video file comprising a file header and video data, the transmission of the complete video file can reduce the influence of the transmission on the video file, and the client can be ensured to receive the complete video file for conversion and play.
(4) According to the invention, the MP4 format video file is processed on the server, and the format conversion of the MP4 format video file is carried out on the client, so that the problem that the client is not smooth when receiving the video file for playing due to low network transmission performance efficiency between the streaming module and the format conversion module caused by the video format conversion on the server is solved.
(5) The invention processes the MP4 format video file on the server, and converts the MP4 format video file on the client, and transmits a single MP4 file on the network, and can use P2P technology to accelerate the transmission.
The foregoing description shows and describes several preferred embodiments of the present application, but as aforementioned, it is to be understood that the application is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the application as described herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the application, which is to be protected by the claims appended hereto.
Claims (8)
1. A method for playing MP4 format video online, comprising:
when an MP4 format video file is stored on a server, the file headers of the MP4 format video source file are dispersed into respective file header fragments according to the key frames of the MP4 format video source file and are stored in the corresponding positions in the MP4 format video source file; adding description file information in front of the file header of the MP4 format video file, wherein the description file information records the offset information of each key frame in the MP4 format video file;
the client receives the requested MP4 format video data and the corresponding description file information which are returned after the client sends an MP4 format video file online playing request to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing;
after the server receives an MP4 format video source file, the file headers of the MP4 format video source file are dispersed into respective file header fragments according to the key frames of the MP4 format video source file, and the fragments are stored in respective corresponding positions in the MP4 format video source file;
generating corresponding MP4 index files according to the file header fragments, and saving all the generated MP4 index files in sequence in front of the MP4 format video file with the file header fragments to form the description file information
The client generates corresponding TS index files according to the description file information and sends the TS index files to a player of the client, and a TS index file list is generated on the player;
the player sends a TS fragment playing request to a client according to the TS index file list sequence;
the client acquires corresponding MP4 format video data according to the TS fragment playing request, converts the video data into TS fragments and returns the TS fragments to the player;
and the player receives the TS fragments and plays the TS fragments in sequence.
2. The method for playing back a MP4 format video on line according to claim 1, wherein the description file information further includes:
the description file information records key frame information required for generating the TS index file, wherein,
the TS index file is further an m3u8 file.
3. The method for playing back MP4 format video on line according to claim 2, wherein the TS index file records the offset of each key frame in the current TS slice.
4. The method for playing back MP4 format video on line according to claim 1, wherein the player sends a TS slicing playback request to the client according to the TS index file list order, further comprising:
and the player sends an HTTP request for TS fragment playing to the client according to the TS index file.
5. A system for playing MP4 format video online, wherein the system is provided on a client and interacts with a server, the system comprises: a receiving module, a processing module and a player,
when an MP4 format video file is stored on a server, the file headers of the MP4 format video source file are dispersed into respective file header fragments according to the key frames of the MP4 format video source file and are stored in the corresponding positions in the MP4 format video source file; adding description file information in front of the file header of the MP4 format video file, wherein the description file information records the offset information of each key frame in the MP4 format video file;
the receiving module is used for receiving the requested MP4 format video data and the corresponding description file information which are returned after the MP4 format video file online playing request is sent to the server, wherein,
the description file information includes: the MP4 format video file is converted into information required by TS slicing;
after the MP4 format video source file is received by the server, the file header of the MP4 format video source file is dispersed into respective file header fragments according to the key frame of the MP4 format video source file, and the fragments are stored in the corresponding positions of the MP4 format video source file; generating corresponding MP4 index files according to the file header fragments, and sequentially saving all the generated MP4 index files in front of the MP4 format video file with the file header fragments to form
The processing module is used for respectively generating corresponding TS index files according to the description file information and sending the TS index files to a player of the client, and generating a TS index file list on the player;
acquiring corresponding MP4 format video data according to the TS fragment playing request, converting the video data into TS fragments and returning the TS fragments to the player;
the player is used for sending a TS fragment playing request to a client according to the TS index file list sequence; and
and receiving the TS fragments and playing the TS fragments in sequence.
6. The system for playing back a video in MP4 format on line according to claim 5, wherein the description file information further includes:
the description file information records key frame information required for generating the TS index file, wherein,
the TS index file is further an m3u8 file.
7. The system for on-line playing of MP4 video according to claim 6, wherein the TS index file records the offset of each key frame in the current TS slice.
8. The system for on-line playing of MP4 format video according to claim 5, wherein the player is further configured to:
and sending an HTTP request of TS slicing playing to the client according to the TS index file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510609838.5A CN105208440B (en) | 2015-09-22 | 2015-09-22 | A kind of method and system that MP4 format video plays online |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510609838.5A CN105208440B (en) | 2015-09-22 | 2015-09-22 | A kind of method and system that MP4 format video plays online |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105208440A CN105208440A (en) | 2015-12-30 |
CN105208440B true CN105208440B (en) | 2019-03-12 |
Family
ID=54955819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510609838.5A Active CN105208440B (en) | 2015-09-22 | 2015-09-22 | A kind of method and system that MP4 format video plays online |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105208440B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105704581A (en) * | 2016-01-25 | 2016-06-22 | 互联天下科技发展(深圳)有限公司 | HTTP real-time video transmission method based on MP4 file format |
CN108124169A (en) * | 2016-11-29 | 2018-06-05 | 中国科学院声学研究所 | A kind of P2P Video service accelerated methods of household radio router |
CN110545459A (en) * | 2018-05-29 | 2019-12-06 | 武汉斗鱼网络科技有限公司 | method for caching video and related equipment |
CN110113655B (en) * | 2019-05-05 | 2021-09-21 | 北京奇艺世纪科技有限公司 | Video playing method and device and user terminal |
CN111083410B (en) * | 2019-12-30 | 2022-02-25 | 珠海全志科技股份有限公司 | Audio and video stream processing method and device for DVR |
CN111356028A (en) * | 2020-03-16 | 2020-06-30 | 南京巨鲨显示科技有限公司 | Method and device for realizing file sequence on demand by streaming media service |
CN113079386B (en) * | 2021-03-19 | 2023-01-17 | 北京百度网讯科技有限公司 | Video online playing method and device, electronic equipment and storage medium |
CN114173074B (en) * | 2021-10-22 | 2023-11-03 | 广州市奥威亚电子科技有限公司 | Recording and storing method for video format conversion and format conversion method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104348899A (en) * | 2014-06-25 | 2015-02-11 | 深圳市天朗时代科技有限公司 | Client and server multimedia content sharing method and sharing system |
CN104661058A (en) * | 2013-11-20 | 2015-05-27 | 深圳市云帆世纪科技有限公司 | MP4 video on demand data stream transmission method, client side and video on demand system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011150644A1 (en) * | 2010-12-17 | 2011-12-08 | 华为技术有限公司 | Method and apparatus for acquiring and transmitting streaming media data in the process of initiation |
JP6180524B2 (en) * | 2012-07-09 | 2017-08-16 | ヴィド スケール インコーポレイテッド | Power-aware video decoding and streaming |
CN104349176B (en) * | 2013-07-30 | 2017-11-10 | 中国电信股份有限公司 | Adaptive stream media system, method for down loading and streaming media server, user terminal |
CN103763637A (en) * | 2014-01-21 | 2014-04-30 | 北京云视睿博传媒科技有限公司 | Stream media broadcasting method and system |
-
2015
- 2015-09-22 CN CN201510609838.5A patent/CN105208440B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104661058A (en) * | 2013-11-20 | 2015-05-27 | 深圳市云帆世纪科技有限公司 | MP4 video on demand data stream transmission method, client side and video on demand system |
CN104348899A (en) * | 2014-06-25 | 2015-02-11 | 深圳市天朗时代科技有限公司 | Client and server multimedia content sharing method and sharing system |
Also Published As
Publication number | Publication date |
---|---|
CN105208440A (en) | 2015-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105208440B (en) | A kind of method and system that MP4 format video plays online | |
US11470405B2 (en) | Network video streaming with trick play based on separate trick play files | |
CN105611395B (en) | A kind of method and system that MP4 format video plays online | |
KR101783579B1 (en) | Method and apparatus for generating, playing adaptive stream based on file format, and thereof readable medium | |
CN105228001B (en) | A kind of method and system that FLV format videos play online | |
CN102118428B (en) | Method and system for playing streaming media | |
US9247317B2 (en) | Content streaming with client device trick play index | |
US8929441B2 (en) | Method and system for live streaming video with dynamic rate adaptation | |
CN112752115B (en) | Live broadcast data transmission method, device, equipment and medium | |
US20140359678A1 (en) | Device video streaming with trick play based on separate trick play files | |
WO2008061416A1 (en) | A method and a system for supporting media data of various coding formats | |
US20140139735A1 (en) | Online Media Data Conversion Method, Online Video Playing Method and Corresponding Device | |
KR20080072019A (en) | Time-shifted presentation of media streams | |
WO2014193996A2 (en) | Network video streaming with trick play based on separate trick play files | |
CN104661058A (en) | MP4 video on demand data stream transmission method, client side and video on demand system | |
US10057624B2 (en) | Synchronization of content rendering | |
US10924524B2 (en) | Communication devices, communication data generation method, and communication data processing method | |
CN105430510A (en) | Video on demand method, gateway, smart terminal and video on demand system | |
US20140036990A1 (en) | System and method for optimizing a video stream | |
US20220131921A1 (en) | Multicast to unicast conversion | |
EP3888319B1 (en) | Multicast to unicast conversion | |
US20230107615A1 (en) | Dynamic creation of low latency video streams in a live event |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100191 Beijing, Xueyuan Road No. 51, the first to enjoy the science and technology building, floor 6, Applicant after: Storm group Limited by Share Ltd Address before: 100191 Beijing, Xueyuan Road No. 51, the first to enjoy the science and technology building, floor 6, Applicant before: Beijing Baofeng Technology Co., Ltd. |
|
COR | Change of bibliographic data | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PP01 | Preservation of patent right |
Effective date of registration: 20190705 Granted publication date: 20190312 |
|
PP01 | Preservation of patent right |