WO2024002264A1 - Video processing device, progress bar time updating method, apparatus, and electronic device - Google Patents

Video processing device, progress bar time updating method, apparatus, and electronic device Download PDF

Info

Publication number
WO2024002264A1
WO2024002264A1 PCT/CN2023/104007 CN2023104007W WO2024002264A1 WO 2024002264 A1 WO2024002264 A1 WO 2024002264A1 CN 2023104007 W CN2023104007 W CN 2023104007W WO 2024002264 A1 WO2024002264 A1 WO 2024002264A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
time
video
target
key frame
Prior art date
Application number
PCT/CN2023/104007
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 WO2024002264A1 publication Critical patent/WO2024002264A1/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/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/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/915Television signal processing therefor for field- or frame-skip recording or reproducing

Definitions

  • the present application relates to the field of video surveillance technology, and in particular to a video processing device, a progress bar time update method and device, electronic equipment and a storage medium.
  • the video playback interface includes a progress bar, which is used to display the length information of the video file played back and the time information of the current video frame displayed on the playback interface during the playback process.
  • Video files are generally in PS encapsulation format.
  • PS encapsulation format only I frames can parse out the absolute time, that is, the actual recording time.
  • the actual recording time of the I frame is usually used to update the time on the progress bar.
  • the default frame rate is 25 frames per second, and in the video stream In the data, there are 50 P frames between every two I frames. That is to say, when the video processing device plays back the video stream data, an I frame will appear every 2 seconds, so the time on the progress bar will appear every 2 seconds. It only updates once every 2 seconds, and the update frequency is slow, causing the currently played back video frame to not correspond to the time on the progress bar.
  • This application provides a video processing device, a progress bar time update method, a device and a storage medium, which can increase the time update frequency on the progress bar.
  • the application provides a video processing device.
  • the video processing device is configured to, in response to receiving a playback instruction, obtain a program flow specified by the playback instruction, wherein the program flow is obtained by processing the original shot.
  • the encoded video stream of the video data is obtained by encapsulating the program stream; the program stream is decoded to obtain a decoded video stream, wherein the decoded video stream includes one or more video sequences, each video sequence includes a key frame and At least one target frame associated with the key frame; for any target video sequence of the one or more video sequences, based on the absolute time of the key frame and the time between the key frame and the target frame interval to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video frame corresponding to the video frame; using the absolute time of the key frame and the target frame The absolute time is used to determine the current playback time displayed on the playback progress bar when the decoded video stream is played back.
  • the video processing device is specifically configured to: obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the relative time of the video frame to the reference time. time offset; determine the time interval between the key frame and the target frame according to the time stamp of the key frame and the time stamp of the target frame.
  • the video processing device is specifically configured to: when the timestamp of the target frame is greater than the timestamp of the key frame, subtract the timestamp of the target frame from the The difference in timestamps of key frames is obtained to determine the time interval.
  • the video processing device is specifically configured to: obtain the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; calculate the frame number difference obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference The product with the frame interval of the target video sequence determines the time interval between the key frame and the target frame.
  • the key frame is an I frame; and/or the target frame is an auxiliary frame.
  • the video processing device is specifically configured to determine the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
  • the playback instruction comes from a user terminal that can communicate with the video processing device; the video processing device is further configured to: send the decoded video stream to the sending user terminal to The decoded video stream is played back on the display interface of the user terminal; wherein the current playback time displayed on the playback progress bar on the display interface corresponds to the video frame currently being played back.
  • the functions of the video processing device and the functions of the user terminal are integrated into a single device.
  • the application provides a progress bar time update method, including: obtaining a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame; an absolute value based on the key frame time and the time interval between the key frame and the target frame to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame; using the The absolute time of the key frame and the absolute time of the target frame are used to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
  • the method further includes: obtaining the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time offset of the video frame relative to the reference time. Shift; determine the time interval between the key frame and the target frame according to the timestamp of the key frame and the timestamp of the target frame.
  • determining the time interval between the key frame and the target frame includes: when the timestamp of the target frame is greater than the timestamp of the key frame, based on The time interval is determined by subtracting the time stamp of the key frame from the time stamp of the target frame.
  • the method further includes: obtaining the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, where the frame interval is used to represent The time interval between two adjacent video frames in the target video sequence; the frame number difference is obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference and the The product of the frame intervals of the target video sequence determines the time interval between the key frame and the target frame.
  • the key frame is an I frame; and/or the target frame is an auxiliary frame.
  • determining the current playback time displayed on the playback progress bar includes: determining the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
  • the application provides a progress bar time updating device, including: an acquisition module, configured to acquire a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame; first Determining module, configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, wherein the absolute time is a video frame the actual recording time of the corresponding video picture; a second determination module, configured to use the absolute time of the key frame and the absolute time of the target frame to determine the playback progress bar when the target video sequence is played back The current playback time displayed on.
  • an acquisition module configured to acquire a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame
  • first Determining module configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, wherein the absolute time is a video frame the actual recording time of the corresponding video picture
  • the acquisition module is also used to acquire the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time stamp of the video frame relative to the reference time.
  • Time offset the first determination module is further configured to determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
  • the first determination module is specifically configured to subtract the timestamp of the target frame based on the timestamp of the key frame when the timestamp of the target frame is greater than the timestamp of the key frame. The timestamp of the above key frame is obtained The difference is obtained to determine the time interval.
  • the acquisition module is also used to acquire the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, where the frame interval is represents the time interval between two adjacent video frames in the target video sequence;
  • the first determination module is specifically used to obtain a frame number by subtracting the frame number of the key frame from the frame number of the target frame The time interval between the key frame and the target frame is determined based on the product of the frame number difference and the frame interval of the target video sequence.
  • the key frame is an I frame; and/or the target frame is an auxiliary frame.
  • the second determination module is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
  • the present application provides an electronic device, including: at least one processor; at least one memory storing machine-executable instructions; when the at least one processor executes the machine-executable instructions, the second aspect is implemented Any progress bar time update method provided by the aspect.
  • this application provides a computer-readable storage medium.
  • the computer-readable storage medium stores computer execution instructions. When the computer execution instructions are run on a computer, the computer is caused to execute any of the progress provided in the second aspect. Article time update method.
  • Figure 1 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application
  • Figure 3 is a schematic diagram of a video sequence provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a PS package provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of a playback interface provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application.
  • Figure 7 is a flow chart of a progress bar time update method provided by an embodiment of the present application.
  • Figure 8 is a flow chart of a progress bar time update method provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of a video sequence provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of a video sequence provided by an embodiment of the present application.
  • Figure 11 is a schematic diagram of a video sequence provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of a playback progress bar provided by an embodiment of the present application.
  • Figure 13 is a schematic structural diagram of a progress bar time updating device provided by an embodiment of the present application.
  • Figure 14 is a schematic structural diagram of a progress bar time updating device provided by an embodiment of the present application.
  • a and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
  • first and second in the description of this application and the drawings are used to distinguish different objects, or to distinguish different processes on the same object, rather than to describe a specific order of objects.
  • references to the terms “including” and “having” and any variations thereof in the description of this application are intended to cover non-exclusive inclusion.
  • a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes other unlisted steps or units, or optionally also includes Includes other steps or units that are inherent to such processes, methods, products, or devices.
  • DVR Digital video recorder
  • DVR is a type of video processing equipment used in conjunction with analog cameras.
  • the main working mode of DVR is to access analog video and audio signals and record video and audio through the hard disk.
  • the core of DVR lies in hard disk recording, so DVR is also called hard disk video recorder.
  • DVR can integrate cameras, mice, remote controls, remote terminal equipment, etc. to form a complete monitoring system, realizing the functions of long-term recording, remote monitoring, remote control, playback, and backup of audio and video signal data.
  • NVR Network video recorder
  • NVR Network Video
  • Network camera IP CAMERA, IPC.
  • Network camera is a new generation of camera that combines traditional cameras and network technology. It can transmit video images to the other side of the earth through the network, and the remote viewer does not need to Its video images can be monitored using any professional software, as long as a standard web browser (such as Microsoft IE or Netscape).
  • IPC generally consists of lens, image sensor, sound sensor, signal processor, A/D converter, encoding chip, main control chip, network and control interface, etc.
  • MPEG2-PS is an encapsulation container for multiplexing digital audio, video, etc.
  • the PS stream is obtained by PS encapsulating the basic code stream output from the encoder; the PS stream is composed of PS packets.
  • PES Packetized elementary stream
  • the basic code stream ES is divided into data packets of different lengths as needed, and each data packet is added with a header to form a grouped basic code stream. These data packets are called PES packets, which are a data structure used to transmit basic code streams.
  • PSM Program stream map
  • GOP Group of pictures
  • a GOP consists of a key frame and several target frames.
  • the target frame needs to rely on the information of the key frame to be predicted.
  • the type of the target frame is not limited and can be B frame, P frame, etc.
  • the key frame may be an I frame (i.e., intra-coded frame) and the target frame may be a P frame (i.e., forward predicted frame).
  • I frame i.e., intra-coded frame
  • P frame i.e., forward predicted frame
  • I frames and P frames are used to represent transmitted video images.
  • the encoder encodes multiple images and generates corresponding code stream data.
  • the code stream data can be divided into GOPs based on key frames (I frames). For example, an I frame and P frames between the I frame and the next I frame are regarded as one GOP.
  • the size of the GOP can be set according to the keyframe interval, where when the keyframe interval is set to be shorter, the size of the GOP is smaller, and when the keyframe interval is set to be longer, the size of the GOP is bigger. For example, if the key frame is an I frame and the interval between key frames is 50 frames, then a GOP includes 1 I frame and 50 P frames. When another I frame is inserted into the GOP, the new GOP generated may include one I frame and 30 P frames.
  • Video frame A video consists of more than one independent picture and presents a continuous dynamic visual effect. Each picture can also be called a "video frame". In order to ensure continuity and smoothness, the number of frames per second of the video is fixed, called the frame rate, for example, 25 frames/s, 30 frames/s, 50 frames/s, etc.
  • Timestamp is a time value corresponding to each video frame in the code stream encapsulation.
  • the time value can be represented by a relative value or other methods.
  • a relative time value may represent a time offset relative to a base time (eg, a power-on time point (starting from 0)).
  • the main purpose of using timestamps is to determine the time change between video frames (that is, the frame interval). Therefore, the representation method of the timestamp and the reference time of the timestamp are not limited in this disclosure. Under normal circumstances, the changing trend of timestamps is uniformly increasing.
  • the difference between the timestamps of two adjacent video frames can represent the playback duration of the previous video frame.
  • the timestamp has a maximum value, and when the timestamp reaches the maximum value, it will be accumulated evenly starting from the base time (e.g., 0) again.
  • Absolute time that is, system time, for example, X year X month X day X hour X minute X second, is used to represent the time when each video frame in the video is generated.
  • the absolute time of a video frame is used to represent the actual recording time of the video picture corresponding to the video frame.
  • the video data is usually encoded at the sending end of the video (for example, camera equipment), and the encoded video data is sent to the receiving end of the video (for example, video processing equipment). equipment).
  • the video receiving end After receiving the encoded video data, the video receiving end performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in the hard disk.
  • the time information of I frames and P frames will also be encapsulated in the corresponding PS packets.
  • the time information of the I frame includes the absolute time of the I frame and the timestamp of the I frame; the time information of the P frame includes the timestamp of the P frame.
  • the absolute time corresponding to the currently played back video frame is usually used to update the current playback time on the playback progress bar.
  • the I frame is usually used. The absolute time to update the time on the playback progress bar.
  • an I frame will only appear every fixed time (for example, 2 seconds), and the time on the playback progress bar will only be updated every corresponding fixed time (for example, 2 seconds), and the update frequency is slow. , causing the currently played back video frame to not correspond to the time on the progress bar.
  • this application provides a progress bar time update method.
  • the idea is: during the playback process, first, determine the absolute time of the key frame in the target video sequence, and the time interval between the key frame and the target frame, Furthermore, the absolute time of the target frame is determined based on the absolute time of the key frame and the time interval between the key frame and the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame. .
  • the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame.
  • the current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
  • FIG. 1 shows a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application.
  • the implementation environment may include: a camera device 10 , a video processing device 20 and a terminal device 30 .
  • the camera device 10 is used to capture video.
  • the camera device 10 may be an analog camera or an IPC.
  • the camera device 10 includes a video encoder 11 for receiving the original video data captured by the camera device 10 and using a specific compression standard (for example, H.264 compression standard) to encode the original video data. Encode the video data to obtain the encoded video stream.
  • a specific compression standard for example, H.264 compression standard
  • the encoded video stream may include one or more video sequences (ie, GOP).
  • Each video sequence includes a key frame and at least one target frame.
  • the I frame is the first video frame of the video sequence, including the complete video picture, and can be encoded independently; at least one target frame is located after the key frame, which is a forward prediction encoding frame, and the target frame only includes Relative to changes in the previous video frame (ie, the previous key frame or target frame closest to the target frame), encoding needs to be completed relying on the previous video frame.
  • the camera device 10 is also used to send the encoded video stream to the video processing device 20 .
  • the video processing device 20 is configured to receive and store the encoded video stream. In some embodiments, the video processing device 20 is also used to decode the encoded video stream to obtain one or more video sequences and play them back.
  • the video processing device 20 may be a digital video recorder (DVR) device or a network hard disk recorder (NVR) device.
  • DVR digital video recorder
  • NVR network hard disk recorder
  • the video processing device 20 after receiving the encoded video stream, performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in a storage area (for example, a local hard disk or a other devices with which video processing device 20 can communicate).
  • a storage area for example, a local hard disk or a other devices with which video processing device 20 can communicate.
  • the video processing device 20 determines the time information corresponding to each video frame (including key frames and target frames) in the encoded video stream, and encapsulates the time information corresponding to each video frame in the corresponding PS. in the bag.
  • the time information corresponding to the I frame includes the absolute time of the I frame and the timestamp of the I frame
  • the time information corresponding to the P frame includes the timestamp of the P frame.
  • the PS stream consists of multiple PS GOPs; a PS GOP consists of one or more PS packets, and each PS packet corresponds to the information of one or more video frames in the corresponding GOP.
  • a PS GOP consists of one or more PS packets
  • each PS packet corresponds to the information of one or more video frames in the corresponding GOP.
  • the structure of the PS packet is shown in Figure 4, where the structure of the first PS packet in the PS GOP (that is, the PS packet corresponding to the I frame) can be as shown in (a) of Figure 4, The structure of other PS packets in the PS GOP (that is, the PS packet corresponding to the P frame) can be shown in (b) of Figure 4.
  • PSH is the header of the PS packet, which mainly includes the timestamp of the video frame corresponding to the PS packet.
  • PES is the basic stream of the encoded video stream, that is, the encoded video stream is grouped to obtain one or more PES.
  • the video processing device 20 after receiving the playback instruction, is also configured to obtain the PS stream corresponding to the playback instruction from the storage area, and decode the PS stream to obtain a decoded video stream.
  • the above playback instruction may be issued by the terminal device 30 .
  • the video processing device 20 includes a video decoder 21 for decoding the PS stream using a specific compression standard (for example, H.264 compression standard) to obtain a decoded video stream.
  • a specific compression standard for example, H.264 compression standard
  • the decoded video stream includes one or more video sequences, each video sequence consisting of a key frame and at least one target frame.
  • the time information of the key frame and the time information of the target frame in the video sequence can be parsed, as well as the frame number of the key frame and the frame number of the target frame.
  • the frame number refers to the sequence number of each video frame.
  • the frame number of the key frame refers to the sequence number of the key frame, for example, F0 or 1
  • the frame number of the target frame refers to the sequence number of the target frame, for example, F1 or 2.
  • the video processing device 20 is also used to send the decoded video stream to the terminal device 30 .
  • the terminal device 30 is used to play the decoded video stream.
  • the terminal device 30 includes a display screen, the playback interface of the display screen includes a first area and a second area, and the first area is smaller than the second area; wherein, the first area is used for The video pictures (video frames) of the decoded video stream are displayed, and the second area includes a playback progress bar.
  • the playback progress bar is used to reflect the time information corresponding to the video pictures (video frames) displayed in the first area.
  • the terminal device 30 is also configured to obtain the time information of each video frame in the video sequence, and update the current playback time of the playback progress bar according to the time information of each video frame.
  • the terminal device 30 may be an electronic device with a playback function, such as a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, or an ultra-mobile personal computer (UMPC). , netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR)/virtual reality (VR) devices, etc.
  • PDAs personal digital assistants
  • AR augmented reality
  • VR virtual reality
  • the video processing device 20 and the terminal device 30 in FIG. 1 may be two separate devices, or the video processing device 20 and the terminal device 30 may be the same device, that is, the video processing device 20 or the corresponding function and the terminal. Device 30 or corresponding functions can be integrated on the same device.
  • the camera device 10 and the video processing device 20 can communicate, and the video processing device 20 and the terminal device 30 can communicate.
  • the video processing device 20 can receive an encoded video stream from the camera device 10, and the terminal device 30 can The decoded video stream is received from video processing device 20.
  • one or more communication media may be included between the camera device 10 and the video processing device 20 and between the video processing device 20 and the terminal device 30 , and the one or more communication media may include a router, a switch or a base station. and other equipment.
  • the video processing device 20 receives the encoded video stream sent by the camera device 10 , performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in the storage area.
  • the user can send a playback instruction to the video processing device 20 through the terminal device 30; when the video processing device 20 receives the playback instruction, the PS corresponding to the video recording to be played back is obtained from the storage area.
  • the video processing device 20 sends the decoded video stream to the terminal device 30; the terminal device 30 displays the decoded video stream, and based on the decoded video
  • the time corresponding to the stream updates the current playback time on the playback progress bar.
  • the progress bar time updating method provided by the embodiment of the present application can be executed by the video processing device shown in Figure 1. As shown in Figure 7, the method includes the following steps:
  • the target video sequence includes key frames and at least one target frame associated with the key frames.
  • a keyframe is the first frame in the target video sequence, and at least one target frame follows the keyframe. Both key frames and target frames are used to represent video frames.
  • the target video sequence is any video sequence in the recorded videos to be played back.
  • the recorded video to be played back includes three video sequences, namely video sequence A, video sequence B, and video sequence C
  • the video processing device obtains video sequence A, video sequence A, and video sequence C by decoding the PS stream corresponding to the recorded video. Sequence B and video sequence C.
  • the video processing device performs PS encapsulation on the encoded video stream to generate a PS stream and store it in the storage area. Furthermore, during the playback process, it is necessary to obtain the PS stream of the recorded video to be played back from the hard disk, and decode the PS stream into the form of one or more video sequences.
  • the absolute time of the target frame is the actual shooting time of the video picture corresponding to the target frame.
  • the absolute time of the target frame is determined based on the sum of the absolute time of the key frame and the time interval between the key frame and the target frame. For example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is T1-T0, then the absolute time of the target frame satisfies: G0+(T1-T0). As another example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is (F1-F0)*D, then the absolute time of the target frame satisfies: G0+(F1-F0)*D .
  • the key frame may be an I frame; and/or the target frame may be an auxiliary frame.
  • the playback progress bar is used to display the length information of the video recording file where the target video sequence is located, and the time information corresponding to the currently played back video frame.
  • the video processing device sends the video image corresponding to the key frame to the terminal device, so that the video image corresponding to the key frame is played on the display screen of the terminal device.
  • the video processing device uses the absolute time of the key frame to update the playback progress.
  • the current playback time of the bar The video processing device sends the video image corresponding to the target frame to the terminal device, so that the video image corresponding to the target frame is played on the display screen of the terminal device.
  • the video processing device uses the absolute time of the target frame to update the current playback time of the playback progress bar.
  • determining the current playback time displayed on the playback progress bar includes: determining the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
  • the current playback time of the playback progress bar is updated to seconds based on the absolute time of the key frame and the absolute time of the target frame. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes.
  • the current playback time of the playback progress bar is updated to milliseconds based on the absolute time of the key frame and the absolute time of the target frame. In this way, the frequency of time update of the progress bar can be increased and the time on the progress bar can be made more accurate. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes and 200 milliseconds.
  • the technical solution provided by the embodiment of the present application first determines the absolute time of the key frame in the target video sequence and the time interval between the key frame and the target frame, and then, based on the absolute time of the key frame and the key frame The time interval between the key frame and the target frame determines the absolute time of the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame.
  • the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame.
  • the current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
  • the progress bar time updating method provided by the embodiment of the present application can be executed by the video processing device shown in Figure 1. As shown in Figure 8, the method includes the following steps:
  • the target video sequence includes key frames and at least one target frame associated with the key frames.
  • a keyframe is the first frame in the target video sequence, and at least one target frame follows the keyframe. Both key frames and target frames are used to represent video frames.
  • the target video sequence is any video sequence in the recorded videos to be played back.
  • the recorded video to be played back includes three video sequences, namely video sequence A, video sequence B, and video sequence C
  • the video processing device obtains video sequence A, video sequence A, and video sequence C by decoding the PS stream corresponding to the recorded video. Sequence B and video sequence C.
  • the video processing device performs PS encapsulation on the encoded video stream to generate a PS stream and store it in the storage area. Furthermore, during the playback process, it is necessary to obtain the PS stream of the recorded video to be played back from the hard disk, and decode the PS stream into the form of one or more video sequences.
  • S202 Determine the absolute time of the key frame and the time interval between the key frame and the target frame.
  • the absolute time of the key frame is the actual recording time of the video picture corresponding to the key frame. For example, if the video picture corresponding to the key frame was shot at 12:00:0 on May 17, 2022, then the absolute time of the key frame is 12:0:0 on May 17, 2022.
  • the target frame is any one of the at least one target frame.
  • the time interval between the key frame and the target frame refers to the time difference between the key frame and the target frame.
  • the embodiment of the present application provides the following two methods for determining the time interval between the key frame and the target frame.
  • Method 1 Determine the time interval between the key frame and the target frame based on the timestamp
  • Step 1 Get the timestamp of the key frame and the timestamp of the target frame.
  • the timestamp of the key frame is used to represent the time offset of the key frame compared to the base time; the timestamp of the target frame is used to represent the time offset of the target frame compared to the base time.
  • the reference time is fixed (the reference time can be the power-on time point (for example, 0), or it can be an arbitrarily set time point (for example, 5ms, 10ms, 20ms, etc.).
  • the embodiment of the present application does not change the reference time.
  • the value of time is not specifically limited), therefore, the time offset relative to the reference time can uniquely characterize the actual recording time of the video frame, that is, the timestamp of each video frame can uniquely characterize the actual recording time of the video frame. Recording time.
  • the timestamp of the key frame is 40ms
  • the first The timestamp of the target frame is 80ms
  • the timestamp of the second target frame is 120ms, which are accumulated evenly until the timestamp reaches the maximum value.
  • the video processing device obtains the timestamp of the key frame by parsing the PS packet corresponding to the key frame; the video processing device obtains the timestamp of the target frame by parsing the PS packet corresponding to the target frame.
  • Step 2 Determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
  • the time interval between the key frame and the target frame is determined based on the difference between the timestamp of the target frame and the timestamp of the key frame. For example, if the timestamp of the target frame is T1 and the timestamp of the key frame is T0, then the time interval between the key frame and the target frame satisfies: T1-T0.
  • the timestamp of the key frame is 40ms
  • the timestamp of the target frame is 120ms.
  • the above step 2 can be implemented as: when the timestamp of the target frame is greater than the timestamp of the key frame, determine the distance between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame. time interval.
  • the timestamp of the target frame should be greater than the timestamp of the key frame.
  • the timestamp has a maximum value. When the timestamp reaches the maximum value, it will continue to accumulate from 0. At this time, there may be a situation where the timestamp of the target frame is smaller than the timestamp of the key frame (that is, when the time stamp occurs Stamp overflow), in which case errors may occur when determining the time interval between the keyframe and the target frame based on the timestamp of the keyframe and the timestamp of the target frame.
  • the timestamp of the key frame is 160ms
  • the timestamp of the target frame is 40ms
  • the timestamp of the target frame is smaller than the timestamp of the key frame
  • the method provided in the first mode is preferably applicable to the situation where the timestamp of the target frame is greater than the timestamp of the key frame.
  • Method 2 Determine the time interval between the key frame and the target frame based on the frame number
  • Step 1 Obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence.
  • the frame interval of the target video sequence is used to represent the time interval between two adjacent video frames in the target video sequence.
  • the video processing device obtains the frame number of the key frame by parsing the PS packet corresponding to the key frame; the video processing device obtains the frame number of the target frame by parsing the PS packet corresponding to the target frame.
  • Step 2 Determine the time interval between the key frame and the target frame based on the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence.
  • the time interval between the key frame and the target frame is determined based on the product of the frame number difference between the frame number of the target frame and the frame number of the key frame and the frame interval of the target video sequence. For example, if the frame number of the target frame is F1, the frame number of the key frame is F0, and the frame interval of the target video sequence is D, then the time interval between the key frame and the target frame satisfies: (F1-F0)*D .
  • the frame time interval of the column is used to determine the time interval between the key frame and the target frame. Timestamp overflow will not occur and the time interval between the key frame and the target frame can be accurately determined.
  • the absolute time of the target frame is the actual shooting time of the video picture corresponding to the target frame.
  • the absolute time of the target frame is determined based on the sum of the absolute time of the key frame and the time interval between the key frame and the target frame. For example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is T1-T0, then the absolute time of the target frame satisfies: G0+(T1-T0). As another example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is (F1-F0)*D, then the absolute time of the target frame satisfies: G0+(F1-F0)*D .
  • the playback progress bar is used to display the length information of the video recording file where the target video sequence is located, and the time information corresponding to the currently played back video frame.
  • the video processing device sends the video image corresponding to the key frame to the terminal device, so that the video image corresponding to the key frame is played on the display screen of the terminal device.
  • the video processing device uses the absolute time of the key frame to update the playback progress.
  • the current playback time of the bar The video processing device sends the video image corresponding to the target frame to the terminal device, so that the video image corresponding to the target frame is played on the display screen of the terminal device.
  • the video processing device uses the absolute time of the target frame to update the current playback time of the playback progress bar.
  • the current playback time of the playback progress bar is updated to seconds based on the absolute time of the key frame and the absolute time of the target frame. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes.
  • the current playback time of the playback progress bar is updated to milliseconds based on the absolute time of the key frame and the absolute time of the target frame. In this way, the frequency of time update of the progress bar can be increased and the time on the progress bar can be made more accurate. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes and 200 milliseconds.
  • the technical solution provided by the embodiment of the present application first determines the absolute time of the key frame in the target video sequence and the time interval between the key frame and the target frame, and then, based on the absolute time of the key frame and the key frame The time interval between the key frame and the target frame determines the absolute time of the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame.
  • the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame.
  • the current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
  • an embodiment of the present application provides a progress bar time updating device for executing the progress bar time updating method shown in Figure 7.
  • the progress bar time updating device 300 includes: an acquisition module 301, a first determination module 302 and a second determination module 303.
  • the acquisition module 301 is used to acquire a target video sequence, where the target video sequence includes a key frame and at least one target frame associated with the key frame, and the time information corresponding to the key frame includes the absolute time of the key frame and the timing of the key frame. Timestamp, the time information corresponding to the target frame includes the timestamp of the target frame.
  • the first determination module 302 is configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame.
  • the second determination module 303 is configured to use the absolute time of the key frame and the absolute time of the target frame to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
  • the acquisition module 301 is also used to obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time of the video frame relative to the reference time. Offset; the first determination module 302 is further configured to determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
  • the first determination module 302 is specifically configured to subtract the time stamp based on the target frame when the timestamp of the target frame is greater than the timestamp of the key frame.
  • the time interval is determined by obtaining the difference between the timestamps of the key frames.
  • the obtaining module 301 is also used to obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; the first determination module 302 is specifically used to obtain the result by subtracting the frame number of the key frame from the frame number of the target frame.
  • the frame number difference is determined based on the product of the frame number difference and the frame interval of the target video sequence to determine the time interval between the key frame and the target frame.
  • the key frame is an I frame; and/or the target frame is an auxiliary frame.
  • the second determination module 303 is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
  • Embodiments of the present application also provide a video processing device, which is configured to obtain a program flow specified by the playback instruction in response to receiving a playback instruction, wherein the program flow is obtained by processing the original video captured.
  • the encoded video stream of the data is obtained by encapsulating the program stream; the program stream is decoded to obtain a decoded video stream, wherein the decoded video stream includes one or more video sequences, and each video sequence includes a key frame and the At least one target frame associated with the key frame; for any target video sequence of the one or more video sequences, based on the absolute time of the key frame and the time interval between the key frame and the target frame , to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame; using the absolute time of the key frame and the absolute time of the target frame time to determine the current playback time displayed on the playback progress bar when the decoded video stream is played back.
  • the video processing device is specifically configured to: obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the relative time of the video frame to the reference time. time offset; determine the time interval between the key frame and the target frame according to the time stamp of the key frame and the time stamp of the target frame.
  • the video processing device is specifically configured to: when the timestamp of the target frame is greater than the timestamp of the key frame, subtract the timestamp of the target frame from the The difference in timestamps of key frames is obtained to determine the time interval.
  • the video processing device is specifically configured to: obtain the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; calculate the frame number difference obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference The product of the frame interval of the target video sequence determines the time interval between the key frame and the target frame.
  • the key frame is an I frame; and/or the target frame is an auxiliary frame.
  • the video processing device is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
  • the playback instruction comes from a user terminal that can communicate with the video processing device; the video processing device is also configured to: send the decoded video stream to the sending user terminal to The decoded video stream is played back on the display interface of the user terminal; wherein the current playback time displayed on the playback progress bar on the display interface corresponds to the video frame currently being played back.
  • the functions of the video processing device and the functions of the user terminal are integrated into a single device.
  • the embodiment of the present application provides another possible structural schematic diagram of the progress bar time updating device involved in the above-mentioned embodiment.
  • the progress bar time updating device 400 includes: a processor 402, a communication interface 403, and a bus 404.
  • the progress bar time updating device may also include a memory 401.
  • Processor 402 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of this application.
  • the processor 402 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
  • the processor 402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
  • Communication interface 403 is used to connect with other devices through a communication network.
  • the communication network can be Ethernet, wireless access network, wireless local area networks (WLAN), etc.
  • Memory 401 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • a type of dynamic storage device which can also be an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or can be used to carry or store instructions or data structures Without limitation, any other medium in the form of the desired program code and capable of being accessed by a computer.
  • EEPROM electrically erasable programmable read-only memory
  • the memory 401 may exist independently of the processor 402.
  • the memory 401 may be connected to the processor 402 through the bus 404 for storing instructions or program codes.
  • the processor 402 calls and executes the instructions or program codes stored in the memory 401, it can implement the progress bar time updating method provided by the embodiment of the present application.
  • the memory 401 can also be integrated with the processor 402 .
  • Bus 404 may be an extended industry standard architecture (EISA) bus, etc.
  • the bus 404 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only one thick line is used in Figure 14, but it does not mean that there is only one bus or one type of bus.
  • An embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct relevant hardware.
  • the program can be stored in the above computer-readable storage medium. When executed, the program can include the processes of the above method embodiments. .
  • Computer-readable storage media may So the memory of any of the aforementioned embodiments.
  • the computer-readable storage medium may also be an external storage device of the progress bar time update device, such as a plug-in hard disk, a smart media card (SMC), or a secure digital device equipped on the progress bar time update device. digital, SD) card, flash card, etc.
  • the computer-readable storage medium may also include both an internal storage unit and an external storage device of the progress bar time updating device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the progress bar time updating device.
  • the above-mentioned computer-readable storage media can also be used to temporarily store data that has been output or is to be output.
  • An embodiment of the present application also provides a computer program product.
  • the computer product includes a computer program.
  • the computer program product When the computer program product is run on a computer, it causes the computer to execute any of the progress bar time updating methods provided in the above embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

