CN105978912A - Testing device and testing method for video index file - Google Patents

Testing device and testing method for video index file Download PDF

Info

Publication number
CN105978912A
CN105978912A CN201610557340.3A CN201610557340A CN105978912A CN 105978912 A CN105978912 A CN 105978912A CN 201610557340 A CN201610557340 A CN 201610557340A CN 105978912 A CN105978912 A CN 105978912A
Authority
CN
China
Prior art keywords
video
index file
test
stream information
file
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.)
Pending
Application number
CN201610557340.3A
Other languages
Chinese (zh)
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.)
1Verge Internet Technology Beijing Co Ltd
Original Assignee
1Verge Internet Technology Beijing 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 1Verge Internet Technology Beijing Co Ltd filed Critical 1Verge Internet Technology Beijing Co Ltd
Priority to CN201610557340.3A priority Critical patent/CN105978912A/en
Publication of CN105978912A publication Critical patent/CN105978912A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a testing device and a testing method for a video index file. The testing method comprises the following steps: acquiring the video index file of a currently-played video through a video index file acquisition and processing module; resolving standard information of the video index file of the currently-played video through a standard information resolving and processing module; resolving video stream information of the video index file of the currently-played video through a video stream information resolving and processing module; and judging whether the resolved standard information is correct or not, and judging whether the resolved video stream information of the video index file is correct or not according to the found video stream information corresponding to the currently-played video through a testing processing module, and determining pass of testing if judgement results of the resolved standard information and the resolved video stream information are correct. Through adoption of the testing device and the testing method, testing of video index files can be performed automatically in batches, so that the working efficiency and working quality of testing are improved effectively.

Description

The test device of video index file and method of testing thereof
Technical field
The present invention relates to stream media technology field, particularly relate to the test device of a kind of video index file And method of testing.
Background technology
Streaming Media, is again streaming video, is the media broadcast of biography limit, limit, is multimedia one.Biography limit, limit Broadcast refer to Media Provider while transmission over networks media, user constantly receive and watch or Listen to the media being transmitted.And HLS (HTTP Live Streaming) is to realize based on HTTP Streaming transfer protocol, can realize the live of Streaming Media and program request, and the advantage of HLS technology is self adaptation Spread (adaptive streaming), i.e. client of code check can automatically select difference according to network condition etc. The video flowing of code check, uses high code check in the case of conditions permit, use low bit-rate when of network busy, And automatically arbitrarily switch between the two.
In prior art, HSL uses common segmentation HTTP program request, but its segmentation is the least, the most existing Have in technology and realize HLS, it is preferred that emphasis is to media file segmentation, and when starting a flow media session, Client can download a video index file comprising metadata, for finding available Media Stream, example If video index file is M3U8 file, and M3U8 file refers to the M3U of UTF-8 coded format File, M3U file is to have recorded an index text-only file, and when opening it, playout software is not to broadcast Put it, but find according to its index the network address of the audio-video document of correspondence to play online. Prior art, in test process, needs to resolve video index file (such as M3U8 file), To judge that video index file (such as M3U8 file) content is the most correct, to meet videoconference client Broadcasting demand, but current test job is all by manually comparing and examining, needs manually to look into See the key video sequence stream information key element such as video segment duration and the total duration of video, the most time-consumingly, it is also possible to draw The problem entering mistake in computation, work efficiency and work quality are the most relatively low.
Summary of the invention
In view of the above problems, the embodiment of the present invention provides test device and the survey thereof of a kind of video index file Method for testing, automatically to carry out the test of video index file, improves work efficiency and work quality.
In order to solve above-mentioned technical problem, the test of a kind of video index file that the embodiment of the present invention provides Device, comprising:
Video index file acquisition processing module, for obtaining this video index file playing video;
Standard information dissection process module, for resolving the video index file of this broadcasting video described Standard information;
Video stream information dissection process module, for resolving the video index file of this broadcasting video described Video stream information;
Test processes module, is used for judging that above-mentioned parsing obtains standard information the most correct and according to searching To this play regarding of video index file that Video stream information corresponding to video judge that above-mentioned parsing obtains Frequently stream information is the most correct, if to resolving the judged result of standard information and the Video stream information obtained for just Really, it is determined that test is passed through.
Wherein, described test processes module specifically includes:
Search module, corresponding for searching this broadcasting video according to the video labeling of this broadcasting video Video stream information;
Standard information test module, is used for judging that above-mentioned parsing obtains standard information the most correct;
Video stream information test module, judges for the Video stream information arrived according to described lookup module searches The Video stream information of this video index file that above-mentioned parsing obtains is the most correct.
Wherein, described test processes module also includes: test result returns processing module, for testing Result returns to user.
Alternatively, described video index file is M3U8 video index file.
Alternatively, described standard information is the standard label of M3U8 video index file.
Alternatively, described Video stream information includes following one or more key element: video definition, video Video-frequency band duration in total duration, total burst number, the duration of each burst, each burst, each burst Interior video-frequency band sequence number.
Alternatively, the video-frequency band sequence number in described Video stream information is each burst;
Whether described test processes module judges the Video stream information of the video index file that above-mentioned parsing obtains Video-frequency band sequence number in the correct each burst specially judging video index file that above-mentioned parsing obtains is No order and be not repeat, if order and unduplicated, it is determined that test is passed through.
It addition, the embodiment of the present invention additionally provides the method for testing of a kind of video index file, comprising:
Obtain this video index file playing video;
Resolve the standard information of this video index file;
Resolve the Video stream information of this video index file;
Judge that above-mentioned parsing obtains standard information this broadcasting video pair that is the most correct and that obtain according to lookup The Video stream information answered judges that the Video stream information of the video index file that above-mentioned parsing obtains is the most correct, If the judged result of the standard information obtaining parsing and Video stream information is correct, it is determined that test is passed through.
Wherein, this Video stream information playing video corresponding that described lookup obtains is according to video labeling Search the Video stream information that this broadcasting video obtained is corresponding.
It addition, also include, test result is returned to user.
Alternatively, described video index file is M3U8 video index file.
Alternatively, described standard information is the standard label of M3U8 video index file.
Alternatively, described Video stream information includes following one or more key element: video definition, video Video-frequency band duration in total duration, total burst number, the duration of each burst, each burst, each burst Interior video-frequency band sequence number.
Alternatively, the video-frequency band sequence number in described Video stream information is each burst;
The described Video stream information judging video index file that above-mentioned parsing obtains the most specially is sentenced Video-frequency band sequence number in each burst of the video index file that disconnected above-mentioned parsing obtains the most sequentially and is not Repeat, if order and unduplicated, it is determined that test pass through.
The test device of the video index file provided according to embodiments of the present invention and method of testing thereof, it leads to Cross video index file acquisition processing module and obtain this video index file playing video;Pass through standard Information analysis processing module resolves the standard information of the video index file of this broadcasting video described;Pass through Video stream information dissection process module resolves the video flowing of this video index file playing video described and believes Breath;Judge that above-mentioned parsing obtains standard information and the most correctly and obtains according to lookup by test processes module This play the video of the video index file that Video stream information corresponding to video judges that above-mentioned parsing obtains Stream information is the most correct, if the judged result of the standard information obtaining parsing and Video stream information is correct, Then determine that test is passed through, due to the fact that can batch the test automatically carrying out video index file, effectively Improve work efficiency and the work quality of test.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below, Accompanying drawing in description is only some embodiments described in the present invention, for those of ordinary skill in the art From the point of view of, it is also possible to other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the first embodiment composition signal of the test device according to the present invention a kind of video index file Figure;
Fig. 2 is the one of test processes module in the test device according to the present invention a kind of video index file Specific embodiment composition schematic diagram;
Fig. 3 is the second embodiment composition signal of the test device according to the present invention a kind of video index file Figure;
Fig. 4 is the stream of a kind of specific embodiment of the method for testing according to the present invention a kind of video index file Cheng Tu.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained Every other embodiment, broadly falls into the scope of protection of the invention.
Referring to Fig. 1, it is the first enforcement of the test device according to the present invention a kind of video index file Example composition schematic diagram.
As shown, the test device of the video index file of the present embodiment specifically includes that video index file Obtain processing module 11, standard information dissection process module 12, Video stream information dissection process module 13 And test processes module 14, wherein
In the present embodiment, video index file acquisition processing module 11 is mainly used in obtaining this broadcasting video Video index file, when implementing, such as can by test user show front end page, front end The page provides the input frame of the video index file content resolved and submits button to, clicks on test user and carries This video index file playing video can be obtained after handing over button, reality can also use its other party Formula obtains, and is not specifically limited here;
Standard information dissection process module 12, for resolving the video index file of this broadcasting video described Standard information, when implementing, described standard information refers to that video index file is the most changeless Standard information, if such as video index file is M3U8 file, standard information e.g. standard label, Here it is not specifically limited;
Video stream information dissection process module 13, for resolving the video index literary composition of this broadcasting video described The Video stream information of part, when implementing, such as a example by video index file is for M3U8 file, M3U8 In file, #EXTINF is a record label, and this label describes the video file specified by the URI of back, The URI address of video-frequency band file must be closelyed follow after the #EXTINF label of i.e. M3U8 file, and at URI Address then includes each Video stream information above, therefore, by resolving video index file (such as M3U8 File) URI after #EXTINF label can obtain each Video stream information of video index file, real Border can also use other analysis modes obtain the Video stream information of video index file, the most not do and have Body limits.
Test processes module 14, is used for judging that above-mentioned parsing obtains standard information the most correct and according to lookup This obtained plays video index file that Video stream information corresponding to video judge that above-mentioned parsing obtains Video stream information is the most correct, if to resolving the judged result obtaining standard information and Video stream information for just Really, it is determined that test is passed through;
When implementing, this Video stream information playing video corresponding can find, such as one Individual specific embodiment, with reference to Fig. 2, this figure is that a specific embodiment composition of test processes module 14 shows Being intended to, in the present embodiment, test processes module 14 specifically includes that
Search module 141, the present embodiment is searched module 141 and is mainly used in playing video according to this Video labeling is searched this and is play the Video stream information that video is corresponding, such as, can look into according to video labeling id Look for determine this video play to there being which video definition, the total score that different video definition is corresponding Sheet number, the duration of each burst and total duration information of video, with to video index file (such as M3U8 file) correctness make a decision;
Standard information test module 142, is used for judging that parsing obtains standard information the most correct;
Video stream information test module 143, for the Video stream information arrived according to described lookup module searches Judge that the Video stream information of this video index file that above-mentioned parsing obtains is the most correct.
Needing explanation, as an example in the present embodiment, described video index file is that M3U8 regards Frequently, during index file, described standard information can be the standard label of M3U8 video index file, such as, According to M3U8 file standard, the standard label as standard information comprises the steps that
#EXTM3U: the form of mark M3U8 file extension, such as .M3U8.This label must comprise In M3U8 file, and can only occur 1 time.
#EXTINF: specify the persistent period of the little segment file of each video, must closely follow video-frequency band after this label The URI address of file.Video little segment file composition video slicing, video slicing composition complete video.
#EXT-X-TARGETDURATION: specify media segment file maximum duration. this label In M3U8 file and can only occur 1 time, wherein #EXTINF can identify each section concrete when continuing Between, this time can only be less than equal to #EXT-X-TARGETDURATION.
#EXT-X-VERSION: specify M3U8 file compatibility version, relevant video file kimonos The version that this label is specified all must all be supported by business device, and this label must be included in M3U8 file, And can only occur 1 time.
#EXT-X-DISCONTINUITY: this label instruction company before the section of present segment file or after section Continuous property, such as, in reality can with the end of one video slicing of tag representation, this label occurrence number with Video slicing number is identical.
#EXT-X-ENDLIST: this label instruction M3U8 end of file, this label must be included in In M3U8 file, and can only occur 1 time.
When implementing, the standard information dissection process module 12 of the present embodiment can be to video rope to be tested The standard information (such as standard label) of quotation part resolves, and test processes module 14 then can be to solution The standard information (such as standard label) that obtains of analysis carries out correction judgement, such as, obtains if resolving The label of M3U8 file meets above-mentioned standard label, then can determine that and resolve this M3U8 file of obtaining Standard information is correct.
In addition, it is necessary to explanation, described Video stream information can include following one or more key element: video During video-frequency band in the total duration of definition, video, total burst number, the duration of each burst, each burst Video-frequency band sequence number in burst long, each.
Specifically, if video index file is M3U8 video index file in the present embodiment, then M3U8 The Video stream information that file includes comprises the steps that
The video definition type of broadcast request
Once play video total duration time of video
Once play total burst number segs of video
Once play the duration seg_time of each burst of video
The once difference of video-frequency band duration ts_end Yu ts_start in the broadcasting each burst of video
Once play video-frequency band sequence number ts_seg_no in each burst of video
Specifically the explanation to key element is as shown in table 1
Table 1
When implementing, such as, it is M3U8 file for video index file, after #EXTINF label The video of each key element above must can be obtained by URI address immediately following the URI address of video-frequency band file Stream information, therefore, in the present embodiment, Video stream information dissection process module 13 is by URI address Resolve and obtain the Video stream information of each key element above in M3U8 file.
Illustrate with specific example below.
In the present embodiment as a example by video index file is for M3U8 video index file, specifically, by Link in actual M3U8 file request is to generate in real time, and for anti-brush and door chain, at URL During splicing, with the addition of multiple encryption key, the present embodiment can simplify parsing testing process, such as front end page What face received is full detail rather than the hyperlink request of M3U8 file of M3U8 file return, because of This, the problem that can bypass URL splicing in the present embodiment, protect the AES of encryption key.
When specifically testing, test processes module 14 gets the M3U8 video index literary composition of this video playback After the video definition of part, the video id of this broadcasting video and requirement;Can inquire according to video id This video id to there being which video definition, total burst number that different video definition is corresponding, Mei Gefen The Video stream information such as the video-frequency band sequence number in the duration of sheet and total duration information of video and each burst.
During actual test, first test processes module 14 can carry out the standard label test of M3U8 file, And then also can test video definition, i.e. contrast video definition and the M3U8 video index file of requirement URI address in the concordance of video definition;Then test video burst duration, general, depending on The least segment file composition video slicing, one point in terms of each #EXT-X-DISCONTINUITY label Sheet, in resolving burst, last ts_end mark i.e. can obtain this burst duration, and during test, contrast is same Under one video definition, the concordance of each burst duration in the duration of each burst and URI address;? Continue test video total burst number, by counting #EXT-X-DISCONTINUITY label when i.e. resolving, Can resolve and obtain video total burst number, during test, contrast under same definition, total burst number and parsing The concordance of total burst number in URI address in the M3U8 file obtained;Continue the total duration of test video, General, video little segment file composition video slicing, multiple video slicings composition complete video, during parsing A burst in terms of each #EXT-X-DISCONTINUITY label, last ts_end in burst Being designated the total duration of this burst, the ts_end of each burst adds and is the total duration of video, during test, and can be right Ratio is under each definition, the total duration of video and the video resolved in the M3U8 file obtained in URI address The concordance of total duration;Continue to test the video-frequency band duration in each burst, i.e. mark with each #EXTINF Signing one video-frequency band section file ts of meter, during parsing, the value of #EXTINF is this video-frequency band duration, surveys During examination, can contrast the difference of ts_end Yu ts_start and the concordance of the value of #EXTINF, last test is every Video-frequency band in video-frequency band sequence number in individual burst, i.e. video-frequency band sequence number and video slicing and each burst without Closing, sequence number is from 0 sequentially, it is impossible to repeat, it is impossible to disappearance.
Need explanation, when above-described embodiment test processes module 14 is tested, for standard label and The testing sequence of each key element of Video stream information can be adjusted according to practical situation, for example, it is also possible to First carry out the test of Video stream information, then carry out the test of standard label, to each letter in Video stream information The testing sequence of breath can also be adjusted according to practical situation, is not specifically limited here, but needs Bright, in practice, will ' test resolve the whether order of the video-frequency band sequence number in each burst obtained and It is unduplicated ' it is optimal case as the last of test and necessary joint.
During it addition, specifically test, all Video stream information can also be wanted by test processes module 14 Element is all tested, but selects the one or more key elements in Video stream information to test, such as, Test processes module 14 is first to resolving the standard label test obtained, after determining that standard label is correct, Video-frequency band sequence number in only test resolves each burst obtained the most sequentially and is unduplicated, if Order and not repetition, then test is passed through;
Or as an example, first test processes module 14 can test the standard label of M3U8 file The most correct, if standard label is correct, and then can test video total burst number and the video found Total burst number is the most consistent, if unanimously, then the video-frequency band sequence number in each burst of last test is the most sequentially And be unduplicated, if order and not repetition, then test is passed through.
Needing explanation, the advantage of HLS technology is that self-adaption code rate spreads (adaptive streaming), Concrete effect can be embodied in videoconference client can automatically select the video of different code check according to network condition etc. Stream, uses high code check in the case of conditions permit, use low bit-rate when of network busy, and automatically Arbitrarily switching between the two, generally, different code checks are presented as different video definition, and for video net For standing, user's entrance of Switch Video definition typically can be provided, based on video website, HLS is answered With, it is also possible to do not consider the switching at runtime problem of video definition, i.e. think a M3U8 file, only Return the video flowing section file of a kind of code check.
Therefore, under the above-mentioned scene not considering video definition, test processes module 14 is to M3U8 Before file is tested, this video id playing video can be obtained, can be obtained this by video id Total duration of secondary broadcasting video, contained burst number and the duration of each burst, and by M3U8 is regarded Frequently the analysis of index file, has influence on the video file row that the key point once play is section file composition Table URI is the most correct, and video file list URI and two labels are relevant, it may be assumed that #EXT-X-DISCONTINUITY and #EXTINF, as it was previously stated, EXT-X-DISCONTINUITY Coding between media file and the media file before of this label back of tag representation is interrupted, and mainly should Mark between video slicing and burst that video website is conventional, and #EXTINF is a record mark Signing, this label describes the video file specified by the URI of back, and each video file URI front is necessary There is #EXTINF label.Hence, it can be determined that affect in video playback crucially M3U8 file, survey During examination, it is thus necessary to determine that contained by the total duration of video of video file list offer of section file composition, video The duration of burst number and each burst is the most consistent with source video file, determines video file list simultaneously Whether middle URI is order and unduplicated.
Accordingly, as another embodiment, test user can submit M3U8 to be resolved to by front end page Video index file and the video id of this broadcasting video, and test processes module 14 is looked into by video id Ask video total burst number, the duration of each burst and the total duration of video of this video;Then test processes mould The standard label that block 14 test resolves the M3U8 file obtained is the most correct, if standard label test is logical Cross, test processes module 14 and then can test and resolve the M3U8 video file list URI information that obtains, Owing to can get video total burst number, each burst duration by M3U8 video file list URI when resolving Duration total with video, test processes module 14 obtains resolving from M3U8 video file list URI Video total burst number, each burst duration and the total duration of video and lookup obtain video total burst number, each burst Duration and the Given information such as the total duration of video compare, it is determined whether consistent, however, it is determined that result is Consistent then test is passed through, and otherwise, test crash, last test processing module 14 judges M3U8 file Whether the URI address of list of videos is order and unduplicated, if the determination result is YES, it is determined that test Pass through, otherwise, it determines test crash, and can return to concrete failure cause.
To sum up, the test device of the video index file that the present embodiment provides, is obtained by video index file Take processing module and obtain this video index file playing video;By standard information dissection process module Resolve the standard information of the video index file of this broadcasting video described;At Video stream information parsing Reason module resolves the Video stream information of the video index file of this broadcasting video described;Pass through test processes Module judges that above-mentioned parsing obtains standard information this broadcasting video pair that is the most correct and that obtain according to lookup The Video stream information answered judges that the Video stream information of the video index file that above-mentioned parsing obtains is the most correct, If the judged result of the standard information obtaining parsing and Video stream information is correct, it is determined that test is passed through, Due to the fact that can batch the test automatically carrying out video index file, be effectively increased the work of test Efficiency and work quality.
With reference to Fig. 3, this figure is the second enforcement of the test device according to the present invention a kind of video index file Example composition schematic diagram.
As shown, the test device of the present embodiment video index file includes equally: video index file obtains Take processing module 11, standard information dissection process module 12, Video stream information dissection process module 13 with And test processes module 14, described video index file acquisition processing module 11, standard information dissection process The function of module 12, Video stream information dissection process module 13 and test processes module 14 and above-mentioned the One embodiment is identical, repeats no more here, but unlike above-mentioned first embodiment, in the present embodiment The test device of video index file also includes: test result returns processing module 15, for test being tied Fruit returns to user.
When implementing, such as can be by showing front end page, in front end to test user in the present embodiment Analysis result is showed user by the page, or adopts and return to analysis result in other ways test user, Here it is not specifically limited.
Same, the test device of the video index file that the present embodiment provides not only can carry out video automatically The test of index file, is effectively increased work efficiency and work quality, and is returned by test result Test result auto-returned is given test user by processing module, so that the user carrying out testing can be timely Solve test result.
With reference to Fig. 4, this figure is a kind of concrete real of the method for testing of the video index file according to the present invention Execute the flow chart of example.
In the present embodiment, the method for testing of video index file mainly comprises the steps:
Step S101, obtains this video index file playing video;
When implementing, such as can be by showing front end page to test user, front end page provides and resolves Video index file content input frame and submit to button, test user click on submission button after Obtain this video index file playing video, it would however also be possible to employ other modes obtain, and the most do not do and have Body limits;
Step S102, resolves the standard information of this video index file;
When implementing, described standard information refers to the general changeless standard information of video index file, If such as video index file is M3U8 file, standard information e.g. standard label, does not the most do and has Body limits;
Step S103, resolves the Video stream information of this video index file;
When implementing, with reference to preceding description, such as a example by video index file is for M3U8 file, In M3U8 file, #EXTINF is a record label, and this label describes regarding specified by the URI of back Frequency file, i.e. must closely follow the URI address of video-frequency band file after the #EXTINF label of M3U8 file, Each Video stream information above is then included, therefore, by resolving video index file (example in URI address Such as M3U8 file) URI after #EXTINF label can obtain each video of video index file Stream information, can also use other analysis modes to obtain the Video stream information of video index file in reality, Here it is not specifically limited.
Step S104, it is judged that whether above-mentioned parsing obtains standard information correct and according to searching this that obtain Play the Video stream information of the video index file that Video stream information corresponding to video judges that above-mentioned parsing obtains It is the most correct, if the judged result of the standard information obtaining parsing and Video stream information is correct, the most really Location survey pinged.
When implementing, this Video stream information playing video corresponding can be searched according to various modes Arrive, be not specifically limited here, such as, as a kind of concrete mode, can search according to video labeling This plays the Video stream information that video is corresponding, such as, in the front end page test shown to test user User also submits to this to play the video mark of video in addition to submitting this to and playing the video index file of video Know, can be found this according to described video labeling and play the Video stream information that video is corresponding.
And when specifically testing, owing to finding this Video stream information playing video, therefore, can will be somebody's turn to do Video stream information in video index file compares with the Video stream information found, if unanimously, Then can confirm that the Video stream information of this video index file play is consistent with known Video stream information, I.e. can confirm that M3U8 file content is correct.
To sum up, the method for testing of the video index file that the present embodiment provides, it is play by obtaining this The video index file of video;Resolve the standard information of this video index file;Resolve this video index literary composition The Video stream information of part;Judge that above-mentioned parsing obtains standard information basis that is the most correct and that obtain according to lookup The Video stream information that secondary broadcasting video is corresponding judges the video flowing letter of the video index file that above-mentioned parsing obtains Breath is the most correct, if the judged result of the standard information obtaining parsing and Video stream information is correct, then Determine that test is passed through, owing to the test of video index file can be carried out by automatic batch, therefore, can effectively carry High test job efficiency and work quality.
Needing explanation, as an example in the present embodiment, described video index file is that M3U8 regards Frequently, during index file, described standard information can be the standard label of M3U8 video index file, such as, With reference to preceding description, according to M3U8 file standard, the standard label as standard information comprises the steps that
#EXTM3U: the form of mark M3U8 file extension, such as .M3U8, this label must comprise In M3U8 file, and can only occur 1 time.
#EXTINF: specify the persistent period of the little segment file of each video, must closely follow video-frequency band after this label The URI address of file, wherein video little segment file composition video slicing, video slicing composition complete video.
#EXT-X-TARGETDURATION: specify media segment file maximum duration, this label In M3U8 file and can only occur 1 time, wherein #EXTINF can identify each section concrete when continuing Between, this time can only be less than equal to #EXT-X-TARGETDURATION.
#EXT-X-VERSION: specify M3U8 file compatibility version, relevant video file kimonos The version that this label is specified all must all be supported by business device, and this label must be included in M3U8 file, And can only occur 1 time.
#EXT-X-DISCONTINUITY: this label instruction company before the section of present segment file or after section Continuous property, such as, in reality can with the end of one video slicing of tag representation, this label occurrence number with Video slicing number is identical.
#EXT-X-ENDLIST: this label instruction M3U8 end of file, this label must be included in In M3U8 file, and can only occur 1 time.
When implementing, step S102 is carried out can be to the standard in video index file when standard information resolves Information (such as standard label) resolves, such as, if the M3U8 file that during test, parsing obtains Label meets above-mentioned standard label, then can determine that this M3U8 file standard information is correct.
In addition, it is necessary to explanation, Video stream information described in the present embodiment can include the most one or more Key element: in the total duration of video definition, video, total burst number, the duration of each burst, each burst Video-frequency band duration, video-frequency band sequence number in each burst.
Specifically, with reference also to preceding description, if video index file is that M3U8 regards in the present embodiment Frequently index file, then the Video stream information that M3U8 file includes comprises the steps that
The video definition type of broadcast request
Once play video total duration time of video
Once play total burst number segs of video
Once play the duration seg_time of each burst of video
The once difference of video-frequency band duration ts_end Yu ts_start in the broadcasting each burst of video
Once play video-frequency band sequence number ts_seg_no in each burst of video
Wherein the explanation to each key element refers to, shown in aforementioned table 1, repeat no more here.
In addition, it is necessary to explanation, when implementing, such as, it is M3U8 literary composition for video index file Part, can must pass through in step S103 immediately following the URI address of video-frequency band file after #EXTINF label URI address resolution obtains the Video stream information of each key element above in M3U8 file, and step S104 is entered The Video stream information that can parsing be obtained during row test compares with the Video stream information found, Obtain test result eventually.
Illustrate with specific example below.
In the present embodiment as a example by video index file is for M3U8 video index file, specifically, by Link in actual M3U8 file request is to generate in real time, and for anti-brush and door chain, at URL During splicing, with the addition of multiple encryption key, the present embodiment can simplify parsing testing process, such as, test dress Put by its front end page receive be M3U8 file return full detail rather than M3U8 file Hyperlink request, therefore, the problem that can bypass URL splicing in the present embodiment, protection encryption the adding of key Close algorithm.
Specifically, such as test user can be by submitting to this to play the M3U8 of video in front end page File, this broadcasting video id and video definition of requirement;
If getting the M3U8 video index file of this video playback, the video id of this broadcasting video With the video definition required;And according to video id, this video id can be found clear to there being which video Clear degree, total burst number that different video definition is corresponding, the duration of each burst and total duration of video The Video stream information such as the video-frequency band sequence number in information and each burst, during test, as an example, Whether the standard label that can first test M3U8 file correct, so can test video definition, the most right Than the video in the video definition required and the URI address resolving the M3U8 video index file obtained The concordance of definition, if unanimously, then carries out next step test;Then test video burst duration, one As, video little segment file composition video slicing, with each #EXT-X-DISCONTINUITY label Counting a burst, in burst, last ts_end is designated the total duration of this burst.Contrast same during test Under definition, determine the duration of each burst found and resolve each burst in the URI address obtained Duration concordance, if unanimously, then carries out next step test;Continuing test video total burst number, i.e. again #EXT-X-DISCONTINUITY label is counted, it can be deduced that video total burst number, test during parsing Time contrast under same definition, the total burst number found and resolve URI ground in the M3U8 file that obtains In location, the concordance of total burst number, same, if unanimously, then continues next step test;Continue test to regard The total duration of frequency, general, video little segment file composition video slicing, multiple video slicings composition completely regards Frequently, a burst in terms of each #EXT-X-DISCONTINUITY label, in burst last Ts_end is designated the total duration of this burst, and during parsing, the ts_end of each burst adds and is the total duration of video, Can contrast under each definition, URI in the M3U8 file that the total duration of video found and parsing obtain In address, the concordance of the total duration of video, same, if unanimously, then continues next step test;Continue to survey Trying the video-frequency band duration in each burst, general, in terms of each #EXTINF label, a video-frequency band is cut Sheet file ts, the value of #EXTINF is this video-frequency band duration, can contrast ts_end and ts_start during test Difference and the value concordance of #EXTINF, same, if unanimously, then continue next step test, finally survey Try the video-frequency band sequence number in each burst, i.e. video-frequency band sequence number and regarding in video slicing and each burst Frequency range is unrelated, and sequence number is from 0 sequentially, it is impossible to repeat, it is impossible to disappearance.
Need explanation, when above-described embodiment is tested, for standard label and Video stream information each The testing sequence of key element can be adjusted according to practical situation, for example, it is also possible to first carry out video flowing ginseng The test of number, then carry out the test of standard label, to the testing sequence of each key element in Video stream information also Can be adjusted according to practical situation, be not specifically limited here.
During it addition, specifically test, it is also possible to the key element of all Video stream information all need not be tested, But the one or more key elements in selection Video stream information are tested, such as, first obtain parsing Standard label test, after determining that standard label is correct, in only test resolves each burst obtained Video-frequency band sequence number whether order and be unduplicated, if order and not repeating, then test is passed through;
Or as an example, the standard label that can first test M3U8 file is the most correct, if mark Fiducial mark label are correct, and then can test video total burst number burst total with the video found number whether Causing, if unanimously, then the video-frequency band sequence number in each burst of last test the most sequentially and is unduplicated, If order and not repetition, then test is passed through.
As a example by playing video on the ios system equipment of mobile terminal, when implementing, for once playing, This video id play and video definition of requirement can be obtained, be can get by packet catcher The link of M3U8 video index file request and the M3U8 video index file of return, and by such as The front end page of M3U8 video index file test device, the video id that can this be play, this is broadcast After the video definition of the M3U8 video index file and requirement of putting video is submitted to, can be according to above-mentioned side Formula carries out testing and obtaining test result, repeats no more here.
Needing explanation, the advantage of HLS technology is that self-adaption code rate spreads (adaptive streaming), Concrete effect can be embodied in videoconference client can automatically select the video of different code check according to network condition etc. Stream, uses high code check in the case of conditions permit, use low bit-rate when of network busy, and automatically Arbitrarily switching between the two, generally, different code checks are presented as different video definition, and for video net For standing, user's entrance of Switch Video definition typically can be provided, based on video website, HLS is answered With, it is also possible to do not consider the switching at runtime problem of video definition, i.e. think a M3U8 file, only Return the video flowing section file of a kind of code check.
Therefore, under the above-mentioned scene not considering video definition, before M3U8 file is tested, Can obtain this play video video id, by video id can obtain this play video total time Burst number long, contained and the duration of each burst, and by the analysis to M3U8 video index file, Having influence on the key point once play is that the video file list URI that section file forms is the most correct, depending on Frequency file list URI and two labels are relevant, it may be assumed that #EXT-X-DISCONTINUITY and #EXTINF, As it was previously stated, the media file of this label back of EXT-X-DISCONTINUITY tag representation is with before Media file between coding be interrupted, be mainly used in the conventional video slicing of video website and burst it Between mark, and #EXTINF be one record label, this label describes regarding specified by the URI of back Frequency file, must there be #EXTINF label in each video file URI front.Hence, it can be determined that impact In video playback crucially M3U8 file, the video file list URI of section file composition provides Contained by the total duration of video, video, the duration of burst number and each burst is the most consistent with source video file, In video file list simultaneously, whether URI is order and unduplicated.
Accordingly, as another embodiment, test user can submit M3U8 to be tested to by front end page Video index file and the video id of this broadcasting video, can be in the following manner when specifically testing: Video total burst number, the duration of each burst and the total duration of video of this video is inquired about by video id;So The standard label of rear test M3U8 file, if standard label test is passed through, and then can test M3U8 and regard Frequency file list URI, will from M3U8 video file list URI resolve obtain video total burst number, Each burst duration and the total duration of video with search video total burst number, the duration of each burst obtained and regard The Given informations such as the total duration of frequency compare, it is determined whether consistent, however, it is determined that to pass through for consistent then test, Otherwise, test crash, finally judge that whether the URI address of M3U8 file list of videos is order and not Repeat, if the determination result is YES, it is determined that test is passed through, otherwise, it determines test crash, and can return Return concrete failure cause.
In above-mentioned provided description, illustrate a large amount of detail.It is to be appreciated, however, that this Inventive embodiment can be put into practice in the case of not having these details.In some instances, not It is shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand in each inventive aspect one Or multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes It is grouped together in single embodiment, figure or descriptions thereof.But, should be by the disclosure Method be construed to reflect an intention that i.e. the present invention for required protection require ratio in each claim The middle more feature of feature be expressly recited.More precisely, as the following claims reflect, Inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows be embodied as Claims of mode are thus expressly incorporated in this detailed description of the invention, the most each claim itself All as the independent embodiment of the present invention.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, And those skilled in the art can design replacement in fact without departing from the scope of the appended claims Execute example.

