WO2017096948A1 - 视频定位方法和装置 - Google Patents

视频定位方法和装置 Download PDF

Info

Publication number
WO2017096948A1
WO2017096948A1 PCT/CN2016/096012 CN2016096012W WO2017096948A1 WO 2017096948 A1 WO2017096948 A1 WO 2017096948A1 CN 2016096012 W CN2016096012 W CN 2016096012W WO 2017096948 A1 WO2017096948 A1 WO 2017096948A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
key frame
time point
progress bar
stopped
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/096012
Other languages
English (en)
French (fr)
Inventor
边智
魏伟
白茂生
祁海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, LeCloud Computing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017096948A1 publication Critical patent/WO2017096948A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

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
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4333Processing operations in response to a pause request

Definitions

  • the present application belongs to the field of Internet video processing technologies, and in particular, to a video positioning method and apparatus.
  • the user when watching a network video, usually after obtaining and locally buffering the data stream (TS) slice, the user can drag the progress bar on the web player to scroll forward or backward through the cached video.
  • This method is based on the time point that the user drags and the time point of the TS slice. For example, the user drags to 10 minutes and 28 seconds.
  • the TS slice of the video content is divided into 10 minutes and 26 seconds and 10 minutes and 32 seconds.
  • the playback starts from 10 minutes and 26 seconds, ensuring that the user can see 10 minutes and 28 seconds.
  • the existing location search of the network video is a positioning method with the TS slice as the granularity, the time accuracy of the positioning is not high, and the user experience is low.
  • the present application provides a video positioning method and apparatus, which can quickly and accurately locate a network video.
  • An embodiment of the present application provides a video positioning method, including:
  • the video data is acquired according to the most recent key frame.
  • the time point of the video corresponding to the delay of the progress bar dragging is obtained, including:
  • the method further includes:
  • a key frame information table is generated according to the key frame information.
  • the key frame closest to the video time point corresponding to the stop of the progress bar dragging is determined according to the video time point corresponding to the stop of the progress bar, including:
  • the key frame closest to the video time point corresponding to the stop of the progress bar dragging is determined according to the video time point corresponding to the stop of the progress bar, including:
  • the video time point corresponding to when the progress bar is dragged and stopped is added with a preset maximum time offset as a video time point of the corrected video progress bar; each key frame in the key frame information table is queried a timestamp corresponding to the video time point of the corrected video progress bar in the key frame information table, and a key frame corresponding to the matched timestamp is determined as The most recent keyframe.
  • the application also provides a video positioning device, including:
  • a determining module configured to determine a time point corresponding to the video when the dragging is stopped according to the progress bar, and determine The key frame closest to the corresponding video time point when the progress bar is dragged and stopped;
  • a positioning module configured to acquire video data according to the most recent key frame.
  • the device further includes:
  • a setting module configured to set a control area of the video progress bar according to the total duration of the video, where the starting position of the control area is 0, and the time point of the ending position is the total duration of the video; setting the video progress bar a mapping relationship between any of the control regions and a video time point corresponding thereto;
  • the obtaining module is specifically configured to: according to the position in the control area when the dragging of the progress bar is stopped, and the mapping relationship between any position of the preset control area and a corresponding video time point thereof, Obtaining a video time point corresponding to the position in the control area when the progress bar drag stops.
  • the device further includes:
  • An extraction module configured to extract each key frame information from the video, where the key frame information includes a timestamp corresponding to the key frame in the video; and generate a key frame information table according to the key frame information.
  • the determining module is specifically configured to:
  • the determining module is specifically configured to: add a preset maximum time offset to the video time point corresponding to when the progress bar is dragged, as a video time point of the corrected video progress bar; Determining, in a key frame information table, a timestamp corresponding to a video time point of the corrected video progress bar in the key frame information table, corresponding to a timestamp in the video in the key frame information table, The key frame corresponding to the matched timestamp is determined as the most recent key frame.
  • the embodiment of the present application provides an electronic device, including the video positioning apparatus according to any of the foregoing embodiments.
  • the embodiment of the present application provides a non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium can store computer instructions, which can implement the video positioning method provided by the embodiments of the present application. Some or all of the steps in each implementation.
  • An embodiment of the present application provides an electronic device, including: one or more processors; and a memory; wherein the memory stores instructions executable by the one or more processors, the instructions being set to It is used to perform any of the above video positioning methods of the present application.
  • An embodiment of the present application provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to perform any of the above video positioning methods in the embodiments of the present application.
  • the time point of the current frame where the progress bar is parked is determined, and the time point in the key frame information table is forwardly matched by the time point of the current frame that is parked, and the time is passed.
  • the key is found to be the closest keyframe to the current frame of the parked frame, and the video data is decoded by the key frame after the nearest keyframe is found.
  • FIG. 1 is a schematic flowchart of a video positioning method according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a progress bar playback control area used in an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a video positioning apparatus according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-persistent memory in computer readable media, random access memory (RAM) And/or non-volatile memory, such as read-only memory (ROM) or flash (flash RAM). Memory is an example of a computer readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash RAM
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • first device if a first device is coupled to a second device, the first device can be directly electrically coupled to the second device, or electrically coupled indirectly through other devices or coupling means. Connected to the second device.
  • the description of the specification is intended to be illustrative of the preferred embodiments of the invention. The scope of protection of the application is subject to the definition of the appended claims.
  • FIG. 1 is a schematic flowchart of a video positioning method according to an embodiment of the present application, as shown in FIG. include:
  • step 101 includes:
  • FIG. 2 is a schematic diagram of a progress bar playback control area used in the embodiment of the present application.
  • a progress bar is generally displayed in a playback control area below the video content area.
  • the video time point corresponding to the position in the play control area where the current progress bar is located can be displayed on the leftmost side of the progress bar, as shown in "00:30:12" in the second step of the progress bar, and the total video is displayed on the far right side of the progress bar. Duration, as shown in Figure 2, "125:30:40.
  • step 102 the method further includes:
  • step 102 further includes:
  • the video time point corresponding to when the progress bar is dragged and stopped is added with a preset maximum time offset as a video time point of the corrected video progress bar; each key frame in the key frame information table is queried a timestamp corresponding to the video time point of the corrected video progress bar in the key frame information table, and a key frame corresponding to the matched timestamp is determined as The most recent keyframe.
  • the maximum time offset may be the maximum offset within the TS segment, and the offset may be a time value, such as 400 ms.
  • the video file may be stored in the manner shown in Table 1, wherein the video file includes three parts, the first part P1 is a file header, the second part P2 is video data, and the third part P3 is key frame information.
  • the key frame information table may be a corresponding index information table of the play time stamp t and the value n representing the byte offset, as shown in Table 2:
  • the file offset (byte offset) of the video data corresponding to the timestamp of the most recent key frame is queried by using the index information table, and the value n (byte offset) in the index information and the video can be The data establishes a unique correspondence so that corresponding video data can be acquired based on the most recent key frame.
  • the video is usually dragged according to the interest.
  • the time point of the current frame where the progress bar is parked is determined, and the time of the current frame that is parked is determined.
  • the point forward matches the timestamp in the key frame information table, and finds the key frame closest to the time point of the parked current frame by the timestamp, and decodes the video data through the key frame after finding the latest key frame.
  • the program can be stored in a non-transitory computer.
  • the program may include, as described above, The flow of an embodiment of the method.
  • the non-transitory computer readable storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • FIG. 3 is a schematic structural diagram of a video positioning apparatus according to an embodiment of the present disclosure. As shown in FIG. 3, the method includes:
  • the obtaining module 31 is configured to: when the progress bar of the video is dragged, acquire a video time point corresponding to when the progress bar drag stops;
  • a determining module 32 configured to determine, according to the video time point corresponding to the stop when the progress bar is dragged, to determine a key frame that is closest to the video time point corresponding to the progress bar drag stop;
  • the positioning module 33 is configured to acquire video data according to the most recent key frame.
  • the device further includes:
  • the setting module 34 is configured to set a control area of the video progress bar according to the total duration of the video, the time point of the start position of the control area is 0, and the time point of the end position is the total duration of the video; setting the video progress a mapping relationship between any position of the control area and its corresponding video time point;
  • the obtaining module 31 is specifically configured to: according to the position in the control area when the dragging of the progress bar is stopped, and the mapping relationship between any position of the preset control area and a corresponding video time point thereof Obtaining a video time point corresponding to the position in the control area when the progress bar drag stops.
  • the device further includes:
  • the extracting module 35 is configured to extract each key frame information from the video, where the key frame information includes a timestamp corresponding to the key frame in the video; and generate a key frame information table according to the key frame information.
  • the determining module 32 is specifically configured to:
  • the video time point corresponding to when the progress bar is dragged and stopped is added with a preset maximum time offset as a video time point of the corrected video progress bar; each key frame in the key frame information table is queried Place Determining a timestamp of the video frame in the key frame information table that matches the video time point of the modified video progress bar, and determining a key frame corresponding to the matched timestamp as the most recent Key frame.
  • the apparatus shown in FIG. 3 can perform the method shown in FIG. 1, and its implementation principle and technical effects are not described again.
  • an electronic device including the video positioning apparatus according to any of the foregoing embodiments.
  • a non-transitory computer readable storage medium is also provided, the non-transitory computer readable storage medium storing computer executable instructions executable by any of the above methods The video positioning method in the example.
  • FIG. 4 is a schematic structural diagram of hardware of an electronic device for performing a video positioning method according to an embodiment of the present disclosure. As shown in FIG. 4, the device includes:
  • processors 410 and memory 420 One or more processors 410 and memory 420, one processor 410 is exemplified in FIG.
  • the apparatus that performs the video positioning method may further include: an input device 430 and an output device 440.
  • the processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 420 is used as a non-transitory computer readable storage medium, and can be used to store a non-volatile software program, a non-volatile computer executable program, and a module, such as a program instruction corresponding to the video positioning method in the embodiment of the present application.
  • a module (for example, the acquisition module 31, the determination module 32, the positioning module 33, and the setting module 34 shown in FIG. 3).
  • the processor 410 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 420, that is, implementing the video positioning method of the above method embodiment.
  • the memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the video positioning device, and the like.
  • memory 420 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 420 can optionally include memory remotely located relative to processor 410, which can be connected to the video positioning device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 430 can receive input digital or character information and generate and use with a video positioning device User settings and key signal inputs related to function control.
  • Output device 440 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 420, and when executed by the one or more processors 410, perform a video localization method in any of the above method embodiments.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例公开了一种视频定位方法和装置,通过在拖拽进度条的时候,确定进度条所停驻的当前帧的时间点,通过停驻的当前帧的时间点向前匹配关键帧信息表中的时间戳,并通过时间戳找到与停驻的当前帧的时间点最近的关键帧,在找到最近关键帧后再通过关键帧来解码出视频数据。提升了对网络视频进行定位操作的粒度,使用户更快更准的看到想看的内容。

