CN102088449B - Playing method and device of network video file - Google Patents

Playing method and device of network video file Download PDF

Info

Publication number
CN102088449B
CN102088449B CN200910252060.1A CN200910252060A CN102088449B CN 102088449 B CN102088449 B CN 102088449B CN 200910252060 A CN200910252060 A CN 200910252060A CN 102088449 B CN102088449 B CN 102088449B
Authority
CN
China
Prior art keywords
data
video
minimum
header
flv
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
CN200910252060.1A
Other languages
Chinese (zh)
Other versions
CN102088449A (en
Inventor
陈良华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN200910252060.1A priority Critical patent/CN102088449B/en
Publication of CN102088449A publication Critical patent/CN102088449A/en
Application granted granted Critical
Publication of CN102088449B publication Critical patent/CN102088449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a playing method and device of a network video file, which belong to the technical field of network communication. The method comprises the following steps of: receiving a video on demand command of a user, downloading at most 1 kilobyte of video data of a video file which corresponds to the video command and determining a format which corresponds to the video file according to the at most 1 kilobyte of video data; and searching a minimum datum which corresponds to the format from a pre-stored minimum data list according to the format, downloading the corresponding minimum datum and transmitting the minimum datum to a flash widget for starting playing a video. The method and the device provided by the invention have the advantages of short loading time and good user experience.

Description

The player method of network video file and device
Technical field
The present invention relates to network communication field, relate in particular to a kind of player method and device of network video file.
Background technology
Development along with the Internet, video file in network is also more and more, in order to allow user better experience the video file in network, prior art provides a kind of player method of network video file, the method comprises: player downloads at least after 2M data, is given flash control by data and started displaying video.
In realizing process of the present invention, there are the following problems for the technical scheme that prior art provides:
In the scheme of prior art, at least need the data of downloading 2M just can carry out the broadcasting of video, the time that causes user to wait for is longer, and user experiences poor.
Summary of the invention
Embodiment of the present invention provides a kind of player method and device of network video file, and the method and device can reduce the time of waiting for, the advantage of better user experience.
The specific embodiment of the present invention provides a kind of player method of network video file, and described method comprises:
Receive after user's order video order, download the video data of the 1K at the most of video file corresponding to this video commands, according to the video data of described 1K at the most, determine the form that this video file is corresponding;
According to described form, from pre-stored minimum data list, find out the minimum data that this form is corresponding, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video.
The present invention also provides a kind of playing device of network video file, and described device comprises:
Receive download unit, for receiving after user's order video order, download the video data of the 1K at the most of video file corresponding to this video commands, according to the video data of described 1K at the most, determine the form that this video file is corresponding;
Search broadcast unit, for finding out from pre-stored minimum data list the minimum data that this form is corresponding according to described form, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video.
By above-mentioned provided technical scheme, can be found out, the technical scheme of the embodiment of the present invention can reduce the time of waiting for, has advantages of better user experience.
Accompanying drawing explanation
The flow chart of the player method of a kind of network video file that Fig. 1 provides for one embodiment of the invention;
The flow chart of the player method of a kind of network video file that Fig. 2 provides for another embodiment of the present invention;
The flow chart of the player method of a kind of network video file that Fig. 3 provides for further embodiment of this invention;
Fig. 4 is the structure chart of the playing device of a kind of network video file provided by the invention.
Embodiment
Embodiment of the present invention provides an embodiment, and the present embodiment provides a kind of player method of network video file, and the method as shown in Figure 1, comprising:
S11, receive after user's order video order, download the video data that this orders the 1K at the most of corresponding video file; Download the video data that is no more than at most 1K;
The scope suggestion of above-mentioned 1K is at the most used 100 bytes between 1K, and in actual conditions, user also can free setting certainly.
S12, according to the video data of this 1K, judge the corresponding form of this video file;
S13, according to this corresponding form, from pre-stored minimum data list, determine minimum data corresponding to this corresponding form;
S14, downloaded after the minimum data that this form is corresponding, by this minimum data, given flash control and start displaying video.
The method that the present embodiment provides is judged after the form that this video file is corresponding by being downloaded to the video data of many 1K, according to this form, from pre-stored list, determine minimum data corresponding to this form, after having downloaded this minimum data, by minimum data, give flash control and start displaying video.Due to the method, only need to download minimum data and can carry out the broadcasting of video file, the data volume of download is little, and the time of loading is shorter, and user experiences high.
The present invention also provides another embodiment, and the present embodiment provides a kind of player method of network video file, and the technology scene that the present embodiment is realized is, it is example that video file be take FLV (flash video) form, and the method as shown in Figure 2, comprising:
S21, receive after user's order video order the video data of the 1K at the most of the video file that foradownloaded video order is corresponding;
S22, the form of judging this video file according to the video data of this 1K are FLV form;
S23, according to this FLV form, from pre-stored minimum data list, determine minimum played data corresponding to this FLV, be specifically as follows FLV Header (header)+first tag; Wherein FLV file format is as shown in table 1:
Table 1:
Header File attribute tag tag tag tag …… END tag
Header+ file attribute tag in the corresponding table 1 of above-mentioned minimum played data.
Above-mentioned first tag can be, metadata onMetaData.Optionally, after determining minimum played data, can detect video file, as detect this video file and there is no first tag, and determine that this first tag is 0, without downloading first tag.
The manufacture method of above-mentioned minimum data list can be, obtain the form of conventional video file, according to the respective standard that concrete form is corresponding, determine minimum data, for example, as FLV form, the < < Video File Format Specification Version 9 > > with reference to Adobe company determine that this minimum data is FLVHeader (header)+first tag; MP4 form and for example, the < < QuickTimeFile Format Specification > > with reference to Adobe company determines that this minimum data is MP4 file header+moov atom.
The concrete form of above-mentioned MP4 can be referring to the description of Table 1 in ISO/IEC 14496-12:2005 (E).
Ftyp (4.3) in the corresponding Table 1 of above-mentioned MP4 file header+moov atom arrives subs (8.42), wherein it should be noted that, band in Table 1 " *" data be essential data, be not with *" data be optional data; In above-mentioned ftyp (4.3) 4.3 is the numbering to data ftyp in Table 1; 8.42 of subs (8.42) is the numbering to data subs in Table 1.
The length that it should be noted that first tag that each video file is corresponding is not definite value, and if first tag of the form video file 1 that is FLV can be 1K, first tag of the video file 2 of form FLV can be 2K; In like manner, the length of the moov atom that each video file is corresponding is not definite value.
S24, after having downloaded first tag data of FLV Header+, by first tag data of FLV Header+, give flash control and start displaying video.
The method that the present embodiment provides is by after being downloaded to the video data of many 1K and judging this video file and be FLV form, according to this FLV form, from pre-stored list, determine that minimum data amount corresponding to this video file is first tag of FLV Header+, after having downloaded first tag of FLV Header+, by first tag data of FLVHeader+, give flash control and start displaying video.Because the method only need to have been downloaded first tag of FLV Header+ and can carry out the broadcasting of video file, and first tag of FLV Header+ is less than 2M data volume certainly, so the data volume of its download is little, so the time of its loading is shorter, user experiences high.
The present invention also provides another embodiment, and the technology scene that the present embodiment is realized is that the video file of the present embodiment be take MP4 form as example, the broadcast format that this MP4 is video file; The method as shown in Figure 3, comprising:
S31, receive after user's order video order the video data of the 1K at the most of the video file that foradownloaded video order is corresponding;
S32, the form of judging this video file according to the video data of this 1K are MP4 form;
S23, according to this MP4 form, from pre-stored minimum data list, determine minimum played data corresponding to this MP4, be specifically as follows MP4 file header+moov atom;
Optionally, after determining minimum played data, can detect video file, as the video file that detects this MP4 form do not have moov atom, and determine that this moov atom is 0, without downloading moovatom.
S34, after having downloaded MP4 file header+moov atom data, by MP4 file header+moov atom data, give flash control and start displaying video.
The method that the present embodiment provides is by after being downloaded to the video data of many 1K and judging this video file and be MP4 form, according to this MP4 form, from pre-stored list, determine that minimum data amount corresponding to this video file is MP4 file header+moov atom, after having downloaded MP4 file header+moov atom, by MP4 file header+moov atom data, give flash control and start displaying video.Because the method only need to have been downloaded MP4 file header+moov atom and can carry out the broadcasting of video file, and MP4 file header+moov atom is less than 2M data volume certainly, so the data volume of its download is little, so the time of its loading is shorter, user experiences high.
The present invention also provides a kind of playing device of network video file, and this device comprises as shown in Figure 4:
Receive download unit 41, for receiving after user's order video order, download the video data of the 1K at the most of video file corresponding to this video commands, according to the video data of described 1K at the most, determine the form that this video file is corresponding;
Search broadcast unit 42, for finding out from pre-stored minimum data list the minimum data that this form is corresponding according to described form, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video.
The preparation method of above-mentioned minimum data list can be referring to the associated description in embodiment of the method.
Optionally, form corresponding to above-mentioned video file is FLV form or MP4 form.When form corresponding to above-mentioned video file is FLV, the minimum played data that minimum data is FLV, is specifically as follows: first tag of FLVHeader+.When form corresponding to above-mentioned video file is MP4, the minimum played data that minimum data is MP4, is specifically as follows: MP4 file header+moov atom.
Optionally, searching broadcast unit 42 comprises:
Detection module 421, after determining that according to described FLV minimum played data is first tag of FLV Header+, detects described video file and whether comprises first tag data,
The first downloading and playing module 422, while comprising for detecting at described detection module, has downloaded after first tag of FLVHeader+, gives flash control start displaying video by described first tag of FLV Header+;
The second downloading and playing module 423, while not comprising for detecting at described detection module, has downloaded after FLVHeader, and just described FLV Header gives flash control and starts displaying video.
Can, search broadcast unit 42 and comprise:
Judge module 424, while for judging at described judge module being, after determining that minimum played data is MP4 file header+moov atom, detecting described video file and whether comprises moov atom data according to described MP4;
The 3rd downloading and playing module 425, while for judging at judge module 424 being, has downloaded after MP4 file header+moov atom, gives flash control start displaying video by described MP4 file header+moov atom;
The 4th downloading and playing module 426, when no for judging at judge module 424, has downloaded after MP4 file header, and just described MP4 file header is given fash control and started displaying video.
In actual conditions, above-mentioned judge module 424 and detection module 421 can be merged into a module, and first, second, third and fourth downloading and playing module also can be merged into a module.
The device that the present embodiment provides is downloaded to the video data of many 1K and judges after the form that this video file is corresponding by receiving download unit 41, by searching broadcast unit 42, according to this form, from pre-stored list, determine minimum data corresponding to this form, after having downloaded this minimum data, by minimum data, give flash control and start displaying video.Due to the method, only need to download minimum data and can carry out the broadcasting of video file, the data volume of download is little, and the time of loading is shorter, and user experiences high.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in computer read/write memory medium, this program is when carrying out, comprise said method step, described storage medium comprises: ROM/RAM, disk, CD etc.
In sum, the technical scheme that the specific embodiment of the invention provides, the time with loading is shorter, and user experiences high advantage.
The above; it is only preferably embodiment of the present invention; but protection scope of the present invention is not limited to this; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the present invention discloses; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (2)

1. a player method for network video file, is characterized in that, described method comprises:
Receive after user's order video order, download the video data of the 1K at the most of video file corresponding to this video commands, according to the video data of described 1K at the most, determine the form that this video file is corresponding;
According to described form, from pre-stored minimum data list, find out the minimum data that this form is corresponding, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video;
The form that described video file is corresponding is FLV form or MP4 form;
As described in form corresponding to video file be FLV, described minimum data is the minimum played data of FLV form, the minimum played data of described FLV form is: first tag of FLV header Header+;
Describedly according to described form, from pre-stored minimum data list, find out the minimum data that this form is corresponding, downloaded after this corresponding minimum data, by described minimum data, give the step that flash control starts displaying video and comprise:
After determining that according to described FLV minimum played data is first tag of FLV Header+, detect described video file and whether comprise first tag data, downloaded in this way after first tag of FLV Header+, by described first tag of FLV Header+, given flash control and start displaying video; As otherwise downloaded after FLV Header, by described FLV Header, give flash control and start displaying video;
As described in form corresponding to video file be MP4, described minimum data is the minimum played data of MP4 form, the minimum played data of described MP4 form is: MP4 file header+moov atom;
Describedly according to described form, from pre-stored minimum data list, find out the minimum data that this form is corresponding, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video and comprise:
After determining that according to described MP4 minimum played data is MP4 file header+moov atom, detect described video file and whether comprise moov atom data, downloaded in this way after MP4 file header+moov atom, by described MP4 file header+moov atom, given flash control and start displaying video; As otherwise downloaded after MP4 file header, just described MP4 file header is given flash control and is started displaying video.
2. a playing device for network video file, is characterized in that, described device comprises:
Receive download unit, for receiving after user's order video order, download the video data of the 1K at the most of video file corresponding to this video commands, according to the video data of described 1K at the most, determine the form that this video file is corresponding;
Search broadcast unit, for finding out from pre-stored minimum data list the minimum data that this form is corresponding according to described form, downloaded after this corresponding minimum data, by described minimum data, give flash control and start displaying video;
The form that described video file is corresponding is FLV form or MP4 form;
As described in form corresponding to video file be FLV, described minimum data is the minimum played data of FLV form, the minimum played data of described FLV form is: first tag of FLV header Header+; The described broadcast unit of searching comprises:
Detection module, after determining that according to described FLV minimum played data is first tag of FLV Header+, detects described video file and whether comprises first tag data,
The first downloading and playing module, while comprising for detecting at described detection module, has downloaded after first tag of FLV Header+, gives flash control start displaying video by described first tag of FLV Header+;
The second downloading and playing module, while not comprising for detecting at described detection module, has downloaded after FLV Header, and just described FLV Header gives flash control and starts displaying video;
As described in form corresponding to video file be MP4, described minimum data is the minimum played data of MP4 form, the minimum played data of described MP4 form is: MP4 file header+moov atom;
The described broadcast unit of searching comprises:
Judge module, while for judging at described judge module being, after determining that minimum played data is MP4 file header+moov atom, detecting described video file and whether comprises moov atom data according to described MP4;
The 3rd downloading and playing module, while for judging at described judge module being, has downloaded after MP4 file header+moov atom, gives flash control start displaying video by described MP4 file header+moov atom;
The 4th downloading and playing module, when no for judging at described judge module, has downloaded after MP4 file header, and just described MP4 file header is given flash control and started displaying video.
CN200910252060.1A 2009-12-08 2009-12-08 Playing method and device of network video file Active CN102088449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910252060.1A CN102088449B (en) 2009-12-08 2009-12-08 Playing method and device of network video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910252060.1A CN102088449B (en) 2009-12-08 2009-12-08 Playing method and device of network video file

Publications (2)

Publication Number Publication Date
CN102088449A CN102088449A (en) 2011-06-08
CN102088449B true CN102088449B (en) 2014-02-26

Family

ID=44100064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910252060.1A Active CN102088449B (en) 2009-12-08 2009-12-08 Playing method and device of network video file

Country Status (1)

Country Link
CN (1) CN102088449B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254962A (en) * 2016-07-28 2016-12-21 武汉斗鱼网络科技有限公司 A kind of live client quickly starts the method and system of broadcasting
CN111885331A (en) * 2020-07-25 2020-11-03 徐州云创电子科技有限公司 Novel mp4 packaging method for automatic storage of video interruption
CN113365140B (en) 2021-06-21 2022-12-23 北京百度网讯科技有限公司 MP4 online playing method, device, equipment, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972193A (en) * 2005-11-22 2007-05-30 三星电子株式会社 Compatible-progressive download method and the system thereof
CN101114950A (en) * 2007-09-11 2008-01-30 武汉虹旭信息技术有限责任公司 Method for reverting SIP protocol based audio/video flow in IP network
CN101114949A (en) * 2007-09-11 2008-01-30 武汉虹旭信息技术有限责任公司 Method for reverting H.323 protocol based audio/video flow in IP network
CN101472156A (en) * 2007-12-25 2009-07-01 欧阳泳春 Method of household player for supporting 3GP media file playing function
CN101577627A (en) * 2009-06-17 2009-11-11 腾讯科技(深圳)有限公司 System and method for downloading and playing multimedia file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972193A (en) * 2005-11-22 2007-05-30 三星电子株式会社 Compatible-progressive download method and the system thereof
CN101114950A (en) * 2007-09-11 2008-01-30 武汉虹旭信息技术有限责任公司 Method for reverting SIP protocol based audio/video flow in IP network
CN101114949A (en) * 2007-09-11 2008-01-30 武汉虹旭信息技术有限责任公司 Method for reverting H.323 protocol based audio/video flow in IP network
CN101472156A (en) * 2007-12-25 2009-07-01 欧阳泳春 Method of household player for supporting 3GP media file playing function
CN101577627A (en) * 2009-06-17 2009-11-11 腾讯科技(深圳)有限公司 System and method for downloading and playing multimedia file

Also Published As

Publication number Publication date
CN102088449A (en) 2011-06-08

Similar Documents

Publication Publication Date Title
US20220086531A1 (en) Methods and apparatus to present supplemental media on a second screen
US8792639B2 (en) Extensible disc player
CN103338384A (en) Video play method and video play device
CN102065118A (en) Method for updating network equipment and device for implementing method
CN102340699B (en) Preserve TV user history and use the method and system of information
CN102497400A (en) Music media information obtaining method of vehicle-mounted radio equipment and obtaining system thereof
CN103269453A (en) Set top box user interface updating method, front-end device and system and set top box
CN103945259A (en) Online video playing method and device
CN105025319A (en) Video pushing method and device
CN101452726A (en) Multimedia playing system and method capable of downloading and displaying lyric
CN102088449B (en) Playing method and device of network video file
CN104503994A (en) Information recommendation method and device based on input method
CN102497401A (en) Music media information acquiring method and system of vehicle-mounted music system
CN103956175A (en) Playing method and equipment of multi-media files
CN105323654A (en) Method and device for displaying content data from network
CN105721261A (en) Intelligent loudspeaker box-based music push method and device
CN103177737B (en) Audio player and sound effect method to set up thereof and audio frequency playing method
CN104080017A (en) Method, device and system for playing tab files
CN104681047A (en) Adaptive video playing method, device and terminal
US11671666B2 (en) Video playing control method, device and storage medium based on a video source selection
CN103699583A (en) Method for realizing live broadcast time shifting, and electronic equipment
CN109948057B (en) Interested content pushing method and device, electronic equipment and medium
CN105847990A (en) Media file playing method and apparatus
CN105373470A (en) Media file compatibility detection method and apparatus
CN104866186A (en) Character playing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant