WO2024041406A1 - Video target frame determination method, apparatus and device, and storage medium - Google Patents

Video target frame determination method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2024041406A1
WO2024041406A1 PCT/CN2023/112828 CN2023112828W WO2024041406A1 WO 2024041406 A1 WO2024041406 A1 WO 2024041406A1 CN 2023112828 W CN2023112828 W CN 2023112828W WO 2024041406 A1 WO2024041406 A1 WO 2024041406A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
video
decoding
time
target
Prior art date
Application number
PCT/CN2023/112828
Other languages
French (fr)
Chinese (zh)
Inventor
陈博
Original Assignee
广州市百果园信息技术有限公司
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 广州市百果园信息技术有限公司 filed Critical 广州市百果园信息技术有限公司
Publication of WO2024041406A1 publication Critical patent/WO2024041406A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing 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 video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream

Definitions

  • the embodiments of the present application relate to the technical field of video playback, and in particular to a video target frame determination method, device, equipment and storage medium.
  • the user can drag the progress bar to modify the playback progress of the video, or open the video and specify a certain progress to start playing.
  • the player internally retrieves the video frame corresponding to the progress selected by the user, and plays the picture from the determined video frame.
  • the I-frame near the target frame is located according to the I-frame index table, and then based on the I-frame, frame-by-frame decoding is started until the target frame is reached, and then the display screen is obtained.
  • the I-frame index table of the video is missing, it is necessary to search frame by frame starting from the first frame of the video to determine the target frame. This method leads to problems such as long operation time and high performance loss, which makes the video playback sluggish. , seriously affecting the user experience.
  • Embodiments of the present application provide a method, device, equipment and storage medium for determining a video target frame, which solves the problems in related technologies of long operation time and high performance loss when determining a video target frame, and improves the accuracy of the video target frame.
  • the retrieval efficiency makes the video playback response more timely, enabling smooth video playback and improving the user experience.
  • embodiments of the present application provide a method for determining a video target frame, which method includes:
  • the detection interval includes the I frame index and the associated end frame index, frame decoding start time and Frame decoding end time;
  • embodiments of the present application also provide a device for determining a video target frame, including:
  • the information cache module is configured to detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
  • the detection interval includes the I frame index and the associated end frame index. , frame decoding start time and frame decoding end time;
  • a search query module configured to obtain the selected target play point, determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval, based on the Decode the time reference frame to search to obtain the video target frame.
  • embodiments of the present application also provide a video target frame determination device, which includes:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors are caused to implement the video target frame determination method described in the embodiments of this application.
  • embodiments of the present application also provide a storage medium that stores computer-executable instructions, which when executed by a computer processor are used to perform the video target frame determination method described in the embodiments of the present application. .
  • embodiments of the present application also provide a computer program product.
  • the computer program product includes a computer program.
  • the computer program is stored in a computer-readable storage medium.
  • At least one processor of the device reads the computer program from the computer-readable storage medium.
  • Obtain and execute the computer program causing the device to execute the video target frame determination method described in the embodiment of the present application.
  • the type of the video frame in the video is detected, and the frame information of the video frame is stored in the cache according to the detection result to obtain the detection interval, where the detection interval includes the I frame index and the associated end frame index, Frame decoding start time and frame decoding end time, obtain the selected target playback point, determine the decoding time base frame based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval, and then based on the decoding Search the time reference frame to obtain the video target frame.
  • This solution improves the retrieval efficiency of video target frames, makes the video playback response more timely, can achieve smooth video playback, and improves the user experience.
  • Figure 1 is a flow chart of a video target frame determination method provided by an embodiment of the present application.
  • Figure 2 is a flow chart of a method for storing frame information of a video frame in a cache according to detection results according to an embodiment of the present application
  • Figure 3 is a flow chart of a method for determining a decoding time reference frame based on detection interval search provided by an embodiment of the present application
  • Figure 4 is a flow chart of a method for determining a decoding time reference frame using a binary search method provided by an embodiment of the present application
  • Figure 5 is a flow chart of a method for determining a video target frame based on a decoding time reference frame provided by an embodiment of the present application
  • Figure 6 is a flow chart of a method for determining a video target frame and displaying the picture provided by an embodiment of the present application
  • Figure 7 is a structural block diagram of a video target frame determination device provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of a video target frame determination device provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,” “second,” etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • Figure 1 is a flow chart of a video target frame determination method provided by an embodiment of the present application, which can be used for video During video playback, the corresponding video frame is determined based on the selected playback point.
  • This method can be performed by computing devices such as servers, laptops, tablets, and smartphones, and specifically includes the following steps:
  • Step S101 Detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
  • the type of video frame in the video is detected.
  • the lack of I-frame information can be caused by the I-frame index table that the original video should carry is missing, damaged, or has abnormal parsing.
  • the process of detecting the type of video frames in the video may be: during the video playback process, the video frame type is detected frame by frame as the video is played; or the video file may be detected in advance.
  • Decoding detecting video frame type frame by frame. For example, when the video file is opened but not played, the above steps may be executed after receiving the specified playback time point.
  • the frame information of the video frame is cached according to the detection result to obtain the detection interval.
  • This detection interval is used for subsequent retrieval of video target frames corresponding to the target playback time point.
  • the information recorded in the detection interval includes the I frame index in the video frame and the associated end frame index, frame decoding start time and frame decoding end time.
  • the I frame index uniquely corresponds to the I frame in a video.
  • the first detected video frame is an I-frame type video frame
  • the index of the video frame is recorded as 1.
  • the second I-frame type video frame is detected,
  • the added index is 4.
  • the generated detection interval may further include an index serial number, which is sequentially incremented when added according to the detected I-frame type video frames.
  • each GOP Group of Pictures, video frame group
  • One GOP contains multiple video frames, with an I frame type video frame as the first frame, and subsequent P frame type video frames may be included.
  • P frame is the forward reference frame in video encoding and decoding.
  • the compression rate is better than I frame.
  • P frame cannot be used independently to render the picture.
  • the B frame is a bidirectional reference frame in video encoding and decoding.
  • the compression rate is higher than that of the I frame and the P frame.
  • the B frame cannot be used independently to render the picture. For example, it depends on the I frame and P frame that appear before and after it.
  • the end frame index associated with the I frame index Can be the index of the last video frame in the same GOP.
  • the frame decoding start time associated with the I frame index is recorded as the time when the video frame of the I frame type starts decoding, such as the decoding timestamp during decoding; the frame decoding end time associated with the I frame index is the same calculation The decoding end time of the last video frame in a unit (such as a GOP).
  • Figure 2 is a flow chart of a method for storing frame information of a video frame in a cache according to detection results provided by an embodiment of the present application. As shown in Figure 2, it specifically includes:
  • Step S1011 During the video playback process, the type of each video frame is detected in turn. If the type of the video frame is an I frame type, the I frame index and the associated end frame index are generated, and the frame decoding start of the video frame is recorded. time and frame decoding end time.
  • each video frame number corresponds to a video frame
  • the corresponding video frame types include I frame, B frame, and P frame
  • each video The frame decoding start time and frame decoding end time of the frame For example, the video frame with video frame number 5 has a frame type of B frame type, the corresponding frame decoding start time is 160 milliseconds, and the frame decoding end time is 200 milliseconds.
  • the first frame is an I-frame type video frame
  • an I-frame index and an associated end frame index are generated, and the frame decoding start time and frame decoding end time of the video frame are recorded.
  • Step S1012 If the type of the video frame is a non-I frame type, update the end frame index and frame decoding end time of the associated I frame type video frame.
  • the frame type is detected, and if it is a non-I frame type, the end frame index and frame decoding end time are updated. Specifically, it may be: adding one to the end frame index value of the video frame, and updating the frame decoding end time to the frame decoding end time of the non-I frame type video frame.
  • the updated table now looks like this:
  • the frame type is a P frame.
  • the end frame index value of the video frame is incremented by one, and the frame decoding end time is updated to the frame decoding end time of a non-I frame type video frame.
  • the updated table looks like this:
  • the frame type is an I frame.
  • the I frame index and the associated end frame index are generated, and the frame decoding start time and frame decoding end time of the video frame are recorded.
  • the updated table looks like this:
  • the frame information is cached to generate a detection interval.
  • Step S102 Obtain the selected target play point, and determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval.
  • the video target frame can be determined based on the cached frame information.
  • the selected target play point is obtained.
  • the display time of the video target frame such as the 1000th millisecond
  • the frame decoding start time and frame decoding end time recorded in the detection interval A lookup is performed to determine the decoding time base frame.
  • FIG. 3 is a flow chart of a method for determining a decoding time reference frame based on detection interval search provided by an embodiment of the present application. It provides a method that can significantly improve search efficiency, as shown in the figure instructions, specifically including:
  • Step S1021 Obtain the video frame information, and obtain the search interval according to the frame decoding time recorded in the video frame information, the playback time of the target playback point, and the detection interval.
  • Step S1022 Determine the decoding time reference frame according to the display time of the video target frame and the frame decoding start time and frame decoding end time corresponding to the search interval.
  • the video frame information may be a recorded video play point and corresponding time information.
  • the time range of the detection interval is from the 0th second to the 1800th second
  • the playback time of the target playback point is the 100th second
  • the video frame information recorded at this time records the video frame corresponding to the 500th second.
  • FIG. 4 is a flow chart of a method for determining a decoding time reference frame using a binary search method provided by an embodiment of the present application, which specifically includes:
  • Step S1023 Perform a binary search in the search interval to determine the frame decoding start time and frame decoding end time associated with the playback time of the target playback point.
  • the search is performed in the search interval from I frame index n to I frame index m.
  • Use the binary search method to determine the frame decoding start time and frame decoding end time corresponding to the (n+m)/2th frame index, and determine whether the playback time of the target play point is within the range of the frame decoding start time and frame decoding end time.
  • the decoding start time and the frame decoding end time are determined as the frame decoding start time and frame decoding end time associated with the playback time of the target play point. It should be noted that the determined frame decoding start time and frame decoding end time associated with the playback time of the target playback point may not be the actual frame decoding start time and frame decoding end time where the playback time of the target playback point is.
  • the actual frame decoding start time and frame decoding end time may be 1200 milliseconds to 1400 milliseconds, and the associated frame decoding start time and frame decoding determined above
  • the end time may be, for example, 900 ms to 1100 ms.
  • Step S1024 Determine the corresponding I frame index and the associated end frame index according to the frame decoding start time and the frame decoding end time.
  • Step S1025 Determine the video frame corresponding to the determined I frame index and the associated end frame index as the decoding time reference frame.
  • the video playback frame is between the I frame index 150 and the end frame index 156.
  • the video frame corresponding to the I frame index 150 and the subsequent 6 video frames can be used as the decoding time reference frame, or the I frame type video frame corresponding to the I frame index 150 can be used as the decoding time reference frame. .
  • Step S103 Search based on the decoding time reference frame to obtain the video target frame.
  • the previously determined decoding time reference frame is a video frame determined based on the decoding time, there is a difference between the decoding time and the display time.
  • the video frames in the video file are arranged according to the decoding time from small to large, and the display time is not necessarily arranged from small to large.
  • search algorithm that improves search efficiency (such as the binary search method)
  • it must be based on a certain Therefore, after using the decoding time to determine the decoding time reference frame, the final video target frame is determined based on the decoding time reference frame.
  • the decoding time reference frame may not be equivalent to the final video target frame, the final video target frame must be near the decoding time reference frame.
  • Figure 5 is a flow chart of a method for determining a video target frame based on a decoding time reference frame provided by an embodiment of the present application. As shown in Figure 5, it specifically includes:
  • Step S1031 Obtain the display time information of the video frame, where the display time information includes each video frame of the video and the corresponding display time.
  • Step S1032 Search and determine the video target frame in the display time information based on the target playback point and the decoding time reference frame.
  • a search based on the decoding time reference frame and the target play point is performed from data containing display time information to determine the final video target frame.
  • query the display time of the video frame corresponding to the decoding time reference frame and nearby video frames in the display time information and determine the video frame whose display time includes the playback time of the target playback point as the video target frame.
  • the frame information of the video frames is stored in the cache according to the detection results to obtain the detection interval, where the detection interval includes the I frame index and The associated end frame index, frame decoding start time and frame decoding end time are used to obtain the selected target play point, and the decoding time is determined based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval.
  • the reference frame is then searched based on the decoding time reference frame to obtain the video target frame.
  • Figure 6 is a flow chart of a method for determining a video target frame and displaying the picture provided by an embodiment of the present application. As shown in Figure 6, it includes:
  • Step S201 Detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
  • Step S202 Obtain the selected target play point, and determine the decoding time reference frame according to the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval.
  • Step S203 Search based on the decoding time reference frame to obtain the video target frame.
  • Step S204 Determine whether the video target frame is an I-frame type. If so, execute step S205; otherwise, execute step S206.
  • Step S205 Decode and display the video target frame.
  • Step S206 Perform a forward search of video frames one by one to determine the I video frame corresponding to the video target frame, and decode and display the video target frame based on the I video frame.
  • the decoding of the video target frame since the decoding of the video target frame requires an I-frame type video frame, if it is an I-frame type, it can be decoded directly. Otherwise, a forward search of the video frames is performed one by one to determine the corresponding I-frame type. After the video frame, the video target frame is decoded and displayed based on the I video frame.
  • a method for determining the audio target frame is further included.
  • searching based on the decoding time reference frame to obtain the video target frame it also includes: searching for the corresponding audio target frame in the audio frame information according to the display time of the video target frame for use in the video target frame and audio target Synchronized playback of frames.
  • a binary search method can be used to search for the display in the audio frame information.
  • the first audio frame after the display time is used as the audio target frame.
  • the audio frame information records each audio frame of the video and the corresponding time point in sequence according to the audio playback order.
  • FIG. 7 is a structural block diagram of a video target frame determination device provided by an embodiment of the present application.
  • the device is used to execute the video target frame determination method provided by the above embodiment, and has functional modules and beneficial effects corresponding to the execution method.
  • the device specifically includes: an information cache module 101 and a search query module 102, where,
  • the information cache module 101 is configured to detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
  • the detection interval includes the I frame index and the associated end frame. Index, frame decoding start time and frame decoding end time;
  • the search query module 102 is configured to obtain the selected target play point, determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval. Search the decoding time reference frame to obtain the video target frame.
  • the frame information of the video frame is stored in the cache according to the detection result to obtain the detection interval, where the detection interval includes the I frame index and the associated end frame index, frame Decoding start time and frame decoding end time, obtain the selected target playback point, determine the decoding time base frame based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval, and then based on the decoding time
  • the reference frame is searched to obtain the video target frame.
  • the information caching module 101 is configured as:
  • the type of the video frame is an I frame type, generate an I frame index and an associated end frame index, and record the frame decoding start time and frame decoding end time of the video frame;
  • the end frame index and frame decoding end time of the associated I frame type video frame are updated.
  • the information caching module 101 is configured as:
  • the frame decoding end time is updated to the frame decoding end time of the non-I frame type video frame.
  • the search query module 102 is configured as:
  • the decoding time reference frame is determined according to the playback time of the target playback point and the frame decoding start time and frame decoding end time corresponding to the search interval.
  • the search query module 102 is configured as:
  • the video frame corresponding to the determined I frame index and the associated end frame index is determined as the decoding time reference frame.
  • the search query module 102 is configured as:
  • the display time information includes each video frame of the video and the corresponding display time
  • a video target frame is determined by searching in the display time information based on the target playback point and the decoding time reference frame.
  • the device further includes a decoding display module 103 configured as:
  • the video target frame is obtained by searching based on the decoding time reference frame, if the video target frame is of the I frame type, the video target frame is decoded and displayed;
  • the search query module 102 is configured as:
  • the decoding and display module 103 is configured to: decode and display the video target frame based on the I frame video frame.
  • the device further includes an audio frame determination module configured to: after searching based on the decoding time reference frame to obtain the video target frame, based on the playback time of the target playback point, in the audio The corresponding audio target frame is found in the frame information for synchronous playback of the video target frame and the audio target frame.
  • Figure 8 is a schematic structural diagram of a video target frame determination device provided by an embodiment of the present application.
  • the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the processor 201 in the device The number can be one or more.
  • one processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected through a bus or other means.
  • a bus is used. Take connection as an example.
  • the memory 202 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the video target frame determination method in the embodiment of the present application.
  • the processor 201 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 202, that is, implementing the above video target frame determination method.
  • the input device 203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and functional control of the device.
  • the output device 204 may include a display device such as a display screen.
  • Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform a video target frame determination method described in the above embodiments, which includes:
  • the detection interval includes the I frame index and the associated end frame index, frame decoding start time and Frame decoding end time;
  • various aspects of the method provided by this application can also be implemented in the form of a program product, which includes program code.
  • the program product When the program product is run on a computer device, the program code is used to The computer device is caused to execute the steps in the method according to various exemplary embodiments of the present application described above in this specification.
  • the computer device may execute the video target frame determination method described in the embodiment of the present application.
  • the program product may take the form of one or more readable media Any combination is achieved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

Embodiments of the present application provide a video target frame determination method, apparatus and device, and a storage medium. The method comprises: detecting the type of video frames in a video, and storing frame information of the video frames in a cache according to the detection result so as to obtain a detection interval, the detection interval comprising an I frame index as well as an end frame index, a frame decoding start time and a frame decoding end time which are associated with the I frame index; acquiring a selected target playback point, and determining a decoding time reference frame according to the playback time of the target playback point as well as the frame decoding start time and the frame decoding end time recorded in the detection interval; and performing searching on the basis of the decoding time reference frame to obtain a video target frame. According to the present solution, the retrieval efficiency of a video target frame is improved, video playback response is more timely, smooth video playback can be achieved, and user experience is improved.

Description

视频目标帧确定方法、装置、设备及存储介质Video target frame determination method, device, equipment and storage medium
本申请要求在2022年08月26日提交中国专利局,申请号202211035665.7的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202211035665.7, which was submitted to the China Patent Office on August 26, 2022. The entire content of this application is incorporated into this application by reference.
技术领域Technical field
本申请实施例涉及视频播放技术领域,尤其涉及一种视频目标帧确定方法、装置、设备及存储介质。The embodiments of the present application relate to the technical field of video playback, and in particular to a video target frame determination method, device, equipment and storage medium.
背景技术Background technique
视频播放过程中,为了满足用户的播放需求,用户可拖动进度条修改视频的播放进度,或是打开视频并指定从某个进度开始播放。此时,播放器内部检索与用户选择的进度对应的视频帧,并从该确定出的视频帧进行画面播放。During video playback, in order to meet the user's playback needs, the user can drag the progress bar to modify the playback progress of the video, or open the video and specify a certain progress to start playing. At this time, the player internally retrieves the video frame corresponding to the progress selected by the user, and plays the picture from the determined video frame.
相关技术中,针对携带有视频的I帧索引表的情况,根据该I帧索引表定位到目标帧附近的I帧,再基于该I帧开始逐帧解码直到目标帧后,进行渲染得到显示画面。然而,针对视频的I帧索引表缺失的情况,需要从视频的第一个帧开始逐帧搜索以确定目标帧,该种方式导致了操作耗时长、性能损耗高的问题,使得视频的播放迟钝,严重影响了用户体验。In the related art, for the case where the I-frame index table of the video is carried, the I-frame near the target frame is located according to the I-frame index table, and then based on the I-frame, frame-by-frame decoding is started until the target frame is reached, and then the display screen is obtained. . However, when the I-frame index table of the video is missing, it is necessary to search frame by frame starting from the first frame of the video to determine the target frame. This method leads to problems such as long operation time and high performance loss, which makes the video playback sluggish. , seriously affecting the user experience.
发明内容Contents of the invention
本申请实施例提供了一种视频目标帧确定方法、装置、设备及存储介质,解决了相关技术中,在确定视频目标帧时,操作耗时长、性能损耗高的问题,提高了视频目标帧的检索效率,使得视频播放响应更加及时,可以实现流畅的视频播放,提升了用户体验。Embodiments of the present application provide a method, device, equipment and storage medium for determining a video target frame, which solves the problems in related technologies of long operation time and high performance loss when determining a video target frame, and improves the accuracy of the video target frame. The retrieval efficiency makes the video playback response more timely, enabling smooth video playback and improving the user experience.
第一方面,本申请实施例提供了一种视频目标帧确定方法,该方法包括:In a first aspect, embodiments of the present application provide a method for determining a video target frame, which method includes:
对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间; Detect the type of video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame index, frame decoding start time and Frame decoding end time;
获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧;Obtain the selected target play point, and determine the decoding time reference frame according to the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval;
基于所述解码时间基准帧进行搜索得到视频目标帧。Search based on the decoding time reference frame to obtain a video target frame.
第二方面,本申请实施例还提供了一种视频目标帧确定装置,包括:In a second aspect, embodiments of the present application also provide a device for determining a video target frame, including:
信息缓存模块,配置为对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间;The information cache module is configured to detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame index. , frame decoding start time and frame decoding end time;
搜索查询模块,配置为获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,基于所述解码时间基准帧进行搜索得到视频目标帧。A search query module configured to obtain the selected target play point, determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval, based on the Decode the time reference frame to search to obtain the video target frame.
第三方面,本申请实施例还提供了一种视频目标帧确定设备,该设备包括:In a third aspect, embodiments of the present application also provide a video target frame determination device, which includes:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,a storage device for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本申请实施例所述的视频目标帧确定方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the video target frame determination method described in the embodiments of this application.
第四方面,本申请实施例还提供了一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行本申请实施例所述的视频目标帧确定方法。In a fourth aspect, embodiments of the present application also provide a storage medium that stores computer-executable instructions, which when executed by a computer processor are used to perform the video target frame determination method described in the embodiments of the present application. .
第五方面,本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中,设备的至少一个处理器从计算机可读存储介质读取并执行计算机程序,使得设备执行本申请实施例所述的视频目标帧确定方法。In a fifth aspect, embodiments of the present application also provide a computer program product. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor of the device reads the computer program from the computer-readable storage medium. Obtain and execute the computer program, causing the device to execute the video target frame determination method described in the embodiment of the present application.
本申请实施例中,通过对视频中视频帧的类型进行检测,根据检测结果将视频帧的帧信息存储至缓存中以得到探测区间,其中,探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间,获取选定的目标播放点,根据视频目标帧的显示时间以及探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,再基于解码时间基准帧进行搜索得到视频目标帧。本方案提高了视频目标帧的检索效率,使得视频播放响应更加及时,可以实现流畅的视频播放,提升了用户体验。 In the embodiment of the present application, the type of the video frame in the video is detected, and the frame information of the video frame is stored in the cache according to the detection result to obtain the detection interval, where the detection interval includes the I frame index and the associated end frame index, Frame decoding start time and frame decoding end time, obtain the selected target playback point, determine the decoding time base frame based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval, and then based on the decoding Search the time reference frame to obtain the video target frame. This solution improves the retrieval efficiency of video target frames, makes the video playback response more timely, can achieve smooth video playback, and improves the user experience.
附图说明Description of drawings
图1为本申请实施例提供的一种视频目标帧确定方法的流程图;Figure 1 is a flow chart of a video target frame determination method provided by an embodiment of the present application;
图2为本申请实施例提供的一种根据检测结果将视频帧的帧信息存储至缓存中的方法的流程图;Figure 2 is a flow chart of a method for storing frame information of a video frame in a cache according to detection results according to an embodiment of the present application;
图3为本申请实施例提供的一种基于探测区间搜索确定解码时间基准帧的方法的流程图;Figure 3 is a flow chart of a method for determining a decoding time reference frame based on detection interval search provided by an embodiment of the present application;
图4为本申请实施例提供的一种采用二分查找法确定解码时间基准帧的方法的流程图;Figure 4 is a flow chart of a method for determining a decoding time reference frame using a binary search method provided by an embodiment of the present application;
图5为本申请实施例提供的一种基于解码时间基准帧确定视频目标帧的方法的流程图;Figure 5 is a flow chart of a method for determining a video target frame based on a decoding time reference frame provided by an embodiment of the present application;
图6为本申请实施例提供的一种确定视频目标帧并进行画面显示的方法的流程图;Figure 6 is a flow chart of a method for determining a video target frame and displaying the picture provided by an embodiment of the present application;
图7为本申请实施例提供的一种视频目标帧确定装置的结构框图;Figure 7 is a structural block diagram of a video target frame determination device provided by an embodiment of the present application;
图8为本申请实施例提供的一种视频目标帧确定设备的结构示意图。Figure 8 is a schematic structural diagram of a video target frame determination device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请实施例作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请实施例,而非对本申请实施例的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请实施例相关的部分而非全部结构。The embodiments of the present application will be further described in detail below with reference to the accompanying drawings and examples. It can be understood that the specific embodiments described here are only used to explain the embodiments of the present application, but are not intended to limit the embodiments of the present application. In addition, it should be noted that, for convenience of description, only some but not all structures related to the embodiments of the present application are shown in the drawings.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
图1为本申请实施例提供的一种视频目标帧确定方法的流程图,可用于视 频播放时基于选中的播放点进行对应视频帧的确定,该方法可以由计算设备如服务器、笔记本电脑、平板电脑和智能手机等来执行,具体包括如下步骤:Figure 1 is a flow chart of a video target frame determination method provided by an embodiment of the present application, which can be used for video During video playback, the corresponding video frame is determined based on the selected playback point. This method can be performed by computing devices such as servers, laptops, tablets, and smartphones, and specifically includes the following steps:
步骤S101、对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间。Step S101: Detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
在一个实施例中,针对视频原有的I帧信息缺失的情况下,对视频中视频帧的类型进行检测。其中,I帧信息的缺失可以是原本视频应该携带的I帧索引表缺失、损坏或解析异常。In one embodiment, when the original I-frame information of the video is missing, the type of video frame in the video is detected. Among them, the lack of I-frame information can be caused by the I-frame index table that the original video should carry is missing, damaged, or has abnormal parsing.
在一个实施例中,在对视频中视频帧的类型进行检测的过程可以是:在视频播放过程中,随着视频的播放进行逐帧的视频帧类型的检测;也可以是预先对视频文件进行解码,逐帧的进行视频帧类型的检测。例如可以是打开视频文件还未进行播放时,在接收到指定的播放时间点后执行上述步骤。In one embodiment, the process of detecting the type of video frames in the video may be: during the video playback process, the video frame type is detected frame by frame as the video is played; or the video file may be detected in advance. Decoding, detecting video frame type frame by frame. For example, when the video file is opened but not played, the above steps may be executed after receiving the specified playback time point.
其中,根据检测结果将视频帧的帧信息进行缓存以得到探测区间。该探测区间用于后续进行目标播放时间点对应的视频目标帧的检索。Among them, the frame information of the video frame is cached according to the detection result to obtain the detection interval. This detection interval is used for subsequent retrieval of video target frames corresponding to the target playback time point.
在一个实施例中,该探测区间记录的信息包括视频帧中的I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间。其中,I帧索引唯一对应一个视频中的I帧。示例性的,如检测到的第1个视频帧为I帧类型的视频帧,则添加至缓存中时,记录该视频帧的索引为1,当第二个I帧类型的视频帧被检测到时,假定该视频帧为第4帧,则添加索引为4。可选的,生成的探测区间可进一步包括索引序号,该索引序号根据检测到的I帧类型的视频帧,在添加时依次顺序的进行递增。例如,检测到第一个I帧类型的视频帧,在记录时对应的索引序号为1,在检测到第二个I帧类型的视频帧,在记录时对应的索引序号为2,依次类推。其中,关联的结束帧索引为和当前记录的I帧类型的视频帧关联的最后一个视频帧的索引。可选的,以每个GOP(Group of Pictures,视频帧组)为计算单位,其中一个GOP包含多个视频帧,其以I帧类型的视频帧作为第一帧,后续可包含P帧类型的视频帧、B帧类型的视频帧。其中,P帧为视频编解码中的向前参考帧,压缩率优于I帧,但P帧无法独立用于渲染画面,必须依赖于同一个GOP中在前面已经出现的I帧和其它P帧。B帧为视频编解码中的双向参考帧,压缩率比I帧、P帧高,但B帧无法独立用于渲染画面,比如依赖于出现在其前面和后面的I帧和P帧。和I帧索引关联的结束帧索引 可以是同一个GOP中最后一个视频帧的索引。In one embodiment, the information recorded in the detection interval includes the I frame index in the video frame and the associated end frame index, frame decoding start time and frame decoding end time. Among them, the I frame index uniquely corresponds to the I frame in a video. For example, if the first detected video frame is an I-frame type video frame, when it is added to the cache, the index of the video frame is recorded as 1. When the second I-frame type video frame is detected, When , assuming that the video frame is the 4th frame, the added index is 4. Optionally, the generated detection interval may further include an index serial number, which is sequentially incremented when added according to the detected I-frame type video frames. For example, if the first I-frame type video frame is detected, the corresponding index number when recording is 1; when the second I-frame type video frame is detected, the corresponding index number when recording is 2, and so on. The associated end frame index is the index of the last video frame associated with the currently recorded I-frame type video frame. Optionally, each GOP (Group of Pictures, video frame group) is used as the calculation unit. One GOP contains multiple video frames, with an I frame type video frame as the first frame, and subsequent P frame type video frames may be included. Video frames, B-frame type video frames. Among them, P frame is the forward reference frame in video encoding and decoding. The compression rate is better than I frame. However, P frame cannot be used independently to render the picture. It must rely on the previous I frame and other P frames in the same GOP. . The B frame is a bidirectional reference frame in video encoding and decoding. The compression rate is higher than that of the I frame and the P frame. However, the B frame cannot be used independently to render the picture. For example, it depends on the I frame and P frame that appear before and after it. The end frame index associated with the I frame index Can be the index of the last video frame in the same GOP.
其中,I帧索引关联的帧解码开始时间,记为该I帧类型的视频帧开始解码时的时间,如解码时的解码时间戳;该I帧索引关联的帧解码结束时间,为同一个计算单位(如一个GOP)中最后一个视频帧的解码结束时间。Among them, the frame decoding start time associated with the I frame index is recorded as the time when the video frame of the I frame type starts decoding, such as the decoding timestamp during decoding; the frame decoding end time associated with the I frame index is the same calculation The decoding end time of the last video frame in a unit (such as a GOP).
图2为本申请实施例提供的一种根据检测结果将视频帧的帧信息存储至缓存中的方法的流程图,如图2所示,具体包括:Figure 2 is a flow chart of a method for storing frame information of a video frame in a cache according to detection results provided by an embodiment of the present application. As shown in Figure 2, it specifically includes:
步骤S1011、在视频播放过程中,依次对每个视频帧的类型进行检测,如果视频帧的类型为I帧类型,则生成I帧索引以及关联的结束帧索引,并记录视频帧的帧解码开始时间以及帧解码结束时间。Step S1011. During the video playback process, the type of each video frame is detected in turn. If the type of the video frame is an I frame type, the I frame index and the associated end frame index are generated, and the frame decoding start of the video frame is recorded. time and frame decoding end time.
示例性的,以一段包含9个视频帧的视频为例,如下表所示,每个视频帧序号对应一个视频帧,相应的视频帧类型包括I帧、B帧和P帧,以及每个视频帧的帧解码开始时间和帧解码结束时间。如视频帧序号为5的视频帧,其帧类型为B帧类型,对应的帧解码开始时间为160毫秒,帧解码结束时间为200毫秒。
For example, taking a video containing 9 video frames as an example, as shown in the following table, each video frame number corresponds to a video frame, and the corresponding video frame types include I frame, B frame, and P frame, and each video The frame decoding start time and frame decoding end time of the frame. For example, the video frame with video frame number 5 has a frame type of B frame type, the corresponding frame decoding start time is 160 milliseconds, and the frame decoding end time is 200 milliseconds.
此时,进行帧信息的缓存时,第一帧为I帧类型的视频帧,则生成I帧索引以及关联的结束帧索引,并记录视频帧的帧解码开始时间以及帧解码结束时间。相应的,如下表所示:
At this time, when buffering frame information, if the first frame is an I-frame type video frame, an I-frame index and an associated end frame index are generated, and the frame decoding start time and frame decoding end time of the video frame are recorded. Correspondingly, as shown in the following table:
步骤S1012、如果所述视频帧的类型为非I帧类型,则对关联的I帧类型的视频帧的结束帧索引和帧解码结束时间进行更新。Step S1012: If the type of the video frame is a non-I frame type, update the end frame index and frame decoding end time of the associated I frame type video frame.
示例性的,以前述示例为例,在播放到第二帧时,对该帧类型检测,如果其为非I帧类型,则进行结束帧索引和帧解码结束时间的更新。具体可以是:将视频帧的结束帧索引值加一,以及帧解码结束时间更新为非I帧类型的视频帧的帧解码结束时间。此时更新后的表如下所示:
Illustratively, taking the above example as an example, when the second frame is played, the frame type is detected, and if it is a non-I frame type, the end frame index and frame decoding end time are updated. Specifically, it may be: adding one to the end frame index value of the video frame, and updating the frame decoding end time to the frame decoding end time of the non-I frame type video frame. The updated table now looks like this:
在播放到第三帧时,该帧类型为P帧,相应的,将视频帧的结束帧索引值加一,以及帧解码结束时间更新为非I帧类型的视频帧的帧解码结束时间。此时更新后的表如下所示:
When the third frame is played, the frame type is a P frame. Correspondingly, the end frame index value of the video frame is incremented by one, and the frame decoding end time is updated to the frame decoding end time of a non-I frame type video frame. The updated table now looks like this:
在播放到第四帧时,该帧类型为I帧,相应的,生成I帧索引以及关联的结束帧索引,并记录视频帧的帧解码开始时间以及帧解码结束时间。此时更新后的表如下所示:
When the fourth frame is played, the frame type is an I frame. Correspondingly, the I frame index and the associated end frame index are generated, and the frame decoding start time and frame decoding end time of the video frame are recorded. The updated table now looks like this:
依次类推进行帧信息的缓存以生成探测区间。By analogy, the frame information is cached to generate a detection interval.
步骤S102、获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧。Step S102: Obtain the selected target play point, and determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval.
在一个实施例中,进行帧信息的缓存后,可基于该缓存的帧信息进行视频目标帧的确定。在用户拖动播放条或直接定位播放点时,获取选定的目标播放点,根据视频目标帧的显示时间(如第1000毫秒),在探测区间中记录的帧解码开始时间和帧解码结束时间进行查找以确定解码时间基准帧。In one embodiment, after the frame information is cached, the video target frame can be determined based on the cached frame information. When the user drags the play bar or directly locates the play point, the selected target play point is obtained. According to the display time of the video target frame (such as the 1000th millisecond), the frame decoding start time and frame decoding end time recorded in the detection interval A lookup is performed to determine the decoding time base frame.
可选的,图3为本申请实施例提供的一种基于探测区间搜索确定解码时间基准帧的方法的流程图。其提供了一种可以显著提升查找效率的方法,如图所 示,具体包括:Optionally, FIG. 3 is a flow chart of a method for determining a decoding time reference frame based on detection interval search provided by an embodiment of the present application. It provides a method that can significantly improve search efficiency, as shown in the figure instructions, specifically including:
步骤S1021、获取视频帧信息,根据视频帧信息记录的帧解码时间、目标播放点的播放时间以及探测区间得到搜索区间。Step S1021: Obtain the video frame information, and obtain the search interval according to the frame decoding time recorded in the video frame information, the playback time of the target playback point, and the detection interval.
步骤S1022、根据视频目标帧的显示时间以及搜索区间对应的帧解码开始时间和帧解码结束时间,确定解码时间基准帧。Step S1022: Determine the decoding time reference frame according to the display time of the video target frame and the frame decoding start time and frame decoding end time corresponding to the search interval.
其中,该视频帧信息可以是已经记录的视频播放点和对应的时间信息。示例性的,探测区间的时间范围为第0秒至第1800秒,目标播放点的播放时间示例性的为第100秒,此时记录的视频帧信息中记录了第500秒对应的视频帧,在进行该视频目标帧的确定时,仅需检索第0秒至第500秒的区间范围,该区间范围记为搜索区间,由此以提高搜索查询效率。The video frame information may be a recorded video play point and corresponding time information. For example, the time range of the detection interval is from the 0th second to the 1800th second, and the playback time of the target playback point is the 100th second, and the video frame information recorded at this time records the video frame corresponding to the 500th second. When determining the video target frame, only the interval range from the 0th second to the 500th second is required, and this interval range is recorded as the search interval, thereby improving the search query efficiency.
可选的,由于前述确定的搜索区间已经基于视频帧的解码时间进行顺序的排序,故搜索过程中采用二分法进行搜索。图4为本申请实施例提供的一种采用二分查找法确定解码时间基准帧的方法的流程图,具体包括:Optionally, since the previously determined search intervals have been sequentially sorted based on the decoding time of the video frames, a dichotomy method is used in the search process. Figure 4 is a flow chart of a method for determining a decoding time reference frame using a binary search method provided by an embodiment of the present application, which specifically includes:
步骤S1023、在搜索区间中进行二分查找,确定目标播放点的播放时间关联的帧解码开始时间和帧解码结束时间。Step S1023: Perform a binary search in the search interval to determine the frame decoding start time and frame decoding end time associated with the playback time of the target playback point.
示例性的,假定在I帧索引为n至I帧索引为m的搜索区间进行搜索。采用二分查找法,确定第(n+m)/2帧索引对应的帧解码开始时间和帧解码结束时间,确定该目标播放点的播放时间是否处于该帧解码开始时间和帧解码结束时间的范围内,如果其大于帧解码结束时间,则在第(n+m)/2帧与第m帧之间进行二分查找;如果其小于帧解码开始时间,则在第n帧至第(n+m)/2帧之间进行二分查找,以确定其所处的帧解码开始时间和帧解码结束时间。如果其处于帧解码开始时间和帧解码结束时间,则将该解码开始时间和帧解码结束时确定为目标播放点的播放时间关联的帧解码开始时间和帧解码结束时间。需要说明的是,该确定出的和目标播放点的播放时间关联的帧解码开始时间和帧解码结束时间可能并非实际的目标播放点的播放时间所处的帧解码开始时间和帧解码结束时间。例如,在确定播放时间为1000毫秒的时间点时,其实际所处的帧解码开始时间和帧解码结束时间可以是1200毫秒至1400毫秒,而上述确定出的关联的帧解码开始时间和帧解码结束时间示例性的可能是900毫秒至1100毫秒。 For example, it is assumed that the search is performed in the search interval from I frame index n to I frame index m. Use the binary search method to determine the frame decoding start time and frame decoding end time corresponding to the (n+m)/2th frame index, and determine whether the playback time of the target play point is within the range of the frame decoding start time and frame decoding end time. Within, if it is greater than the frame decoding end time, perform a binary search between the (n+m)/2th frame and the m-th frame; if it is less than the frame decoding start time, then perform a binary search between the nth frame to the (n+m)th frame )/2 frames to perform a binary search to determine the frame decoding start time and frame decoding end time. If it is within the frame decoding start time and the frame decoding end time, the decoding start time and the frame decoding end time are determined as the frame decoding start time and frame decoding end time associated with the playback time of the target play point. It should be noted that the determined frame decoding start time and frame decoding end time associated with the playback time of the target playback point may not be the actual frame decoding start time and frame decoding end time where the playback time of the target playback point is. For example, when the playback time is determined to be 1000 milliseconds, the actual frame decoding start time and frame decoding end time may be 1200 milliseconds to 1400 milliseconds, and the associated frame decoding start time and frame decoding determined above The end time may be, for example, 900 ms to 1100 ms.
步骤S1024、根据帧解码开始时间和帧解码结束时间确定对应的I帧索引以及关联的结束帧索引。Step S1024: Determine the corresponding I frame index and the associated end frame index according to the frame decoding start time and the frame decoding end time.
步骤S1025、将确定出的I帧索引以及关联的结束帧索引对应的视频帧确定为解码时间基准帧。Step S1025: Determine the video frame corresponding to the determined I frame index and the associated end frame index as the decoding time reference frame.
示例性的,如确定出视频播放帧处于I帧索引为150,结束帧索引156之间。可选的,可以将该I帧索引为150对应的视频帧以及后续的6帧视频帧作为解码时间基准帧,或者将第I帧索引为150对应的I帧类型的视频帧作为解码时间基准帧。For example, it is determined that the video playback frame is between the I frame index 150 and the end frame index 156. Optionally, the video frame corresponding to the I frame index 150 and the subsequent 6 video frames can be used as the decoding time reference frame, or the I frame type video frame corresponding to the I frame index 150 can be used as the decoding time reference frame. .
步骤S103、基于所述解码时间基准帧进行搜索得到视频目标帧。Step S103: Search based on the decoding time reference frame to obtain the video target frame.
在一个实施例中,由于前述确定的解码时间基准帧为基于解码时间确定的视频帧,而解码时间和显示时间存在差异。可选的,视频文件中视频帧的排列是根据解码时间从小到大进行排列,而显示时间不一定是从小到大排列,为了使用提高查找效率的查找算法(如二分查找法)必须基于一个有序的序列进行,故采用解码时间确定解码时间基准帧后,在基于该解码时间基准帧以确定最终的视频目标帧。虽然解码时间基准帧可能并不等同于最终的视频目标帧,但最终的视频目标帧一定处于该解码时间基准帧的附近。In one embodiment, since the previously determined decoding time reference frame is a video frame determined based on the decoding time, there is a difference between the decoding time and the display time. Optional, the video frames in the video file are arranged according to the decoding time from small to large, and the display time is not necessarily arranged from small to large. In order to use a search algorithm that improves search efficiency (such as the binary search method), it must be based on a certain Therefore, after using the decoding time to determine the decoding time reference frame, the final video target frame is determined based on the decoding time reference frame. Although the decoding time reference frame may not be equivalent to the final video target frame, the final video target frame must be near the decoding time reference frame.
可选的,图5为本申请实施例提供的一种基于解码时间基准帧确定视频目标帧的方法的流程图,如图5所示,具体包括:Optionally, Figure 5 is a flow chart of a method for determining a video target frame based on a decoding time reference frame provided by an embodiment of the present application. As shown in Figure 5, it specifically includes:
步骤S1031、获取视频帧的显示时间信息,其中该,显示时间信息包括视频的每个视频帧以及对应的显示时间。Step S1031: Obtain the display time information of the video frame, where the display time information includes each video frame of the video and the corresponding display time.
步骤S1032、在显示时间信息中基于目标播放点以及解码时间基准帧进行搜索确定视频目标帧。Step S1032: Search and determine the video target frame in the display time information based on the target playback point and the decoding time reference frame.
在一个实施例中,确定出解码时间基准帧后,从包含显示时间信息的数据中进行基于该解码时间基准帧和目标播放点的搜索以确定最终的视频目标帧。可选的,在显示时间信息中查询该解码时间基准帧对应视频帧以及附近的视频帧的显示时间,将显示时间包含该目标播放点的播放时间的视频帧确定为视频目标帧。In one embodiment, after the decoding time reference frame is determined, a search based on the decoding time reference frame and the target play point is performed from data containing display time information to determine the final video target frame. Optionally, query the display time of the video frame corresponding to the decoding time reference frame and nearby video frames in the display time information, and determine the video frame whose display time includes the playback time of the target playback point as the video target frame.
由上述可知,通过对视频中视频帧的类型进行检测,根据检测结果将视频帧的帧信息存储至缓存中以得到探测区间,其中,探测区间包括I帧索引以及 关联的结束帧索引、帧解码开始时间和帧解码结束时间,获取选定的目标播放点,根据视频目标帧的显示时间以及探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,再基于解码时间基准帧进行搜索得到视频目标帧。本方案提高了视频目标帧的检索效率,使得视频播放响应更加及时,可以实现流畅的视频播放,提升了用户体验。As can be seen from the above, by detecting the type of video frames in the video, the frame information of the video frames is stored in the cache according to the detection results to obtain the detection interval, where the detection interval includes the I frame index and The associated end frame index, frame decoding start time and frame decoding end time are used to obtain the selected target play point, and the decoding time is determined based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval. The reference frame is then searched based on the decoding time reference frame to obtain the video target frame. This solution improves the retrieval efficiency of video target frames, makes the video playback response more timely, can achieve smooth video playback, and improves the user experience.
图6为本申请实施例提供的一种确定视频目标帧并进行画面显示的方法的流程图,如图6所示,包括:Figure 6 is a flow chart of a method for determining a video target frame and displaying the picture provided by an embodiment of the present application. As shown in Figure 6, it includes:
步骤S201、对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间。Step S201: Detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval.
步骤S202、获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧。Step S202: Obtain the selected target play point, and determine the decoding time reference frame according to the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval.
步骤S203、基于所述解码时间基准帧进行搜索得到视频目标帧。Step S203: Search based on the decoding time reference frame to obtain the video target frame.
步骤S204、判断视频目标帧是否为I帧类型,如果是,则执行步骤S205,否则执行步骤S206。Step S204: Determine whether the video target frame is an I-frame type. If so, execute step S205; otherwise, execute step S206.
步骤S205、对所述视频目标帧进行解码显示。Step S205: Decode and display the video target frame.
步骤S206、进行视频帧的逐个前向搜索确定所述视频目标帧对应的I帧视频帧,基于该I帧视频帧对所述视频目标帧进行解码显示。Step S206: Perform a forward search of video frames one by one to determine the I video frame corresponding to the video target frame, and decode and display the video target frame based on the I video frame.
在一个实施例中,由于视频目标帧的解码需要I帧类型的视频帧,如果其本身为I帧类型,则可直接进行解码,否则进行进行视频帧的逐个前向搜索确定对应的I帧类型的视频帧后,基于该I帧视频帧对所述视频目标帧进行解码显示。In one embodiment, since the decoding of the video target frame requires an I-frame type video frame, if it is an I-frame type, it can be decoded directly. Otherwise, a forward search of the video frames is performed one by one to determine the corresponding I-frame type. After the video frame, the video target frame is decoded and displayed based on the I video frame.
由上述方案可知,通过高效精确的对视频目标帧的检索确定,并进行相应的解码显示,使得视频播放响应更加及时,可以实现流畅的视频播放,提升了用户体验。It can be seen from the above solution that through efficient and accurate retrieval and determination of the video target frame, and corresponding decoding and display, the video playback response is more timely, smooth video playback can be achieved, and the user experience is improved.
在上述技术方案的基础上,进一步包括确定音频目标帧的方法。可选的,在基于解码时间基准帧进行搜索得到视频目标帧之后,还包括:根据视频目标帧的显示时间,在音频帧信息中查找对应的音频目标帧,以用于视频目标帧和音频目标帧的同步播放。可选的,可采用二分查找法在音频帧信息中搜索该显 示时间之后的第一个音频帧作为音频目标帧。其中,该音频帧信息按照音频播放顺序,依次记录有视频的每个音频帧以及对应的时间点。Based on the above technical solution, a method for determining the audio target frame is further included. Optionally, after searching based on the decoding time reference frame to obtain the video target frame, it also includes: searching for the corresponding audio target frame in the audio frame information according to the display time of the video target frame for use in the video target frame and audio target Synchronized playback of frames. Optionally, a binary search method can be used to search for the display in the audio frame information. The first audio frame after the display time is used as the audio target frame. Among them, the audio frame information records each audio frame of the video and the corresponding time point in sequence according to the audio playback order.
图7为本申请实施例提供的一种视频目标帧确定装置的结构框图,该装置用于执行上述实施例提供的视频目标帧确定方法,具备执行方法相应的功能模块和有益效果。如图7所示,该装置具体包括:信息缓存模块101和搜索查询模块102,其中,Figure 7 is a structural block diagram of a video target frame determination device provided by an embodiment of the present application. The device is used to execute the video target frame determination method provided by the above embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in Figure 7, the device specifically includes: an information cache module 101 and a search query module 102, where,
信息缓存模块101,配置为对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间;The information cache module 101 is configured to detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame. Index, frame decoding start time and frame decoding end time;
搜索查询模块102,配置为获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,基于所述解码时间基准帧进行搜索得到视频目标帧。The search query module 102 is configured to obtain the selected target play point, determine the decoding time reference frame based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval. Search the decoding time reference frame to obtain the video target frame.
由上述方案可知,通过对视频中视频帧的类型进行检测,根据检测结果将视频帧的帧信息存储至缓存中以得到探测区间,其中,探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间,获取选定的目标播放点,根据视频目标帧的显示时间以及探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,再基于解码时间基准帧进行搜索得到视频目标帧。本方案提高了视频目标帧的检索效率,使得视频播放响应更加及时,可以实现流畅的视频播放,提升了用户体验。It can be seen from the above solution that by detecting the type of video frame in the video, the frame information of the video frame is stored in the cache according to the detection result to obtain the detection interval, where the detection interval includes the I frame index and the associated end frame index, frame Decoding start time and frame decoding end time, obtain the selected target playback point, determine the decoding time base frame based on the display time of the video target frame and the frame decoding start time and frame decoding end time recorded in the detection interval, and then based on the decoding time The reference frame is searched to obtain the video target frame. This solution improves the retrieval efficiency of video target frames, makes the video playback response more timely, can achieve smooth video playback, and improves the user experience.
在一个可能的实施例中,所述信息缓存模块101,配置为:In a possible embodiment, the information caching module 101 is configured as:
在视频播放过程中,依次对每个视频帧的类型进行检测;During video playback, the type of each video frame is detected in turn;
如果所述视频帧的类型为I帧类型,则生成I帧索引以及关联的结束帧索引,并记录所述视频帧的帧解码开始时间以及帧解码结束时间;If the type of the video frame is an I frame type, generate an I frame index and an associated end frame index, and record the frame decoding start time and frame decoding end time of the video frame;
如果所述视频帧的类型为非I帧类型,则对关联的I帧类型的视频帧的结束帧索引和帧解码结束时间进行更新。If the type of the video frame is a non-I frame type, the end frame index and frame decoding end time of the associated I frame type video frame are updated.
在一个可能的实施例中,所述信息缓存模块101,配置为:In a possible embodiment, the information caching module 101 is configured as:
将所述视频帧的结束帧索引值加一;Add one to the end frame index value of the video frame;
将所述帧解码结束时间更新为所述非I帧类型的视频帧的帧解码结束时间。The frame decoding end time is updated to the frame decoding end time of the non-I frame type video frame.
在一个可能的实施例中,所述搜索查询模块102,配置为: In a possible embodiment, the search query module 102 is configured as:
获取视频帧信息,根据所述视频帧信息记录的帧解码时间、所述目标播放点的播放时间以及所述探测区间得到搜索区间,所述搜索区间的区间范围小于所述探测区间的范围;Obtain video frame information, and obtain a search interval based on the frame decoding time recorded in the video frame information, the playback time of the target play point, and the detection interval, and the interval range of the search interval is smaller than the range of the detection interval;
根据所述目标播放点的播放时间以及所述搜索区间对应的帧解码开始时间和帧解码结束时间,确定解码时间基准帧。The decoding time reference frame is determined according to the playback time of the target playback point and the frame decoding start time and frame decoding end time corresponding to the search interval.
在一个可能的实施例中,所述搜索查询模块102,配置为:In a possible embodiment, the search query module 102 is configured as:
在所述搜索区间中进行二分查找,确定所述目标播放点的播放时间关联的帧解码开始时间和帧解码结束时间;Perform a binary search in the search interval to determine the frame decoding start time and frame decoding end time associated with the playback time of the target play point;
根据所述帧解码开始时间和帧解码结束时间确定对应的I帧索引以及关联的结束帧索引;Determine the corresponding I frame index and the associated end frame index according to the frame decoding start time and frame decoding end time;
将确定出的所述I帧索引以及关联的结束帧索引对应的视频帧确定为解码时间基准帧。The video frame corresponding to the determined I frame index and the associated end frame index is determined as the decoding time reference frame.
在一个可能的实施例中,所述搜索查询模块102,配置为:In a possible embodiment, the search query module 102 is configured as:
获取视频帧的显示时间信息,所述显示时间信息包括视频的每个视频帧以及对应的显示时间;Obtain the display time information of the video frame, where the display time information includes each video frame of the video and the corresponding display time;
在所述显示时间信息中基于所述目标播放点以及所述解码时间基准帧进行搜索确定视频目标帧。A video target frame is determined by searching in the display time information based on the target playback point and the decoding time reference frame.
在一个可能的实施例中,该装置还包括解码显示模块103,配置为:In a possible embodiment, the device further includes a decoding display module 103 configured as:
在所述基于所述解码时间基准帧进行搜索得到视频目标帧之后,在所述视频目标帧为I帧类型的情况下,对所述视频目标帧进行解码显示;After the video target frame is obtained by searching based on the decoding time reference frame, if the video target frame is of the I frame type, the video target frame is decoded and displayed;
所述搜索查询模块102配置为:The search query module 102 is configured as:
在所述视频目标帧不为I帧类型的情况下,进行视频帧的逐个前向搜索确定所述视频目标帧对应的I帧视频帧;When the video target frame is not of the I-frame type, perform a forward search of video frames one by one to determine the I-frame video frame corresponding to the video target frame;
所述解码显示模块103配置为:基于所述I帧视频帧对所述视频目标帧进行解码显示。The decoding and display module 103 is configured to: decode and display the video target frame based on the I frame video frame.
在一个可能的实施例中,该装置还包括音频帧确定模块,配置为:在所述基于所述解码时间基准帧进行搜索得到视频目标帧之后,根据所述目标播放点的播放时间,在音频帧信息中查找对应的音频目标帧,以用于所述视频目标帧和所述音频目标帧的同步播放。 In a possible embodiment, the device further includes an audio frame determination module configured to: after searching based on the decoding time reference frame to obtain the video target frame, based on the playback time of the target playback point, in the audio The corresponding audio target frame is found in the frame information for synchronous playback of the video target frame and the audio target frame.
图8为本申请实施例提供的一种视频目标帧确定设备的结构示意图,如图8所示,该设备包括处理器201、存储器202、输入装置203和输出装置204;设备中处理器201的数量可以是一个或多个,图8中以一个处理器201为例;设备中的处理器201、存储器202、输入装置203和输出装置204可以通过总线或其他方式连接,图8中以通过总线连接为例。存储器202作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的视频目标帧确定方法对应的程序指令/模块。处理器201通过运行存储在存储器202中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的视频目标帧确定方法。输入装置203可用于接收输入的数字或字符信息,以及产生与设备的用户设置以及功能控制有关的键信号输入。输出装置204可包括显示屏等显示设备。Figure 8 is a schematic structural diagram of a video target frame determination device provided by an embodiment of the present application. As shown in Figure 8, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the processor 201 in the device The number can be one or more. In Figure 8, one processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected through a bus or other means. In Figure 8, a bus is used. Take connection as an example. As a computer-readable storage medium, the memory 202 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the video target frame determination method in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 202, that is, implementing the above video target frame determination method. The input device 203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and functional control of the device. The output device 204 may include a display device such as a display screen.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种上述实施例描述的视频目标帧确定方法,其中,包括:Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform a video target frame determination method described in the above embodiments, which includes:
对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间;Detect the type of video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame index, frame decoding start time and Frame decoding end time;
获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧;Obtain the selected target play point, and determine the decoding time reference frame according to the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval;
基于所述解码时间基准帧进行搜索得到视频目标帧。Search based on the decoding time reference frame to obtain a video target frame.
值得注意的是,上述视频目标帧确定装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。It is worth noting that in the above embodiments of the video target frame determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above divisions, as long as the corresponding functions can be realized; in addition , the specific names of each functional unit are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
在一些可能的实施方式中,本申请提供的方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在计算机设备上运行时,所述程序代码用于使所述计算机设备执行本说明书上述描述的根据本申请各种示例性实施方式的方法中的步骤,例如,所述计算机设备可以执行本申请实施例所记载的视频目标帧确定方法。所述程序产品可以采用一个或多个可读介质 的任意组合实现。 In some possible implementations, various aspects of the method provided by this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to The computer device is caused to execute the steps in the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the video target frame determination method described in the embodiment of the present application. The program product may take the form of one or more readable media Any combination is achieved.

Claims (12)

  1. 视频目标帧确定方法,其中,包括:Video target frame determination method, including:
    对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间;Detect the type of video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame index, frame decoding start time and Frame decoding end time;
    获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧;Obtain the selected target play point, and determine the decoding time reference frame according to the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval;
    基于所述解码时间基准帧进行搜索得到视频目标帧。Search based on the decoding time reference frame to obtain a video target frame.
  2. 根据权利要求1所述的视频目标帧确定方法,其中,所述对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,包括:The video target frame determination method according to claim 1, wherein the detecting the type of the video frame in the video and storing the frame information of the video frame in the cache according to the detection result to obtain the detection interval includes:
    在视频播放过程中,依次对每个视频帧的类型进行检测;During video playback, the type of each video frame is detected in turn;
    如果所述视频帧的类型为I帧类型,则生成I帧索引以及关联的结束帧索引,并记录所述视频帧的帧解码开始时间以及帧解码结束时间;If the type of the video frame is an I frame type, generate an I frame index and an associated end frame index, and record the frame decoding start time and frame decoding end time of the video frame;
    如果所述视频帧的类型为非I帧类型,则对关联的I帧类型的视频帧的结束帧索引和帧解码结束时间进行更新。If the type of the video frame is a non-I frame type, the end frame index and frame decoding end time of the associated I frame type video frame are updated.
  3. 根据权利要求2所述的视频目标帧确定方法,其中,所述对关联的I帧类型的视频帧的结束帧索引和帧解码结束时间进行更新,包括:The video target frame determination method according to claim 2, wherein the updating of the end frame index and frame decoding end time of the associated I frame type video frame includes:
    将所述关联的I帧类型的视频帧的结束帧索引值加一;Add one to the end frame index value of the associated I-frame type video frame;
    将所述帧解码结束时间更新为所述非I帧类型的视频帧的帧解码结束时间。The frame decoding end time is updated to the frame decoding end time of the non-I frame type video frame.
  4. 根据权利要求1所述的视频目标帧确定方法,其中,所述根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解码时间基准帧,包括:The video target frame determination method according to claim 1, wherein the decoding time reference frame is determined based on the playback time of the target playback point and the frame decoding start time and frame decoding end time recorded in the detection interval, include:
    获取视频帧信息,根据所述视频帧信息记录的帧解码时间、所述目标播放点的播放时间以及所述探测区间得到搜索区间,所述搜索区间的区间范围小于所述探测区间的范围;Obtain video frame information, and obtain a search interval based on the frame decoding time recorded in the video frame information, the playback time of the target play point, and the detection interval, and the interval range of the search interval is smaller than the range of the detection interval;
    根据所述目标播放点的播放时间以及所述搜索区间对应的帧解码开始时间和帧解码结束时间,确定解码时间基准帧。The decoding time reference frame is determined according to the playback time of the target playback point and the frame decoding start time and frame decoding end time corresponding to the search interval.
  5. 根据权利要求4所述的视频目标帧确定方法,其中,所述根据所述目标播放点的播放时间以及所述搜索区间对应的帧解码开始时间和帧解码结束时间, 确定解码时间基准帧,包括:The video target frame determination method according to claim 4, wherein the playback time of the target playback point and the frame decoding start time and frame decoding end time corresponding to the search interval, Determine the decoding time reference frame, including:
    在所述搜索区间中进行二分查找,确定所述目标播放点的播放时间关联的帧解码开始时间和帧解码结束时间;Perform a binary search in the search interval to determine the frame decoding start time and frame decoding end time associated with the playback time of the target play point;
    根据所述帧解码开始时间和帧解码结束时间确定对应的I帧索引以及关联的结束帧索引;Determine the corresponding I frame index and the associated end frame index according to the frame decoding start time and frame decoding end time;
    将确定出的所述I帧索引以及关联的结束帧索引对应的视频帧确定为解码时间基准帧。The video frame corresponding to the determined I frame index and the associated end frame index is determined as the decoding time reference frame.
  6. 根据权利要求1-5中任一项所述的视频目标帧确定方法,其中,所述基于所述解码时间基准帧进行搜索得到视频目标帧,包括:The video target frame determination method according to any one of claims 1 to 5, wherein the searching based on the decoding time reference frame to obtain the video target frame includes:
    获取视频帧的显示时间信息,所述显示时间信息包括视频的每个视频帧以及对应的显示时间;Obtain the display time information of the video frame, where the display time information includes each video frame of the video and the corresponding display time;
    在所述显示时间信息中基于所述目标播放点以及所述解码时间基准帧进行搜索确定视频目标帧。A video target frame is determined by searching in the display time information based on the target playback point and the decoding time reference frame.
  7. 根据权利要求1-5中任一项所述的视频目标帧确定方法,其中,在所述基于所述解码时间基准帧进行搜索得到视频目标帧之后,还包括:The method for determining a video target frame according to any one of claims 1 to 5, wherein after searching based on the decoding time reference frame to obtain the video target frame, it further includes:
    在所述视频目标帧为I帧类型的情况下,对所述视频目标帧进行解码显示;When the video target frame is of I-frame type, decoding and displaying the video target frame;
    在所述视频目标帧不为I帧类型的情况下,进行视频帧的逐个前向搜索确定所述视频目标帧对应的I帧视频帧,基于所述I帧视频帧对所述视频目标帧进行解码显示。When the video target frame is not of the I frame type, a forward search of video frames is performed one by one to determine the I frame video frame corresponding to the video target frame, and the video target frame is processed based on the I frame video frame. Decoded display.
  8. 根据权利要求1-5中任一项所述的视频目标帧确定方法,其中,在所述基于所述解码时间基准帧进行搜索得到视频目标帧之后,还包括:The method for determining a video target frame according to any one of claims 1 to 5, wherein after searching based on the decoding time reference frame to obtain the video target frame, it further includes:
    根据所述目标播放点的播放时间,在音频帧信息中查找对应的音频目标帧,以用于所述视频目标帧和所述音频目标帧的同步播放。According to the playback time of the target playback point, the corresponding audio target frame is found in the audio frame information for synchronous playback of the video target frame and the audio target frame.
  9. 视频目标帧确定装置,其中,包括:Video target frame determination device, including:
    信息缓存模块,配置为对视频中视频帧的类型进行检测,根据检测结果将所述视频帧的帧信息存储至缓存中以得到探测区间,所述探测区间包括I帧索引以及关联的结束帧索引、帧解码开始时间和帧解码结束时间;The information cache module is configured to detect the type of the video frame in the video, and store the frame information of the video frame in the cache according to the detection result to obtain the detection interval. The detection interval includes the I frame index and the associated end frame index. , frame decoding start time and frame decoding end time;
    搜索查询模块,配置为获取选定的目标播放点,根据所述目标播放点的播放时间以及所述探测区间中记录的帧解码开始时间和帧解码结束时间,确定解 码时间基准帧,基于所述解码时间基准帧进行搜索得到视频目标帧。A search query module configured to obtain the selected target play point, and determine the solution based on the play time of the target play point and the frame decoding start time and frame decoding end time recorded in the detection interval. The decoding time reference frame is searched based on the decoding time reference frame to obtain the video target frame.
  10. 一种视频目标帧确定设备,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现权利要求1-8中任一项所述的视频目标帧确定方法。A video target frame determination device, the device includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors , causing the one or more processors to implement the video target frame determination method described in any one of claims 1-8.
  11. 一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行权利要求1-8中任一项所述的视频目标帧确定方法。A storage medium storing computer-executable instructions, which when executed by a computer processor are used to perform the video target frame determination method according to any one of claims 1-8.
  12. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1-8中任一项所述的视频目标帧确定方法。 A computer program product includes a computer program, wherein when the computer program is executed by a processor, the video target frame determination method according to any one of claims 1-8 is implemented.
