WO2012092725A1 - 视频播放时快进快退处理方法、装置以及移动终端 - Google Patents

视频播放时快进快退处理方法、装置以及移动终端 Download PDF

Info

Publication number
WO2012092725A1
WO2012092725A1 PCT/CN2011/071650 CN2011071650W WO2012092725A1 WO 2012092725 A1 WO2012092725 A1 WO 2012092725A1 CN 2011071650 W CN2011071650 W CN 2011071650W WO 2012092725 A1 WO2012092725 A1 WO 2012092725A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
video file
start time
video
fast
Prior art date
Application number
PCT/CN2011/071650
Other languages
English (en)
French (fr)
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 WO2012092725A1 publication Critical patent/WO2012092725A1/zh

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/41Structure of client; Structure of client peripherals
    • H04N21/414Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance
    • H04N21/41407Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance embedded in a portable device, e.g. video client on a mobile phone, PDA, laptop

Definitions

  • the present invention relates to the field of communications, and in particular to a fast forward and fast rewind processing method, apparatus, and mobile terminal for video playback.
  • Background Art Currently, widely used video files mainly have three frame types: I frame, P frame, and B frame. The following explains this separately:
  • An I-frame (also known as an intra-coded frame) is an independent frame with all the information.
  • the first frame in the video sequence is always an I-frame, which can be decoded independently without reference to other images. If the transmitted bit stream is corrupted, the I frame needs to be used as the starting point or resynchronization point for the new viewer.
  • P-frames (also known as inter-predictive coded frames) need to be referenced by reference to different parts of the previous I-frame and/or P-frame.
  • P frames typically occupy fewer bits of data than I frames, but because P frames have complex dependencies on the preceding P and I reference frames, they are very sensitive to transmission errors.
  • a B frame (also known as a bidirectionally predictive coded frame) requires both the previous frame and the following frame as reference frames.
  • the processing of fast-forward and fast-rewind functions for playing video is as follows: One is to fast forward and rewind, while fast-forwarding and decoding, this method needs to be frame-by-frame during fast forward and rewind. To analyze the content of the video, and then decode, resulting in a speed of '1" mann.
  • the improved method is to analyze the type of each frame during fast forward and fast rewind, if the frame is I frame to decode, if not continue to fast forward Or fast retreat.
  • the drawback of this operation is that the operation speed is relatively slow, generally applicable to PCs or processors with higher-end devices.
  • Another method is to jump to the specified time point according to the user's fast forward and rewind operations. Then, look for the nearest I frame position from this point in time, and then start decoding from this I frame position. This method operates faster, but the progress bar time is not accurate. Because there is no interval between I frames. Standard, so it often happens that the playback time does not stay at the end of the search, the progress bar will jump forward or backward.
  • a primary object of the present invention is to provide a fast forward and fast backward processing method, apparatus, and mobile terminal for video playback, to at least solve one of the above problems.
  • a fast forward and rewind processing method for video playback including: pre-acquiring a playback start time of each I frame in a video file; and performing a fast forward operation, sequentially skipping to the next I The playback start time of the frame; when performing the fast rewind operation, it sequentially jumps to the playback start time of the previous I frame.
  • the I frame index table is read to jump to the playback start time of the next I frame; when the fast rewind operation is performed, the I frame index table is read to jump to the start of the previous I frame. time.
  • the I frame index table further stores the total number of I frames in the video file.
  • acquiring a playback start time of each I frame in the video file includes: reading content of the STSS of the video file to obtain each I in the video file The frame number of the frame, and the content of the STTS of the video file is read to obtain the playback start time of each I frame in the video file.
  • the fast forward operation when the I frame skipped is the last I frame in the video file, if the fast forward operation is continued, the playback ends; when the fast reverse operation is performed, if the jump is performed, The I station is the first I frame in the video file, and then plays from the beginning.
  • a fast forward and rewind processing apparatus for video playback, including: a video parsing module configured to acquire a playback start time of each I frame in the video file; The processing module is configured to jump to the playback start time of the next I frame in sequence when performing the fast forward operation; and skip to the playback start time of the previous I frame in sequence when performing the fast reverse operation.
  • the video parsing module is configured to generate an I-frame index table for playing time of each I frame after acquiring a playback start time of each I frame in the video file, and save the memory in the memory.
  • the processing module is configured to, when performing the fast forward operation, sequentially skip to the play start time of the next I frame by reading the I frame index table; when performing the fast rewind operation, by reading the The I frame index table sequentially jumps to the playback start time of the previous I frame.
  • the I frame index table further stores the total number of I frames in the video file.
  • the video parsing module is further configured to read the content of the STSS of the video file to obtain the frame number of each I frame in the video file, and read Taking the content of the STTS of the video file to obtain the playback start time of each I frame in the video file.
  • a mobile terminal comprising the above-described fast forward and rewind processing device for video playback.
  • the invention solves the problems existing in the fast forward and rewind processing of the video file in the prior art, and improves the user experience.
  • BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  • FIG. 1 is a flow chart of a fast forward and rewind processing method during video playback according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a structure of a fast forward and rewind processing device during video playback according to an embodiment of the present invention
  • 3 is a schematic diagram of a basic format of a 3gp, MP4 file according to an embodiment of the present invention
  • FIG. 4 is a structural block diagram of a mobile phone player according to an embodiment of the present invention
  • FIG. 5 is an I frame index table format according to an embodiment of the present invention.
  • Schematic diagram 6 is a flow chart of generating an I frame time buffer according to an embodiment of the present invention.
  • FIG. 7 is a flow chart of performing fast forward and fast rewind operations according to an embodiment of the present invention.
  • BEST MODE FOR CARRYING OUT THE INVENTION the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
  • a fast forward and fast rewind processing method for video playback is provided, and the method can be applied to a terminal that needs to perform fast forward and rewind processing, for example, a mobile terminal.
  • FIG. 1 is a flowchart of a fast forward and rewind processing method during video playback according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • an I frame index table is generated for the playback start time of each I frame, and is saved in the memory buffer; In the operation, the I frame index table is read to jump to the playback start time of the next I frame; when the fast rewind operation is performed, the playback start time of the previous I frame is sequentially skipped by reading the I frame index table. It is relatively easy to implement the index table. Of course, other methods can be used to record the playback start time of each I frame obtained.
  • the total number of I frames in the video file may also be saved in the I frame index table.
  • the playback start time of each I frame can be obtained according to the format of the video file. It should be noted that the method for obtaining the playback start time of each I frame does not affect the embodiment of the embodiment, which will be described below by way of example.
  • Example ⁇ when the format of the video file is 3gp or MP4, the content of the STSS of the video file can be obtained. The frame number of each I frame in the video file, and reading the content of the STTS of the video file to obtain the playback start time of each I frame in the video file.
  • the judgment of the last I frame and the first I frame may also be added.
  • a fast forward and rewind processing device for video playback is also provided, and the device can be applied to a mobile terminal, and the device is used to implement the foregoing embodiment and preferred embodiments thereof. Further, only the modules involved in the device will be described below. 2 is a structural block diagram of a fast forward and rewind processing apparatus during video playback according to an embodiment of the present invention. As shown in FIG.
  • the structure includes: a video parsing module 22 and a processing module 24, which will be described below.
  • the video parsing module 22 is configured to acquire a play start time of each I frame in the video file;
  • the processing module 24 is connected to the video parsing module 22, and the module is configured to perform the playback of the next I frame in sequence when performing the fast forward operation. Start time; When performing the fast rewind operation, the playback start time of the previous I frame is sequentially counted.
  • the video parsing module 22 is configured to generate an I frame index table for each I frame playback time after acquiring the playback start time of each I frame in the video file, and save the data in the memory buffer; 24, set to skip the playback start time of the next I frame by reading the I frame index table when performing the fast forward operation; skipping to the previous one by reading the above I frame index table when performing the fast rewind operation
  • the playback start time of the I frame is also stored in the I frame index table.
  • the video parsing module 22 is configured to read the content of the STSS of the video file, obtain the frame number of each I frame in the video file, and read the content of the STTS of the video file.
  • the information of the I frame is obtained in advance, and an I frame index table is generated, and then operated according to the index table during fast forward and fast backward. Therefore, the problem of slow speed caused by frame-by-frame parsing in the prior art is overcome, and the problem of jumping directly caused by directly retrieving the I frame without resolving the I frame is not solved at all, and the fast forward and fast rewind are improved.
  • FIG. 3 is a schematic diagram of a basic format of a 3gp and MP4 file according to an embodiment of the present invention.
  • the video files of the 3gp and MP4 formats each include a file type, a video header information, and a video data area.
  • all configuration information and data information are configured according to the atomic tree mode.
  • the root atom is configured as a moov atom, and the data root atom is an mdat atom.
  • trak audio/video track
  • the trak indicating the audio storage information is the audio track
  • the video storage information is the video track.
  • the sub-atom hdlr atom in each trak can identify whether the frame is a video frame or an audio frame. If Hdlr is "vide” for a video frame, if Hdlr is "soun", it represents an audio frame.
  • the STSS configuration block mainly describes the frame numbers of all I frames of the video. This will be explained below.
  • the STTS configuration block describes the playback time of all frames of the video, in milliseconds. This is explained below.
  • the mobile phone player before the video is played, the information of the I frame is obtained in advance, and an I frame index table is generated, and then operated according to the index table during fast forward and fast rewind, which can improve fast forward and fast backward. Speed and accuracy improve the user experience, especially on low-end phones.
  • the mobile phone player includes: a video parsing module 10, a video decoding module 20, a player UI module 30, and a broadcast.
  • the player master control module 40 (where the player master control module, the player UI module, and the video decoding module implement the functions of the above processing module), wherein the player master control module 40 is responsible for calling the video parsing module 10 to read the video file.
  • the player master control module controls the video parsing module 10 to read the video data, and calls the video decoding module 20 to play the data, and the player UI module 30 reads the video playing time at a fixed period to refresh.
  • Player interface In this embodiment, the information of the I frame is obtained in advance by the video parsing module 10 by using the software method, and an I frame index table is generated.
  • FIG. 5 is a schematic diagram of the format of the I frame index table according to the embodiment of the present invention. As shown in FIG. 5, the table includes the number of I frames and the playing time of each I frame. Then, when the user performs fast forward and fast rewind on the video file, according to the index table, the table can be greatly improved. Increased speed and accuracy of entering and rewinding to enhance the user experience. 6 is a flowchart of generating an I frame time buffer according to an embodiment of the present invention. (It should be noted that the module is not involved in FIG.
  • Step S601 The player general control module 40 calls the video parsing module 10 to analyze the video, and the video parsing module 10 parses the content of the video file to obtain a video trak.
  • step S602 the video parsing module 10 parses the video trak, obtains the specific data of the STSS and the STTS of the video, and reads the data into the memory.
  • step S603 the video parsing module 10 analyzes the content of the STSS, obtains how many I frames are shared by the video, and then allocates a memory buffer according to the number of I frames.
  • Step S604 the video parsing module 10 reads the content of the STTS according to the parsed content, and obtains the length of time of each frame.
  • Step S605 the video parsing module 10 calculates the play start time of each I frame by using the time length information of each frame of the STTS according to the sequence number of the I frame.
  • step S606 the video parsing module 10 saves the total number of I frames and the play time of all I frames into the memory buffer.
  • the I frame index table is generated. The purpose of saving the total number is to avoid accessing the memory out of bounds during the search. After generating the I frame time buffer, the user can fast forward or rewind the file.
  • Step S701 performing a fast forward or fast reverse operation. It is determined whether the current I frame is the last I frame in the user operation direction. If not, step S702 is performed, and if yes, step S704 is performed.
  • Step S702 Obtain an index of an I frame in the I frame index table in the user operation direction according to the current time, and obtain a time of the next I frame. When the user fast forward time is equal to the I frame time, the player UI module 30 refreshes. progress bar. Step S703, fast forward to the time of the next I frame, and notify the player UI module 30 to draw a progress bar.
  • Step S704 if it is a fast rewind operation, and if the current I frame is the first frame, the playback starts from the beginning, if it is a fast forward operation, and if the current I frame is the last frame, the playback ends. If it is not the last I frame, continue processing.
  • the time each time the user sees is an I frame time, so the time jump phenomenon after the end of the operation is not generated. This can effectively improve the user's visual experience during operation.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Description

视频番放时 ' 进 ' 退处理方法、 装置以及移动终端 技术领域 本发明涉及通信领域, 具体而言, 涉及一种视频播放时快进快退处理方 法、 装置以及移动终端。 背景技术 目前, 广泛使用的视频文件主要有 I帧、 P帧、 B帧三种帧类型。 下面 对此分别进行说明:
I帧 (也称为帧内编码帧) 是一种自带全部信息的独立帧, 视频序列中 的第一个帧始终都是 I帧, 其无需参考其它图像便可独立进行解码。 如果所 传输的比特流遭到破坏,则需要将 I帧用作新查看器的起始点或重新同步点。
P帧 (也成为帧间预测编码帧) 需要参考前面的 I帧和 /或 P帧的不同部 分才能进行编码。 与 I帧相比, P帧通常占用更少的数据位, 但由于 P帧对 前面的 P和 I参考帧有着复杂的依赖性, 因此对传输错误非常敏感。
B帧 (也称为双向预测编码帧) 需要同时以前面的帧和后面的帧作为参 考帧。 目前, 对正在播放视频执行快进、 快退功能的处理有如下几种: 一种是在快进、 快退时, 一边快进一边解码, 这种方法需要在快进快退 时逐个帧的去分析视频的内容, 然后解码, 导致速度' 1"曼。 其改进的方法是在 快进、 快退时分析每个帧的类型, 如果这个帧是 I帧才解码, 如果不是则继 续快进或者快退。 然而, 这样操作的缺陷是操作速度比较慢, 一般适用于 PC 或者处理器比较高端的设备。 另一种方法是按照用户的快进、 快退操作跳到进度条指定的时间点, 然 后从这个时间点寻找最近的一个 I帧位置, 然后从这个 I帧位置出开始解码。 这种方法操作速度比较快, 但是进度条时间并不准确。 因为 I帧之间的间隔 并没有一个标准, 所以经常会产生播放时间没有停留在搜索结束时的位置, 进度条就会向前或者向后跳跃的现象。 而产生这种跳跃的原因就是因为快进 完成后视频解码器需要重新解码, 而这个解码必须从最近的一个 I帧开始, 而用户快进、 快退的结束时间往往是一个 P帧、 或者 B帧, 所以解码器需要 在用户快进、 快退的基础上重新搜索到最近的一个 I帧的位置, 而两个 I帧 之间的间隔往往需要几秒钟甚至 10几秒钟时间。 因此, 用户能明显感觉到 搜索结束后进度条产生的明显跳跃现象, 导致影响用户的视觉体验。 综上可知, 现有技术中视频文件的快进快退的处理均存在问题。 发明内容 本发明的主要目的在于提供一种视频播放时快进快退处理方法、 装置以 及移动终端, 以至少解决上述问题之一。 根据本发明的一个方面, 提供了一种视频播放时快进快退处理方法, 包 括: 预先获取视频文件中每一个 I帧的播放开始时间; 在执行快进操作时, 依次跳到下一个 I帧的播放开始时间; 在执行快退操作时, 依次跳到前一个 I帧的播放开始时间。 优选地, 在获取到所述视频文件中每一个 I帧的播放开始时间之后, 将 所述每一个 I帧的播放开始时间生成 I帧索引表, 并保存在内存緩冲中; 在 执行快进操作时, 通过读取所述 I帧索引表依次跳到下一个 I帧的播放开始 时间; 在执行快退操作时, 通过读取所述 I帧索引表依次跳到前一个 I帧的 播放开始时间。 优选地, 所述 I帧索引表中还保存有所述视频文件中的 I帧的总个数。 优选地, 在所述视频文件的格式为 3gp或 MP4时, 获取视频文件中每一 个 I帧的播放开始时间包括: 读取所述视频文件的 STSS的内容获取到所述 视频文件中每一个 I帧的帧序号, 读取所述视频文件的 STTS的内容获取到 所述视频文件中每一个 I帧的播放开始时间。 优选地, 在执行快进操作时, 在跳到的 I帧为所述视频文件中的最后一 个 I帧时, 如果继续执行快进操作则播放结束; 在执行快退操作时, 如果跳 到的 I站为所述视频文件中的第一个 I帧, 则从头开始播放。 根据本发明的另一个方面,还提供了一种视频播放时快进快退处理装置, 包括: 视频解析模块, 设置为获取视频文件中每一个 I帧的播放开始时间; 处理模块, 设置为在执行快进操作时, 依次跳到下一个 I帧的播放开始时间; 在执行快退操作时, 依次跳到前一个 I帧的播放开始时间。 优选地, 所述视频解析模块, 设置为在获取到所述视频文件中每一个 I 帧的播放开始时间之后, 将所述每一个 I帧的播放时间生成 I帧索引表, 并 保存在内存緩冲中; 所述处理模块, 设置为在执行快进操作时, 通过读取所 述 I帧索引表依次跳到下一个 I帧的播放开始时间; 在执行快退操作时, 通 过读取所述 I帧索引表依次跳到前一个 I帧的播放开始时间。 优选地, 所述 I帧索引表中还保存有所述视频文件中的 I帧的总个数。 优选地, 在所述视频文件的格式为 3gp或 MP4时, 所述视频解析模块还 设置为读取所述视频文件的 STSS的内容获取到所述视频文件中每一个 I帧 的帧序号, 读取所述视频文件的 STTS的内容获取到所述视频文件中每一个 I帧的播放开始时间。 根据本发明的另一个方面, 还提供了一种移动终端, 包括上述的视频播 放时快进快退处理装置。 通过本发明, 解决了现有技术中视频文件快进快退处理中存在的问题, 提高了用户体验。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中: 图 1是根据本发明实施例的视频播放时快进快退处理方法的流程图; 图 2是根据本发明实施例的视频播放时快进快退处理装置的结构框图; 图 3是根据本发明实施例的中所涉及的 3gp、 MP4文件基本格式的示意 图; 图 4是根据本发明实施例的手机播放器的结构框图; 图 5是根据本发明实施例 I帧索引表格式的示意图; 图 6是根据本发明实施例生成 I帧时间緩冲区的流程图; 图 7是根据本发明实施例进行快进、 快退操作的流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在本实施例中, 提供了一种视频播放时快进快退处理方法, 该方法可以 应用于需要进行快进快退处理的终端中, 例如, 移动终端。 图 1是根据本发 明实施例的视频播放时快进快退处理方法的流程图, 如图 1所示, 该流程包 括以下步 4聚:
S 102, 预先获取视频文件中每一个 I帧的播放开始时间;
S 104, 在执行快进操作时, 依次跳到下一个 I帧的播放开始时间; 在执 行快退操作时, 依次跳到前一个 I帧的播放开始时间。 通过上述步骤, 可以在进行快进快退处理之前, 获取到每一个 I帧的播 放开始时间, 从而在快进快退是直接跳到下一个 I帧的播放开始时间, 与现 有的两种相比, 在操作速度比较快的前提下避免了出现跳跃的问题, 从而提 高了用户体验。 优选的, 在实施时, 可以在获取到视频文件中每一个 I帧的播放开始时 间之后, 将每一个 I帧的播放开始时间生成 I帧索引表, 并保存在内存緩冲 中; 在执行快进操作时, 通过读取 I帧索引表依次跳到下一个 I帧的播放开 始时间; 在执行快退操作时, 通过读取 I帧索引表依次跳到前一个 I帧的播 放开始时间。 通过索引表的方式实现比较容易, 当然也可以釆用其他的方式 来记录获取到的每一个 I帧的播放开始时间。 优选的, 为了防止在搜索时访 问内存越界, 在该 I帧索引表中还可以保存视频文件中的 I帧的总个数。 在实施时, 可以根据视频文件的格式的不同来获取每一个 I帧的播放开 始时间。 需要说明的是, 无论通过哪种方式来获取每个 I帧的播放开始时间 均不影响本实施例的实施例, 以下以举例的方式进行说明。 例 ^, 在视频文 件的格式为 3gp或 MP4时,可以通过读取视频文件的 STSS的内容获取到该 视频文件中每一个 I帧的帧序号, 并读取该视频文件的 STTS的内容获取到 该视频文件中每一个 I帧的播放开始时间。 优选的, 在实施时, 为了进一步提高用户体验, 还可以增加最后一个 I 帧和第一个 I帧的判断。 例如, 在执行快进操作时, 当兆到的 I帧为视频文 件中的最后一个 I帧时, 如果用户继续执行快进操作则播放结束; 在执行快 退操作时, 如果跳到的 I站为视频文件中的第一个 I帧, 则从头开始播放。 在本实施例中, 还提供了一种视频播放时快进快退处理装置, 该装置可 以应用于移动终端中, 该装置用于实现上述实施例及其优选实施方式, 已经 进行过说明的不再赘述, 下面仅对该装置中涉及到的模块进行说明。 图 2是 根据本发明实施例的视频播放时快进快退处理装置的结构框图,如图 2所示, 该结构包括: 视频解析模块 22和处理模块 24, 下面对此进行说明。 视频解析模块 22, 设置为获取视频文件中每一个 I帧的播放开始时间; 处理模块 24连接至视频解析模块 22, 该模块设置为在执行快进操作时, 依 次兆到下一个 I帧的播放开始时间; 在执行快退操作时, 依次兆到前一个 I 帧的播放开始时间。 优选的, 视频解析模块 22, 设置为在获取到视频文件中每一个 I帧的播 放开始时间之后, 将每一个 I帧的播放时间生成 I帧索引表, 并保存在内存 緩冲中; 处理模块 24, 设置为在执行快进操作时, 通过读取 I帧索引表依次 跳到下一个 I帧的播放开始时间; 在执行快退操作时, 通过读取上述 I帧索 引表依次跳到前一个 I帧的播放开始时间。 优选的, I帧索引表中还保存有视频文件中的 I帧的总个数。 优选的, 在视频文件的格式为 3gp或 MP4时, 视频解析模块 22用于读 取视频文件的 STSS的内容获取到视频文件中每一个 I帧的帧序号, 读取视 频文件的 STTS的内容获取到视频文件中每一个 I帧的播放开始时间。 通过本实施例, 在播放视频前, 提前得到 I帧的信息, 并生成一个 I帧 索引表, 然后在快进、 快退时根据这个索引表来操作。 从而克服了现有技术 中需要逐帧解析而导致的速度很慢的问题, 以及根本不解析直接快进到指定 时间然后在重新查找 I帧而导致的跳跃的问题, 提升了快进、 快退的速度和 精确性, 提高了用户的体验。 以下以 3gp和 MP4格式的视频文件为例进行说明。 为了更好的进行说明,首先对 3gp和 MP4的这两种视频文件格式进行分 析, 这两种视频文件格式比较近似。 图 3是才艮据本发明实施例的中所涉及的 3gp、 MP4文件基本格式的示意图, 3gp和 MP4格式的视频文件均包括文件 类型、 视频头信息、 视频数据区三部分。 在 3gp和 MP4文件中, 所有的配置 信息和数据信息按照原子树的模式配置。 配置根原子是 moov原子, 数据根 原子是 mdat原子。 moov原子中有很多音频 /视频轨 (trak ) 原子, trak原子 用来表示不同的音视频具体信息。 表示音频存放信息的 trak是音频轨, 表示 视频存放信息的是视频轨。 其中, 每个 trak中的子原子 hdlr原子可以识别这 帧是视频帧还是音频帧, 如果 Hdlr为 "vide"代表视频帧, 若 Hdlr为 "soun"则 代表音频帧。 每个 trak中有两个子原子 STSS和 STTS , STSS这个配置块主要描述了 该视频的所有 I帧的帧序号。 下面对此进行说明。
STSS 原子
00 00 00 24 长度 73 74 73 73 STSS标示
00 00 00 00 版本信息
00 00 00 05 I帧总个数
00 00 00 01 I帧索引
00 00 00 1F 00 00 00 3D 00 00 01 5B
00 00 02 79
STTS这个配置块描述了该视频所有帧的播放时间, 单位是毫秒。 下面 对此进行说明。
STTS 原子 00 00 E7 90 长度
73 74 74 73 STTS标示
00 00 00 00 版本信息
00 00 1C F0 总个数
Figure imgf000008_0001
00 00 OB BB 这一帧的帧时间长度
00 00 00 02 接下来两帧同一时间长度
00 00 11 97 这两帧的帧时间长度
00 00 00 01
00 00 OB BB
00 00 00 01 00 00 11 9A 在本实施例中, 视频开始播放前才艮据读取 STSS的内容得到该视频共有 多少个 I帧。 然后根据 I帧的数量分配一个内存緩冲。 读取 STTS的内容, 并根据 I帧的序号, 计算出每个 I帧的播放时间。 在用户需要快进或者快退 时, 才艮据内存緩冲中 I帧的位置, 每次向前, 或者向后时跳到某个 I帧来确 定时间。 这样每次用户看到的时间都是一个 I帧的时间, 解码器可以从这个 时间开始重新解码。 通过本优选实施例, 在播放视频前, 提前得到 I帧的信息, 并生成一个 I帧索引表, 然后在快进、 快退时根据这个索引表来操作, 这样可以提升快 进、 快退的速度和精确性, 提升了用户体验, 尤其是在低端手机上可以有效 的提升用户体验。 下面以手机上的播放器为例进行说明。 图 4是 居本发明实施例的手机播放器的结构框图, 如图 4所示, 该手 机播放器包括: 视频解析模块 10、 视频解码模块 20、 播放器 UI模块 30、 播 放器总控模块 40 (其中, 播放器总控模块、 播放器 UI模块、 视频解码模块 实现了上述处理模块的功能), 其中播放器总控模块 40负责调用视频解析模 块 10来读取视频文件相关配置信息, 完成初始化工作。 初始化完成后, 播 放器总控模块, 控制视频解析模块 10来读取视频数据, 并调用视频解码模 块 20来播放数据, 同时播放器 UI模块 30以固定的周期来读取视频播放时 间, 来刷新播放器界面。 在本实施例中, 可以通过软件方法在播放视频前, 利用视频解析模块 10 提前得到 I帧的信息, 并生成一个 I帧索引表, 图 5是根据本发明实施例 I 帧索引表格式的示意图, 如图 5所示, 该表包括 I帧的数目, 以及各个 I帧 的播放时间, 然后当用户对视频文件进行在快进、 快退时, 根据这个索引表 来操作, 这样可以大大提升快进、 快退的速度和精确性, 提升用户体验。 图 6是根据本发明实施例生成 I帧时间緩冲区的流程图(需要说明的是, 在图 6中并没有涉及到模块, 在以下步骤的描述中结合了模块进行说明), 该流程包括如下步骤: 步骤 S601 , 播放器总控模块 40调用视频解析模块 10来分析视频, 视频 解析模块 10解析视频文件的内容, 得到视频 trak。 步骤 S602,视频解析模块 10解析视频 trak,得到该视频的 STSS和 STTS 的具体数据, 并把这些数据读入内存。 步骤 S603 , 视频解析模块 10分析 STSS的内容, 得到该视频共有多少 个 I帧, 然后根据 I帧的数量分配一个内存緩冲。 步骤 S604, 视频解析模块 10才艮据解析的内容读取 STTS的内容, 得到 每个帧的时间长度。 步骤 S605 , 视频解析模块 10根据 I帧的序号, 利用 STTS的每帧时间 长度信息, 计算出每个 I帧的播放开始时间。 步骤 S606,视频解析模块 10把 I帧的总个数和所有 I帧的播放时间保存 到内存緩冲中。 生成 I帧索引表, 保存总个数的目的是在搜索时避免访问内 存越界。 在生成 I帧时间緩冲区后, 用户可以对文件进行快进或快退的操作, 图
7是根据本发明实施例进行快进、 快退操作的流程图, 该流程包括如下步骤: 步骤 S701 , 执行快进或者快退操作。 判断当前 I帧是否为用户操作方向上的最后一个 I帧, 如果不是, 执行 步骤 S702, 如果是, 则执行步骤 S704。 步骤 S702, 根据当前时间得到用户操作方向下一个 I帧在 I帧索引表中 的索引, 并获得下一个 I帧的时间, 用户快进时间等于该 I帧时间时, 则播 放器 UI模块 30刷新进度条。 步骤 S703 , 快进到下一个 I帧的时间, 并通知播放器 UI模块 30绘制进 度条。 步骤 S704, 如果是快退操作, 并且如果当前 I帧是第一帧则从头开始播 放, 如果是快进操作, 并且如果当前 I帧是最后一帧, 则结束播放。 如果不是最后一个 I帧, 则继续处理。 经过以上的操作, 每次用户看到的时间都是一个 I帧的时间, 所以也不 会产生操作结束后时间跳跃现象。 这样就可以较为有效的提升用户在操作时 的视觉体验。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而可以将它们存储在存储装置中由计算装置来执行, 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作 成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件 结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的^"神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。

Claims

权 利 要 求 书
1. 一种视频播放时快进快退处理方法, 包括:
预先获取视频文件中每一个 I帧的播放开始时间;
在执行快进操作时, 依次跳到下一个 I帧的播放开始时间; 在执 行快退操作时, 依次跳到前一个 I帧的播放开始时间。
2. 根据权利要求 1所述的方法, 其中,
在获取到所述视频文件中每一个 I帧的播放开始时间之后, 将所 述每一个 I帧的播放开始时间生成 I帧索引表, 并保存在内存緩冲中; 在执行快进操作时, 通过读取所述 I帧索引表依次跳到下一个 I 帧的播放开始时间; 在执行快退操作时, 通过读取所述 I帧索引表依 次兆到前一个 I帧的播放开始时间。
3. 根据权利要求 2所述的方法, 其中, 所述 I帧索引表中还保存有所述 视频文件中的 I帧的总个数。
4. 根据权利要求 1至 3中任一项所述的方法, 其中, 在所述视频文件的 格式为 3gp或 MP4时, 获取视频文件中每一个 I帧的播放开始时间包 括:
读取所述视频文件的存储了每个 I帧的序号 STSS的内容获取到所 述视频文件中每一个 I帧的帧序号, 读取所述视频文件的存储每个帧 的时间信息 STTS的内容获取到所述视频文件中每一个 I帧的播放开始 时间。
5. 根据权利要求 1所述的方法, 其中,
在执行快进操作时, 在跳到的 I帧为所述视频文件中的最后一个 I 帧时, 如果继续执行快进操作则播放结束; 在执行快退操作时, 如果 跳到的 I站为所述视频文件中的第一个 I帧, 则从头开始播放。
6. —种视频播放时快进快退处理装置, 包括:
视频解析模块, 设置为获取视频文件中每一个 I帧的播放开始时 间; 处理模块, 设置为在执行快进操作时, 依次跳到下一个 I帧的播 放开始时间; 在执行快退操作时, 依次跳到前一个 I帧的播放开始时 间。
7. 根据权利要求 6所述的装置, 其中,
所述视频解析模块, 设置为在获取到所述视频文件中每一个 I帧 的播放开始时间之后, 将所述每一个 I帧的播放时间生成 I帧索引表, 并保存在内存緩冲中;
所述处理模块, 设置为在执行快进操作时, 通过读取所述 I帧索 引表依次跳到下一个 I帧的播放开始时间; 在执行快退操作时, 通过 读取所述 I帧索引表依次跳到前一个 I帧的播放开始时间。
8. 根据权利要求 7所述的装置, 其中, 所述 I帧索引表中还保存有所述 视频文件中的 I帧的总个数。
9. 根据权利要求 6所述的装置, 其中, 在所述视频文件的格式为 3gp或 MP4时, 所述视频解析模块还设置为读取所述视频文件的 STSS的内 容获取到所述视频文件中每一个 I帧的帧序号, 读取所述视频文件的 STTS的内容获取到所述视频文件中每一个 I帧的播放开始时间。
10. —种移动终端, 其中, 包括权利要求 6至 9中任一项所述的视频播放 时快进快退处理装置。
PCT/CN2011/071650 2011-01-07 2011-03-09 视频播放时快进快退处理方法、装置以及移动终端 WO2012092725A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011100026101A CN102123281A (zh) 2011-01-07 2011-01-07 视频播放时快进快退处理方法、装置以及移动终端
CN201110002610.1 2011-01-07

Publications (1)

Publication Number Publication Date
WO2012092725A1 true WO2012092725A1 (zh) 2012-07-12

Family

ID=44251707

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/071650 WO2012092725A1 (zh) 2011-01-07 2011-03-09 视频播放时快进快退处理方法、装置以及移动终端

Country Status (2)

Country Link
CN (1) CN102123281A (zh)
WO (1) WO2012092725A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501166A (zh) * 2021-11-18 2022-05-13 武汉市烽视威科技有限公司 Dash点播快进快退方法及系统

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271131A (zh) * 2011-07-25 2011-12-07 中兴通讯股份有限公司 节目源文件预处理及点播的方法、系统及流媒体服务器
CN102780919A (zh) * 2012-08-24 2012-11-14 乐视网信息技术(北京)股份有限公司 通过关键帧进行视频定位和播放的方法
CN103957471B (zh) * 2014-05-05 2017-07-14 华为技术有限公司 网络视频播放的方法和装置
CN105451073B (zh) * 2015-11-16 2018-11-02 深圳Tcl数字技术有限公司 Mp4视频源的传送方法和装置
CN105916035A (zh) * 2015-12-15 2016-08-31 乐视致新电子科技(天津)有限公司 一种快速定位播放时间点的显示方法及装置
CN106385633B (zh) * 2016-09-27 2019-12-10 深圳市九洲电器有限公司 一种个人视频录像方法及系统
CN106658201B (zh) * 2017-01-13 2019-08-06 北京元心科技有限公司 优化播放器进度条的方法及装置
CN108200434A (zh) * 2017-12-25 2018-06-22 四川迪佳通电子有限公司 流媒体播放方法及系统
CN110072123B (zh) * 2018-01-24 2022-04-15 中兴通讯股份有限公司 一种视频的恢复播放方法、视频播放终端及服务器

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (zh) * 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置
CN101635847A (zh) * 2009-09-02 2010-01-27 中兴通讯股份有限公司 一种流媒体的传输方法、视频播放装置及终端
CN101841692A (zh) * 2010-04-23 2010-09-22 深圳市茁壮网络股份有限公司 视频流快进快退的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (zh) * 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置
CN101635847A (zh) * 2009-09-02 2010-01-27 中兴通讯股份有限公司 一种流媒体的传输方法、视频播放装置及终端
CN101841692A (zh) * 2010-04-23 2010-09-22 深圳市茁壮网络股份有限公司 视频流快进快退的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501166A (zh) * 2021-11-18 2022-05-13 武汉市烽视威科技有限公司 Dash点播快进快退方法及系统

Also Published As

Publication number Publication date
CN102123281A (zh) 2011-07-13

Similar Documents

Publication Publication Date Title
WO2012092725A1 (zh) 视频播放时快进快退处理方法、装置以及移动终端
US10705709B2 (en) Playing media
US8670072B1 (en) Method and apparatus for streaming media data processing, and streaming media playback equipment
CN102714050B (zh) 恢复内容回放的存储设备和方法
US8856218B1 (en) Modified media download with index adjustment
EP3739895A1 (en) Media playback
CN101106637A (zh) 通过机顶盒实现对外接存储设备的媒体文件播放的方法
EP3142381B1 (en) Network video playing method and device
CN103596059A (zh) 智能电视媒体播放器及其播放进度调整方法、智能电视
RU2005134850A (ru) Устройство воспроизведения мультимедийных данных, способ приема аудиоданных и структура аудиоданных в них
WO2014079239A1 (zh) 实时视频通讯回放数据流的获取方法、装置及系统
WO2017202060A1 (zh) 一种视频播放方法及装置
US20100247066A1 (en) Method and apparatus for reverse playback of encoded multimedia content
KR20140010337A (ko) 전자기기 및 그 제어방법
JP5282383B2 (ja) コンテンツ再生装置、コンテンツ再生方法、プログラム、およびコンテンツ再生システム
JP2022531084A (ja) ビデオ処理方法及び装置、端末、及びコンピュータプログラム
US20120093489A1 (en) Smooth rewind media playback
CN102811380B (zh) 多媒体文件中音视频数据的解复用方法及装置
CN102065320B (zh) 用于处理关于ts码流的特技播放命令的方法和设备
US20090136204A1 (en) System and method for remote live pause
CN108810575B (zh) 一种发送目标视频的方法和装置
WO2015018119A1 (zh) 一种多媒体文件生成的方法及多媒体设备
US20150189365A1 (en) Method and apparatus for generating a recording index
JP2007048378A (ja) 記録装置、記録方法、記録方法のプログラム及び記録方法のプログラムを記録した記録媒体
CN114339289B (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: 11854552

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

Country of ref document: EP

Kind code of ref document: A1