Claims (14)

1. the test device of a video index file, it is characterised in that including:
Video index file acquisition processing module, for obtaining this video index file playing video;
Standard information dissection process module, for resolving the video index file of this broadcasting video described Standard information;
Video stream information dissection process module, for resolving the video index file of this broadcasting video described Video stream information;
Test processes module, is used for judging that above-mentioned parsing obtains standard information the most correct and according to searching To this play regarding of video index file that Video stream information corresponding to video judge that above-mentioned parsing obtains Frequently stream information is the most correct, if to resolving the judged result of standard information and the Video stream information obtained for just Really, it is determined that test is passed through.
The test device of video index file the most according to claim 1, it is characterised in that described Test processes module specifically includes:
Search module, corresponding for searching this broadcasting video according to the video labeling of this broadcasting video Video stream information;
Standard information test module, is used for judging that above-mentioned parsing obtains standard information the most correct;
Video stream information test module, judges for the Video stream information arrived according to described lookup module searches The Video stream information of this video index file that above-mentioned parsing obtains is the most correct.
The test device of video index file the most according to claim 1, it is characterised in that described Test processes module also includes: test result returns processing module, for test result is returned to user.
4., according to the test device of the video index file described in any one of claim 1-3, its feature exists In, described video index file is M3U8 video index file.
The test device of video index file the most according to claim 4, it is characterised in that described Standard information is the standard label of M3U8 video index file.
The test device of video index file the most according to claim 1, it is characterised in that described Video stream information includes following one or more key element: the total duration of video definition, video, total burst number, Video-frequency band duration in the duration of each burst, each burst, the video-frequency band sequence number in each burst.
The test device of video index file the most according to claim 1, it is characterised in that described Video stream information is the video-frequency band sequence number in each burst;
Whether described test processes module judges the Video stream information of the video index file that above-mentioned parsing obtains Video-frequency band sequence number in the correct each burst specially judging video index file that above-mentioned parsing obtains is No order and be not repeat, if order and unduplicated, it is determined that test is passed through.
8. the method for testing of a video index file, it is characterised in that including:
Obtain this video index file playing video;
Resolve the standard information of this video index file;
Resolve the Video stream information of this video index file;
Judge that above-mentioned parsing obtains standard information this broadcasting video pair that is the most correct and that obtain according to lookup The Video stream information answered judges that the Video stream information of the video index file that above-mentioned parsing obtains is the most correct, If the judged result of the standard information obtaining parsing and Video stream information is correct, it is determined that test is passed through.
The method of testing of video index file the most according to claim 8, it is characterised in that described Searching this that obtain and playing Video stream information corresponding to video is to search this that obtain according to video labeling Play the Video stream information that video is corresponding.
The method of testing of video index file the most according to claim 8, it is characterised in that also Including, test result is returned to user.
The method of testing of 11. video index files described in-10 any one according to Claim 8, its feature Being, described video index file is M3U8 video index file.
The test analysis method of 12. video index files according to claim 11, it is characterised in that Described standard information is the standard label of M3U8 video index file.
The method of testing of 13. Media Stream index files according to claim 8, it is characterised in that Described Video stream information includes following one or more key element: the total duration of video definition, video, total score Video-frequency band duration in sheet number, the duration of each burst, each burst, the video-frequency band sequence in each burst Number.
The test analysis method of 14. video index files according to claim 8, it is characterised in that Described Video stream information is the video-frequency band sequence number in each burst;
The described Video stream information judging video index file that above-mentioned parsing obtains the most specially is sentenced Video-frequency band sequence number in each burst of the video index file that disconnected above-mentioned parsing obtains the most sequentially and is not Repeat, if order and unduplicated, it is determined that test pass through.
CN201610557340.3A 2016-07-14 2016-07-14 Testing device and testing method for video index file Pending CN105978912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610557340.3A CN105978912A (en) 2016-07-14 2016-07-14 Testing device and testing method for video index file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610557340.3A CN105978912A (en) 2016-07-14 2016-07-14 Testing device and testing method for video index file

Publications (1)

Publication Number Publication Date
CN105978912A true CN105978912A (en) 2016-09-28

Family

ID=56951617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610557340.3A Pending CN105978912A (en) 2016-07-14 2016-07-14 Testing device and testing method for video index file

Country Status (1)

Country Link
CN (1) CN105978912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324608A (en) * 2018-03-29 2019-10-11 腾讯科技(深圳)有限公司 Detection method, device and the computer equipment of video flow quality

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000036947A (en) * 1998-07-17 2000-02-02 Mitsubishi Electric Corp Video storage distribution display device
CN101540896A (en) * 2008-03-17 2009-09-23 中国移动通信集团公司 Method, device and system for testing video service quality
CN102843614A (en) * 2012-07-27 2012-12-26 优视科技有限公司 Streaming media display method and equipment and system
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN103747284A (en) * 2013-12-27 2014-04-23 乐视网信息技术(北京)股份有限公司 Video pushing method and server
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal
CN105578203A (en) * 2016-01-15 2016-05-11 北京赛特斯信息科技股份有限公司 Video file quality detection system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000036947A (en) * 1998-07-17 2000-02-02 Mitsubishi Electric Corp Video storage distribution display device
CN101540896A (en) * 2008-03-17 2009-09-23 中国移动通信集团公司 Method, device and system for testing video service quality
CN102843614A (en) * 2012-07-27 2012-12-26 优视科技有限公司 Streaming media display method and equipment and system
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal
CN103747284A (en) * 2013-12-27 2014-04-23 乐视网信息技术(北京)股份有限公司 Video pushing method and server
CN105578203A (en) * 2016-01-15 2016-05-11 北京赛特斯信息科技股份有限公司 Video file quality detection system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324608A (en) * 2018-03-29 2019-10-11 腾讯科技(深圳)有限公司 Detection method, device and the computer equipment of video flow quality
CN110324608B (en) * 2018-03-29 2022-05-24 腾讯科技(深圳)有限公司 Method and device for detecting video stream quality and computer equipment

Similar Documents

Publication Publication Date Title
KR101501860B1 (en) A method of targeted ad insertion using http live streaming protocol
US11080749B2 (en) Synchronising advertisements
CN104463643A (en) Method for presenting user comments on advertisement
US10257567B2 (en) Watermark based content recognition improvements
CN109729390B (en) IPTV program monitoring method, device and system
CN109982068B (en) Method, apparatus, device and medium for evaluating quality of synthesized video
US11743195B2 (en) System and method for monitoring and managing video stream content
CN102572500A (en) Network TV program rating collecting system and method
CN107659538A (en) A kind of method and apparatus of Video processing
US20090193455A1 (en) Information storage medium and method for providing additional contents based on trigger, and digital broadcast reception apparatus
CN107070866A (en) The transmission method and device of a kind of flow data
CN113892272A (en) Disambiguating fingerprint-based channel multi-matches using steganographic encoded data as a basis
CN105530523B (en) A kind of service implementation method and equipment
CN105812847A (en) HLS video live broadcast method, server and system
KR20130088036A (en) Hybrid delivery mechanism in a multimedia transmission system
CN114514753A (en) Use of watermarks for controlling abandonment of dynamic content modification
CN106688240A (en) Method and device for remotely recording video programs
CN105978912A (en) Testing device and testing method for video index file
US20070174877A1 (en) Device and method for automatically obtaining information relating to the audiences of programs transmitted by a communication network
CN104065978A (en) Method for positioning media content and system thereof
US9467242B2 (en) System and method for producing an electronic program guide for user-created content
WO2020263624A1 (en) Use of steganographically-encoded time information as basis to control implementation of dynamic content modification
CN110324682A (en) VOD method and system based on block chain
CN104469427B (en) Data transmission method and terminal and server
CN105828122A (en) Video information obtaining method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160928