WO2017166492A1 - 流媒体文件处理方法及装置 - Google Patents
流媒体文件处理方法及装置 Download PDFInfo
- Publication number
- WO2017166492A1 WO2017166492A1 PCT/CN2016/088978 CN2016088978W WO2017166492A1 WO 2017166492 A1 WO2017166492 A1 WO 2017166492A1 CN 2016088978 W CN2016088978 W CN 2016088978W WO 2017166492 A1 WO2017166492 A1 WO 2017166492A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- slice
- processed
- duration
- play time
- frame
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring 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/44204—Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Definitions
- the embodiments of the present invention relate to the field of streaming media technologies, and in particular, to a streaming media file processing method and apparatus.
- Streaming media files have become an indispensable part of people's lives and work.
- Video files are inseparable from video on demand, live broadcast, etc.
- the streaming media file includes a plurality of slices, and fields for describing the slice duration of each slice, and the like.
- each slice of the streaming media file includes each frame and its corresponding display time stamp information.
- the video file may include m3u8 and a slice, and the m3u8 device includes a #EXTINF field for recording the slice duration of the slice, and the slice includes each frame and its corresponding display timestamp information.
- the slice duration may not be the same as the actual time, and the display time stamp may also be wrong. If one of the two types of information is in error, a playback exception (such as unplayable or stuck) may occur.
- a playback exception such as unplayable or stuck
- the embodiment of the invention provides a method and a device for processing a streaming media file, which are used to solve the problem that the prior art does not detect whether the slice duration and the display time stamp have any problem, and the quality of the generated streaming media file is not high in the prior art. , there will be problems such as playback exceptions.
- an embodiment of the present invention provides a streaming media file processing method, where the method includes:
- the recorded slice duration is different from the actual duration of the to-be-processed slice, and/or, the time difference between the first frame play time and the last frame play time is not the average play time per frame;
- an embodiment of the present invention provides a streaming media file processing apparatus, where the apparatus includes:
- a slice duration acquisition module configured to acquire, for each slice to be processed of the streaming media file, a slice duration recorded by a slice duration field of the to-be-processed slice;
- a play time determining module configured to determine, according to a play time reference of the slice to be processed, a last frame play time of the to-be-processed slice, and a first frame play time of the next slice of the to-be-processed slice;
- the abnormality determining module is configured to determine whether the following abnormality determining condition is met: the recorded slice duration is different from the actual duration of the to-be-processed slice, and/or the time difference between the first frame play time and the last frame play time is not the average per frame Play time;
- the abnormality determining module is configured to determine that the streaming media file has a playback abnormality problem if the determination result of the abnormality determining module is yes.
- the beneficial effects of the embodiments of the present invention include: in the solution provided by the embodiment of the present invention, the slice duration recorded in the slice duration field of the to-be-processed slice is obtained for each slice to be processed of the streaming media file; and according to the play time of the slice to be processed a reference, determining a last frame playing time of the to-be-processed slice, and a first frame playing time of the next slice of the to-be-processed slice; determining whether the following abnormality determining condition is true: the recorded slice duration is different from the actual duration of the to-be-processed slice, And/or, the time difference between the first frame playing time and the last frame playing time is not the average playing time per frame; if yes, it is determined that the streaming media file has a playback abnormality problem.
- the slice duration recorded in the embodiment of the present invention is different from the actual duration of the slice to be processed, it indicates that the slice duration is incorrect, which may cause playback abnormality. If the time difference between the first frame play time and the last frame play time is not the average play time per frame, the play duration between the last frame of the pending slice and the first frame of the next slice exceeds two frames, but only one play is played.
- the frame image indicates that there is a problem with the display timestamp of the first frame of the next slice of the slice to be processed, which may cause problems such as playing a card, and cause a playback abnormality.
- the embodiment of the present invention it is possible to detect whether the slice duration and/or the display time stamp has a problem, thereby being able to detect Whether the streaming media file will play abnormally.
- the user can be made aware of which streaming media files are abnormally played, so that abnormal streaming media files can be processed, the quality of the user can be improved, and the quality of the produced streaming media files can be improved.
- FIG. 1 is an exemplary flowchart of a method for processing a streaming media file according to Embodiment 1 of the present invention
- FIG. 2 is an exemplary flowchart of a method for processing a streaming media file according to Embodiment 2 of the present invention
- FIG. 3 is a schematic structural diagram of a streaming media file processing apparatus according to Embodiment 3 of the present invention.
- FIG. 4 is a schematic structural diagram of a streaming media file processing device according to Embodiment 4 of the present invention.
- the slice duration recorded in the slice duration field of the slice to be processed is obtained; and, according to the play time reference of the slice to be processed, the last frame of the slice to be processed is determined to be played. Time, and the first frame play time of the next slice of the slice to be processed; determining whether the following abnormality determination condition is true: the slice duration of the record is different from the actual duration of the slice to be processed, and/or the first frame play time and the last frame The time difference between the playing times is not the average playing time per frame; if so, it is determined that the streaming media file has a playback abnormality problem.
- the slice duration recorded in the embodiment of the present invention is different from the actual duration of the slice to be processed, it indicates that the slice duration is incorrect, which may cause playback abnormality. If the time difference between the first frame play time and the last frame play time is not the average play time per frame, the play duration between the last frame of the pending slice and the first frame of the next slice exceeds two frames, but only one play is played. The frame image indicates that there is a problem with the display timestamp of the first frame of the next slice of the slice to be processed, and it is prone to playback phenomenon, resulting in abnormal playback.
- the embodiment of the present invention it is possible to detect whether there is a problem with the slice duration and/or the display time stamp, so that it is possible to detect whether a streaming media file is abnormally played. Furthermore, the user can be made aware of which streaming media files are abnormally played, so that abnormal streaming media files can be processed, the quality of the user can be improved, and the quality of the produced streaming media files can be improved.
- the streaming media file processing method provided by the embodiment of the present invention is further described below by using an embodiment.
- FIG. 1 is a schematic flowchart diagram of a method for processing a streaming media file according to an embodiment of the present invention, where the method includes the following steps:
- Step 101 Obtain a slice duration recorded in a slice duration field of the to-be-processed slice for each slice to be processed of the streaming media file.
- Step 102 Determine, according to a play time reference of the slice to be processed, a last frame play time of the to-be-processed slice, and a first frame play time of the next slice of the to-be-processed slice.
- step 101 and step 102 The execution order of step 101 and step 102 is not limited.
- Step 103 Determine whether the following abnormality determination condition is established: the recorded slice duration is different from the actual duration of the to-be-processed slice, and/or the time difference between the first frame play time and the last frame play time is not the average play time per frame.
- the average playing time per frame refers to the average playing time of one frame.
- the average playback duration of one frame of the slice to be processed may be, for example, the playback duration of the slice to be processed is T, and the number of frames is S, and the average playback duration of each frame is the result of dividing T by S.
- This method of calculating the average playback time per frame is particularly suitable for streaming media files with variable frame rates, and of course for streaming media files with constant frame rates.
- the average playback duration per frame can also be obtained by dividing the total playback duration of the streaming media file by the total number of frames of the streaming media file.
- any method for determining the average play duration of each frame of the slice to be processed is applicable to the embodiment of the present invention, which is not limited by the embodiment of the present invention.
- Step 104 If yes, it is determined that the streaming media file has a playback abnormality problem.
- the slice duration recorded is different from the actual duration of the slice to be processed, it indicates that the slice duration is incorrect, which may cause playback abnormality. If the time difference between the first frame play time and the last frame play time is not the average play time per frame, the play duration between the last frame of the pending slice and the first frame of the next slice exceeds two frames, but only one play is played. Frame image. This indicates that there may be a problem in the display timestamp of the first frame of the next slice of the slice to be processed, and it is prone to playback phenomenon, resulting in abnormal playback.
- the embodiment of the present invention it is possible to detect whether there is a problem with the slice duration and/or the display time stamp, so that it is possible to detect whether a streaming media file is abnormally played.
- This can facilitate the user to know which streaming media files are abnormally played, thereby processing abnormal streaming media files, improving user playback quality, and improving the quality of the streaming media files.
- the playback abnormality can be reduced, the playback quality can be improved, and the slice duration error or the timestamp error information can be generated.
- the above method is further explained below:
- the following method may be used to determine whether the recorded slice duration is the same as the actual duration of the slice to be processed, including step A1. -Step A5:
- Step A1 Determine a first frame play time and a last frame play time of the to-be-processed slice according to a play time reference of the slice to be processed.
- Step A2 calculating a duration between a first frame play time of the slice to be processed and a last frame play time
- Step A3 Determine whether the duration is equal to the recorded slice duration.
- Step A4 If equal, it is determined that the recorded slice duration is the same as the actual duration of the slice to be processed.
- Step A5 If not equal, it is determined that the recorded slice duration is different from the actual duration of the slice to be processed.
- the playback abnormality may be reduced by using the following method to improve the playback quality of the streaming media.
- the streaming media file further includes an encoding characteristic change identifier that describes whether the encoding characteristics of the two slices before and after is changed (for example, the #EXT-X-DISCONTINUITY field in the m3u8 file is the encoding property change identifier). If the coding characteristics of the two slices are not changed, the display timestamp of the to-be-played frame will always increase, that is, the playback time of the first frame of the latter slice will be later than the playback time of the last frame of the previous slice. Therefore, in the embodiment of the present invention, the video playback quality can be improved by the following methods:
- Step B1 determining whether there is an encoding characteristic change identifier between the slice to be processed and the next slice of the slice to be processed.
- Step B2 If it does not exist, it is determined that the first frame playing time of the next slice of the slice to be processed is No greater than the last frame play time of the slice to be processed.
- next slice of the slice to be processed can be used as a new slice to be processed and the process returns to step 101 until all the slices of the streaming media file are processed.
- step B3 Since it has been determined that the slice duration of the recorded slice to be processed is different from the actual duration of the slice to be processed, it is necessary to comprehensively consider whether the display timestamp (ie, play time) of the first frame of the next slice of the slice to be processed is incorrect. Determine a reasonable play time benchmark. Specifically, refer to step B3, step B4.
- Step B3 If greater than, the first frame play time of the next slice of the slice to be processed is used as the play time reference of the slice after the slice to be processed.
- the display timestamp of the first frame of the next slice of the slice to be processed is not problematic, and the first frame play time of the next slice of the slice to be processed may be used as the play time reference of the slice after the slice to be processed. Almost reduce playback anomalies and improve playback quality.
- Step B4 If less than, the sum of the last frame play time of the slice to be processed and the average play duration of each frame is used as the play time reference of the slice after the slice to be processed.
- the display timestamp of the first frame of the next slice of the slice to be processed is incorrect. Then, the sum of the last frame playing time of the slice to be processed and the average playing time of each frame is used as the playing time reference of the slice after the slice to be processed, thereby reducing the playing abnormality and improving the playing quality.
- the play time reference of the slice after the slice to be processed is not dependent on the erroneous slice duration calculation by replacing the play time reference of the slice after the slice to be processed. This can avoid the problem that the wrong slice length causes an abnormal playback, thereby improving the playback quality.
- the playback abnormality caused by the display timestamp can be reduced by the following method, and the playback quality is improved, including steps C1 - C3:
- Step C1 Determine whether there is an encoding characteristic change identifier between the slice to be processed and the next slice of the slice to be processed.
- next slice of the slice to be processed can be used as a new slice to be processed and the process returns to step 101 until all the slices of the streaming media file are processed.
- Step C2 If not, determine whether the following condition is true: the next slice of the slice to be processed
- the playing time of the first frame is greater than the playing time of the last frame of the slice to be processed, and the difference between the playing time of the first frame of the next slice of the slice to be processed and the playing time of the last frame of the slice to be processed is the average playing time per frame.
- the first frame playing time of the next slice of the slice to be processed is A
- the last frame playing time of the pending slice is B
- the average playing time per frame is C.
- Step C3 If not, the sum of the last frame play time of the slice to be processed and the average play time of each frame is used as the play time reference of the slice after the slice to be processed.
- the first frame playing time of the next slice of the slice to be processed is determined to be greater than the last frame playing time of the slice to be processed, and the average playing time per frame is normal, everything is normal, and no playback abnormality occurs. You can continue to play using the playback time reference of the slice to be processed.
- the display time stamp of the next slice of the slice to be processed is incorrect.
- information indicating that the display time stamp of the next slice of the slice to be processed is incorrect may also be generated. In this way, the user can learn which segment of the streaming media file has a display timestamp error, which is convenient and convenient to modify the display timestamp of the slice, and improve the quality of the generated streaming media file.
- the recorded slice duration is different from the actual duration of the slice to be processed, it indicates that the recorded slice duration does not match the actual length.
- the slice duration indicating the record of the slice to be processed may also be generated. wrong information. In this way, the user can learn which segment of the streaming media file has an error in the slice duration of the slice, and it is convenient to modify the slice duration of the slice accurately and conveniently, and improve the quality of the generated streaming media file.
- any streaming media file may be played abnormally, so that the user can understand and take measures to correct the problematic streaming media file, thereby improving the quality of the streaming media file.
- the play abnormality can be effectively reduced, and the playback quality of the streaming media file is improved.
- the corresponding error information can also be generated, so that the user can locate the streaming file of the travel problem and correct the problem, and improve the quality of the produced streaming media file.
- the execution body of the method may be a player or a server.
- FIG. 2 it is a schematic flowchart of the method, including the following steps:
- Step 201 Obtain a slice duration recorded in a slice duration field of the to-be-processed slice for each slice to be processed of the streaming media file.
- Step 202 Determine a first frame play time and a last frame play time of the to-be-processed slice according to a play time reference of the slice to be processed.
- Step 203 Calculate the duration between the first frame play time of the slice to be processed and the last frame play time.
- Step 204 Determine whether the duration is equal to the recorded slice duration. If yes, go to step 205. If no, go to step 206.
- Step 205 It is determined that the recorded slice duration is the same as the actual duration of the slice to be processed, and then step 207 is performed.
- Step 206 It is determined that the recorded slice duration is different from the actual duration of the slice to be processed, and then step 210 is performed.
- step 206 it is also possible to generate information indicating that the slice duration of the record of the slice to be processed is incorrect (that is, record the slice duration error).
- Step 207 If there is no coding property change identifier between the to-be-processed slice and the next slice of the to-be-processed slice, determine whether the following condition is true: the first frame play time of the next slice of the slice to be processed is greater than the last frame of the slice to be processed The playing time, and the difference between the first frame playing time of the next slice of the slice to be processed and the last frame playing time of the slice to be processed is the average playing time per frame; if yes, step 208 is performed; if not, step 209 is performed.
- Step 208 The next slice of the slice to be processed is taken as a new slice to be processed, and step 201 is performed.
- Step 209 The sum of the last frame play time of the slice to be processed and the average play duration of each frame is used as the play time reference of the slice after the slice to be processed, and then step 208 is performed.
- the slice indicating the slice to be processed may also be generated.
- the information of the next slice showing the timestamp error (ie, recording a timestamp error).
- Step 210 If there is no coding property change identifier between the to-be-processed slice and the next slice of the to-be-processed slice, determine whether the first frame play time of the next slice of the slice to be processed is greater than the last frame play time of the slice to be processed. If step 211 is performed, if no, step 212 is performed.
- step 210 If the result of the determination in step 210 is no, information indicating that the display time stamp of the next slice of the slice to be processed is incorrect (ie, recording a timestamp error) may also be generated.
- Step 211 The first frame play time of the next slice of the slice to be processed is used as the play time reference of the slice after the slice to be processed, and then step 208 is performed.
- Step 212 The sum of the last frame play time of the slice to be processed and the average play duration of each frame is used as the play time reference of the slice after the slice to be processed, and then step 208 is performed.
- the embodiment of the present invention it is possible to confirm which streaming media files are abnormally played, so that the user can understand and take measures to correct the problematic streaming media file, thereby improving the quality of the streaming media file.
- the play abnormality can be effectively reduced, and the playback quality of the streaming media file is improved.
- the corresponding error information can also be generated, so that the user can locate the streaming file of the travel problem and correct the problem, and improve the quality of the produced streaming media file.
- FIG. 3 is a schematic structural diagram of the apparatus, where the apparatus includes:
- the slice duration acquisition module 301 is configured to obtain, for each slice to be processed of the streaming media file, a slice duration recorded by the slice duration field of the to-be-processed slice;
- the play time determining module 302 is configured to determine, according to a play time reference of the slice to be processed, a last frame play time of the to-be-processed slice, and a first frame play time of the next slice of the to-be-processed slice;
- the abnormality determining module 303 is configured to determine whether the following abnormality determining condition is met: the recorded slice duration is different from the actual duration of the to-be-processed slice, and/or the time difference between the first frame play time and the last frame play time is not every frame. Average playing time;
- the abnormality determining module 304 is configured to determine that the streaming media file has a playback abnormality problem if the determination result of the abnormality determining module is YES.
- the device further includes:
- a first characteristic change representation determining module configured to determine a slice to be processed and the slice to be processed Whether there is an encoding characteristic change identifier between the next slices;
- a first determining module configured to determine, if the first characteristic change indicates that the determining result of the determining module is not present, determining whether a first frame playing time of the next slice of the slice to be processed is greater than a last frame playing time of the slice to be processed;
- a first reference adjustment module configured to: if a determination result of the first determination module is greater than, use a first frame play time of a next slice of the slice to be processed as a play time reference of the slice after the slice to be processed;
- the second reference adjustment module is configured to use, when the determination result of the first determining module is less than, the sum of the last frame playing time of the slice to be processed and the average playing time of each frame as the playing time reference of the slice after the slice to be processed.
- the device further includes:
- the second characteristic change representation determining module is configured to determine whether an encoding characteristic change identifier exists between the to-be-processed slice and the next slice of the to-be-processed slice;
- a second determining module configured to determine whether the following condition is true if the second characteristic change indicates that the determining result of the determining module is not present: the first frame playing time of the next slice of the slice to be processed is greater than the last frame playing time of the slice to be processed, And the difference between the first frame playing time of the next slice of the slice to be processed and the last frame playing time of the slice to be processed is the average playing time per frame;
- the third reference adjustment module if the determination result of the second determination module is no, the sum of the last frame play time of the slice to be processed and the average play duration of each frame is used as the play time reference of the slice after the slice to be processed.
- the device further includes:
- the first information generating module is configured to generate information indicating that the display time stamp of the next slice of the slice to be processed is incorrect.
- the device further comprises:
- the duration judging module is configured to judge whether the recorded slice duration is the same as the actual duration of the slice to be processed according to the following method:
- the device further includes:
- a second information generating module configured to generate information indicating a slice duration error of the record of the slice to be processed.
- the video file processing apparatus provided in the embodiment of the present invention, if the recorded slice duration is different from the actual duration of the slice to be processed, it indicates that the slice duration is incorrect may cause abnormal playback, if the first frame play time and the last frame play
- the time difference between the times is not the average playing time per frame, which means that the playing time between the last frame of the pending slice and the first frame of the next slice exceeds two frames, but only one frame is played, which indicates that the slice may be processed.
- the display time stamp of the first frame of the next slice is problematic, and the phenomenon of playing the card is likely to occur, resulting in abnormal playback.
- the embodiment of the present invention it is possible to detect whether there is a problem with the slice duration and/or the display time stamp, so that it is possible to detect whether a streaming media file is abnormally played.
- FIG. 4 is a schematic structural diagram of the device, where the device includes:
- a memory 401 configured to store various programs and instructions
- the processor 402 is configured to perform the following operations by running various programs and instructions stored in the memory:
- the recorded slice duration is different from the actual duration of the to-be-processed slice, and/or, the time difference between the first frame play time and the last frame play time is not the average play time per frame;
- the processor is further configured to:
- the first frame play time of the next slice of the slice to be processed is used as a play time reference of the slice after the slice to be processed;
- the sum of the last frame play time of the slice to be processed and the average play time of each frame is used as the play time reference of the slice after the slice to be processed.
- the processor is further configured to:
- the first frame play time of the next slice of the slice to be processed is greater than the last frame play time of the slice to be processed, and the first frame play time of the next slice of the slice to be processed and the slice to be processed
- the difference between the last frame play time is the average play time per frame
- the sum of the last frame play time of the slice to be processed and the average play duration of each frame is used as the play time reference of the slice after the slice to be processed.
- the processor is further configured to: generate a display indicating the next slice of the slice to be processed Timestamp error message.
- the processor is further configured to: determine whether the recorded slice duration is the same as the actual duration of the slice to be processed according to the following method:
- the processor is further configured to: generate information indicating that the slice duration of the record of the slice to be processed is incorrect.
- the embodiment of the present invention further provides a computer program, including computer readable code, when the computer readable code is executed on a device, causing the device to execute any of the foregoing streaming media files provided by the embodiments of the present invention.
- a computer program including computer readable code, when the computer readable code is executed on a device, causing the device to execute any of the foregoing streaming media files provided by the embodiments of the present invention.
- an embodiment of the present invention further provides a computer readable medium, wherein the above computer program is stored.
- the video file processing apparatus provided in the embodiment of the present invention, if the recorded slice duration is different from the actual duration of the slice to be processed, it indicates that the slice duration is incorrect may cause abnormal playback, if the first frame play time and the last frame play
- the time difference between the times is not the average playing time per frame, which means that the playing time between the last frame of the pending slice and the first frame of the next slice exceeds two frames, but only one frame is played, which indicates that the slice may be processed.
- the display time stamp of the first frame of the next slice is problematic, and the phenomenon of playing the card is likely to occur, resulting in abnormal playback.
- the embodiment of the present invention it is possible to detect whether there is a problem with the slice duration and/or the display time stamp, so that it is possible to detect whether a streaming media file is abnormally played.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
一种流媒体文件处理方法及装置,针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;并根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;若是,则确定该流媒体文件存在播放异常问题。能够检测切片时长和/或显示时间戳是否有问题,从而能够检测流媒体文件是否会发生播放异常,这样以便于用户知晓哪些流媒体文件存在播放异常的,提高制作流媒体文件的质量。
Description
本申请要求在2016年03月28日提交中国专利局、申请号为201610183604.3、发明名称为“流媒体文件处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及流媒体技术领域,尤其涉及流媒体文件处理方法及装置。
流媒体文件已成为人们生活和工作中不可缺少的信息。无论视频点播、直播等都离不开视频文件。流媒体文件包括多个切片,以及用于描述各切片的切片时长的字段等。此外,流媒体文件的各切片中含有各帧及其对应的显示时间戳信息等。例如,视频文件可以包括m3u8和切片,m3u8件中含有#EXTINF字段用于记录切片的切片时长,切片中含有各帧及其对应的显示时间戳信息等。
由于流媒体提供商越来越多,制作生成的流媒体文件也越来越多。发明人在实现本发明的过程中发现,有些流媒体文件会出现一些质量问题。例如切片时长可能与实际不相同,显示时间戳也可能出错。若这两种信息中有一种信息出错,则会出现播放异常(例如无法播放或卡顿)。而现有技术中没有检测切片时长和显示时间戳是否有问题的技术,导致现有技术中存在制作的流媒体文件质量不高,会出现播放异常的问题。
发明内容
本发明实施例提供流媒体文件处理方法及装置,用以解决目前由于现有技术中没有检测切片时长和显示时间戳是否有问题的技术,导致现有技术中存在制作的流媒体文件质量不高,会出现播放异常等的问题。
本发明实施例提供的具体技术方案如下:
一方面,本发明实施例提供一种流媒体文件处理方法,所述方法包括:
针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字
段记录的切片时长;并
根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;
判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;
若是,则确定该流媒体文件存在播放异常问题。
另一方面,本发明实施例提供一种流媒体文件处理装置,所述装置包括:
切片时长获取模块,用于针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;
播放时间确定模块,用于根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;
异常判断模块,用于判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;
异常确定模块,用于若异常判断模块的判断结果为是,则确定该流媒体文件存在播放异常问题。
本发明实施例有益效果包括:本发明实施例提供的方案中,针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;并根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;若是,则确定该流媒体文件存在播放异常问题。这样,本发明实施例中若记录的切片时长与该待处理切片的实际时长不同则说明切片时长不正确可能会导致播放异常。若首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长,则表示待处理切片的末帧与下一切片的首帧之间的播放时长超过两帧,但仅播放一帧图像,这说明可能待处理切片的下一切片的首帧的显示时间戳有问题,容易导致播放卡顿等问题,引发播放异常。故此,本发明实施例,能够检测切片时长和/或显示时间戳是否有问题,从而能够检测
流媒体文件是否会发生播放异常。这样,能够便于用户知晓哪些流媒体文件存在播放异常的,从而能够对异常的流媒体文件进行处理,提高用户播放质量,同时提高制作流媒体文件的质量。
图1为本发明实施例一中流媒体文件处理方法的示例性流程图;
图2为本发明实施例二中流媒体文件处理方法的示例性流程图;
图3为本发明实施例三中流媒体文件处理装置的结构示意图;
图4为本发明实施例四中流媒体文件处理设备的结构示意图。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例中针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;并,根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;若是,则确定该流媒体文件存在播放异常问题。这样,本发明实施例中若记录的切片时长与该待处理切片的实际时长不同则说明切片时长不正确可能会导致播放异常。若首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长,则表示待处理切片的末帧与下一切片的首帧之间的播放时长超过两帧,但仅播放一帧图像,这说明可能待处理切片的下一切片的首帧的显示时间戳有问题,容易出现播放卡顿的现象导致播放异常。故此,本发明实施例,能够检测切片时长和/或显示时间戳是否有问题,从而能够检测流媒体文件是否会发生播放异常。进而,能够便于用户知晓哪些流媒体文件存在播放异常的,从而能够对异常的流媒体文件进行处理,提高用户播放质量,同时提高制作流媒体文件的质量。
下面,通过实施例对本发明实施例提供的流媒体文件处理方法做进一步说明。
实施例一
如图1所示,为本发明实施例中流媒体文件处理方法的流程示意图,该方法包括以下步骤:
步骤101:针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长。
步骤102:根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间。
其中,步骤101和步骤102的执行顺序不受限。
步骤103:判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长。
其中,每帧平均播放时长指一帧的平均播放时长。可以是待处理切片的一帧平均播放时长,例如待处理切片的播放时长为T,帧数为S,则每帧平均播放时长为T除以S所得的结果。这种计算每帧平均播放时长的方法尤其适用于帧率可变的流媒体文件,当然也可用于帧率不变的流媒体文件。针对帧率不变的流媒体文件,每帧平均播放时长还可以通过计算流媒体文件的总播放时长除以流媒体文件的总帧数获得。具体实施时,任何能够确定待处理切片每帧平均播放时长的方法均适用于本发明实施例,本发明实施例对此不做限定。
步骤104:若是,则确定该流媒体文件存在播放异常问题。
本发明实施例中若记录的切片时长与该待处理切片的实际时长不同则说明切片时长不正确可能会导致播放异常。若首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长,则表示待处理切片的末帧与下一切片的首帧之间的播放时长超过两帧,但仅播放一帧图像。这说明可能待处理切片的下一切片的首帧的显示时间戳有问题,容易出现播放卡顿的现象导致播放异常。故此,本发明实施例,能够检测切片时长和/或显示时间戳是否有问题,从而能够检测流媒体文件是否会发生播放异常。这样能够便于用户知晓哪些流媒体文件存在播放异常的,从而能够对异常的流媒体文件进行处理,提高用户播放质量,同时提高制作流媒体文件的质量。
此外,本发明实施例中还可以减少播放异常,提高播放质量;还可以生成切片时长错误,或显示时间戳错误的信息。为便于进一步理解,下面对上述方法做进一步说明:
一、关于判断记录的切片时长与实际值是否相同
其中,在一个实施例中,为便于准确的确定记录的切片时长与实际值是否相同,本发明实施例中可以根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同,包括步骤A1-步骤A5:
步骤A1:根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间。
步骤A2:计算待处理切片的首帧播放时间与末帧播放时间之间的时长;
步骤A3:判断该时长是否等于记录的切片时长。
步骤A4:若等于,则确定记录的切片时长与待处理切片的实际时长相同。
步骤A5:若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
二、关于减少播放异常
其中,在一个实施例中,本发明实施例中可以通过以下方法减少播放异常从而提高流媒体的播放质量。具体的,通常情况下,流媒体文件中还包括描述前后两切片的编码特性是否变化的编码特性变化标识(例如m3u8文件中的#EXT-X-DISCONTINUITY字段则为编码特性改变标识)。若前后两切片的编码特性没有改变,待播放帧的显示时间戳会一直增大,即后一切片的首帧的播放时间会晚于前一切片的末帧的播放时间。故此,本发明实施例中可以通过以下方法提高视频播放质量:
1)、若记录的待处理切片的切片时长与该待处理切片的实际时长不同,则依赖切片时长播放流媒体文件将会导致播放异常。本发明实施例中可以通过以下方法减少切片时长错误导致的播放异常,提高播放质量,包括步骤B1-步骤B4:
步骤B1:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识。
步骤B2:若不存在,则判断待处理切片的下一切片的首帧播放时间是
否大于待处理切片的末帧播放时间。
其中,若存在,则可以将待处理切片下一切片作为新的待处理切片并返回步骤101,直至流媒体文件的所有切片处理完毕为止。
由于之前已经确定记录的待处理切片的切片时长与该待处理切片的实际时长不同,故此,需要综合考虑待处理切片的下一切片的首帧的显示时间戳(即播放时间)是否有误来确定合理的播放时间基准。具体的,参见步骤B3,步骤B4。
步骤B3:若大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准。
若大于,则说明待处理切片的下一切片的首帧的显示时间戳没有问题,则可以以待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准,从容减少播放异常,提高播放质量。
步骤B4:若小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,若小于,则说明待处理切片的下一切片的首帧的显示时间戳有误。则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准,从而减少播放异常,提高播放质量。
由此,本发明实施例中,当确定记录的切片时长错误时,通过更换待处理切片之后的切片的播放时间基准,使得待处理切片之后的切片的播放时间不依赖与错误的切片时长计算。这样能够规避错误的切片时长导致播放异常的问题,从而提高播放质量。
2)、若记录的切片时长与该待处理切片的实际时长相同,则待处理切片的下一切片的显示时间戳若有问题,则也可能导致播放异常,例如,下一切片的首帧播放时间早于待处理切片的末帧显示时间将会导致播放异常,故此,本发明实施例中可以通过以下方法减少显示时间戳导致的播放异常问题,提高播放质量,包括步骤C1-步骤C3:
步骤C1:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识。
其中,若存在,则可以将待处理切片下一切片作为新的待处理切片并返回步骤101,直至流媒体文件的所有切片处理完毕为止。
步骤C2:若不存在,确定以下条件是否成立:待处理切片的下一切片
的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长。
例如,待处理切片的下一切片的首帧播放时间为A,待处理切片的末帧播放时间为B,每帧平均播放时长为C。则步骤C2指判断以下条件是否成立:A大于B,且A-B=C。若不成立,说明A不大于B,和/或A-B≠C。那么这时候会导致播放异常,则执行步骤C3,重新设定播放时间基准,从而规避下一切片的首帧显示时间戳异常带来的播放异常,提高播放质量。
步骤C3:若否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,在一个实施例中,若确定待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且大每帧平均播放时长则说明一切正常,不会出现播放异常,则可以继续使用待处理切片的播放时间基准进行播放。
其中,在一个实施例中,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,则说明待处理切片的下一切片的显示时间戳错误。本发明实施例中为进一步提高流媒体文件的指令,还可以生成表示待处理切片的下一切片的显示时间戳错误的信息。这样,用户可以通过该信息了解到流媒体文件哪个切片的显示时间戳出现错误,便于准确方便地修改该切片的显示时间戳,提高制作流媒体文件的质量。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长不同,则说明记录的切片时长与实际不符,本发明实施例中还可以生成表示待处理切片的记录的切片时长错误的信息。这样,用户可以通过该信息了解到流媒体文件哪个切片的切片时长出现错误,便于准确方便地修改该切片的切片时长,提高制作流媒体文件的质量。
综上,本发明实施例中,能够确认哪些流媒体文件会出现播放异常,以便于用户了解,并采取措施修正有问题的流媒体文件,从而提高流媒体文件的质量。此外,本发明实施例中,通过重新确定播放时间基准能够有效的减少播放异常,提高流媒体文件播放质量。对于切片时长错误,或者显示时间戳错误还能够生成对应的错误信息,以便于用户能够定位出行问题的流媒体文件并修正问题,提高制作的流媒体文件的质量。
实施例二
为便于进一步理解,本发明实施例对流媒体文件的处理方法进行进一步的说明。该方法的执行主体可以是播放器也可以是服务器。具体的,如图2所示,为该方法的流程示意图,包括以下步骤:
步骤201:针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长。
步骤202:根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间。
步骤203:计算待处理切片的首帧播放时间与末帧播放时间之间的时长。
步骤204:判断该时长是否等于记录的切片时长,若是,执行步骤205,若否,执行步骤206。
步骤205:确定记录的切片时长与待处理切片的实际时长相同,之后执行步骤207。
步骤206:确定记录的切片时长与待处理切片的实际时长不相同,之后执行步骤210。
其中,步骤206之后,还可以生成表示待处理切片的记录的切片时长错误的信息(即记录一次切片时长错误)。
步骤207:若待处理切片与该待处理切片的下一切片之间不存在编码特性改变标识,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;若是,则执行步骤208,若否,则执行步骤209。
步骤208:将待处理切片的下一切片作为新的待处理切片,并执行步骤201。
步骤209:将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准,之后执行步骤208。
其中,在一个实施例中,若步骤207的判断结果为否,且确定待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间时,还可以生成表示待处理切片的下一切片的显示时间戳错误的信息(即记录一次时间戳错误)。
步骤210:若待处理切片与该待处理切片的下一切片之间不存在编码特性改变标识,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间,若是执行步骤211,若否执行步骤212。
其中,若步骤210的判断结果为否,则还可以生成表示待处理切片的下一切片的显示时间戳错误的信息(即记录一次时间戳错误)。
步骤211:将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准,之后执行步骤208。
步骤212:则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准,之后执行步骤208。
这样,本发明实施例中,能够确认哪些流媒体文件会出现播放异常,以便于用户了解,并采取措施修正有问题的流媒体文件,从而提高流媒体文件的质量。此外,本发明实施例中,通过重新确定播放时间基准能够有效的减少播放异常,提高流媒体文件播放质量。对于切片时长错误,或者显示时间戳错误还能够生成对应的错误信息,以便于用户能够定位出行问题的流媒体文件并修正问题,提高制作的流媒体文件的质量。
实施例三
基于相同的发明构思,本发明实施例还提供一种流媒体文件处理装置,如图3所示,为该装置的结构示意图,所述装置包括:
切片时长获取模块301,用于针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;
播放时间确定模块302,用于根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;
异常判断模块303,用于判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;
异常确定模块304,用于若异常判断模块的判断结果为是,则确定该流媒体文件存在播放异常问题。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长不同,所述装置还包括:
第一特性改变表示判断模块,用于判断待处理切片与该待处理切片的
下一切片之间是否存在编码特性改变标识;
第一判断模块,用于若第一特性改变表示判断模块的判断结果为不存在,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间;
第一基准调整模块,用于若第一判断模块的判断结果为大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准;
第二基准调整模块,用于若第一判断模块的判断结果为小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长相同,所述装置还包括:
第二特性改变表示判断模块,用于判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;
第二判断模块,用于若第二特性改变表示判断模块的判断结果为不存在,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;
第三基准调整模块,若第二判断模块的判断结果为否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,在一个实施例中,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,所述装置还包括:
第一信息生成模块,用于生成表示待处理切片的下一切片的显示时间戳错误的信息。
其中,在一个实施例中,所述装置还包括:
时长判断模块,用于根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同:
根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间;
计算待处理切片的首帧播放时间与末帧播放时间之间的时长;
判断该时长是否等于记录的切片时长;
若等于,则确定记录的切片时长与待处理切片的实际时长相同;
若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长不同,所述装置还包括:
第二信息生成模块,用于生成表示待处理切片的记录的切片时长错误的信息。
综上,本发明实施例中提供的视频文件处理装置,若记录的切片时长与该待处理切片的实际时长不同则说明切片时长不正确可能会导致播放异常,若首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长,则表示待处理切片的末帧与下一切片的首帧之间的播放时长超过两帧,但仅播放一帧图像,这说明可能待处理切片的下一切片的首帧的显示时间戳有问题,容易出现播放卡顿的现象等,导致播放异常。故此,本发明实施例,能够检测切片时长和/或显示时间戳是否有问题,从而能够检测流媒体文件是否会发生播放异常。这样,也便于用户知晓哪些流媒体文件存在播放异常的,从而能够对异常的流媒体文件进行处理,提高用户播放质量,同时提高制作流媒体文件的质量。
实施例四
基于相同的发明构思,本发明实施例还提供一种流媒体文件处理设备,如图4所示,为该设备的结构示意图,所述设备包括:
存储器401,用于存储各种程序及指令;
处理器402,用于通过运行存储器存储的各种程序及指令执行以下操作:
针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;
根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;
判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;
若成立,则确定该流媒体文件存在播放异常问题。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长不同,所述处理器还用于:
判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;
若不存在,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间;
若大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准;
若小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时长相同,所述处理器还用于:
判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;
若不存在,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;
若否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
其中,在一个实施例中,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,所述处理器还用于:生成表示待处理切片的下一切片的显示时间戳错误的信息。
其中,在一个实施例中,所述处理器还用于:根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同:
根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间;
计算待处理切片的首帧播放时间与末帧播放时间之间的时长;
判断该时长是否等于记录的切片时长;
若等于,则确定记录的切片时长与待处理切片的实际时长相同;
若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
其中,在一个实施例中,若记录的切片时长与该待处理切片的实际时
长不同,所述处理器还用于:生成表示待处理切片的记录的切片时长错误的信息。
此外,本发明实施例还提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在设备上运行时,导致所述设备执行本发明实施例提供的上述任一种流媒体文件处理方法。
此外,本发明实施例还提供一种计算机可读介质,其中存储了上述计算机程序。
综上,本发明实施例中提供的视频文件处理装置,若记录的切片时长与该待处理切片的实际时长不同则说明切片时长不正确可能会导致播放异常,若首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长,则表示待处理切片的末帧与下一切片的首帧之间的播放时长超过两帧,但仅播放一帧图像,这说明可能待处理切片的下一切片的首帧的显示时间戳有问题,容易出现播放卡顿的现象等,导致播放异常。故此,本发明实施例,能够检测切片时长和/或显示时间戳是否有问题,从而能够检测流媒体文件是否会发生播放异常。这样,也便于用户知晓哪些流媒体文件存在播放异常的,从而能够对异常的流媒体文件进行处理,提高用户播放质量,同时提高制作流媒体文件的质量。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明实施例的技术方案,
而非对其限制;尽管参照前述实施例对本发明实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例各实施例技术方案的精神和范围。
Claims (20)
- 一种流媒体文件处理方法,其特征在于,所述方法包括:针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;并,根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;若是,则确定该流媒体文件存在播放异常问题。
- 根据权利要求1所述的方法,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述方法还包括:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;若不存在,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间;若大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准;若小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
- 根据权利要求1所述的方法,其特征在于,若记录的切片时长与该待处理切片的实际时长相同,所述方法还包括:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;若不存在,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;若否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
- 根据权利要求2或3所述的方法,其特征在于,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,所述方法还包括:生成表示待处理切片的下一切片的显示时间戳错误的信息。
- 根据权利要求1所述的方法,其特征在于,根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同:根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间;计算待处理切片的首帧播放时间与末帧播放时间之间的时长;判断该时长是否等于记录的切片时长;若等于,则确定记录的切片时长与待处理切片的实际时长相同;若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
- 根据权利要求1所述的方法,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述方法还包括:生成表示待处理切片的记录的切片时长错误的信息。
- 一种流媒体文件处理装置,其特征在于,所述装置包括:切片时长获取模块,用于针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;播放时间确定模块,用于根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;异常判断模块,用于判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;异常确定模块,用于若异常判断模块的判断结果为是,则确定该流媒体文件存在播放异常问题。
- 根据权利要求7所述的装置,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述装置还包括:第一特性改变表示判断模块,用于判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;第一判断模块,用于若第一特性改变表示判断模块的判断结果为不存在,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间;第一基准调整模块,用于若第一判断模块的判断结果为大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放 时间基准;第二基准调整模块,用于若第一判断模块的判断结果为小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
- 根据权利要求7所述的装置,其特征在于,若记录的切片时长与该待处理切片的实际时长相同,所述装置还包括:第二特性改变表示判断模块,用于判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;第二判断模块,用于若第二特性改变表示判断模块的判断结果为不存在,若不存在,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;第三基准调整模块,若第二判断模块的判断结果为否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
- 根据权利要求8或9所述的装置,其特征在于,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,所述装置还包括:第一信息生成模块,用于生成表示待处理切片的下一切片的显示时间戳错误的信息。
- 根据权利要求7所述的装置,其特征在于,所述装置还包括:时长判断模块,用于根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同:根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间;计算待处理切片的首帧播放时间与末帧播放时间之间的时长;判断该时长是否等于记录的切片时长;若等于,则确定记录的切片时长与待处理切片的实际时长相同;若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
- 根据权利要求7所述的装置,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述装置还包括:第二信息生成模块,用于生成表示待处理切片的记录的切片时长错误的信息。
- 一种流媒体文件处理设备,其特征在于,所述设备包括:存储器,用于存储各种程序及指令;处理器,用于通过运行存储器存储的各种程序及指令执行以下操作:针对流媒体文件的每个待处理切片,获取该待处理切片的切片时长字段记录的切片时长;根据待处理切片的播放时间基准,确定该待处理切片的末帧播放时间,以及该待处理切片的下一切片的首帧播放时间;判断以下异常判定条件是否成立:记录的切片时长与该待处理切片的实际时长不同,和/或,首帧播放时间与末帧播放时间之间的时差不为每帧平均播放时长;若是,则确定该流媒体文件存在播放异常问题。
- 根据权利要求13所述的设备,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述处理器还用于:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;若不存在,则判断待处理切片的下一切片的首帧播放时间是否大于待处理切片的末帧播放时间;若大于,则将待处理切片的下一切片的首帧播放时间作为该待处理切片之后的切片的播放时间基准;若小于,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为该待处理切片之后的切片的播放时间基准。
- 根据权利要求13所述的设备,其特征在于,若记录的切片时长与该待处理切片的实际时长相同,所述处理器还用于:判断待处理切片与该待处理切片的下一切片之间是否存在编码特性改变标识;若不存在,确定以下条件是否成立:待处理切片的下一切片的首帧播放时间大于待处理切片的末帧播放时间,且待处理切片的下一切片的首帧播放时间与待处理切片的末帧播放时间的差值为每帧平均播放时长;若否,则将待处理切片的末帧播放时间与每帧平均播放时长之和作为 该待处理切片之后的切片的播放时间基准。
- 根据权利要求14或15所述的设备,其特征在于,若待处理切片的下一切片的首帧播放时间小于待处理切片的末帧播放时间,所述处理器还用于生成表示待处理切片的下一切片的显示时间戳错误的信息。
- 根据权利要求13所述的设备,其特征在于,所述处理器还用于根据以下方法判断记录的切片时长与待处理切片的实际时长是否相同:根据待处理切片的播放时间基准,确定该待处理切片的首帧播放时间以及末帧播放时间;计算待处理切片的首帧播放时间与末帧播放时间之间的时长;判断该时长是否等于记录的切片时长;若等于,则确定记录的切片时长与待处理切片的实际时长相同;若不等于,则确定记录的切片时长与待处理切片的实际时长不相同。
- 根据权利要求13所述的设备,其特征在于,若记录的切片时长与该待处理切片的实际时长不同,所述处理器还用于生成表示待处理切片的记录的切片时长错误的信息。
- 一种计算机程序,其特征在于,包括计算机可读代码,当所述计算机可读代码在设备上运行时,导致所述设备执行根据权利要求1-6中的任一个所述的流媒体文件处理方法。
- 一种计算机可读介质,其特征在于,存储了如权利要求19所述的计算机程序。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/247,762 US20170280193A1 (en) | 2016-03-28 | 2016-08-25 | Method and device for processing a streaming media file |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610183604.3A CN105847977A (zh) | 2016-03-28 | 2016-03-28 | 流媒体文件处理方法及装置 |
| CN201610183604.3 | 2016-03-28 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/247,762 Continuation US20170280193A1 (en) | 2016-03-28 | 2016-08-25 | Method and device for processing a streaming media file |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017166492A1 true WO2017166492A1 (zh) | 2017-10-05 |
Family
ID=56584296
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/088978 Ceased WO2017166492A1 (zh) | 2016-03-28 | 2016-07-06 | 流媒体文件处理方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105847977A (zh) |
| WO (1) | WO2017166492A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114401447A (zh) * | 2021-12-20 | 2022-04-26 | 北京字节跳动网络技术有限公司 | 一种视频卡顿预测方法、装置、设备和介质 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107426629B (zh) * | 2017-06-19 | 2020-06-23 | 网宿科技股份有限公司 | 一种流媒体文件处理方法及直播系统 |
| CN109587551B (zh) * | 2017-09-29 | 2020-12-25 | 北京金山云网络技术有限公司 | 一种流媒体直播卡顿的判断方法、装置、设备及存储介质 |
| CN111031385B (zh) * | 2019-12-20 | 2022-03-08 | 北京爱奇艺科技有限公司 | 视频播放的方法及装置 |
| CN114845164B (zh) * | 2021-02-02 | 2025-02-11 | 中国移动通信有限公司研究院 | 一种数据处理方法、装置及设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0725506A2 (en) * | 1995-02-03 | 1996-08-07 | International Business Machines Corporation | Apparatus and method for segmentation and time synchronization of the transmission of multimedia data |
| CN103024440A (zh) * | 2013-01-11 | 2013-04-03 | 德科仕通信(上海)有限公司 | 针对has的视频质量评价和故障诊断方法 |
| CN103491430A (zh) * | 2012-06-12 | 2014-01-01 | 联想(北京)有限公司 | 流媒体数据处理方法和电子设备 |
| CN104052991A (zh) * | 2014-06-17 | 2014-09-17 | 德科仕通信(上海)有限公司 | 检测has视频卡顿的方法及系统 |
| CN104581208A (zh) * | 2015-01-30 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | 一种用于视频点播以及用于辅助视频点播的方法和装置 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104735473B (zh) * | 2015-03-05 | 2018-03-09 | 天脉聚源(北京)科技有限公司 | 一种视频流播放的检测方法及装置 |
-
2016
- 2016-03-28 CN CN201610183604.3A patent/CN105847977A/zh active Pending
- 2016-07-06 WO PCT/CN2016/088978 patent/WO2017166492A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0725506A2 (en) * | 1995-02-03 | 1996-08-07 | International Business Machines Corporation | Apparatus and method for segmentation and time synchronization of the transmission of multimedia data |
| CN103491430A (zh) * | 2012-06-12 | 2014-01-01 | 联想(北京)有限公司 | 流媒体数据处理方法和电子设备 |
| CN103024440A (zh) * | 2013-01-11 | 2013-04-03 | 德科仕通信(上海)有限公司 | 针对has的视频质量评价和故障诊断方法 |
| CN104052991A (zh) * | 2014-06-17 | 2014-09-17 | 德科仕通信(上海)有限公司 | 检测has视频卡顿的方法及系统 |
| CN104581208A (zh) * | 2015-01-30 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | 一种用于视频点播以及用于辅助视频点播的方法和装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114401447A (zh) * | 2021-12-20 | 2022-04-26 | 北京字节跳动网络技术有限公司 | 一种视频卡顿预测方法、装置、设备和介质 |
| US12568272B2 (en) | 2021-12-20 | 2026-03-03 | Beijing Bytedance Network Technology Co., Ltd. | Video stutter prediction method and apparatus, device and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105847977A (zh) | 2016-08-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017166492A1 (zh) | 流媒体文件处理方法及装置 | |
| US11507488B2 (en) | Upstream fault detection | |
| US11284140B2 (en) | Machine learning techniques for determining quality of user experience | |
| US10999391B2 (en) | Dynamic filtering and amelioration of content stream manifests | |
| WO2017092343A1 (zh) | 一种视频数据的检测方法和装置 | |
| JP2007180669A5 (zh) | ||
| JP2018526837A5 (zh) | ||
| CA2971176C (en) | Detection of failures in advertisement replacement | |
| WO2018232796A1 (zh) | 一种流媒体文件处理方法及直播系统 | |
| US8731335B2 (en) | Method and apparatus for correcting rotation of video frames | |
| EP3568774A1 (en) | Anomaly detection of media event sequences | |
| CN104717571A (zh) | 关键播放时间点确定方法、视频播放方法及相关装置 | |
| KR20180074723A (ko) | 카나리 분석을 사용하여 서버 측 행동의 클라이언트 측 영향들을 결정하기 위한 기술들 | |
| WO2017092324A1 (zh) | 视频片段的展示方法及系统 | |
| RU2016135051A (ru) | Способ представления цифрового мультимедийного контента и устройство | |
| CN111565335B (zh) | 视频质量评价方法、装置、计算机设备及存储介质 | |
| JP2022043130A5 (zh) | ||
| CN105893246A (zh) | 播放器测试方法、装置及系统 | |
| CN104967911B (zh) | 多媒体文件插入位置的确定方法及装置 | |
| US7433533B2 (en) | Video performance evaluation | |
| CN102647622B (zh) | 流媒体剪辑播放进度管理方法及系统 | |
| US20220124134A1 (en) | Timestamp processing methods for streaming media | |
| CN104702872B (zh) | 一种录像文件的备份方法和装置 | |
| CN110971978B (zh) | 视频播放方法及装置 | |
| CN114520907B (zh) | 一种检测音频流和视频流是否同步的方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16896264 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16896264 Country of ref document: EP Kind code of ref document: A1 |