Description

视频定位方法和装置
本申请要求于2015年12月7日提交中国专利局、申请号为201510890386.2、申请名称为“视频定位方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于互联网视频处理技术领域,具体地说,涉及一种视频定位方法和装置。
背景技术
目前,观看网络视频时,通常获取并在本地缓存数据流(TS)切片后,用户可以在网页播放器拖动进度条,以向前或向后翻看已经缓存的视频。这种方式以用户拖动到的时间点和TS切片的时间点为准。例如,用户拖动到10分28秒,该时刻视频内容所在TS切片的分割位置在10分26秒和10分32秒,则从10分26秒开始播放,确保用户能够看到10分28秒的内容。由此可知,现有的网络视频的定位搜索是一种以TS切片为粒度的定位方法,定位的时间准确性不高,用户体验度较低。
因此,一种快速且精确定位网络视频的方法亟待提出。
发明内容
有鉴于此,本申请提供了一种视频定位方法和装置,可以快速且精确定位网络视频。
本申请实施例提供一种视频定位方法,包括:
在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
根据所述最近的关键帧获取视频数据。
其中,获取所述进度条拖动停止时对应的视频时间点,包括:
根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;
设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
其中,所述的方法还包括:
从所述视频中提取每个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;
根据所述关键帧信息生成关键帧信息表。
其中,根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧,包括:
根据所述进度条拖动停止时对应的视频时间点,查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
其中,根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧,包括:
将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
本申请还提供一种视频定位装置,包括:
获取模块,用于在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
确定模块,用于根据所述进度条拖动停止时对应的视频时间点,向前确定与 所述进度条拖动停止时对应的视频时间点最近的关键帧;
定位模块,用于根据所述最近的关键帧获取视频数据。
其中,所述的装置还包括:
设置模块,用于根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
所述获取模块,具体用于根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
其中,所述的装置还包括:
提取模块,用于从所述视频中提取每一个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;根据所述关键帧信息生成关键帧信息表。
其中,所述确定模块具体用于:
根据所述进度条拖动停止时对应的视频时间点,查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
其中,所述确定模块具体用于:将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
本申请实施例提供一种电子设备,包括前述任一实施例所述的视频定位装置。
本申请实施例提供一种非暂态计算机可读存储介质,其中,该非暂态计算机可读存储介质可存储有计算机指令,该计算机指令执行时可实现本申请实施例提供的视频定位方法的各实现方式中的部分或全部步骤。
本申请实施例提供一种电子设备,包括:一个或多个处理器;以及,存储器;其中,所述存储器存储有可被所述一个或多个处理器执行的指令,所述指令被设置为用于执行本申请上述任一项视频定位方法。
本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行本申请实施例上述任一项视频定位方法。
本申请实施例通过在拖拽进度条的时候,确定进度条所停驻的当前帧的时间点,通过停驻的当前帧的时间点向前匹配关键帧信息表中的时间戳,并通过时间戳找到与停驻的当前帧的时间点最近的关键帧,在找到最近关键帧后再通过关键帧来解码出视频数据。提升了对网络视频进行定位操作的粒度,使用户更快更准的看到想看的内容。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是本申请实施例提供的一种视频定位方法的流程示意图;
图2为本申请实施例采用的一种进度条播放控制区域示意图;
图3为本申请实施例提供的一种视频定位装置的结构示意图;
图4为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
以下将配合附图及实施例来详细说明本申请的实施方式,藉此对本申请如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM) 和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
如在说明书及权利要求当中调用了某些词汇来指称特定组件。本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。如在通篇说明书及权利要求当中所提及的“包含”为一开放式用语,故应解释成“包含但不限定于”。“大致”是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。此外,“耦接”一词在此包含任何直接及间接的电性耦接手段。因此,若文中描述一第一装置耦接于一第二装置,则代表所述第一装置可直接电性耦接于所述第二装置,或通过其他装置或耦接手段间接地电性耦接至所述第二装置。说明书后续描述为实施本申请的较佳实施方式,然所述描述乃以说明本申请的一般原则为目的,并非用以限定本申请的范围。本申请的保护范围当视所附权利要求所界定者为准。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。
图1是本申请实施例提供的一种视频定位方法的流程示意图,如图1所示, 包括:
101、在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
具体实现时,步骤101包括:
根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;
设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
举例来说,在使用视频播放器对视频进行播放的实际应用中,为了方便用户实时了解视频播放情况,为用户提供了表示视频播放进度的进度条。图2为本申请实施例采用的一种进度条播放控制区域示意图,如图2所示的,在使用视频播放器进行视频播放时,一般在视频内容区域下方的播放控制区域中显示进度条,并且可以在进度条的最左侧显示当前进度条所在的播放控制区域中的位置对应的视频时间点,如图2中的“00:30:12”,在进度条的最右侧显示视频总时长,如图2中的“125:30:40。
102、根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
具体实现时,步骤102之前还包括:
从所述视频中提取每个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;根据所述关键帧信息生成关键帧信息表。
基于上述生成的关键帧信息表,步骤102具体实现时还包括:
根据所述进度条拖动停止时对应的视频时间点,查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧;或者
将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。其中,最大时间偏移可以是TS切分内的最大偏移量,该偏移量可以是一个时间值,例如400ms。
举例来说,视频文件可以表1所示的方式进行存储,其中,视频文件包括三个部分,第一部分P1为文件头,第二部分P2为视频数据,第三部分P3为关键帧信息。
P1 P2 P3
文件头 视频数据 关键帧信息
其中,关键帧信息表可以是播放时间戳t与代表字节偏移量的数值n的对应索引信息表,如表2所示:
时间(t) 1s 2s 3s 4s 5s 6s 7s ……
字节偏移量(n) 70 45 30 12 90 31 50 ……
103、根据所述最近的关键帧获取视频数据。
通过上述索引信息表查询与所述最近的关键帧的时间戳对应的视频数据的文件偏移量(字节偏移量),可将索引信息中的数值n(字节偏移量)与视频数据建立起唯一的对应关系,从而可以根据最近的关键帧获取相对应的视频数据。
用户在观看视频时,通常会根据兴趣对视频进行拖拽,本申请实施例通过在拖拽进度条的时候,确定进度条所停驻的当前帧的时间点,通过停驻的当前帧的时间点向前匹配关键帧信息表中的时间戳,并通过时间戳找到与停驻的当前帧的时间点最近的关键帧,在找到最近关键帧后再通过关键帧来解码出视频数据。提升了对网络视频进行定位操作的粒度,使用户更快更准的看到想看的内容。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非暂态计算机可读存储介质中,该程序在执行时,可包括如上述各方 法的实施例的流程。其中,所述的非暂态计算机可读存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
图3为本申请实施例提供的一种视频定位装置的结构示意图,如图3所示,包括:
获取模块31,用于在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
确定模块32,用于根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
定位模块33,用于根据所述最近的关键帧获取视频数据。
其中,所述的装置还包括:
设置模块34,用于根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
所述获取模块31,具体用于根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
其中,所述的装置还包括:
提取模块35,用于从所述视频中提取每一个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;根据所述关键帧信息生成关键帧信息表。
其中,所述确定模块32具体用于:
根据所述进度条拖动停止时对应的视频时间点,查询提取模块35生成的所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧;或者
将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所 述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
图3所示的装置可以执行图1所示的方法,其实现原理和技术效果不再赘述。
在本申请另一实施例中,还提供一种电子设备,包括前述任一实施例所述的视频定位装置。
在本申请另一实施例中,还提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的视频定位方法。
图4是本申请实施例提供的执行视频定位方法的电子设备的硬件结构示意图,如图4所示,该设备包括:
一个或多个处理器410以及存储器420,图4中以一个处理器410为例。
执行视频定位方法的设备还可以包括:输入装置430和输出装置440。
处理器410、存储器420、输入装置430和输出装置440可以通过总线或者其他方式连接,图4中以通过总线连接为例。
存储器420作为一种非暂态计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的视频定位方法对应的程序指令/模块(例如,附图3所示的获取模块31、确定模块32、定位模块33和设置模块34)。处理器410通过运行存储在存储器420中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例视频定位方法。
存储器420可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据视频定位装置的使用所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器420可选包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至视频定位装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置430可接收输入的数字或字符信息,以及产生与视频定位装置的用 户设置以及功能控制有关的键信号输入。输出装置440可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器420中,当被所述一个或者多个处理器410执行时,执行上述任意方法实施例中的视频定位方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
上述说明示出并描述了本申请的若干优选实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述申请构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。