Disclosed in the present application are a video processing device, a progress bar time updating method, an apparatus, and a storage medium. The video processing device is used for: in response to receiving a playback instruction, acquiring a program stream assigned by the playback instruction, the program stream being obtained by performing program stream packaging on an encoded video stream of shot original video data; decoding the program stream to obtain a decoded video stream, the decoded video stream comprising one or more video sequences, and each video sequence comprising a key frame and at least one target frame associated with the key frame; for any target video sequence among the one or more video sequences, determining the absolute time of the target frame on the basis of the absolute time of the key frame and the time interval between the key frame and the target frame, the absolute time being the actual recording time of the video picture corresponding to the video frame; and by means of the absolute time of the key frame and the absolute time of the target frame, determining the current playing time displayed on the playback progress bar when the decoded video stream is played back.

Description

视频处理设备、进度条时间更新方法及装置、电子设备Video processing equipment, progress bar time update method and device, electronic equipment 技术领域Technical field
本申请涉及视频监控技术领域,尤其涉及一种视频处理设备、进度条时间更新方法及装置、电子设备及存储介质。The present application relates to the field of video surveillance technology, and in particular to a video processing device, a progress bar time update method and device, electronic equipment and a storage medium.
背景技术Background technique
在视频监控领域,现有的视频处理设备(例如,数字硬盘录像机、网络硬盘录像机等)除了支持对接入的摄像机进行接入预览、录像存储等功能外,还具有对本地存储的录像进行回放的功能。录像回放界面包括进度条,该进度条用于显示回放的录像文件的长度信息以及回放过程中回放界面显示的当前视频帧的时间信息。In the field of video surveillance, existing video processing equipment (for example, digital hard disk video recorders, network hard disk video recorders, etc.) not only supports access preview and video storage functions for connected cameras, but also has the ability to play back locally stored videos. function. The video playback interface includes a progress bar, which is used to display the length information of the video file played back and the time information of the current video frame displayed on the playback interface during the playback process.
录像文件一般为PS封装格式,在PS封装格式下,只有I帧才可以解析出绝对时间,即,实际录制时间。在录像文件回放的过程中,通常采用I帧的实际录制时间来更新进度条上的时间,但是,对于大部分的视频处理设备而言,默认的帧率为25帧每秒,而在视频流数据中,每两个I帧之间有50个P帧,也就是说,视频处理设备在回放视频流数据的过程中每隔2秒才会出现一个I帧,那么进度条上的时间每隔2秒才会更新一次,更新频率较慢,导致当前回放的视频帧与进度条上的时间不对应。Video files are generally in PS encapsulation format. Under PS encapsulation format, only I frames can parse out the absolute time, that is, the actual recording time. During the playback of video files, the actual recording time of the I frame is usually used to update the time on the progress bar. However, for most video processing equipment, the default frame rate is 25 frames per second, and in the video stream In the data, there are 50 P frames between every two I frames. That is to say, when the video processing device plays back the video stream data, an I frame will appear every 2 seconds, so the time on the progress bar will appear every 2 seconds. It only updates once every 2 seconds, and the update frequency is slow, causing the currently played back video frame to not correspond to the time on the progress bar.
发明内容Contents of the invention
本申请提供一种视频处理设备、进度条时间更新方法、装置及存储介质,能够提高进度条上的时间更新频率。This application provides a video processing device, a progress bar time update method, a device and a storage medium, which can increase the time update frequency on the progress bar.
第一方面,申请提供一种视频处理设备,所述视频处理设备用于,响应于接收到回放指令,获取所述回放指令指定的程序流,其中,所述程序流为通过对所拍摄的原始视频数据的编码视频流进行程序流封装得到;对所述程序流进行解码,以获得解码视频流,其中,所述解码视频流包括一个或更多个视频序列,每个视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;针对所述一个或更多个视频序列的任一目标视频序列,基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述解码视频流被回放时回放进度条上显示的当前播放时间。In a first aspect, the application provides a video processing device. The video processing device is configured to, in response to receiving a playback instruction, obtain a program flow specified by the playback instruction, wherein the program flow is obtained by processing the original shot. The encoded video stream of the video data is obtained by encapsulating the program stream; the program stream is decoded to obtain a decoded video stream, wherein the decoded video stream includes one or more video sequences, each video sequence includes a key frame and At least one target frame associated with the key frame; for any target video sequence of the one or more video sequences, based on the absolute time of the key frame and the time between the key frame and the target frame interval to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video frame corresponding to the video frame; using the absolute time of the key frame and the target frame The absolute time is used to determine the current playback time displayed on the playback progress bar when the decoded video stream is played back.
在一种可能的实现方式中,所述视频处理设备具体用于:获取所述关键帧的时间戳以及所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;根据所述关键帧的时间戳以及所述目标帧的时间戳来确定所述关键帧和所述目标帧之间的时间间隔。In a possible implementation, the video processing device is specifically configured to: obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the relative time of the video frame to the reference time. time offset; determine the time interval between the key frame and the target frame according to the time stamp of the key frame and the time stamp of the target frame.
另一种可能的实现方式中,所述视频处理设备具体用于:在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In another possible implementation, the video processing device is specifically configured to: when the timestamp of the target frame is greater than the timestamp of the key frame, subtract the timestamp of the target frame from the The difference in timestamps of key frames is obtained to determine the time interval.
另一种可能的实现方式中,所述视频处理设备具体用于:获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;计算所述目标帧的帧号减去所述关键帧的帧号获得的帧号差;根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。 In another possible implementation, the video processing device is specifically configured to: obtain the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; calculate the frame number difference obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference The product with the frame interval of the target video sequence determines the time interval between the key frame and the target frame.
另一种可能的实现方式中,所述关键帧为I帧;和/或所述目标帧为辅助帧。In another possible implementation, the key frame is an I frame; and/or the target frame is an auxiliary frame.
另一种可能的实现方式中,所述视频处理设备具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In another possible implementation, the video processing device is specifically configured to determine the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
另一种可能的实现方式中,所述回放指令来自可与所述视频处理设备通信的用户终端;所述视频处理设备还用于:将所述解码视频流发送给发送所述用户终端,以在所述用户终端的显示界面上回放所述解码视频流;其中,所述显示界面上的回放进度条上显示的当前播放时间,与当前正在回放的视频帧相对应。In another possible implementation, the playback instruction comes from a user terminal that can communicate with the video processing device; the video processing device is further configured to: send the decoded video stream to the sending user terminal to The decoded video stream is played back on the display interface of the user terminal; wherein the current playback time displayed on the playback progress bar on the display interface corresponds to the video frame currently being played back.
另一种可能的实现方式中,所述视频处理设备的功能和所述用户终端的功能被集成在单个设备中。In another possible implementation, the functions of the video processing device and the functions of the user terminal are integrated into a single device.
第二方面,申请提供一种进度条时间更新方法,包括:获取目标视频序列,其中,所述目标视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述目标视频序列被回放时回放进度条上显示的当前播放时间。In a second aspect, the application provides a progress bar time update method, including: obtaining a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame; an absolute value based on the key frame time and the time interval between the key frame and the target frame to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame; using the The absolute time of the key frame and the absolute time of the target frame are used to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
另一种可能的实现方式中,所述方法还包括:获取所述关键帧的时间戳和所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;根据所述关键帧的时间戳和所述目标帧的时间戳,确定所述关键帧与所述目标帧之间的时间间隔。In another possible implementation, the method further includes: obtaining the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time offset of the video frame relative to the reference time. Shift; determine the time interval between the key frame and the target frame according to the timestamp of the key frame and the timestamp of the target frame.
另一种可能的实现方式中,所述确定所述关键帧与所述目标帧之间的时间间隔,包括:在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In another possible implementation, determining the time interval between the key frame and the target frame includes: when the timestamp of the target frame is greater than the timestamp of the key frame, based on The time interval is determined by subtracting the time stamp of the key frame from the time stamp of the target frame.
另一种可能的实现方式中,所述方法还包括:获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;通过将所述目标帧的帧号减去所述关键帧的帧号获得帧号差;根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。In another possible implementation, the method further includes: obtaining the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, where the frame interval is used to represent The time interval between two adjacent video frames in the target video sequence; the frame number difference is obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference and the The product of the frame intervals of the target video sequence determines the time interval between the key frame and the target frame.
另一种可能的实现方式中,所述关键帧为I帧;和/或所述目标帧为辅助帧。In another possible implementation, the key frame is an I frame; and/or the target frame is an auxiliary frame.
另一种可能的实现方式中,所述确定所述回放进度条上显示的当前播放时间,包括:根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In another possible implementation, determining the current playback time displayed on the playback progress bar includes: determining the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
第三方面,申请提供一种进度条时间更新装置,包括:获取模块,用于获取目标视频序列,其中,所述目标视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;第一确定模块,用于基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;第二确定模块,用于利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述目标视频序列被回放时回放进度条上显示的当前播放时间。In a third aspect, the application provides a progress bar time updating device, including: an acquisition module, configured to acquire a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame; first Determining module, configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, wherein the absolute time is a video frame the actual recording time of the corresponding video picture; a second determination module, configured to use the absolute time of the key frame and the absolute time of the target frame to determine the playback progress bar when the target video sequence is played back The current playback time displayed on.
另一种可能的实现方式中,所述获取模块,还用于获取所述关键帧的时间戳和所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;所述第一确定模块,还用于根据所述关键帧的时间戳和所述目标帧的时间戳,确定所述关键帧与所述目标帧之间的时间间隔。In another possible implementation, the acquisition module is also used to acquire the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time stamp of the video frame relative to the reference time. Time offset; the first determination module is further configured to determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
另一种可能的实现方式中,所述第一确定模块,具体用于在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获 得的差,来确定所述时间间隔。In another possible implementation, the first determination module is specifically configured to subtract the timestamp of the target frame based on the timestamp of the key frame when the timestamp of the target frame is greater than the timestamp of the key frame. The timestamp of the above key frame is obtained The difference is obtained to determine the time interval.
另一种可能的实现方式中,所述获取模块,还用于获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;所述第一确定模块,具体用于将所述目标帧的帧号减去所述关键帧的帧号获得帧号差,并根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。In another possible implementation, the acquisition module is also used to acquire the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, where the frame interval is represents the time interval between two adjacent video frames in the target video sequence; the first determination module is specifically used to obtain a frame number by subtracting the frame number of the key frame from the frame number of the target frame The time interval between the key frame and the target frame is determined based on the product of the frame number difference and the frame interval of the target video sequence.
另一种可能的实现方式中,所述关键帧为I帧;和/或所述目标帧为辅助帧。In another possible implementation, the key frame is an I frame; and/or the target frame is an auxiliary frame.
另一种可能的实现方式中,所述第二确定模块具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In another possible implementation, the second determination module is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
第四方面,本申请提供一种电子设备,包括:至少一个处理器;至少一个存储器,存储有机器可执行指令;所述至少一个处理器在执行所述机器可执行指令时,实现上述第二方面所提供的任一种进度条时间更新方法。In a fourth aspect, the present application provides an electronic device, including: at least one processor; at least one memory storing machine-executable instructions; when the at least one processor executes the machine-executable instructions, the second aspect is implemented Any progress bar time update method provided by the aspect.
第五方面,本申请提供一种计算机可读存储介质,计算机可读存储介质存储有计算机执行指令,当计算机执行指令在计算机上运行时,使得计算机执行上述第二方面所提供的任一种进度条时间更新方法。In a fifth aspect, this application provides a computer-readable storage medium. The computer-readable storage medium stores computer execution instructions. When the computer execution instructions are run on a computer, the computer is caused to execute any of the progress provided in the second aspect. Article time update method.
本申请中第三方面到第五方面及其各种实现方式的具体描述,可以参考第一方面、第二方面及其各种实现方式中的详细描述。第三方面到第五方面及其各种实现方式的有益效果,可以参考第一方面、第二方面及其各种实现方式的有益效果分析,此处不再赘述。For detailed descriptions of the third to fifth aspects and their various implementations in this application, reference may be made to the detailed descriptions of the first aspect, the second aspect and their various implementations. For the beneficial effects of the third to fifth aspects and their various implementation methods, please refer to the analysis of the beneficial effects of the first aspect, the second aspect and their various implementation methods, and will not be repeated here.
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the following description.
附图说明Description of drawings
图1为本申请实施例提供的一种进度条时间更新方法所涉及的实施环境示意图;Figure 1 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application;
图2为本申请实施例提供的一种进度条时间更新方法所涉及的实施环境示意图;Figure 2 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application;
图3为本申请实施例提供的一种视频序列的示意图;Figure 3 is a schematic diagram of a video sequence provided by an embodiment of the present application;
图4为本申请实施例提供的一种PS包的示意图;Figure 4 is a schematic diagram of a PS package provided by an embodiment of the present application;
图5为本申请实施例提供的一种回放界面的示意图;Figure 5 is a schematic diagram of a playback interface provided by an embodiment of the present application;
图6为本申请实施例提供的一种进度条时间更新方法所涉及的实施环境示意图;Figure 6 is a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application;
图7为本申请实施例提供的一种进度条时间更新方法的流程图;Figure 7 is a flow chart of a progress bar time update method provided by an embodiment of the present application;
图8为本申请实施例提供的一种进度条时间更新方法的流程图;Figure 8 is a flow chart of a progress bar time update method provided by an embodiment of the present application;
图9为本申请实施例提供的一种视频序列的示意图;Figure 9 is a schematic diagram of a video sequence provided by an embodiment of the present application;
图10为本申请实施例提供的一种视频序列的示意图;Figure 10 is a schematic diagram of a video sequence provided by an embodiment of the present application;
图11为本申请实施例提供的一种视频序列的示意图;Figure 11 is a schematic diagram of a video sequence provided by an embodiment of the present application;
图12为本申请实施例提供的一种回放进度条的示意图;Figure 12 is a schematic diagram of a playback progress bar provided by an embodiment of the present application;
图13为本申请实施例提供的一种进度条时间更新装置的结构示意图;Figure 13 is a schematic structural diagram of a progress bar time updating device provided by an embodiment of the present application;
图14为本申请实施例提供的一种进度条时间更新装置的结构示意图。 Figure 14 is a schematic structural diagram of a progress bar time updating device provided by an embodiment of the present application.
具体实施方式Detailed ways
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
本申请的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。The terms “first” and “second” in the description of this application and the drawings are used to distinguish different objects, or to distinguish different processes on the same object, rather than to describe a specific order of objects.
此外,本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选的还包括其他没有列出的步骤或单元,或可选的还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。Furthermore, references to the terms "including" and "having" and any variations thereof in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes other unlisted steps or units, or optionally also includes Includes other steps or units that are inherent to such processes, methods, products, or devices.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.
在本申请的描述中,除非另有说明,“多个”的含义是指两个或两个以上。In the description of this application, unless otherwise stated, the meaning of "plurality" means two or more.
为了便于理解本申请的技术方案,下面先对本申请所涉及的术语进行简单介绍。In order to facilitate understanding of the technical solution of this application, the terminology involved in this application is briefly introduced below.
1、数字视频录像机(digital video recorder,DVR),DVR是一类视频处理设备,与模拟摄像机配套使用。DVR的主要工作模式是接入模拟视音频信号,通过硬盘进行视音频录像。DVR的核心在于硬盘录像,因此DVR也被称作硬盘录像机。1. Digital video recorder (DVR). DVR is a type of video processing equipment used in conjunction with analog cameras. The main working mode of DVR is to access analog video and audio signals and record video and audio through the hard disk. The core of DVR lies in hard disk recording, so DVR is also called hard disk video recorder.
DVR可以整合摄像机、鼠标、遥控器、远程终端设备等组成一套完整的监控系统,实现对音视频信号数据进行长时间录像、远程监视、远程控制、回放、备份的功能。DVR can integrate cameras, mice, remote controls, remote terminal equipment, etc. to form a complete monitoring system, realizing the functions of long-term recording, remote monitoring, remote control, playback, and backup of audio and video signal data.
2、网络硬盘录像机(network video recorder,NVR),NVR是一类视频处理设备,与网络摄像机或视频编码器配套使用,实现对通过网络传送过来的数字视频的记录。2. Network video recorder (NVR). NVR is a type of video processing equipment that is used in conjunction with a network camera or video encoder to record digital video transmitted through the network.
NVR最主要的功能是通过网络接收IPC(网络摄像机)设备传输的数字视频码流,并进行存储、管理,从而实现网络化带来的分布式架构优势。通过NVR,可以同时观看、浏览、回放、管理、存储多个网络摄像机。The main function of NVR is to receive the digital video stream transmitted by IPC (Internet Camera) equipment through the network, and store and manage it, thereby realizing the advantages of distributed architecture brought by networking. Through NVR, you can watch, browse, playback, manage, and store multiple network cameras at the same time.
3、网络摄像机(IP CAMERA,IPC),网络摄像机是一种结合传统摄像机与网络技术所产生的新一代摄像机,它可以将视频影像通过网络传至地球另一端,且远端的浏览者不需用任何专业软件,只要标准的网络浏览器(如Microsoft IE或Netscape)即可监视其视频影像。IPC一般由镜头、图像传感器、声音传感器、信号处理器、A/D转换器、编码芯片、主控芯片、网络及控制接口等部分组成。3. Network camera (IP CAMERA, IPC). Network camera is a new generation of camera that combines traditional cameras and network technology. It can transmit video images to the other side of the earth through the network, and the remote viewer does not need to Its video images can be monitored using any professional software, as long as a standard web browser (such as Microsoft IE or Netscape). IPC generally consists of lens, image sensor, sound sensor, signal processor, A/D converter, encoding chip, main control chip, network and control interface, etc.
4、程序流或节目流(program stream,PS)封装,MPEG2-PS是一种多路复用数字音频、视频等的封装容器。通过对编码器中输出的基本码流进行PS封装,得到PS流;其中,PS流由PS包组成。4. Program stream or program stream (PS) encapsulation. MPEG2-PS is an encapsulation container for multiplexing digital audio, video, etc. The PS stream is obtained by PS encapsulating the basic code stream output from the encoder; the PS stream is composed of PS packets.
5、分组的基本码流(packetized elementary stream,PES),将基本码流ES根据需要分成长度不等的数据包,并将各个数据包加上包头就形成了分组的基本码流。这些具有数据包称为PES分组,是用来传递基本码流的一种数据结构。5. Packetized elementary stream (PES), the basic code stream ES is divided into data packets of different lengths as needed, and each data packet is added with a header to form a grouped basic code stream. These data packets are called PES packets, which are a data structure used to transmit basic code streams.
6、节目流映射(program stream map,PSM),PSM提供了关于节目流中原始流以及它们之间相互关系的描述。PSM是一种PES分组。6. Program stream map (PSM). PSM provides a description of the original streams in the program stream and the relationships between them. PSM is a PES packet.
7、图像组(group of picture,GOP),GOP是一组连续的画面,其包含的帧数可以 被定义。在一些示例中,一个GOP由一张关键帧和数张目标帧组成。目标帧作为辅助帧,需要依赖关键帧的信息来被预测,目标帧的类型不受限制,可以是B帧、P帧等等。7. Group of pictures (GOP). GOP is a group of continuous pictures, and the number of frames it contains can be is defined. In some examples, a GOP consists of a key frame and several target frames. As an auxiliary frame, the target frame needs to rely on the information of the key frame to be predicted. The type of the target frame is not limited and can be B frame, P frame, etc.
在一些示例中,关键帧可以是I帧(即,内部编码帧),目标帧可以是P帧(即,前向预测帧)。举例来说,I帧是一个完整的画面,而P帧记录的是相对于I帧的变化。如果没有I帧,P帧就无法解码。In some examples, the key frame may be an I frame (i.e., intra-coded frame) and the target frame may be a P frame (i.e., forward predicted frame). For example, an I frame is a complete picture, while a P frame records changes relative to the I frame. Without I frames, P frames cannot be decoded.
在H.264或H.265压缩标准中I帧、P帧用于表示传输的视频画面。编码器将多张图像进行编码后生成对应的码流数据,在解码端可以基于关键帧(I帧)来对该码流数据进行GOP的划分。例如,将一个I帧以及从该I帧到下一个I帧之间的P帧作为一个GOP。In the H.264 or H.265 compression standard, I frames and P frames are used to represent transmitted video images. The encoder encodes multiple images and generates corresponding code stream data. At the decoding end, the code stream data can be divided into GOPs based on key frames (I frames). For example, an I frame and P frames between the I frame and the next I frame are regarded as one GOP.
在一些示例中,GOP的大小可以根据关键帧的间隔来设定,其中,当关键帧的间隔设置较短时,GOP的大小更小,而当关键帧的间隔设置较长时,GOP的大小更大。例如,关键帧为I帧,关键帧的间隔为50帧,则一个GOP包括1个I帧跟50个P帧。当在该GOP中再插入一个I帧时,产生的新的GOP可能包括一个I帧和30个P帧。In some examples, the size of the GOP can be set according to the keyframe interval, where when the keyframe interval is set to be shorter, the size of the GOP is smaller, and when the keyframe interval is set to be longer, the size of the GOP is bigger. For example, if the key frame is an I frame and the interval between key frames is 50 frames, then a GOP includes 1 I frame and 50 P frames. When another I frame is inserted into the GOP, the new GOP generated may include one I frame and 30 P frames.
8、视频帧,视频由一幅以上的独立画面组成并呈现连续动态的视觉效果,其中,各个画面也可称为“视频帧”。为了保证连续性和流畅性,视频每秒的帧数是固定的,称为帧率,例如,25帧/s、30帧/s、50帧/s等。8. Video frame. A video consists of more than one independent picture and presents a continuous dynamic visual effect. Each picture can also be called a "video frame". In order to ensure continuity and smoothness, the number of frames per second of the video is fixed, called the frame rate, for example, 25 frames/s, 30 frames/s, 50 frames/s, etc.
9、时间戳,是码流封装中视频帧各自对应的一个时间值,该时间值可以采用相对值的方式或其他方式来表示。在一些示例中,一个相对时间值可以表示相对于基准时间(例如,开机时间点(从0开始))的时间偏移。利用时间戳的主要目的在于,确定视频帧之间的时间变化(也即,帧间隔),因此,在本公开中对时间戳的表示方式以及时间戳的基准时间不进行限定。正常情况下,时间戳的变化趋势是均匀递增的。相邻两个视频帧的时间戳的差值,可表示前一个视频帧的播放时长。9. Timestamp is a time value corresponding to each video frame in the code stream encapsulation. The time value can be represented by a relative value or other methods. In some examples, a relative time value may represent a time offset relative to a base time (eg, a power-on time point (starting from 0)). The main purpose of using timestamps is to determine the time change between video frames (that is, the frame interval). Therefore, the representation method of the timestamp and the reference time of the timestamp are not limited in this disclosure. Under normal circumstances, the changing trend of timestamps is uniformly increasing. The difference between the timestamps of two adjacent video frames can represent the playback duration of the previous video frame.
此外,时间戳具有最大值,当时间戳达到最大值时,将再次从基准时间(例如,0)开始均匀累加。Furthermore, the timestamp has a maximum value, and when the timestamp reaches the maximum value, it will be accumulated evenly starting from the base time (e.g., 0) again.
10、绝对时间,也即系统时间,例如,X年X月X日X时X分X秒,用于表示视频中每一个视频帧生成时的时间。在本申请实施例中,一个视频帧的绝对时间用于表示该视频帧对应的视频画面的实际录制时间。10. Absolute time, that is, system time, for example, X year X month X day X hour X minute X second, is used to represent the time when each video frame in the video is generated. In this embodiment of the present application, the absolute time of a video frame is used to represent the actual recording time of the video picture corresponding to the video frame.
以上是本申请实施例中所涉及到的部分概念的介绍,以下不再赘述。The above is an introduction to some concepts involved in the embodiments of this application, and they will not be described again below.
在视频监控领域,为了使视频数据能够便于传输和存储,通常在视频的发送端(例如,摄像机设备)将视频数据进行编码,将编码后的视频数据发送给视频的接收端(例如,视频处理设备)。视频的接收端在接收到编码后的视频数据后,对编码后的视频流进行PS封装,得到PS流,将PS流存储在硬盘中。在PS封装的过程中,I帧和P帧的时间信息,也会封装在对应的PS包中。其中,I帧的时间信息包括I帧的绝对时间和I帧的时间戳;P帧的时间信息包括P帧的时间戳。In the field of video surveillance, in order to facilitate the transmission and storage of video data, the video data is usually encoded at the sending end of the video (for example, camera equipment), and the encoded video data is sent to the receiving end of the video (for example, video processing equipment). equipment). After receiving the encoded video data, the video receiving end performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in the hard disk. During the PS encapsulation process, the time information of I frames and P frames will also be encapsulated in the corresponding PS packets. The time information of the I frame includes the absolute time of the I frame and the timestamp of the I frame; the time information of the P frame includes the timestamp of the P frame.
在回放的过程中,需要从硬盘中获取待回放的录像视频对应的PS流,进行解码,得到解码后的视频流,并回放该解码后的视频流。现有技术中,通常采用当前回放的视频帧对应的绝对时间来更新回放进度条上的当前播放时间,但是,由于只有I帧具有绝对时间,而P帧没有绝对时间,因此,通常采用I帧的绝对时间来更新回放进度条上的时间。During the playback process, it is necessary to obtain the PS stream corresponding to the recorded video to be played back from the hard disk, decode it, obtain the decoded video stream, and play back the decoded video stream. In the prior art, the absolute time corresponding to the currently played back video frame is usually used to update the current playback time on the playback progress bar. However, since only the I frame has an absolute time and the P frame does not have an absolute time, the I frame is usually used. The absolute time to update the time on the playback progress bar.
这样,每隔一段固定时间(例如,2秒)才会出现一个I帧,那么回放进度条上的时间每隔对应的相同的固定时间(例如,2秒)才会更新一次,更新频率较慢,导致当前回放的视频帧与进度条上的时间不对应。 In this way, an I frame will only appear every fixed time (for example, 2 seconds), and the time on the playback progress bar will only be updated every corresponding fixed time (for example, 2 seconds), and the update frequency is slow. , causing the currently played back video frame to not correspond to the time on the progress bar.
为此,本申请提供一种进度条时间更新方法,其思路在于:在回放的过程中,首先,确定目标视频序列中的关键帧的绝对时间,以及关键帧与目标帧之间的时间间隔,进而,根据关键帧的绝对时间和关键帧与目标帧之间的时间间隔,确定目标帧的绝对时间;最后,根据关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间。如此,相比于现有技术仅根据关键帧的绝对时间来更新回放进度条的当前播放时间的方法,本申请实施例,同时基于关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间,有效提高了回放进度条的更新频率,使得当前回放的视频帧与进度条上的当前播放时间对应。To this end, this application provides a progress bar time update method. The idea is: during the playback process, first, determine the absolute time of the key frame in the target video sequence, and the time interval between the key frame and the target frame, Furthermore, the absolute time of the target frame is determined based on the absolute time of the key frame and the time interval between the key frame and the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame. . In this way, compared with the prior art method of updating the current playback time of the playback progress bar based only on the absolute time of the key frame, the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame. The current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
下面将结合附图对本申请实施例的实施方式进行详细描述。The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参考图1,其示出本申请实施例提供的一种进度条时间更新方法所涉及的实施环境示意图。如图1所示,该实施环境可以包括:摄像设备10、视频处理设备20和终端设备30。Please refer to FIG. 1 , which shows a schematic diagram of the implementation environment involved in a progress bar time update method provided by an embodiment of the present application. As shown in FIG. 1 , the implementation environment may include: a camera device 10 , a video processing device 20 and a terminal device 30 .
摄像设备10用于拍摄视频。The camera device 10 is used to capture video.
示例性的,摄像设备10可以为模拟摄像机或IPC。For example, the camera device 10 may be an analog camera or an IPC.
在一些实施例中,如图2所示,摄像设备10包括视频编码器11,用于接收摄像设备10拍摄的原始的视频数据,采用特定压缩标准(例如,H.264压缩标准),对原始的视频数据进行编码,得到编码后的视频流。In some embodiments, as shown in FIG. 2 , the camera device 10 includes a video encoder 11 for receiving the original video data captured by the camera device 10 and using a specific compression standard (for example, H.264 compression standard) to encode the original video data. Encode the video data to obtain the encoded video stream.
其中,编码后的视频流可以包括一个或更多个视频序列(即,GOP)。每个视频序列包括一个关键帧和至少一个目标帧。如图3所示,I帧为视频序列的第一个视频帧,包括完整的视频画面,可以独立完成编码;至少一个目标帧位于关键帧之后,为向前预测编码帧,目标帧中仅包括相对于在前视频帧(即,前面最靠近该目标帧的关键帧或目标帧)的变化,需要依赖于在前视频帧才能完成编码。The encoded video stream may include one or more video sequences (ie, GOP). Each video sequence includes a key frame and at least one target frame. As shown in Figure 3, the I frame is the first video frame of the video sequence, including the complete video picture, and can be encoded independently; at least one target frame is located after the key frame, which is a forward prediction encoding frame, and the target frame only includes Relative to changes in the previous video frame (ie, the previous key frame or target frame closest to the target frame), encoding needs to be completed relying on the previous video frame.
在一些实施例中,摄像设备10还用于将编码后的视频流发送给视频处理设备20。In some embodiments, the camera device 10 is also used to send the encoded video stream to the video processing device 20 .
视频处理设备20用于接收并存储编码后的视频流。在一些实施例中,视频处理设备20还用于对编码后的视频流进行解码,得到一个或多个视频序列并进行回放。The video processing device 20 is configured to receive and store the encoded video stream. In some embodiments, the video processing device 20 is also used to decode the encoded video stream to obtain one or more video sequences and play them back.
示例性的,视频处理设备20可以为数字视频录像机(DVR)设备,或者网络硬盘录像机(NVR)设备。For example, the video processing device 20 may be a digital video recorder (DVR) device or a network hard disk recorder (NVR) device.
在一些实施例中,视频处理设备20在接收到编码后的视频流后,对编码后的视频流进行PS封装,得到PS流,并将PS流存储在存储区域(例如,本地的硬盘或与视频处理设备20可通信的其他设备)中。In some embodiments, after receiving the encoded video stream, the video processing device 20 performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in a storage area (for example, a local hard disk or a other devices with which video processing device 20 can communicate).
在PS封装的过程中,视频处理设备20确定编码后的视频流中每一个视频帧(包括关键帧和目标帧)对应的时间信息,并将每一个视频帧对应的时间信息封装在相应的PS包中。示例性的,I帧对应的时间信息包括I帧的绝对时间和I帧的时间戳;P帧对应的时间信息包括P帧的时间戳。During the PS encapsulation process, the video processing device 20 determines the time information corresponding to each video frame (including key frames and target frames) in the encoded video stream, and encapsulates the time information corresponding to each video frame in the corresponding PS. in the bag. For example, the time information corresponding to the I frame includes the absolute time of the I frame and the timestamp of the I frame; the time information corresponding to the P frame includes the timestamp of the P frame.
其中,PS流由多个PS GOP构成;一个PS GOP由一个或更多个PS包组成,每个PS包对应相应GOP中的一个或更多个视频帧的信息。示例性的,PS包的结构如图4所示,其中,PS GOP中的第一个PS包(也即,I帧对应的PS包)的结构可以如图4中的(a)所示,PS GOP中的其他PS包(也即,P帧对应的PS包)的结构可以如图4中的(b)所示。Among them, the PS stream consists of multiple PS GOPs; a PS GOP consists of one or more PS packets, and each PS packet corresponds to the information of one or more video frames in the corresponding GOP. Exemplarily, the structure of the PS packet is shown in Figure 4, where the structure of the first PS packet in the PS GOP (that is, the PS packet corresponding to the I frame) can be as shown in (a) of Figure 4, The structure of other PS packets in the PS GOP (that is, the PS packet corresponding to the P frame) can be shown in (b) of Figure 4.
其中,PSH为PS包的包头,主要包含所述PS包对应的视频帧的时间戳。PES为编码后的视频流的基本流,也即,对编码后的视频流进行分组,得到一个或多个PES。PSM 是一种特殊的PES,PSM用于放置该视频帧(即,I帧)对应的绝对时间。PSM仅出现在I帧中,也即,仅有I帧具有绝对时间,P帧没有绝对时间。Wherein, PSH is the header of the PS packet, which mainly includes the timestamp of the video frame corresponding to the PS packet. PES is the basic stream of the encoded video stream, that is, the encoded video stream is grouped to obtain one or more PES. PSM Is a special PES, PSM is used to place the absolute time corresponding to the video frame (ie, I frame). PSM only appears in I frames, that is, only I frames have absolute time, and P frames do not have absolute time.
在一些实施例中,在接收到回放指令后,视频处理设备20还用于从存储区域中获取该回放指令对应的PS流,并对该PS流进行解码,得到解码后的视频流。示例性的,上述回放指令可以由终端设备30发出。In some embodiments, after receiving the playback instruction, the video processing device 20 is also configured to obtain the PS stream corresponding to the playback instruction from the storage area, and decode the PS stream to obtain a decoded video stream. For example, the above playback instruction may be issued by the terminal device 30 .
在一些实施例中,如图2所示,视频处理设备20包括视频解码器21,用于采用特定压缩标准(例如,H.264压缩标准),对PS流进行解码,得到解码后的视频流。In some embodiments, as shown in Figure 2, the video processing device 20 includes a video decoder 21 for decoding the PS stream using a specific compression standard (for example, H.264 compression standard) to obtain a decoded video stream. .
在一些实施例中,解码后的视频流包括一个或多个视频序列,每个视频序列由一个关键帧和至少一个目标帧组成。In some embodiments, the decoded video stream includes one or more video sequences, each video sequence consisting of a key frame and at least one target frame.
在一些实施例中,在视频解码器解码的过程中,可以解析出视频序列中的关键帧的时间信息和目标帧的时间信息以及关键帧的帧号和目标帧的帧号。这里,帧号是指每一个视频帧的序号。示例性的,关键帧的帧号是指关键帧的序号,例如,F0或1;目标帧的帧号是指目标帧的序号,例如,F1或2。In some embodiments, during the decoding process of the video decoder, the time information of the key frame and the time information of the target frame in the video sequence can be parsed, as well as the frame number of the key frame and the frame number of the target frame. Here, the frame number refers to the sequence number of each video frame. For example, the frame number of the key frame refers to the sequence number of the key frame, for example, F0 or 1; the frame number of the target frame refers to the sequence number of the target frame, for example, F1 or 2.
在一些实施例中,视频处理设备20还用于将解码后的视频流发送给终端设备30。In some embodiments, the video processing device 20 is also used to send the decoded video stream to the terminal device 30 .
终端设备30用于播放解码后的视频流。The terminal device 30 is used to play the decoded video stream.
在一些实施例中,如图5所示,终端设备30包括显示屏,该显示屏的回放界面包括第一区域和第二区域,并且第一区域小于第二区域;其中,第一区域用于显示解码后的视频流的视频画面(视频帧),第二区域包括回放进度条,该回放进度条用于反映第一区域中显示的视频画面(视频帧)对应的时间信息。In some embodiments, as shown in FIG. 5 , the terminal device 30 includes a display screen, the playback interface of the display screen includes a first area and a second area, and the first area is smaller than the second area; wherein, the first area is used for The video pictures (video frames) of the decoded video stream are displayed, and the second area includes a playback progress bar. The playback progress bar is used to reflect the time information corresponding to the video pictures (video frames) displayed in the first area.
在一些实施例中,终端设备30还用于获取视频序列中的每一个视频帧的时间信息,根据每一个视频帧的时间信息来更新回放进度条的当前播放时间。In some embodiments, the terminal device 30 is also configured to obtain the time information of each video frame in the video sequence, and update the current playback time of the playback progress bar according to the time information of each video frame.
示例性的,终端设备30可以为具有播放功能的电子设备,例如可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等。本公开对该终端设备30的具体形态不作特殊限制。For example, the terminal device 30 may be an electronic device with a playback function, such as a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, or an ultra-mobile personal computer (UMPC). , netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR)/virtual reality (VR) devices, etc. This disclosure does not place any special restrictions on the specific form of the terminal device 30 .
可选地,图1中的视频处理设备20和终端设备30可以是两个单独的设备,或者,视频处理设备20和终端设备30为同一设备,即,视频处理设备20或对应的功能以及终端设备30或对应的功能可以集成在同一个设备上。Optionally, the video processing device 20 and the terminal device 30 in FIG. 1 may be two separate devices, or the video processing device 20 and the terminal device 30 may be the same device, that is, the video processing device 20 or the corresponding function and the terminal. Device 30 or corresponding functions can be integrated on the same device.
摄像设备10和视频处理设备20之间可以进行通信,视频处理设备20和终端设备30之间可以进行通信,例如,视频处理设备20可以从摄像设备10接收编码后的视频流,终端设备30可从视频处理设备20接收解码后的视频流。在一个示例中,摄像设备10和视频处理设备20之间以及视频处理设备20和终端设备30之间可以包括一个或多个通信媒体,该一个或多个通信媒体可包括路由器、交换器或基站等设备。The camera device 10 and the video processing device 20 can communicate, and the video processing device 20 and the terminal device 30 can communicate. For example, the video processing device 20 can receive an encoded video stream from the camera device 10, and the terminal device 30 can The decoded video stream is received from video processing device 20. In one example, one or more communication media may be included between the camera device 10 and the video processing device 20 and between the video processing device 20 and the terminal device 30 , and the one or more communication media may include a router, a switch or a base station. and other equipment.
具体的,如图6所示,视频处理设备20接收摄像设备10发送的编码后的视频流,对编码后的视频流进行PS封装,得到PS流,并将该PS流存储在存储区域中。当用户需要查看某一时间段的视频录像时,可以通过终端设备30向视频处理设备20发送回放指令;在视频处理设备20接收到回放指令时,从存储区域中获取待回放视频录像对应的PS流,对该PS流进行解码,得到解码后的视频流;视频处理设备20将解码后的视频流发送给终端设备30;终端设备30显示该解码后的视频流,并根据该解码后的视频流对应的时间,更新回放进度条上的当前播放时间。 Specifically, as shown in FIG. 6 , the video processing device 20 receives the encoded video stream sent by the camera device 10 , performs PS encapsulation on the encoded video stream to obtain the PS stream, and stores the PS stream in the storage area. When the user needs to view the video recording of a certain period of time, the user can send a playback instruction to the video processing device 20 through the terminal device 30; when the video processing device 20 receives the playback instruction, the PS corresponding to the video recording to be played back is obtained from the storage area. stream, decode the PS stream to obtain the decoded video stream; the video processing device 20 sends the decoded video stream to the terminal device 30; the terminal device 30 displays the decoded video stream, and based on the decoded video The time corresponding to the stream updates the current playback time on the playback progress bar.
下面对本申请实施例提供的一种进度条时间更新方法进行具体介绍。The following is a detailed introduction to a progress bar time updating method provided by the embodiment of the present application.
本申请实施例提供的进度条时间更新方法可以由图1中所示的视频处理设备来执行。如图7所示,该方法包括以下步骤:The progress bar time updating method provided by the embodiment of the present application can be executed by the video processing device shown in Figure 1. As shown in Figure 7, the method includes the following steps:
S101、获取目标视频序列。S101. Obtain the target video sequence.
其中,目标视频序列包括关键帧和与关键帧关联的至少一个目标帧。关键帧是目标视频序列中的第一个帧,至少一个目标帧在关键帧之后。关键帧和目标帧均用于表示视频画面。Wherein, the target video sequence includes key frames and at least one target frame associated with the key frames. A keyframe is the first frame in the target video sequence, and at least one target frame follows the keyframe. Both key frames and target frames are used to represent video frames.
在一些实施例中,上述目标视频序列是待回放的录像视频中的任意一个视频序列。示例性的,若待回放的录像视频包括3个视频序列,分别为视频序列A、视频序列B和视频序列C,则视频处理设备通过解码该录像视频对应的PS流,获取视频序列A、视频序列B和视频序列C。In some embodiments, the target video sequence is any video sequence in the recorded videos to be played back. For example, if the recorded video to be played back includes three video sequences, namely video sequence A, video sequence B, and video sequence C, the video processing device obtains video sequence A, video sequence A, and video sequence C by decoding the PS stream corresponding to the recorded video. Sequence B and video sequence C.
可以理解的是,为了方便存储,在接收到视频编码器输出的编码后的视频流之后,视频处理设备对编码后的视频流进行PS封装,生成PS流,存储在存储区域中。进而,在回放的过程中,需要从硬盘中获取待回放录像视频的PS流,并将该PS流解码成一个或多个视频序列的形式。It can be understood that, in order to facilitate storage, after receiving the encoded video stream output by the video encoder, the video processing device performs PS encapsulation on the encoded video stream to generate a PS stream and store it in the storage area. Furthermore, during the playback process, it is necessary to obtain the PS stream of the recorded video to be played back from the hard disk, and decode the PS stream into the form of one or more video sequences.
S102、基于关键帧的绝对时间,关键帧与目标帧之间的时间间隔,确定目标帧的绝对时间。S102. Based on the absolute time of the key frame and the time interval between the key frame and the target frame, determine the absolute time of the target frame.
其中,目标帧的绝对时间为目标帧所对应的视频画面的实际拍摄时间。The absolute time of the target frame is the actual shooting time of the video picture corresponding to the target frame.
在一些实施例中,根据关键帧的绝对时间和关键帧与目标帧之间的时间间隔的和,确定目标帧的绝对时间。示例性的,若关键帧的绝对时间为G0,关键帧与目标帧之间的时间间隔为T1-T0,则目标帧的绝对时间满足:G0+(T1-T0)。又一示例性的,若关键帧的绝对时间为G0,关键帧与目标帧之间的时间间隔为(F1-F0)*D,则目标帧的绝对时间满足:G0+(F1-F0)*D。In some embodiments, the absolute time of the target frame is determined based on the sum of the absolute time of the key frame and the time interval between the key frame and the target frame. For example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is T1-T0, then the absolute time of the target frame satisfies: G0+(T1-T0). As another example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is (F1-F0)*D, then the absolute time of the target frame satisfies: G0+(F1-F0)*D .
例如,若关键帧的绝对时间为12时0分0秒,关键帧与目标帧之间的时间间隔为1秒,则目标帧的绝对时间为:12时0分0秒+1秒=12时0分1秒。For example, if the absolute time of the key frame is 12 hours, 0 minutes and 0 seconds, and the time interval between the key frame and the target frame is 1 second, then the absolute time of the target frame is: 12 hours, 0 minutes, 0 seconds + 1 second = 12 hours 0 minutes and 1 second.
S103、基于关键帧的绝对时间和目标帧的绝对时间,来确定所述目标视频序列被回放时回放进度条上显示的当前播放时间。S103. Based on the absolute time of the key frame and the absolute time of the target frame, determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
在一些实施例中,关键帧可以为I帧;和/或,目标帧可以为辅助帧。In some embodiments, the key frame may be an I frame; and/or the target frame may be an auxiliary frame.
在一些实施例中,如图12所示,回放进度条用于显示目标视频序列所在的视频录像文件的长度信息,以及当前回放视频帧对应的时间信息。In some embodiments, as shown in Figure 12, the playback progress bar is used to display the length information of the video recording file where the target video sequence is located, and the time information corresponding to the currently played back video frame.
在一些实施例种,视频处理设备向终端设备发送关键帧对应的视频画面,以使得终端设备的显示屏上播放关键帧对应的视频画面,同时,视频处理设备采用关键帧的绝对时间更新回放进度条的当前播放时间。视频处理设备向终端设备发送目标帧对应的视频画面,以使得终端设备的显示屏上播放目标帧对应的视频画面,同时,视频处理设备采用目标帧的绝对时间更新回放进度条的当前播放时间。In some embodiments, the video processing device sends the video image corresponding to the key frame to the terminal device, so that the video image corresponding to the key frame is played on the display screen of the terminal device. At the same time, the video processing device uses the absolute time of the key frame to update the playback progress. The current playback time of the bar. The video processing device sends the video image corresponding to the target frame to the terminal device, so that the video image corresponding to the target frame is played on the display screen of the terminal device. At the same time, the video processing device uses the absolute time of the target frame to update the current playback time of the playback progress bar.
在一些实施例中,确定所述回放进度条上显示的当前播放时间,包括:根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In some embodiments, determining the current playback time displayed on the playback progress bar includes: determining the current playback time displayed on the playback progress bar based on the minimum time unit of the playback progress bar.
在一些实施例中,在回放进度条上最小的时间单位为秒的情况下,基于关键帧的绝对时间和目标帧的绝对时间,将回放进度条的当前播放时间更新到秒。示例性的,若目标帧的绝对时间为12点01分200毫秒,则更新后的回放进度条的当前播放时间为12点01分。 In some embodiments, when the smallest time unit on the playback progress bar is seconds, the current playback time of the playback progress bar is updated to seconds based on the absolute time of the key frame and the absolute time of the target frame. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes.
在一些实施例中,在回放进度条上的最小时间单位为毫秒的情况下,基于关键帧的绝对时间和目标帧的绝对时间,将回放进度条的当前播放时间更新到毫秒。如此,可以提高进度条时间更新频率,并使得进度条上的时间更精准。示例性的,若目标帧的绝对时间为12点01分200毫秒,则更新后的回放进度条的当前播放时间为12点01分200毫秒。In some embodiments, when the minimum time unit on the playback progress bar is milliseconds, the current playback time of the playback progress bar is updated to milliseconds based on the absolute time of the key frame and the absolute time of the target frame. In this way, the frequency of time update of the progress bar can be increased and the time on the progress bar can be made more accurate. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes and 200 milliseconds.
可以理解的是,本申请实施例提供的技术方案,首先确定目标视频序列中的关键帧的绝对时间,以及关键帧与目标帧之间的时间间隔,进而,根据关键帧的绝对时间和关键帧与目标帧之间的时间间隔,确定目标帧的绝对时间;最后,根据关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间。如此,相比于现有技术仅根据关键帧的绝对时间来更新回放进度条的当前播放时间的方法,本申请实施例同时基于关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间,有效提高了回放进度条的更新频率,使得当前回放的视频帧与进度条上的当前播放时间对应。It can be understood that the technical solution provided by the embodiment of the present application first determines the absolute time of the key frame in the target video sequence and the time interval between the key frame and the target frame, and then, based on the absolute time of the key frame and the key frame The time interval between the key frame and the target frame determines the absolute time of the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame. In this way, compared with the prior art method of updating the current playback time of the playback progress bar based only on the absolute time of the key frame, the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame. The current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
本申请实施例提供的进度条时间更新方法可以由图1中所示的视频处理设备来执行。如图8所示,该方法包括以下步骤:The progress bar time updating method provided by the embodiment of the present application can be executed by the video processing device shown in Figure 1. As shown in Figure 8, the method includes the following steps:
S201、获取目标视频序列。S201. Obtain the target video sequence.
其中,目标视频序列包括关键帧和与关键帧关联的至少一个目标帧。关键帧是目标视频序列中的第一个帧,至少一个目标帧在关键帧之后。关键帧和目标帧均用于表示视频画面。Wherein, the target video sequence includes key frames and at least one target frame associated with the key frames. A keyframe is the first frame in the target video sequence, and at least one target frame follows the keyframe. Both key frames and target frames are used to represent video frames.
在一些实施例中,上述目标视频序列是待回放的录像视频中的任意一个视频序列。示例性的,若待回放的录像视频包括3个视频序列,分别为视频序列A、视频序列B和视频序列C,则视频处理设备通过解码该录像视频对应的PS流,获取视频序列A、视频序列B和视频序列C。In some embodiments, the target video sequence is any video sequence in the recorded videos to be played back. For example, if the recorded video to be played back includes three video sequences, namely video sequence A, video sequence B, and video sequence C, the video processing device obtains video sequence A, video sequence A, and video sequence C by decoding the PS stream corresponding to the recorded video. Sequence B and video sequence C.
可以理解的是,为了方便存储,在接收到视频编码器输出的编码后的视频流之后,视频处理设备对编码后的视频流进行PS封装,生成PS流,存储在存储区域中。进而,在回放的过程中,需要从硬盘中获取待回放录像视频的PS流,并将该PS流解码成一个或多个视频序列的形式。It can be understood that, in order to facilitate storage, after receiving the encoded video stream output by the video encoder, the video processing device performs PS encapsulation on the encoded video stream to generate a PS stream and store it in the storage area. Furthermore, during the playback process, it is necessary to obtain the PS stream of the recorded video to be played back from the hard disk, and decode the PS stream into the form of one or more video sequences.
S202、确定关键帧的绝对时间和关键帧与目标帧之间的时间间隔。S202. Determine the absolute time of the key frame and the time interval between the key frame and the target frame.
其中,关键帧的绝对时间为关键帧所对应的视频画面的实际录制时间。示例性的,若关键帧所对应的视频画面为2022年5月17日12时0分0秒拍摄的,则关键帧的绝对时间为2022年5月17日12时0分0秒。Among them, the absolute time of the key frame is the actual recording time of the video picture corresponding to the key frame. For example, if the video picture corresponding to the key frame was shot at 12:00:0 on May 17, 2022, then the absolute time of the key frame is 12:0:0 on May 17, 2022.
在一些实施例中,目标帧为至少一个目标帧中的任意一个目标帧。In some embodiments, the target frame is any one of the at least one target frame.
在一些实施例中,关键帧与目标帧之间的时间间隔指的是关键帧与目标帧之间相差的时间。本申请实施例提供了以下两种方式,用于确定关键帧与目标帧之间的时间间隔。In some embodiments, the time interval between the key frame and the target frame refers to the time difference between the key frame and the target frame. The embodiment of the present application provides the following two methods for determining the time interval between the key frame and the target frame.
方式一、基于时间戳确定关键帧与目标帧之间的时间间隔Method 1: Determine the time interval between the key frame and the target frame based on the timestamp
步骤1、获取关键帧的时间戳和目标帧的时间戳。Step 1. Get the timestamp of the key frame and the timestamp of the target frame.
其中,关键帧的时间戳用于表示关键帧相较于基准时间的时间偏移;目标帧的时间戳用于表示目标帧相较于基准时间的时间偏移。通常,基准时间是固定不变的(基准时间可以是开机时间点(例如,0),也可以是任意设置的某一时间点(例如,5ms、10ms、20ms等),本申请实施例对基准时间的值不作具体限定),因此,相对于基准时间的时间偏移,能够唯一的表征该视频帧的实际录制时间,也即,每一个视频帧的时间戳能够唯一的表征该视频帧的实际录制时间。示例性的,关键帧的时间戳为40ms,第一个 目标帧的时间戳80ms,第二个目标帧的时间戳为120ms,依次均匀累加,直至时间戳达到最大值。Among them, the timestamp of the key frame is used to represent the time offset of the key frame compared to the base time; the timestamp of the target frame is used to represent the time offset of the target frame compared to the base time. Usually, the reference time is fixed (the reference time can be the power-on time point (for example, 0), or it can be an arbitrarily set time point (for example, 5ms, 10ms, 20ms, etc.). The embodiment of the present application does not change the reference time. The value of time is not specifically limited), therefore, the time offset relative to the reference time can uniquely characterize the actual recording time of the video frame, that is, the timestamp of each video frame can uniquely characterize the actual recording time of the video frame. Recording time. For example, the timestamp of the key frame is 40ms, the first The timestamp of the target frame is 80ms, and the timestamp of the second target frame is 120ms, which are accumulated evenly until the timestamp reaches the maximum value.
在一些实施例中,视频处理设备通过解析关键帧对应的PS包得到关键帧的时间戳;视频处理设备通过解析目标帧对应的PS包得到目标帧的时间戳。In some embodiments, the video processing device obtains the timestamp of the key frame by parsing the PS packet corresponding to the key frame; the video processing device obtains the timestamp of the target frame by parsing the PS packet corresponding to the target frame.
步骤2、根据关键帧的时间戳和目标帧的时间戳,确定关键帧与目标帧之间的时间间隔。Step 2: Determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
在一些实施例中,根据目标帧的时间戳与关键帧的时间戳之间的差值,确定关键帧与目标帧之间的时间间隔。示例性的,若目标帧的时间戳为T1,关键帧的时间戳为T0,则关键帧与目标帧之间的时间间隔满足:T1-T0。In some embodiments, the time interval between the key frame and the target frame is determined based on the difference between the timestamp of the target frame and the timestamp of the key frame. For example, if the timestamp of the target frame is T1 and the timestamp of the key frame is T0, then the time interval between the key frame and the target frame satisfies: T1-T0.
示例性的,如图9所示,若关键帧的时间戳为40ms,目标帧的时间戳为120ms。则关键帧与目标帧之间的时间间隔为:120ms-40ms=80ms。For example, as shown in Figure 9, if the timestamp of the key frame is 40ms, the timestamp of the target frame is 120ms. Then the time interval between the key frame and the target frame is: 120ms-40ms=80ms.
在一些实施例中,上述步骤2可以实现为:在目标帧的时间戳大于关键帧的时间戳的情况下,根据关键帧的时间戳和目标帧的时间戳,确定关键帧与目标帧之间的时间间隔。In some embodiments, the above step 2 can be implemented as: when the timestamp of the target frame is greater than the timestamp of the key frame, determine the distance between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame. time interval.
可以理解的是,在一个视频序列中,关键帧在前,目标帧在后,且时间戳是从前往后依次递增的,因此目标帧的时间戳应当大于关键帧的时间戳。但是,时间戳具有最大值,当时间戳达到最大值时,将从0开始继续累加,那么此时,可能会出现目标帧的时间戳小于关键帧的时间戳的情况(也即,发生了时间戳溢出),在这种情况下,根据关键帧的时间戳和目标帧的时间戳来确定关键帧与目标帧之间的时间间隔,可能会出现错误。示例性的,如图10所示,若时间戳的最大值为200ms,关键帧的时间戳为160ms,目标帧的时间戳为40ms,此时,目标帧的时间戳小于关键帧的时间戳,若根据目标帧的时间戳与关键帧的时间戳之间的差值,得到的关键帧与目标帧之间的时间间隔为:40ms-160ms=-120ms,显然这个结果是不正确的,因此,在时间戳溢出的情况下,无法根据时间戳来确定关键帧与目标帧之间的时间间隔。It can be understood that in a video sequence, the key frame comes first and the target frame follows, and the timestamps increase from front to back, so the timestamp of the target frame should be greater than the timestamp of the key frame. However, the timestamp has a maximum value. When the timestamp reaches the maximum value, it will continue to accumulate from 0. At this time, there may be a situation where the timestamp of the target frame is smaller than the timestamp of the key frame (that is, when the time stamp occurs Stamp overflow), in which case errors may occur when determining the time interval between the keyframe and the target frame based on the timestamp of the keyframe and the timestamp of the target frame. For example, as shown in Figure 10, if the maximum value of the timestamp is 200ms, the timestamp of the key frame is 160ms, and the timestamp of the target frame is 40ms, at this time, the timestamp of the target frame is smaller than the timestamp of the key frame, If based on the difference between the timestamp of the target frame and the timestamp of the key frame, the time interval between the key frame and the target frame is: 40ms-160ms=-120ms. Obviously this result is incorrect. Therefore, In the case of timestamp overflow, the time interval between the key frame and the target frame cannot be determined based on the timestamp.
因此,方式一提供的方法,优选适用于在目标帧的时间戳大于关键帧的时间戳的情况。Therefore, the method provided in the first mode is preferably applicable to the situation where the timestamp of the target frame is greater than the timestamp of the key frame.
方式二、基于帧号确定关键帧与目标帧之间的时间间隔Method 2: Determine the time interval between the key frame and the target frame based on the frame number
步骤1、获取关键帧的帧号、目标帧的帧号和目标视频序列的帧间隔。Step 1. Obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence.
其中,目标视频序列的帧间隔用于表示目标视频序列中,相邻两个视频帧之间的时间间隔。The frame interval of the target video sequence is used to represent the time interval between two adjacent video frames in the target video sequence.
在一些实施例中,视频处理设备通过解析关键帧对应的PS包得到关键帧的帧号;视频处理设备通过解析目标帧对应的PS包得到目标帧的帧号。In some embodiments, the video processing device obtains the frame number of the key frame by parsing the PS packet corresponding to the key frame; the video processing device obtains the frame number of the target frame by parsing the PS packet corresponding to the target frame.
步骤2、根据关键帧的帧号、目标帧的帧号和目标视频序列的帧间隔,确定关键帧与目标帧之间的时间间隔。Step 2: Determine the time interval between the key frame and the target frame based on the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence.
在一些实施例中,根据目标帧的帧号与关键帧的帧号之间的帧号差,与目标视频序列的帧间隔的积,确定关键帧与目标帧之间的时间间隔。示例性的,若目标帧的帧号为F1,关键帧的帧号为F0,目标视频序列的帧间隔为D,则关键帧与目标帧之间的时间间隔满足:(F1-F0)*D。In some embodiments, the time interval between the key frame and the target frame is determined based on the product of the frame number difference between the frame number of the target frame and the frame number of the key frame and the frame interval of the target video sequence. For example, if the frame number of the target frame is F1, the frame number of the key frame is F0, and the frame interval of the target video sequence is D, then the time interval between the key frame and the target frame satisfies: (F1-F0)*D .
示例性的,如图11所示,若关键帧的帧号为1,目标帧的帧号为6,目标视频序列的帧间隔为40ms,则关键帧与目标帧之间的时间间隔为:(6-1)*40ms=200ms。For example, as shown in Figure 11, if the frame number of the key frame is 1, the frame number of the target frame is 6, and the frame interval of the target video sequence is 40ms, then the time interval between the key frame and the target frame is: ( 6-1)*40ms=200ms.
可以理解的是,基于关键帧的帧号与目标帧的帧号之间的帧号差,以及目标视频序 列的帧时间间隔来确定关键帧与目标帧之间的时间间隔,不会出现时间戳溢出的情况,能够准确的确定关键帧与目标帧之间的时间间隔。It can be understood that based on the frame number difference between the frame number of the key frame and the frame number of the target frame, as well as the target video sequence The frame time interval of the column is used to determine the time interval between the key frame and the target frame. Timestamp overflow will not occur and the time interval between the key frame and the target frame can be accurately determined.
S203、基于关键帧的绝对时间,关键帧与目标帧之间的时间间隔,确定目标帧的绝对时间。S203. Based on the absolute time of the key frame and the time interval between the key frame and the target frame, determine the absolute time of the target frame.
其中,目标帧的绝对时间为目标帧所对应的视频画面的实际拍摄时间。The absolute time of the target frame is the actual shooting time of the video picture corresponding to the target frame.
在一些实施例中,根据关键帧的绝对时间和关键帧与目标帧之间的时间间隔的和,确定目标帧的绝对时间。示例性的,若关键帧的绝对时间为G0,关键帧与目标帧之间的时间间隔为T1-T0,则目标帧的绝对时间满足:G0+(T1-T0)。又一示例性的,若关键帧的绝对时间为G0,关键帧与目标帧之间的时间间隔为(F1-F0)*D,则目标帧的绝对时间满足:G0+(F1-F0)*D。In some embodiments, the absolute time of the target frame is determined based on the sum of the absolute time of the key frame and the time interval between the key frame and the target frame. For example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is T1-T0, then the absolute time of the target frame satisfies: G0+(T1-T0). As another example, if the absolute time of the key frame is G0 and the time interval between the key frame and the target frame is (F1-F0)*D, then the absolute time of the target frame satisfies: G0+(F1-F0)*D .
例如,若关键帧的绝对时间为12时0分0秒,关键帧与目标帧之间的时间间隔为1秒,则目标帧的绝对时间为:12时0分0秒+1秒=12时0分1秒。For example, if the absolute time of the key frame is 12 hours, 0 minutes and 0 seconds, and the time interval between the key frame and the target frame is 1 second, then the absolute time of the target frame is: 12 hours, 0 minutes, 0 seconds + 1 second = 12 hours 0 minutes and 1 second.
S204、基于关键帧的绝对时间和目标帧的绝对时间,更新回放进度条的当前播放时间。S204. Based on the absolute time of the key frame and the absolute time of the target frame, update the current playback time of the playback progress bar.
在一些实施例中,如图12所示,回放进度条用于显示目标视频序列所在的视频录像文件的长度信息,以及当前回放视频帧对应的时间信息。In some embodiments, as shown in Figure 12, the playback progress bar is used to display the length information of the video recording file where the target video sequence is located, and the time information corresponding to the currently played back video frame.
在一些实施例种,视频处理设备向终端设备发送关键帧对应的视频画面,以使得终端设备的显示屏上播放关键帧对应的视频画面,同时,视频处理设备采用关键帧的绝对时间更新回放进度条的当前播放时间。视频处理设备向终端设备发送目标帧对应的视频画面,以使得终端设备的显示屏上播放目标帧对应的视频画面,同时,视频处理设备采用目标帧的绝对时间更新回放进度条的当前播放时间。In some embodiments, the video processing device sends the video image corresponding to the key frame to the terminal device, so that the video image corresponding to the key frame is played on the display screen of the terminal device. At the same time, the video processing device uses the absolute time of the key frame to update the playback progress. The current playback time of the bar. The video processing device sends the video image corresponding to the target frame to the terminal device, so that the video image corresponding to the target frame is played on the display screen of the terminal device. At the same time, the video processing device uses the absolute time of the target frame to update the current playback time of the playback progress bar.
在一些实施例中,在回放进度条上最小的时间单位为秒的情况下,基于关键帧的绝对时间和目标帧的绝对时间,将回放进度条的当前播放时间更新到秒。示例性的,若目标帧的绝对时间为12点01分200毫秒,则更新后的回放进度条的当前播放时间为12点01分。In some embodiments, when the smallest time unit on the playback progress bar is seconds, the current playback time of the playback progress bar is updated to seconds based on the absolute time of the key frame and the absolute time of the target frame. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes.
在一些实施例中,在回放进度条上的最小时间单位为毫秒的情况下,基于关键帧的绝对时间和目标帧的绝对时间,将回放进度条的当前播放时间更新到毫秒。如此,可以提高进度条时间更新频率,并使得进度条上的时间更精准。示例性的,若目标帧的绝对时间为12点01分200毫秒,则更新后的回放进度条的当前播放时间为12点01分200毫秒。In some embodiments, when the minimum time unit on the playback progress bar is milliseconds, the current playback time of the playback progress bar is updated to milliseconds based on the absolute time of the key frame and the absolute time of the target frame. In this way, the frequency of time update of the progress bar can be increased and the time on the progress bar can be made more accurate. For example, if the absolute time of the target frame is 12:01 minutes and 200 milliseconds, the current playback time of the updated playback progress bar is 12:01 minutes and 200 milliseconds.
可以理解的是,本申请实施例提供的技术方案,首先确定目标视频序列中的关键帧的绝对时间,以及关键帧与目标帧之间的时间间隔,进而,根据关键帧的绝对时间和关键帧与目标帧之间的时间间隔,确定目标帧的绝对时间;最后,根据关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间。如此,相比于现有技术仅根据关键帧的绝对时间来更新回放进度条的当前播放时间的方法,本申请实施例同时基于关键帧的绝对时间和目标帧的绝对时间来更新回放进度条的当前播放时间,有效提高了回放进度条的更新频率,使得当前回放的视频帧与进度条上的当前播放时间对应。It can be understood that the technical solution provided by the embodiment of the present application first determines the absolute time of the key frame in the target video sequence and the time interval between the key frame and the target frame, and then, based on the absolute time of the key frame and the key frame The time interval between the key frame and the target frame determines the absolute time of the target frame; finally, the current playback time of the playback progress bar is updated based on the absolute time of the key frame and the absolute time of the target frame. In this way, compared with the prior art method of updating the current playback time of the playback progress bar based only on the absolute time of the key frame, the embodiment of the present application simultaneously updates the playback progress bar based on the absolute time of the key frame and the absolute time of the target frame. The current playback time effectively increases the update frequency of the playback progress bar, so that the currently played back video frame corresponds to the current playback time on the progress bar.
如图13所示,本申请实施例提供了一种进度条时间更新装置,用于执行如图7所示的进度条时间更新方法。该进度条时间更新装置300包括:获取模块301、第一确定模块302和第二确定模块303。As shown in Figure 13, an embodiment of the present application provides a progress bar time updating device for executing the progress bar time updating method shown in Figure 7. The progress bar time updating device 300 includes: an acquisition module 301, a first determination module 302 and a second determination module 303.
获取模块301,用于获取目标视频序列,其中,目标视频序列包括关键帧和与关键帧关联的至少一个目标帧,关键帧对应的时间信息包括关键帧的绝对时间和关键帧的时 间戳,目标帧对应的时间信息包括目标帧的时间戳。The acquisition module 301 is used to acquire a target video sequence, where the target video sequence includes a key frame and at least one target frame associated with the key frame, and the time information corresponding to the key frame includes the absolute time of the key frame and the timing of the key frame. Timestamp, the time information corresponding to the target frame includes the timestamp of the target frame.
第一确定模块302,用于基于关键帧的绝对时间以及关键帧和目标帧之间的时间间隔,来确定目标帧的绝对时间,其中,绝对时间为视频帧对应的视频画面的实际录制时间。The first determination module 302 is configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame.
第二确定模块303,用于利用关键帧的绝对时间和目标帧的绝对时间,来确定目标视频序列被回放时回放进度条上显示的当前播放时间。The second determination module 303 is configured to use the absolute time of the key frame and the absolute time of the target frame to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
在一种可能的实现方式中,获取模块301,还用于获取所述关键帧的时间戳和所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;第一确定模块302,还用于根据所述关键帧的时间戳和所述目标帧的时间戳,确定所述关键帧与所述目标帧之间的时间间隔。In a possible implementation, the acquisition module 301 is also used to obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time of the video frame relative to the reference time. Offset; the first determination module 302 is further configured to determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
在一种可能的实现方式中,所述第一确定模块302,具体用于在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In a possible implementation, the first determination module 302 is specifically configured to subtract the time stamp based on the target frame when the timestamp of the target frame is greater than the timestamp of the key frame. The time interval is determined by obtaining the difference between the timestamps of the key frames.
在一种可能的实现方式中,所述获取模块301,还用于获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;所述第一确定模块302,具体用于将所述目标帧的帧号减去所述关键帧的帧号获得帧号差,并根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。In a possible implementation, the obtaining module 301 is also used to obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; the first determination module 302 is specifically used to obtain the result by subtracting the frame number of the key frame from the frame number of the target frame. The frame number difference is determined based on the product of the frame number difference and the frame interval of the target video sequence to determine the time interval between the key frame and the target frame.
在一种可能的实现方式中,所述关键帧为I帧;和/或所述目标帧为辅助帧。In a possible implementation, the key frame is an I frame; and/or the target frame is an auxiliary frame.
在一种可能的实现方式中,所述第二确定模块303具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In a possible implementation, the second determination module 303 is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
本申请实施例还提供了一种视频处理设备,该视频处理设备用于响应于接收到回放指令,获取所述回放指令指定的程序流,其中,所述程序流为通过对所拍摄的原始视频数据的编码视频流进行程序流封装得到;对所述程序流进行解码,以获得解码视频流,其中,所述解码视频流包括一个或更多个视频序列,每个视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;针对所述一个或更多个视频序列的任一目标视频序列,基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述解码视频流被回放时回放进度条上显示的当前播放时间。Embodiments of the present application also provide a video processing device, which is configured to obtain a program flow specified by the playback instruction in response to receiving a playback instruction, wherein the program flow is obtained by processing the original video captured. The encoded video stream of the data is obtained by encapsulating the program stream; the program stream is decoded to obtain a decoded video stream, wherein the decoded video stream includes one or more video sequences, and each video sequence includes a key frame and the At least one target frame associated with the key frame; for any target video sequence of the one or more video sequences, based on the absolute time of the key frame and the time interval between the key frame and the target frame , to determine the absolute time of the target frame, where the absolute time is the actual recording time of the video picture corresponding to the video frame; using the absolute time of the key frame and the absolute time of the target frame time to determine the current playback time displayed on the playback progress bar when the decoded video stream is played back.
在一种可能的实现方式中,所述视频处理设备具体用于:获取所述关键帧的时间戳以及所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;根据所述关键帧的时间戳以及所述目标帧的时间戳来确定所述关键帧和所述目标帧之间的时间间隔。In a possible implementation, the video processing device is specifically configured to: obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the relative time of the video frame to the reference time. time offset; determine the time interval between the key frame and the target frame according to the time stamp of the key frame and the time stamp of the target frame.
在一种可能的实现方式中,所述视频处理设备具体用于:在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In a possible implementation, the video processing device is specifically configured to: when the timestamp of the target frame is greater than the timestamp of the key frame, subtract the timestamp of the target frame from the The difference in timestamps of key frames is obtained to determine the time interval.
在一种可能的实现方式中,所述视频处理设备具体用于:获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;计算所述目标帧的帧号减去所述关键帧的帧号获得的帧号差;根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。 In a possible implementation, the video processing device is specifically configured to: obtain the frame number of the key frame, the frame number of the target frame, and the frame interval of the target video sequence, wherein the frame interval Used to represent the time interval between two adjacent video frames in the target video sequence; calculate the frame number difference obtained by subtracting the frame number of the key frame from the frame number of the target frame; according to the frame number difference The product of the frame interval of the target video sequence determines the time interval between the key frame and the target frame.
在一种可能的实现方式中,所述关键帧为I帧;和/或所述目标帧为辅助帧。In a possible implementation, the key frame is an I frame; and/or the target frame is an auxiliary frame.
在一种可能的实现方式中,所述视频处理设备具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。In a possible implementation, the video processing device is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar.
在一种可能的实现方式中,所述回放指令来自可与所述视频处理设备通信的用户终端;所述视频处理设备还用于:将所述解码视频流发送给发送所述用户终端,以在所述用户终端的显示界面上回放所述解码视频流;其中,所述显示界面上的回放进度条上显示的当前播放时间,与当前正在回放的视频帧相对应。In a possible implementation, the playback instruction comes from a user terminal that can communicate with the video processing device; the video processing device is also configured to: send the decoded video stream to the sending user terminal to The decoded video stream is played back on the display interface of the user terminal; wherein the current playback time displayed on the playback progress bar on the display interface corresponds to the video frame currently being played back.
在一种可能的实现方式中,所述视频处理设备的功能和所述用户终端的功能被集成在单个设备中。In a possible implementation, the functions of the video processing device and the functions of the user terminal are integrated into a single device.
在采用硬件的形式实现上述集成的模块的功能的情况下,本申请实施例提供了上述实施例中所涉及的进度条时间更新装置的另一种可能的结构示意图。如图14所示,该进度条时间更新装置400包括:处理器402,通信接口403,总线404。可选的,该进度条时间更新装置还可以包括存储器401。When the functions of the above-mentioned integrated modules are implemented in the form of hardware, the embodiment of the present application provides another possible structural schematic diagram of the progress bar time updating device involved in the above-mentioned embodiment. As shown in Figure 14, the progress bar time updating device 400 includes: a processor 402, a communication interface 403, and a bus 404. Optionally, the progress bar time updating device may also include a memory 401.
处理器402,可以是实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器402可以是中央处理器,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器402也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。Processor 402 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of this application. The processor 402 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure. The processor 402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
通信接口403,用于与其他设备通过通信网络连接。该通信网络可以是以太网,无线接入网,无线局域网(wireless local area networks,WLAN)等。Communication interface 403 is used to connect with other devices through a communication network. The communication network can be Ethernet, wireless access network, wireless local area networks (WLAN), etc.
存储器401,可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。Memory 401 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions. A type of dynamic storage device, which can also be an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or can be used to carry or store instructions or data structures Without limitation, any other medium in the form of the desired program code and capable of being accessed by a computer.
作为一种可能的实现方式,存储器401可以独立于处理器402存在,存储器401可以通过总线404与处理器402相连接,用于存储指令或者程序代码。处理器402调用并执行存储器401中存储的指令或程序代码时,能够实现本申请实施例提供的进度条时间更新方法。As a possible implementation, the memory 401 may exist independently of the processor 402. The memory 401 may be connected to the processor 402 through the bus 404 for storing instructions or program codes. When the processor 402 calls and executes the instructions or program codes stored in the memory 401, it can implement the progress bar time updating method provided by the embodiment of the present application.
另一种可能的实现方式中,存储器401也可以和处理器402集成在一起。In another possible implementation, the memory 401 can also be integrated with the processor 402 .
总线404,可以是扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线404可以分为地址总线、数据总线、控制总线等。为便于表示,图14中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Bus 404 may be an extended industry standard architecture (EISA) bus, etc. The bus 404 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only one thick line is used in Figure 14, but it does not mean that there is only one bus or one type of bus.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将进度条时间更新装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the above description of the embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated as needed. It is completed by different functional modules, that is, the internal structure of the progress bar time update device is divided into different functional modules to complete all or part of the functions described above.
本申请实施例还提供了一种计算机可读存储介质。上述方法实施例中的全部或者部分流程可以由计算机指令来指示相关的硬件完成,该程序可存储于上述计算机可读存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。计算机可读存储介质可 以是前述任一实施例的内存。上述计算机可读存储介质也可以是上述进度条时间更新装置的外部存储设备,例如上述进度条时间更新装置上配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,上述计算机可读存储介质还可以既包括上述进度条时间更新装置的内部存储单元也包括外部存储设备。上述计算机可读存储介质用于存储上述计算机程序以及上述进度条时间更新装置所需的其他程序和数据。上述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。An embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct relevant hardware. The program can be stored in the above computer-readable storage medium. When executed, the program can include the processes of the above method embodiments. . Computer-readable storage media may So the memory of any of the aforementioned embodiments. The computer-readable storage medium may also be an external storage device of the progress bar time update device, such as a plug-in hard disk, a smart media card (SMC), or a secure digital device equipped on the progress bar time update device. digital, SD) card, flash card, etc. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the progress bar time updating device. The computer-readable storage medium is used to store the computer program and other programs and data required by the progress bar time updating device. The above-mentioned computer-readable storage media can also be used to temporarily store data that has been output or is to be output.
本申请实施例还提供一种计算机程序产品,该计算机产品包含计算机程序,当该计算机程序产品在计算机上运行时,使得该计算机执行上述实施例中所提供的任一项进度条时间更新方法。An embodiment of the present application also provides a computer program product. The computer product includes a computer program. When the computer program product is run on a computer, it causes the computer to execute any of the progress bar time updating methods provided in the above embodiments.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看附图、公开内容、以及所附权利要求书,可理解并实现公开实施例的其他变化。在权利要求中,“包括”(Comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present application has been described herein in connection with various embodiments, in practicing the claimed application, those skilled in the art can understand and implement the disclosure by reviewing the drawings, the disclosure, and the appended claims. Other variations of the embodiment. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may perform several of the functions recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not mean that a combination of these measures cannot be combined to advantageous effects.
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Although the present application has been described in conjunction with specific features and embodiments thereof, it will be apparent that various modifications and combinations may be made without departing from the spirit and scope of the application. Accordingly, the specification and drawings are intended to be merely illustrative of the application as defined by the appended claims and are to be construed to cover any and all modifications, variations, combinations or equivalents within the scope of the application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and equivalent technologies, the present application is also intended to include these modifications and variations.
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。 The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (22)

  1. 一种视频处理设备,其特征在于,所述视频处理设备用于:A video processing device, characterized in that the video processing device is used for:
    响应于接收到回放指令,获取所述回放指令指定的程序流,其中,所述程序流为通过对所拍摄的原始视频数据的编码视频流进行程序流封装得到;In response to receiving the playback instruction, obtain the program flow specified by the playback instruction, wherein the program flow is obtained by performing program flow encapsulation on the encoded video stream of the captured original video data;
    对所述程序流进行解码,以获得解码视频流,其中,所述解码视频流包括一个或更多个视频序列,每个视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;decoding the program stream to obtain a decoded video stream, wherein the decoded video stream includes one or more video sequences, each video sequence including a key frame and at least one target frame associated with the key frame;
    针对所述一个或更多个视频序列的任一目标视频序列,基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;For any target video sequence of the one or more video sequences, determining the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame. Absolute time, wherein the absolute time is the actual recording time of the video picture corresponding to the video frame;
    利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述解码视频流被回放时回放进度条上显示的当前播放时间。The absolute time of the key frame and the absolute time of the target frame are used to determine the current playback time displayed on the playback progress bar when the decoded video stream is played back.
  2. 根据权利要求1所述的视频处理设备,其特征在于,所述视频处理设备具体用于:The video processing device according to claim 1, characterized in that the video processing device is specifically used for:
    获取所述关键帧的时间戳以及所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;Obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time offset of the video frame relative to the reference time;
    根据所述关键帧的时间戳以及所述目标帧的时间戳来确定所述关键帧和所述目标帧之间的时间间隔。The time interval between the key frame and the target frame is determined according to the time stamp of the key frame and the time stamp of the target frame.
  3. 根据权利要求2所述的视频处理设备,其特征在于,所述视频处理设备具体用于:The video processing device according to claim 2, characterized in that the video processing device is specifically used for:
    在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In the case where the timestamp of the target frame is greater than the timestamp of the key frame, the time interval is determined based on the difference obtained by subtracting the timestamp of the key frame from the timestamp of the target frame.
  4. 根据权利要求1至3任意一项所述的视频处理设备,其特征在于,所述视频处理设备具体用于:The video processing device according to any one of claims 1 to 3, characterized in that the video processing device is specifically used for:
    获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;Obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence, where the frame interval is used to represent the interval between two adjacent video frames in the target video sequence. time interval;
    计算所述目标帧的帧号减去所述关键帧的帧号获得的帧号差;Calculate the frame number difference obtained by subtracting the frame number of the key frame from the frame number of the target frame;
    根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。The time interval between the key frame and the target frame is determined according to the product of the frame number difference and the frame interval of the target video sequence.
  5. 根据权利要求1至4任意一项所述的视频处理设备,其特征在于,所述关键帧为I帧;和/或The video processing device according to any one of claims 1 to 4, characterized in that the key frame is an I frame; and/or
    所述目标帧为辅助帧。The target frame is an auxiliary frame.
  6. 根据权利要求1至5任意一项所述的视频处理设备,其特征在于,所述视频处理设备具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。The video processing device according to any one of claims 1 to 5, characterized in that the video processing device is specifically configured to determine the current playback value displayed on the playback progress bar according to the minimum time unit of the playback progress bar. time.
  7. 根据权利要求1至6任意一项所述的视频处理设备,其特征在于,所述回放指令来自可与所述视频处理设备通信的用户终端;所述视频处理设备还用于:The video processing device according to any one of claims 1 to 6, characterized in that the playback instruction comes from a user terminal that can communicate with the video processing device; the video processing device is also used to:
    将所述解码视频流发送给发送所述用户终端,以在所述用户终端的显示界面上回放所述解码视频流;Send the decoded video stream to the user terminal to play back the decoded video stream on the display interface of the user terminal;
    其中,所述显示界面上的回放进度条上显示的当前播放时间,与当前正在回放的视频帧相对应。Wherein, the current playback time displayed on the playback progress bar on the display interface corresponds to the video frame currently being played back.
  8. 根据权利要求7所述的视频处理设备,其特征在于,所述视频处理设备的功能和所述用户终端的功能被集成在单个设备中。The video processing device according to claim 7, characterized in that the functions of the video processing device and the functions of the user terminal are integrated in a single device.
  9. 一种进度条时间更新方法,其特征在于,包括:A method for updating progress bar time, which is characterized by including:
    获取目标视频序列,其中,所述目标视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;Obtaining a target video sequence, wherein the target video sequence includes a key frame and at least one target frame associated with the key frame;
    基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定 所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;Determine based on the absolute time of the key frame and the time interval between the key frame and the target frame The absolute time of the target frame, wherein the absolute time is the actual recording time of the video picture corresponding to the video frame;
    利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述目标视频序列被回放时回放进度条上显示的当前播放时间。The absolute time of the key frame and the absolute time of the target frame are used to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method of claim 9, further comprising:
    获取所述关键帧的时间戳和所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;Obtain the timestamp of the key frame and the timestamp of the target frame, where the timestamp is used to represent the time offset of the video frame relative to the reference time;
    根据所述关键帧的时间戳和所述目标帧的时间戳,确定所述关键帧与所述目标帧之间的时间间隔。The time interval between the key frame and the target frame is determined according to the time stamp of the key frame and the time stamp of the target frame.
  11. 根据权利要求10所述的方法,其特征在于,所述确定所述关键帧与所述目标帧之间的时间间隔,包括:The method according to claim 10, wherein determining the time interval between the key frame and the target frame includes:
    在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。In the case where the timestamp of the target frame is greater than the timestamp of the key frame, the time interval is determined based on the difference obtained by subtracting the timestamp of the key frame from the timestamp of the target frame.
  12. 根据权利要求9至11任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9 to 11, characterized in that the method further includes:
    获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔;Obtain the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence, where the frame interval is used to represent the interval between two adjacent video frames in the target video sequence. time interval;
    通过将所述目标帧的帧号减去所述关键帧的帧号获得帧号差;The frame number difference is obtained by subtracting the frame number of the key frame from the frame number of the target frame;
    根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。The time interval between the key frame and the target frame is determined according to the product of the frame number difference and the frame interval of the target video sequence.
  13. 根据权利要求9至12任意一项所述的方法,其特征在于,所述关键帧为I帧;和/或The method according to any one of claims 9 to 12, characterized in that the key frame is an I frame; and/or
    所述目标帧为辅助帧。The target frame is an auxiliary frame.
  14. 根据权利要求9至13任意一项所述的方法,其特征在于,所述确定所述回放进度条上显示的当前播放时间,包括:The method according to any one of claims 9 to 13, wherein determining the current playback time displayed on the playback progress bar includes:
    根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。The current playback time displayed on the playback progress bar is determined according to the minimum time unit of the playback progress bar.
  15. 一种进度条时间更新装置,其特征在于,包括:A progress bar time updating device, characterized by including:
    获取模块,用于获取目标视频序列,其中,所述目标视频序列包括关键帧以及所述关键帧关联的至少一个目标帧;An acquisition module, configured to acquire a target video sequence, wherein the target video sequence includes key frames and at least one target frame associated with the key frames;
    第一确定模块,用于基于所述关键帧的绝对时间以及所述关键帧和所述目标帧之间的时间间隔,来确定所述目标帧的所述绝对时间,其中,所述绝对时间为视频帧对应的视频画面的实际录制时间;A first determination module, configured to determine the absolute time of the target frame based on the absolute time of the key frame and the time interval between the key frame and the target frame, wherein the absolute time is The actual recording time of the video frame corresponding to the video frame;
    第二确定模块,用于利用所述关键帧的所述绝对时间和所述目标帧的所述绝对时间,来确定所述目标视频序列被回放时回放进度条上显示的当前播放时间。The second determination module is configured to use the absolute time of the key frame and the absolute time of the target frame to determine the current playback time displayed on the playback progress bar when the target video sequence is played back.
  16. 根据权利要求15所述的装置,其特征在于,The device according to claim 15, characterized in that:
    所述获取模块,还用于获取所述关键帧的时间戳和所述目标帧的时间戳,其中,所述时间戳用于表示视频帧相对于基准时间的时间偏移;The acquisition module is also used to acquire the timestamp of the key frame and the timestamp of the target frame, wherein the timestamp is used to represent the time offset of the video frame relative to the reference time;
    所述第一确定模块,还用于根据所述关键帧的时间戳和所述目标帧的时间戳,确定所述关键帧与所述目标帧之间的时间间隔。The first determining module is further configured to determine the time interval between the key frame and the target frame based on the timestamp of the key frame and the timestamp of the target frame.
  17. 根据权利要求16所述的装置,其特征在于,所述第一确定模块,具体用于在所述目标帧的时间戳大于所述关键帧的时间戳的情况下,基于所述目标帧的时间戳减去所述关键帧的时间戳获得的差,来确定所述时间间隔。The device according to claim 16, wherein the first determination module is specifically configured to determine based on the time of the target frame when the timestamp of the target frame is greater than the timestamp of the key frame. The time interval is determined by subtracting the time stamp from the key frame's timestamp.
  18. 根据权利要求15至17任意一项所述的装置,其特征在于,The device according to any one of claims 15 to 17, characterized in that,
    所述获取模块,还用于获取所述关键帧的帧号、所述目标帧的帧号和所述目标视频序列的帧间隔,其中,所述帧间隔用于表示所述目标视频序列中相邻两个视频帧之间的时间间隔; The acquisition module is also used to acquire the frame number of the key frame, the frame number of the target frame and the frame interval of the target video sequence, wherein the frame interval is used to represent the corresponding phase in the target video sequence. The time interval between two adjacent video frames;
    所述第一确定模块,具体用于将所述目标帧的帧号减去所述关键帧的帧号获得帧号差,并根据所述帧号差与所述目标视频序列的帧间隔的积,确定所述关键帧与所述目标帧之间的时间间隔。The first determination module is specifically configured to obtain a frame number difference by subtracting the frame number of the key frame from the frame number of the target frame, and based on the product of the frame number difference and the frame interval of the target video sequence , determine the time interval between the key frame and the target frame.
  19. 根据权利要求15至18任意一项所述的装置,其特征在于,所述关键帧为I帧;和/或The device according to any one of claims 15 to 18, characterized in that the key frame is an I frame; and/or
    所述目标帧为辅助帧。The target frame is an auxiliary frame.
  20. 根据权利要求15至19任意一项所述的装置,其特征在于,所述第二确定模块具体用于根据所述回放进度条的最小时间单位来确定所述回放进度条上显示的当前播放时间。The device according to any one of claims 15 to 19, wherein the second determination module is specifically configured to determine the current playback time displayed on the playback progress bar according to the minimum time unit of the playback progress bar. .
  21. 一种电子设备,其特征在于,包括:An electronic device, characterized by including:
    至少一个处理器;at least one processor;
    至少一个存储器,存储有机器可执行指令;At least one memory storing machine-executable instructions;
    其中,所述至少一个处理器在执行所述机器可执行指令时,实现根据权利要求9至14任一项所述的方法。Wherein, when the at least one processor executes the machine executable instructions, the method according to any one of claims 9 to 14 is implemented.
  22. 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序在计算机上运行时实现根据权利要求9至14任一项所述的方法。 A computer program product, characterized by comprising a computer program that implements the method according to any one of claims 9 to 14 when run on a computer.
PCT/CN2023/104007 2022-06-29 2023-06-29 Video processing device, progress bar time updating method, apparatus, and electronic device WO2024002264A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210753726.7 2022-06-29
CN202210753726.7A CN117376648A (en) 2022-06-29 2022-06-29 Progress bar time updating method, device and storage medium

Publications (1)

Publication Number Publication Date
WO2024002264A1 true WO2024002264A1 (en) 2024-01-04

Family

ID=89383315

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/104007 WO2024002264A1 (en) 2022-06-29 2023-06-29 Video processing device, progress bar time updating method, apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN117376648A (en)
WO (1) WO2024002264A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150179224A1 (en) * 2013-12-24 2015-06-25 JBF Interlude 2009 LTD - ISRAEL Methods and systems for seeking to non-key frames
CN104994340A (en) * 2015-06-25 2015-10-21 广东工业大学 Precise positioning playback method for audio/video storage mode
CN108737908A (en) * 2018-05-21 2018-11-02 腾讯科技(深圳)有限公司 A kind of media playing method, device and storage medium
US20190272088A1 (en) * 2018-03-05 2019-09-05 Qingdao Hisense Media Network Technology Co., Ltd. Playing media
CN110809179A (en) * 2019-10-30 2020-02-18 烽火通信科技股份有限公司 Method and system for switching live broadcast time-shifting time axis under HLS protocol
CN112788366A (en) * 2020-12-28 2021-05-11 杭州海康威视系统技术有限公司 Video processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150179224A1 (en) * 2013-12-24 2015-06-25 JBF Interlude 2009 LTD - ISRAEL Methods and systems for seeking to non-key frames
CN104994340A (en) * 2015-06-25 2015-10-21 广东工业大学 Precise positioning playback method for audio/video storage mode
US20190272088A1 (en) * 2018-03-05 2019-09-05 Qingdao Hisense Media Network Technology Co., Ltd. Playing media
CN108737908A (en) * 2018-05-21 2018-11-02 腾讯科技(深圳)有限公司 A kind of media playing method, device and storage medium
CN110809179A (en) * 2019-10-30 2020-02-18 烽火通信科技股份有限公司 Method and system for switching live broadcast time-shifting time axis under HLS protocol
CN112788366A (en) * 2020-12-28 2021-05-11 杭州海康威视系统技术有限公司 Video processing method and device

Also Published As

Publication number Publication date
CN117376648A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN110784718B (en) Video data encoding method, apparatus, device and storage medium
KR101533174B1 (en) Method of processing a sequence of coded video frames
JP6737922B2 (en) Transmission method, reception method, transmission device, and reception device
CN110430445B (en) Video synchronous playing method, device, equipment and medium
WO2019170073A1 (en) Media playback
CN101867796A (en) Method and device for monitoring video
WO2020207403A1 (en) Image acquisition method and device
CN109905749B (en) Video playing method and device, storage medium and electronic device
US6948185B1 (en) Process and device for synchronizing an MPEG decoder
KR20070096920A (en) Apparatus and method for determining rendering duration of video frame
JP2018182677A (en) Information processing apparatus, information processing method, program, and recording medium manufacturing method
JP3558983B2 (en) Digital broadcast recording and playback device
WO2024002264A1 (en) Video processing device, progress bar time updating method, apparatus, and electronic device
EP1473935A1 (en) Information processing apparatus and method
CN108810575B (en) Method and device for sending target video
JP2018182617A (en) Information processing apparatus, information processing method, program, and recording medium manufacturing method
JP2004537214A (en) Broadcasting system, broadcasting device, synchronization information replacement device, synchronization information replacement method, program, and recording medium recording the program
JP7275212B2 (en) Transmission method, reception method, transmission device and reception device
WO2003096691A1 (en) Signal processing device, signal processing method, program, and recording medium
US10306298B2 (en) Image processing apparatus and control method thereof
CN114979736B (en) Display device and audio and video synchronization method
JP3773892B2 (en) Digital recording / reproducing device
JP2001078195A (en) System encoder
JP4373379B2 (en) Data compression device
JPH10276408A (en) Video information providing control method and system therefor

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: 23830429

Country of ref document: EP

Kind code of ref document: A1