PCT/CN2023/112828 2022-08-26 2023-08-14 Video target frame determination method, apparatus and device, and storage medium WO2024041406A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211035665.7 2022-08-26
CN202211035665.7A CN115396729B (en) 2022-08-26 2022-08-26 Video target frame determining method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2024041406A1 true WO2024041406A1 (en) 2024-02-29

Family

ID=84123571

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/112828 WO2024041406A1 (en) 2022-08-26 2023-08-14 Video target frame determination method, apparatus and device, and storage medium

Country Status (2)

Country Link
CN (1) CN115396729B (en)
WO (1) WO2024041406A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117528154B (en) * 2024-01-04 2024-03-29 湖南快乐阳光互动娱乐传媒有限公司 Video delivery method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2439741A1 (en) * 2010-10-08 2012-04-11 Samsung Electronics Co., Ltd. Video playing apparatus and location search method thereof
CN109348251A (en) * 2018-10-08 2019-02-15 腾讯科技(深圳)有限公司 For the method, apparatus of video playing, computer-readable medium and electronic equipment
CN111083573A (en) * 2018-10-22 2020-04-28 杭州海康威视系统技术有限公司 Video file processing method and device and storage node
WO2020147521A1 (en) * 2019-01-15 2020-07-23 北京字节跳动网络技术有限公司 Image display method and apparatus
CN112822522A (en) * 2020-12-31 2021-05-18 北京梧桐车联科技有限责任公司 Video playing method, device, equipment and storage medium
CN112929755A (en) * 2021-01-21 2021-06-08 稿定(厦门)科技有限公司 Video file playing method and device in progress dragging process
CN113259779A (en) * 2021-07-01 2021-08-13 杭州觅睿科技股份有限公司 Video processing method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1131637C (en) * 2000-10-13 2003-12-17 北京算通数字技术研究中心有限公司 Method of generating data stream index file and using said file accessing frame and shearing lens
KR100765787B1 (en) * 2006-06-15 2007-10-12 삼성전자주식회사 Method for reproducing compressed and encoded video data stream and apparatus thereof
CN104717509B (en) * 2015-03-31 2017-09-26 北京奇艺世纪科技有限公司 A kind of video encoding/decoding method and device
CN113225585A (en) * 2020-01-21 2021-08-06 腾讯科技(深圳)有限公司 Video definition switching method and device, electronic equipment and storage medium
CN113542888B (en) * 2021-07-09 2024-04-09 北京百度网讯科技有限公司 Video processing method and device, electronic equipment and storage medium
CN113573101B (en) * 2021-07-09 2023-11-28 百果园技术(新加坡)有限公司 Video coding method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2439741A1 (en) * 2010-10-08 2012-04-11 Samsung Electronics Co., Ltd. Video playing apparatus and location search method thereof
CN109348251A (en) * 2018-10-08 2019-02-15 腾讯科技(深圳)有限公司 For the method, apparatus of video playing, computer-readable medium and electronic equipment
CN111083573A (en) * 2018-10-22 2020-04-28 杭州海康威视系统技术有限公司 Video file processing method and device and storage node
WO2020147521A1 (en) * 2019-01-15 2020-07-23 北京字节跳动网络技术有限公司 Image display method and apparatus
CN112822522A (en) * 2020-12-31 2021-05-18 北京梧桐车联科技有限责任公司 Video playing method, device, equipment and storage medium
CN112929755A (en) * 2021-01-21 2021-06-08 稿定(厦门)科技有限公司 Video file playing method and device in progress dragging process
CN113259779A (en) * 2021-07-01 2021-08-13 杭州觅睿科技股份有限公司 Video processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115396729A (en) 2022-11-25
CN115396729B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
US8786785B2 (en) Video signature
US20200322684A1 (en) Video recommendation method and apparatus
US7673238B2 (en) Portable media device with video acceleration capabilities
WO2022143688A1 (en) Video frame extraction processing method, apparatus and device, and medium
CN110418186B (en) Audio and video playing method and device, computer equipment and storage medium
WO2024041406A1 (en) Video target frame determination method, apparatus and device, and storage medium
WO2023011094A1 (en) Video editing method and apparatus, electronic device, and storage medium
US8612384B2 (en) Methods and apparatus for searching and accessing multimedia content
WO2017202060A1 (en) Video playing method and apparatus
WO2018183845A1 (en) Generating a video presentation to accompany audio
US9116605B2 (en) System and method for generating event distribution information
US10733454B2 (en) Transformation of video streams
CN107450874B (en) Multimedia data double-screen playing method and system
JP6678167B2 (en) Method and apparatus for determining media information associated with data stored on a storage device
US20150189365A1 (en) Method and apparatus for generating a recording index
CN111263211B (en) Method for caching video data and terminal equipment
US8761579B2 (en) Video data processing apparatus and file management method
WO2020192012A1 (en) Data processing method and apparatus, and storage medium
WO2014209305A1 (en) Checkpoints for media buffering
US11600302B2 (en) System and methods for autonomous synchronous rendering of media objects obtained from a plurality of media sources
CN113542888B (en) Video processing method and device, electronic equipment and storage medium
WO2017088382A1 (en) Data processing method and device
JP2007066370A (en) Play-back apparatus and play-back method
US9542922B2 (en) Method for inserting watermark to image and electronic device thereof
US11750893B2 (en) Pre-fetch of data using seek intervals

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23856496

Country of ref document: EP

Kind code of ref document: A1