Claims (14)

  1. 一种视频定位方法,其特征在于,应用于电子设备,包括:
    在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
    根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
    根据所述最近的关键帧获取视频数据。
  2. 如权利要求1所述的方法,其特征在于,获取所述进度条拖动停止时对应的视频时间点,包括:
    根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;
    设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
    根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
  3. 如权利要求1所述的方法,其特征在于,还包括:
    从所述视频中提取每个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;
    根据所述关键帧信息生成关键帧信息表。
  4. 如权利要求1-3中任一项所述的方法,其特征在于,根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧,包括:
    根据所述进度条拖动停止时对应的视频时间点,查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
  5. 如权利要求1-3中任一项所述的方法,其特征在于,根据所述进度 条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧,包括:
    将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
  6. 一种视频定位装置,其特征在于,包括:
    获取模块,用于在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
    确定模块,用于根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
    定位模块,用于根据所述最近的关键帧获取视频数据。
  7. 如权利要求6所述的装置,其特征在于,还包括:
    设置模块,用于根据视频的总时长,设置视频进度条的控制区域,所述控制区域的起始位置的时间点为0,结束位置的时间点为视频的总时长;设置所述视频进度条在所述控制区域的任一位置与其对应的视频时间点之间的映射关系;
    所述获取模块,具体用于根据所述进度条拖动停止时在所述控制区域中的位置,以及预设的所述控制区域的任一位置与其对应的视频时间点之间的映射关系,获取与所述进度条拖动停止时在所述控制区域中的位置对应的视频时间点。
  8. 如权利要求6所述的装置,其特征在于,还包括:
    提取模块,用于从所述视频中提取每一个关键帧信息,所述关键帧信息包括所述关键帧在所述视频中对应的时间戳;根据所述关键帧信息生成关键帧信息表。
  9. 如权利要求6-8中任一项所述的装置,其特征在于,所述确定模块具体用于:
    根据所述进度条拖动停止时对应的视频时间点,查询所述关键帧信息表 中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述进度条拖动停止时对应的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
  10. 如权利要求6-8中任一项所述的装置,其特征在于,所述确定模块具体用于:将所述进度条拖动停止时对应的视频时间点加上预设的最大时间偏移量,作为修正后的视频进度条的视频时间点;查询所述关键帧信息表中每个关键帧在所述视频中对应的时间戳,向前确定所述关键帧信息表中与所述修正后的视频进度条的视频时间点匹配的时间戳,将所述匹配的时间戳对应的关键帧确定为最近的关键帧。
  11. 一种电子设备,其特征在于,包括如权利要求6-10任一项所述的视频定位装置。
  12. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1-5任一所述方法。
  13. 一种电子设备,其特征在于,包括:
    一个或多个处理器;以及,
    与所述一个或多个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述一个或多个处理器执行的指令,所述指令被所述一个或多个处理器执行,以使所述一个或多个处理器能够:
    在拖动视频的进度条时,获取所述进度条拖动停止时对应的视频时间点;
    根据所述进度条拖动停止时对应的视频时间点,向前确定与所述进度条拖动停止时对应的视频时间点最近的关键帧;
    根据所述最近的关键帧获取视频数据。
  14. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-5所述的方法。
PCT/CN2016/096012 2015-12-07 2016-08-19 视频定位方法和装置 Ceased WO2017096948A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510890386.2 2015-12-07
CN201510890386.2A CN105898588A (zh) 2015-12-07 2015-12-07 视频定位方法和装置

Publications (1)

Publication Number Publication Date
WO2017096948A1 true WO2017096948A1 (zh) 2017-06-15

Family

ID=57002884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096012 Ceased WO2017096948A1 (zh) 2015-12-07 2016-08-19 视频定位方法和装置

Country Status (2)

Country Link
CN (1) CN105898588A (zh)
WO (1) WO2017096948A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231517A (zh) * 2020-11-04 2021-01-15 支付宝(杭州)信息技术有限公司 一种数据查询方法及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650547A (zh) * 2018-05-09 2018-10-12 北京奇艺世纪科技有限公司 一种视频分享方法、装置及设备
CN108737874A (zh) * 2018-06-05 2018-11-02 武汉斗鱼网络科技有限公司 一种视频播放方法及电子设备
CN108900918A (zh) * 2018-08-17 2018-11-27 深圳市茁壮网络股份有限公司 一种视频点播方法、客户端及电子设备
CN111436005B (zh) 2019-01-15 2022-03-08 北京字节跳动网络技术有限公司 用于显示图像的方法和装置
CN110868642B (zh) * 2019-10-31 2022-03-08 腾讯音乐娱乐科技(深圳)有限公司 视频播放方法、装置及存储介质
CN110913240B (zh) * 2019-12-02 2022-02-22 广州酷狗计算机科技有限公司 视频截取方法、装置、服务器以及计算机可读存储介质
CN113542888B (zh) * 2021-07-09 2024-04-09 北京百度网讯科技有限公司 视频的处理方法、装置、电子设备及存储介质
CN115314654B (zh) * 2022-10-12 2023-01-06 飞狐信息技术(天津)有限公司 一种视频处理方法、系统、存储介质及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137302A (zh) * 2010-12-09 2011-07-27 华为技术有限公司 流媒体视频内容的播放方法和装置
CN103024561A (zh) * 2011-09-28 2013-04-03 深圳市快播科技有限公司 一种拖拽进度条的显示方法及装置
CN103179465A (zh) * 2013-03-22 2013-06-26 广东欧珀移动通信有限公司 一种视频播放进度控制的方法及移动终端
US20140359679A1 (en) * 2013-05-30 2014-12-04 Sonic Ip, Inc. Content streaming with client device trick play index
CN104811812A (zh) * 2014-01-24 2015-07-29 腾讯科技(北京)有限公司 音视频播放进度的控制方法、装置、和系统
CN104918120A (zh) * 2014-03-12 2015-09-16 联想(北京)有限公司 一种播放进度调节方法及电子设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (zh) * 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137302A (zh) * 2010-12-09 2011-07-27 华为技术有限公司 流媒体视频内容的播放方法和装置
CN103024561A (zh) * 2011-09-28 2013-04-03 深圳市快播科技有限公司 一种拖拽进度条的显示方法及装置
CN103179465A (zh) * 2013-03-22 2013-06-26 广东欧珀移动通信有限公司 一种视频播放进度控制的方法及移动终端
US20140359679A1 (en) * 2013-05-30 2014-12-04 Sonic Ip, Inc. Content streaming with client device trick play index
CN104811812A (zh) * 2014-01-24 2015-07-29 腾讯科技(北京)有限公司 音视频播放进度的控制方法、装置、和系统
CN104918120A (zh) * 2014-03-12 2015-09-16 联想(北京)有限公司 一种播放进度调节方法及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231517A (zh) * 2020-11-04 2021-01-15 支付宝(杭州)信息技术有限公司 一种数据查询方法及装置

Also Published As

Publication number Publication date
CN105898588A (zh) 2016-08-24

Similar Documents

Publication Publication Date Title
WO2017096948A1 (zh) 视频定位方法和装置
CN103024561B (zh) 一种拖拽进度条的显示方法及装置
WO2017201935A1 (zh) 视频播放方法及装置
US11615814B2 (en) Video automatic editing method and system based on machine learning
CN109640113B (zh) 一种拖拉视频数据的处理方法及代理服务器
CN104104999B (zh) 音视频信息推荐方法及设备
US11405447B2 (en) Method, apparatus and system for presenting mobile media information
CN110348219A (zh) 版本比对方法、系统、计算机设备及可读存储介质
US10554784B2 (en) Method and system for rendering content using templates
WO2017088408A1 (zh) 一种截取视频分享的实现方法和装置
CN107483597B (zh) 一种资源转移方法、相关设备及系统
US20150193832A1 (en) Method, apparatus, and system for communicating and presenting product information
CN106162362B (zh) 一种视频播放方法及播放器
WO2016165346A1 (zh) 存储和播放音频文件的方法和装置
CN103841464A (zh) 一种视频信息推送方法及装置
CN104090887A (zh) 歌曲搜索方法及装置
CN107517402A (zh) 客户端及浏览器直播视频的录制方法与装置
US10387489B1 (en) Selecting songs with a desired tempo
US20220166824A1 (en) Detecting Sensor-Based Interactions with Client Device in Conjunction with Presentation of Content
CN107507614A (zh) 结合ui执行自然语言命令的方法、设备、系统与存储介质
CN110347900B (zh) 一种关键词的重要度计算方法、装置、服务器及介质
CN105868424B (zh) 音频文件命名方法、装置及电子设备
CN105227355B (zh) 一种多媒体播放列表管理方法、装置及系统
WO2026082050A1 (zh) 直播交互的方法、装置、设备和存储介质
WO2017219691A1 (zh) 页面内容加载方法、装置及电子设备

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872144

Country of ref document: EP

Kind code of ref document: A1