WO2010102525A1 - Method for generating gif, and system and media player thereof - Google Patents

Method for generating gif, and system and media player thereof Download PDF

Info

Publication number
WO2010102525A1
WO2010102525A1 PCT/CN2010/070248 CN2010070248W WO2010102525A1 WO 2010102525 A1 WO2010102525 A1 WO 2010102525A1 CN 2010070248 W CN2010070248 W CN 2010070248W WO 2010102525 A1 WO2010102525 A1 WO 2010102525A1
Authority
WO
WIPO (PCT)
Prior art keywords
gif
user
file
generation
target
Prior art date
Application number
PCT/CN2010/070248
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 腾讯科技(深圳)有限公司
Priority to SG2011058757A priority Critical patent/SG173703A1/en
Publication of WO2010102525A1 publication Critical patent/WO2010102525A1/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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/034Electronic editing of digitised analogue information signals, e.g. audio or video signals on discs
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • 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/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
    • H04N21/8153Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics comprising still images, e.g. texture, background image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards
    • H04N5/4448Receiver circuitry for the reception of television signals according to analogue transmission standards for frame-grabbing

Definitions

  • Frame Interval Define how long to extract a frame in the video. The frame interval is different and the number of extracted video frames will be different.
  • GIF playback speed Define the playback speed of the generated target GIF file.
  • the target GIF file saving module 56 saves the generated target GIF file output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Graphics (AREA)
  • Theoretical Computer Science (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention is applicable to the field of data processing, and provides a method for generating the Graphics Interchange Format (GIF) and the system and the media player thereof. The method includes the following steps: receiving a parameter for generating GIF set by a user; stopping playing a media file after having received a command for generating GIF of the user, and intercepting a video frame of the media file into single images based on the parameter for generating GIF set by the user; coding the single images based on the parameter for generating GIF set by the user, so as to generate an object GIF file. The present invention could intercept the video content of the media file based on the parameter for generating GIF set by the user during playing the media, so as to generate an object GIF file, while the user does not need to install and learn to use the special authoring tool for the GIF file, and the operating flow is simple and is convenient for the user to use.

Description

一种 GIF生成方法、 系统及媒体播放器 技术领域  GIF generation method, system and media player
本发明属于数据处理领域, 尤其涉及一种 GIF生成方法、 系统及媒 体播放器。 发明背景  The present invention belongs to the field of data processing, and in particular, to a GIF generation method, system, and media player. Background of the invention
目前, 使用媒体播放器观看视频成为用户普遍的学习和休闲娱乐方 式, 在视频观看过程中, 用户希望将视频中的筒短画面保存下来, 或者 与其他用户分享。 主流的媒体播放器软件一般都支持视频截图功能, 将 播放的一帧截取成一个 JPG或 BMP文件, 其不足这样操作是只能保存 单张的图片, 不能保存一个视频片段。  At present, watching videos using a media player has become a popular learning and leisure mode for users. During the video viewing process, the user wants to save the short picture in the video or share it with other users. The mainstream media player software generally supports the video capture function, which intercepts a frame to be played as a JPG or BMP file. Insufficient operation is that only a single picture can be saved, and a video clip cannot be saved.
图像互换格式(Graphics Interchange Format, GIF )的一个特点是在 一个 GIF文件中可以存多幅彩色图像, 如果将存于一个文件中的多幅图 像逐幅读出并显示到屏幕上, 就可构成一种最筒单的动画。 目前, 几乎 所有相关软件都支持 GIF,公共领域有大量的软件在使用 GIF图像文件。  One of the features of the Graphics Interchange Format (GIF) is that multiple color images can be stored in one GIF file. If multiple images stored in one file are read out one by one and displayed on the screen, Forms the most single animation. Currently, almost all related software supports GIF, and there are a large number of software in the public domain that use GIF image files.
在将视频数据转换为 GIF文件时, 常见的做法是在媒体播放器中将 感兴趣的视频片段一帧帧截图下来, 保存成若干张独立的图片, 然后使 用特定的 GIF文件制作工具将这些图片制作成 GIF。 这种做法要求用户 独立安装特定的 GIF文件制作工具, 并且会使用 GIF文件制作工具, 操 作流程繁瑣, 给用户带来艮大不便。 发明内容  When converting video data to GIF files, it is common practice to take a frame of the video clip of interest in the media player and save it as a number of separate images, then use a specific GIF file creation tool to place the images. Made into a GIF. This approach requires users to install specific GIF file creation tools independently, and will use GIF file creation tools, which is cumbersome and inconvenient for users. Summary of the invention
本发明实施例的目的在于提供一种 GIF生成方法, 旨在解决现有技 术在将视频数据转换成 GIF时,用户需要安装特定的 GIF文件制作工具, 操作流程繁瑣, 给用户带来很大不便的问题。 An object of the present invention is to provide a GIF generation method, which is intended to solve the problem that a user needs to install a specific GIF file creation tool when converting video data into a GIF. The operation process is cumbersome and causes great inconvenience to the user.
本发明实施例是这样实现的, 一种 GIF生成方法, 所述方法包括下 述步骤:  The embodiment of the present invention is implemented as follows. A GIF generating method includes the following steps:
接收用户设定的 GIF生成参数;  Receiving user-set GIF generation parameters;
收到用户的 GIF生成指令后, 停止媒体文件的播放, 根据用户设定 的 GIF生成参数将媒体文件的视频帧截取成单一图像;  After receiving the user's GIF generation instruction, the media file is stopped, and the video frame of the media file is intercepted into a single image according to the GIF generation parameter set by the user;
根据用户设定的 GIF生成参数, 将所述单一图像进行编码, 生成目 标 GIF文件。  The single image is encoded according to a user-set GIF generation parameter to generate a target GIF file.
本发明实施例的另一目的在于提供一种 GIF生成系统, 所述系统包 括:  Another object of embodiments of the present invention is to provide a GIF generation system, the system comprising:
GIF参数控制模块, 用于接收用户设定的 GIF生成参数;  a GIF parameter control module, configured to receive a user-set GIF generation parameter;
视频帧抽取模块, 用于收到用户的 GIF生成指令后, 停止媒体文件 的播放, 根据用户设定的 GIF生成参数将媒体文件的视频帧截取成单一 图像;  The video frame extraction module is configured to: after receiving the GIF generation instruction of the user, stop playing the media file, and intercept the video frame of the media file into a single image according to the GIF generation parameter set by the user;
GIF编码模块, 用于根据用户设定的 GIF生成参数, 将所述单一图 像进行编码, 生成目标 GIF文件。  The GIF encoding module is configured to encode the single image according to a user-set GIF generating parameter to generate a target GIF file.
本发明实施例的另一目的在于提供一种媒体播放器, 包括视频后处 理单元, 用于对解码后的视频数据进行视频处理, 所述媒体播放器还包 括有一 GIF生成子系统, 用于根据用户设定的 GIF生成参数, 从所述视 频后处理单元图像处理后的视频数据中截取生成目标 GIF文件。  Another object of the embodiments of the present invention is to provide a media player, including a video post-processing unit, configured to perform video processing on the decoded video data, where the media player further includes a GIF generating subsystem, configured to The user-set GIF generation parameter intercepts the generated target GIF file from the video data processed by the video post-processing unit image.
本发明实施例可以在媒体播放过程中根据用户设定的 GIF生成参数 截取媒体文件的视频内容生成目标 GIF文件, 用户不需要安装和学习使 用专门的 GIF文件制作工具, 操作流程筒单, 方便用户使用。 附图简要说明 In the embodiment of the present invention, the target GIF file may be generated by intercepting the video content of the media file according to the GIF generation parameter set by the user during the media playing process, and the user does not need to install and learn to use the special GIF file creation tool, and the operation flow is simple, and the user is convenient. use. BRIEF DESCRIPTION OF THE DRAWINGS
图 1是本发明实施例提供的 GIF生成方法的实现流程图; 图 2是本发明的一个实施例提供的 GIF生成方法的具体实现流程 图;  1 is a flowchart of an implementation of a GIF generation method according to an embodiment of the present invention; FIG. 2 is a specific implementation flow diagram of a GIF generation method according to an embodiment of the present invention;
图 3是本发明实施例提供的 GIF生成 UI界面示意图;  3 is a schematic diagram of a GIF generation UI interface provided by an embodiment of the present invention;
图 4是本发明实施例提供的媒体播放器的结构图;  4 is a structural diagram of a media player according to an embodiment of the present invention;
图 5是本发明实施例提供的 GIF生成子系统的结构图。 实施本发明的方式  FIG. 5 is a structural diagram of a GIF generation subsystem according to an embodiment of the present invention. Mode for carrying out the invention
为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附 图及实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的 具体实施例仅仅用以解释本发明, 并不用于限定本发明。  In order to make the objects, the technical solutions and the advantages of the present invention more comprehensible, the present invention will be further described in detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例在媒体文件播放过程中根据用户设定的 GIF生成参数 截取视频内容, 生成目标 GIF文件, 方便用户使用。  In the embodiment of the present invention, during the playing of the media file, the video content is intercepted according to the GIF generation parameter set by the user, and the target GIF file is generated, which is convenient for the user to use.
图 1示出了本发明实施例提供的 GIF生成方法的实现流程, 详述如 下:  FIG. 1 is a flowchart showing an implementation process of a GIF generation method according to an embodiment of the present invention, which is described in detail as follows:
在步骤 S101中, 接收用户设定的 GIF生成参数。  In step S101, a GIF generation parameter set by the user is received.
为了使得用户得到满意的 GIF文件,在目标 GIF文件生成过程中允 许用户对相关的 GIF生成参数进行设置, 作为本发明的一个实施例, 可 以提供如下 GIF生成参数供用户设定:  In order to enable the user to obtain a satisfactory GIF file, the user is allowed to set the relevant GIF generation parameters during the target GIF file generation process. As an embodiment of the present invention, the following GIF generation parameters may be provided for the user to set:
1.视频截取起点: 定义选择希望截取的视频起点帧。  1. Video Capture Start Point: Define the video start frame you want to capture.
2.截取长度: 定义截取的视频长度, 将视频截取起点之后一段的视 频截取成 GIF, 截取的视频长度的终点为视频截取终点。  2. Intercept length: Define the length of the captured video. The video of the segment after the video is intercepted is intercepted into GIF, and the end of the length of the captured video is the end of the video interception.
3.帧间隔: 定义多长时间抽取视频中的一帧, 帧间隔不同, 抽取的 视频帧的数量也将不同。 4.GIF播放速度: 定义生成的目标 GIF文件的播放速度。 3. Frame Interval: Define how long to extract a frame in the video. The frame interval is different and the number of extracted video frames will be different. 4. GIF playback speed: Define the playback speed of the generated target GIF file.
作为本发明的一个实施例, 还可以允许用户在 GIF生成参数中设定 图像处理参数, 对生成目标 GIF文件的图像进行处理, 例如:  As an embodiment of the present invention, the user may also be allowed to set image processing parameters in the GIF generation parameters to process the image of the generated target GIF file, for example:
1. GIF分辨率: 定义生成的 GIF的长宽, 例如 320 x 240、 200 150 等多种常见的分辨率。  1. GIF resolution: Define the length and width of the generated GIF, such as 320 x 240, 200 150 and many other common resolutions.
2.图像质量: 定义生成的 GIF的图像质量, 图像质量不同, 生成的 GIF文件大小也不同。  2. Image quality: Define the image quality of the generated GIF, the image quality is different, and the generated GIF file size is also different.
另外, 为了便于用户标识生成的目标 GIF文件, 还可以允许用户设 定指纹图参数, 指纹图为在目标 GIF文件中叠加的可以标识一定含义的 图片, 例如软件标识等。 指纹图是可选的, 可以以流式网络图形格式 ( Portable Network Graphic Format , PNG )文件的形式存在。  In addition, in order to facilitate the user to identify the generated target GIF file, the user may also be allowed to set the fingerprint parameter, and the fingerprint is a picture superimposed in the target GIF file that can identify a certain meaning, such as a software identifier. The fingerprint is optional and can exist in the form of a Portable Network Graphic Format (PNG) file.
考虑到用户体验、 操作习惯以及软件传播等因素, 在本发明实施例 中, 可以将某些 GIF生成参数配置成允许用户设定, 将某些 GIF生成参 数配置成不允许用户设定, 在设定方式上也可以不同。 其中, 视频截取 起点、 截取长度、 帧间隔、 GIF分辨率和图像质量需要在目标 GIF文件 生成前设定, GIF播放速度可以在 GIF生成后, 在预览播放过程中再次 进行设定。  In the embodiment of the present invention, certain GIF generation parameters may be configured to allow user settings, and certain GIF generation parameters are configured to not allow user settings, in consideration of factors such as user experience, operating habits, and software propagation. The method can also be different. Among them, the video capture start point, intercept length, frame interval, GIF resolution and image quality need to be set before the target GIF file is generated. The GIF playback speed can be set again during the preview playback after the GIF is generated.
在步骤 S102中, 收到用户的 GIF生成指令后, 停止媒体文件的播 放,根据用户设定的 GIF生成参数将媒体文件的视频帧截取成单一图像。  In step S102, after receiving the GIF generation instruction of the user, the playback of the media file is stopped, and the video frame of the media file is intercepted into a single image according to the GIF generation parameter set by the user.
在步骤 S103中, 如果用户设定了图像处理参数, 例如 GIF分辨率、 图像质量等, 则根据用户设定的图像处理参数, 对截取的单一图像进行 图像处理, 例如改变 GIF分辨率、 提高图像质量等。  In step S103, if the user sets image processing parameters, such as GIF resolution, image quality, etc., image processing is performed on the intercepted single image according to the image processing parameters set by the user, for example, changing the GIF resolution and improving the image. Quality and so on.
在步骤 S104 中, 如果用户设定了指纹图, 将用户设定的指纹图叠 加到每个单一图像中。  In step S104, if the user sets the fingerprint, the user-set fingerprint is superimposed on each single image.
在步骤 S105中, 根据用户设定的 GIF生成参数, 将单一图像进行 编码, 生成目标 GIF文件。 In step S105, a single image is performed according to a GIF generation parameter set by the user. Encode, generate the target GIF file.
在步骤 S106中, 将目标 GIF文件输出保存。  In step S106, the target GIF file output is saved.
图 2示出了本发明的一个实施例提供的 GIF生成方法的具体实现流 程, 详述如下:  FIG. 2 shows a specific implementation process of a GIF generation method provided by an embodiment of the present invention, which is described in detail as follows:
在步骤 S201中, 接收用户输入的 GIF截取指令。 如图 3所示, 用 户可以在媒体播放器的用户界面 (User Interface, UI )上选取 GIF截取 功能键输入 GIF截取指令。  In step S201, a GIF interception instruction input by the user is received. As shown in Figure 3, the user can select the GIF intercept function button on the user interface (UI) of the media player to input the GIF intercept command.
在步骤 S202 中, 媒体播放器暂停当前视频的播放, 获取用户设定 的视频截取起点、 截取长度、 帧间隔、 GIF分辨率等 GIF生成参数。 用 户可以在媒体播放器弹出的设定界面中对 GIF生成参数进行设定, 并可 以浏览设定后的效果。  In step S202, the media player pauses the playback of the current video, and obtains a GIF generation parameter such as a video capture start point, a cut length, a frame interval, and a GIF resolution set by the user. The user can set the GIF generation parameters in the setting interface popped up in the media player, and can view the set effect.
在步骤 S203 中, 根据用户设定的帧间隔, 截取视频数据中的一帧 图像, 保存在内存中, 截取完成后内存中将保存有若干帧单一图像。  In step S203, according to the frame interval set by the user, one frame of the video data is intercepted and stored in the memory, and a plurality of frame single images are stored in the memory after the interception is completed.
在步骤 S204 中, 如果用户设定了图像处理参数, 则对截取的单一 图像,按照用户设定的 GIF生成参数进行图像处理,包括变换图像大小、 改变图像质量等。  In step S204, if the user sets the image processing parameter, the image is processed according to the GIF generation parameter set by the user for the intercepted single image, including changing the image size, changing the image quality, and the like.
在步骤 S205 中, 判断用户是否设定加载指纹图, 是则执行步骤 S206, 否则执行步骤 S207。  In step S205, it is determined whether the user sets the loading fingerprint map, if yes, step S206 is performed, otherwise step S207 is performed.
在步骤 S206 中, 加载指纹图, 将指纹图叠加到上述截取的每一帧 单一图像中。  In step S206, the fingerprint image is loaded, and the fingerprint image is superimposed on the single image of each frame intercepted above.
在步骤 S207中, 根据系统默认的 GIF播放速度参数, 将多个单一 图像进行编码, 生成目标 GIF文件。  In step S207, a plurality of single images are encoded according to the system default GIF playback speed parameter to generate a target GIF file.
在步骤 S208中, 将生成的目标 GIF文件加载到内存中。  In step S208, the generated target GIF file is loaded into the memory.
如果用户需要预览所截取的 GIF的效果,则执行步骤 S209,对内存 中的目标 GIF文件进行解析并播放。 用户在预览生成的目标 GIF文件的播放效果时可以调整播放速度, 在步骤 S210中, 判断用户是否调整播放速度, 是则执行步骤 S211 , 否 则执行步骤 S212。 If the user needs to preview the effect of the intercepted GIF, step S209 is executed to parse and play the target GIF file in the memory. When the user previews the playback effect of the generated target GIF file, the user can adjust the playback speed. In step S210, it is determined whether the user adjusts the playback speed. If yes, step S211 is performed; otherwise, step S212 is performed.
在步骤 S211 中, 根据用户调整后的 GIF播放速度参数调整内存中 目标 GIF文件的播放速度, 返回执行步骤 S209。  In step S211, the playback speed of the target GIF file in the memory is adjusted according to the adjusted GIF playback speed parameter of the user, and the process returns to step S209.
在步骤 S212中, 判断用户是否调整视频截取起点、 截取长度、 GIF 分辨率等 GIF生成参数,是则按照用户调整后的 GIF生成参数返回执行 步骤 S203, 否则执行步骤 S213。  In step S212, it is determined whether the user adjusts the GIF generation parameter such as the video capture start point, the intercept length, and the GIF resolution. If the user adjusts the GIF generation parameter, the process returns to step S203, otherwise step S213 is performed.
在步骤 S213中, 接收用户的目标 GIF文件保存指令, 将最终的播 放速度回写至原来已生成的目标 GIF文件中。  In step S213, the user's target GIF file save instruction is received, and the final playback speed is written back to the original generated target GIF file.
作为本发明的一个实施例, 目标 GIF文件生成后, 可以自动将目标 GIF文件复制到剪贴板, 用户可以利用该目标 GIF文件进行各种操作, 例如直接将目标 GIF文件粘贴到即时通信系统的聊天窗口进行传播, 也 可以向用户提供一个快捷键, 直接将生成的 GIF加入到即时通信系统的 聊天表情中。  As an embodiment of the present invention, after the target GIF file is generated, the target GIF file can be automatically copied to the clipboard, and the user can perform various operations by using the target GIF file, for example, directly paste the target GIF file into the chat of the instant messaging system. The window is propagated, and a shortcut key can be provided to the user to directly add the generated GIF to the chat emoticon of the instant messaging system.
图 4示出了本发明实施例提供的媒体播放器的结构,为了便于说明, 仅示出了与本发明实施例相关的部分。  FIG. 4 shows the structure of a media player provided by an embodiment of the present invention. For the convenience of description, only parts related to the embodiment of the present invention are shown.
文件解析单元 41 解析输入的媒体文件的格式, 判断媒体文件的编 码格式。  The file parsing unit 41 parses the format of the input media file and determines the encoding format of the media file.
音视频分离及解码单元 42将媒体文件的音视频数据分离出来, 根 据文件解析单元 41 获取的媒体文件的编码格式对音视频数据进行相应 的解码处理。  The audio/video separation and decoding unit 42 separates the audio and video data of the media file, and performs corresponding decoding processing on the audio and video data according to the encoding format of the media file obtained by the file parsing unit 41.
视频后处理单元 43 对解码后的视频数据进行图像的旋转、 加亮等 视频处理。  The video post-processing unit 43 performs video processing such as image rotation and highlighting on the decoded video data.
音频后处理单元 44对解码后的音频数据进行去噪、 均衡等音频处 理。 The audio post-processing unit 44 performs denoising, equalization, and the like on the decoded audio data. Reason.
渲染单元 45 将经过音视频后处理的音视频数据进行渲染处理后输 出到声卡、 显卡等设备中播放。  The rendering unit 45 renders the audio and video data processed by the audio and video and outputs it to the sound card, video card, etc. for playback.
在本发明实施例中, 截取视频数据生成目标 GIF文件主要在媒体播 放的视频解码之后、 渲染输出之前完成, 因此可以在媒体播放器中集成 GIF 生成功能。 作为本发明的一个实施例, 可以在视频后处理单元 43 中集成 GIF生成子系统 431 , 根据用户设定的 GIF生成参数, 截取视频 数据, 生成目标 GIF文件。 当然, GIF生成子系统 431也可以不集成在 视频后处理单元 43中, 而作为媒体播放器中的一个独立功能单元。  In the embodiment of the present invention, the interception of the video data to generate the target GIF file is mainly performed after the video playback of the media is decoded and before the rendering output, so that the GIF generation function can be integrated in the media player. As an embodiment of the present invention, the GIF generation subsystem 431 may be integrated in the video post-processing unit 43 to intercept the video data according to the GIF generation parameters set by the user to generate a target GIF file. Of course, the GIF generation subsystem 431 may also not be integrated in the video post-processing unit 43 as an independent functional unit in the media player.
为了方便用户浏览生成的目标 GIF文件, 可以在媒体播放器中增加 GIF播放单元 46, 用来解析和播放生成的目标 GIF文件。 当然, GIF播 放单元 46也可以不集成在媒体播放器中, 例如采用独立的目标 GIF文 件播放工具进行浏览。  In order to facilitate the user to browse the generated target GIF file, a GIF playing unit 46 may be added to the media player for parsing and playing the generated target GIF file. Of course, the GIF playback unit 46 may also not be integrated into the media player, such as browsing with a separate target GIF file playback tool.
图 5示出了本发明实施例提供的 GIF生成子系统的结构, 为了便于 说明, 仅示出了与本发明实施例相关的部分。  FIG. 5 shows the structure of the GIF generation subsystem provided by the embodiment of the present invention. For the convenience of description, only parts related to the embodiment of the present invention are shown.
GIF参数控制模块 51从用户界面上接收用户设定的 GIF生成参数, 包括视频截取起点、 截取长度、 帧间隔和播放速度, 还可以包括图像处 理参数或者指纹图。 这些 GIF生成参数影响到生成的目标 GIF文件。  The GIF parameter control module 51 receives the user-set GIF generation parameters from the user interface, including the video capture start point, the intercept length, the frame interval, and the playback speed, and may also include image processing parameters or fingerprints. These GIF generation parameters affect the generated target GIF file.
在媒体文件播放过程中, 当视频帧抽取模块 52收到用户的 GIF生 成指令后,停止媒体文件的播放,根据用户选定的截取视频内容的起点、 终点、 帧间隔等 GIF生成参数, 将其中的视频帧截取成单一图像。  During the playback of the media file, when the video frame extraction module 52 receives the GIF generation instruction of the user, the playback of the media file is stopped, and the GIF generation parameters such as the start point, the end point, and the frame interval of the intercepted video content selected by the user are used. The video frame is truncated into a single image.
在本发明实施例中, 如果用户设定了 GIF分辨率、 图像质量等图像 处理参数, 单一图像处理模块 53按照用户设定的图像处理参数, 对每 个单一图像进行处理, 包括改变 GIF分辨率、 图像质量等。  In the embodiment of the present invention, if the user sets image processing parameters such as GIF resolution and image quality, the single image processing module 53 processes each single image according to the image processing parameters set by the user, including changing the GIF resolution. , image quality, etc.
作为本发明的一个实施例, 如果用户需要对目标 GIF文件中叠加指 纹图, 指纹图叠加模块 54将用户输入或事先设定的指纹图叠加到每个 单一图像中。 As an embodiment of the present invention, if the user needs to superimpose the target GIF file The pattern, fingerprint overlay module 54 superimposes a user input or a previously set fingerprint onto each single image.
GIF编码模块 55根据用户设定的相关 GIF生成参数, 将截取的单 一图像进行编码, 生成目标 GIF文件。  The GIF encoding module 55 encodes the intercepted single image according to the relevant GIF generation parameters set by the user to generate a target GIF file.
目标 GIF文件保存模块 56将生成的目标 GIF文件输出保存。  The target GIF file saving module 56 saves the generated target GIF file output.
本发明实施例可以在媒体播放过程中根据用户设定的 GIF生成参数 截取媒体文件的视频内容生成目标 GIF文件, 用户不需要安装和学习使 用专门的 GIF文件制作工具, 操作流程筒单, 方便用户使用。 用户还可 以方便的预览生成的目标 GIF文件, ^据预览情况调整目标 GIF文件。 另夕卜, 用户还可以将目标 GIF文件粘贴到即时通信系统的聊天窗口进行 传播, 或者将目标 GIF文件加入到即时通信系统的聊天表情中, 以增强 用户的通信乐趣。  In the embodiment of the present invention, the target GIF file may be generated by intercepting the video content of the media file according to the GIF generation parameter set by the user during the media playing process, and the user does not need to install and learn to use the special GIF file creation tool, and the operation flow is simple, and the user is convenient. use. The user can also conveniently preview the generated target GIF file, and adjust the target GIF file according to the preview. In addition, the user can also paste the target GIF file into the chat window of the instant messaging system for propagation, or add the target GIF file to the chat emoticon of the instant messaging system to enhance the user's communication fun.
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡 在本发明的精神和原则之内所作的任何修改、 等同替换和改进等, 均应 包含在本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims

权利要求书 Claim
1、 一种 GIF生成方法, 其特征在于, 所述方法包括下述步骤: 接收用户设定的 GIF生成参数; A method for generating a GIF, the method comprising the steps of: receiving a GIF generation parameter set by a user;
收到用户的 GIF生成指令后, 停止媒体文件的播放, 根据用户设定 的 GIF生成参数将媒体文件的视频帧截取成单一图像;  After receiving the user's GIF generation instruction, the media file is stopped, and the video frame of the media file is intercepted into a single image according to the GIF generation parameter set by the user;
根据用户设定的 GIF生成参数, 将所述单一图像进行编码, 生成目 标 GIF文件。  The single image is encoded according to a user-set GIF generation parameter to generate a target GIF file.
2、 如权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 保存所述目标 GIF文件。  2. The method of claim 1 wherein the method further comprises: saving the target GIF file.
3、 如权利要求 1所述的方法, 其特征在于, 所述 GIF生成参数包 括视频截取起点、 截取长度、 帧间隔和播放速度。  3. The method of claim 1, wherein the GIF generation parameters include a video capture start point, a truncation length, a frame interval, and a play speed.
4、 如权利要求 1所述的方法, 其特征在于, 所述 GIF生成参数包 括图像处理参数;  4. The method of claim 1, wherein the GIF generation parameters comprise image processing parameters;
在将所述单一图像进行编码, 生成目标 GIF文件之前, 所述方法进 一步包括下述步骤:  Before encoding the single image to generate a target GIF file, the method further includes the following steps:
根据用户设定的图像处理参数, 对所述单一图像进行图像处理。 Image processing is performed on the single image according to image processing parameters set by the user.
5、 如权利要求 1所述的方法, 其特征在于, 所述 GIF生成参数包 括指纹图; 5. The method according to claim 1, wherein the GIF generation parameter comprises a fingerprint map;
在根据用户设定的 GIF生成参数, 将所述单一图像进行编码, 生成 目标 GIF文件之前, 所述方法进一步包括下述步骤:  Before the single image is encoded according to the GIF generation parameter set by the user to generate the target GIF file, the method further includes the following steps:
将用户设定的指纹图叠加到每个单一图像中。  A user-set fingerprint is superimposed on each single image.
6、 一种 GIF生成系统, 其特征在于, 所述系统包括:  6. A GIF generation system, the system comprising:
GIF参数控制模块, 用于接收用户设定的 GIF生成参数; 视频帧抽取模块, 用于收到用户的 GIF生成指令后, 停止媒体文件 的播放, 根据用户设定的 GIF生成参数将媒体文件的视频帧截取成单一 图像; The GIF parameter control module is configured to receive a GIF generation parameter set by the user; the video frame extraction module is configured to: after receiving the GIF generation instruction of the user, stop the media file Playback, the video frame of the media file is intercepted into a single image according to the GIF generation parameter set by the user;
GIF编码模块, 用于根据用户设定的 GIF生成参数, 将所述单一图 像进行编码, 生成目标 GIF文件。  The GIF encoding module is configured to encode the single image according to a user-set GIF generating parameter to generate a target GIF file.
7、 如权利要求 6所述的系统, 其特征在于, 该系统进一步包括: GIF文件保存模块, 用于保存所述目标 GIF文件。  7. The system of claim 6, wherein the system further comprises: a GIF file saving module, configured to save the target GIF file.
8、 如权利要求 6所述的系统, 其特征在于, 所述 GIF生成参数包 括视频截取起点、 截取长度、 帧间隔和播放速度。  8. The system of claim 6, wherein the GIF generation parameters include a video capture start point, a truncation length, a frame interval, and a play speed.
9、 如权利要求 6所述的系统, 其特征在于, 所述 GIF生成参数包 括图像处理参数,  9. The system of claim 6, wherein the GIF generation parameters include image processing parameters,
所述系统还包括:  The system also includes:
图像处理模块, 用于根据用户设定的图像处理参数, 对所述单一图 像进行图像处理。  And an image processing module, configured to perform image processing on the single image according to image processing parameters set by a user.
10、 如权利要求 6所述的系统, 其特征在于, 所述 GIF生成参数包 括图像处理参数包括指纹图;  10. The system of claim 6, wherein the GIF generation parameters include image processing parameters including a fingerprint map;
所述系统还包括:  The system also includes:
指纹图加载模块, 用于将用户设定的指纹图叠加到每个单一图像 中。  A fingerprint loading module is used to superimpose a user-set fingerprint on each single image.
11、 一种媒体播放器, 包括视频后处理单元, 用于对解码后的视频 数据进行视频处理, 其特征在于, 所述媒体播放器还包括有一 GIF生成 子系统, 用于根据用户设定的 GIF生成参数, 从所述视频后处理单元图 像处理后的视频数据中截取生成目标 GIF文件。  A media player, comprising a video post-processing unit, configured to perform video processing on the decoded video data, wherein the media player further includes a GIF generating subsystem configured to be configured according to a user. The GIF generates parameters, and the generated target GIF file is intercepted from the video data processed by the video post-processing unit image.
12、 如权利要求 11所述的媒体播放器, 其特征在于, 所述 GIF生 成子系统集成在所述视频后处理单元中, 或者为所述媒体播放器的一个 独立功能单元。 12. The media player of claim 11, wherein the GIF generation subsystem is integrated in the video post-processing unit or is an independent functional unit of the media player.
13、 如权利要求 11 或 12所述的媒体播放器, 其特征在于, 所述 GIF生成子系统包括: The media player according to claim 11 or 12, wherein the GIF generation subsystem comprises:
GIF参数控制模块, 用于接收 GIF生成指令, 该 GIF生成指令包括 用户设定的 GIF生成参数;  a GIF parameter control module, configured to receive a GIF generation instruction, where the GIF generation instruction includes a user-set GIF generation parameter;
视频帧抽取模块, 用于收到用户的 GIF生成指令后, 停止媒体文件 的播放, 根据用户设定的 GIF生成参数将媒体文件的视频帧截取成单一 图像;  The video frame extraction module is configured to: after receiving the GIF generation instruction of the user, stop playing the media file, and intercept the video frame of the media file into a single image according to the GIF generation parameter set by the user;
GIF编码模块, 用于根据用户设定的 GIF生成参数, 将所述单一图 像进行编码, 生成目标 GIF文件; 以及  a GIF encoding module, configured to encode the single image according to a user-set GIF generation parameter to generate a target GIF file;
GIF文件保存模块, 用于保存所述目标 GIF文件。  A GIF file saving module for saving the target GIF file.
14、 如权利要求 11 或 12所述的媒体播放器, 其特征在于, 所述 GIF生成参数包括图像处理参数, 所述 GIF生成子系统还包括:  The media player according to claim 11 or 12, wherein the GIF generation parameter includes image processing parameters, and the GIF generation subsystem further includes:
图像处理模块, 用于根据用户设定的图像处理参数, 对所述单一图 像进行图像处理。  And an image processing module, configured to perform image processing on the single image according to image processing parameters set by a user.
15、 如权利要求 11 或 12所述的媒体播放器, 其特征在于, 所述 GIF生成参数包括指纹图, 所述 GIF生成子系统还包括:  The media player according to claim 11 or 12, wherein the GIF generation parameter comprises a fingerprint, and the GIF generation subsystem further comprises:
指纹图加载模块, 用于将用户设定的指纹图叠加到每个单一图像 中。  A fingerprint loading module is used to superimpose a user-set fingerprint on each single image.
16、 如权利要求 11或 12所述的媒体播放器, 其特征在于, 所述媒 体播放器还包括一 GIF播放单元, 用于解析和播放所述目标 GIF文件。  The media player according to claim 11 or 12, wherein the media player further comprises a GIF playing unit for parsing and playing the target GIF file.
PCT/CN2010/070248 2009-03-13 2010-01-19 Method for generating gif, and system and media player thereof WO2010102525A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SG2011058757A SG173703A1 (en) 2009-03-13 2010-01-19 Method for generating gif, and system and media player thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNA2009101059887A CN101510313A (en) 2009-03-13 2009-03-13 Method, system and medium player for generating GIF
CN200910105988.7 2009-03-13

Publications (1)

Publication Number Publication Date
WO2010102525A1 true WO2010102525A1 (en) 2010-09-16

Family

ID=41002704

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/070248 WO2010102525A1 (en) 2009-03-13 2010-01-19 Method for generating gif, and system and media player thereof

Country Status (4)

Country Link
CN (1) CN101510313A (en)
MY (1) MY158426A (en)
SG (1) SG173703A1 (en)
WO (1) WO2010102525A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024924A (en) * 2015-07-30 2015-11-04 中国传媒大学 Intelligent life diary gif picture system
CN108055587A (en) * 2017-11-30 2018-05-18 星潮闪耀移动网络科技(中国)有限公司 Sharing method, device, mobile terminal and the storage medium of image file
CN111405306A (en) * 2020-03-20 2020-07-10 深圳宇翊技术股份有限公司 PIS streaming media service method based on capturing and secondary encoding after playing

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510313A (en) * 2009-03-13 2009-08-19 腾讯科技(深圳)有限公司 Method, system and medium player for generating GIF
CN102314701A (en) * 2011-06-28 2012-01-11 北京新媒传信科技有限公司 Method and device for playing GIF (graphic interchange format) cartoons in ME (mobile equipment) in real time
CN102509313B (en) * 2011-10-18 2013-06-05 广东欧珀移动通信有限公司 Encapsulating method of multimedia image data
CN102609899A (en) * 2012-03-01 2012-07-25 盛乐信息技术(上海)有限公司 Method and system for converting video to poster
CN103810738B (en) * 2012-11-14 2017-08-25 腾讯科技(深圳)有限公司 Gif file rendering intent and device
CN103971391A (en) * 2013-02-01 2014-08-06 腾讯科技(深圳)有限公司 Animation method and device
CN104225920B (en) * 2013-06-24 2018-07-03 深圳市云趣网络科技股份有限公司 Communication method and device between a kind of user of flash game
CN104282032A (en) * 2013-06-28 2015-01-14 深圳市天趣网络科技有限公司 Dynamic screenshot method for game client, and client thereof
CN103414935B (en) * 2013-07-29 2017-12-29 深圳Tcl新技术有限公司 Method and apparatus based on subscriber identity information interception sound, video
CN104023192B (en) * 2014-06-27 2016-04-13 努比亚技术有限公司 A kind of method and apparatus of recorded video
CN105376658B (en) * 2014-08-26 2019-04-12 无锡天脉聚源传媒科技有限公司 A kind of device and method generating video file general view
CN107465954B (en) * 2014-12-04 2019-09-06 Oppo广东移动通信有限公司 The generation method and Related product of dynamic thumbnail
CN104717565B (en) * 2015-03-30 2019-03-01 努比亚技术有限公司 The method and apparatus for generating dynamic image
CN106375862B (en) * 2016-09-22 2019-10-15 维沃移动通信有限公司 A kind of method, apparatus and terminal obtaining GIF picture
CN106791918B (en) * 2016-12-01 2019-08-16 中央电视台 Method and device for generating image interchange format file
CN107172482B (en) * 2017-03-31 2020-01-10 北京奇艺世纪科技有限公司 Method and device for generating image with interchangeable format
CN107707968A (en) * 2017-08-18 2018-02-16 广州爱美互动网络科技有限公司 A kind of video web page turns the data processing method and device of GIF pictures
CN109936763B (en) * 2017-12-15 2022-07-01 腾讯科技(深圳)有限公司 Video processing and publishing method
WO2020047691A1 (en) * 2018-09-03 2020-03-12 深圳市大疆创新科技有限公司 Method, device, and mobile platform for generating dynamic image and storage medium
CN110460894A (en) * 2019-06-25 2019-11-15 维沃移动通信有限公司 A kind of video image display method and terminal device
CN110363701A (en) * 2019-07-18 2019-10-22 腾讯科技(深圳)有限公司 A kind of gif file display methods, device, terminal device and storage medium
CN110659616A (en) * 2019-09-26 2020-01-07 新华智云科技有限公司 Method for automatically generating gif from video
CN110839181A (en) * 2019-12-04 2020-02-25 湖南快乐阳光互动娱乐传媒有限公司 Method and system for converting video content into gif based on B/S architecture
CN111464760A (en) * 2020-05-06 2020-07-28 Oppo(重庆)智能科技有限公司 Dynamic image generation method and device and terminal equipment
CN112235637A (en) * 2020-10-15 2021-01-15 惠州Tcl移动通信有限公司 GIF generation method, device, storage medium and mobile terminal
CN113609083B (en) * 2021-08-04 2023-08-11 网易(杭州)网络有限公司 File storage method, device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070237225A1 (en) * 2006-03-30 2007-10-11 Eastman Kodak Company Method for enabling preview of video files
CN101075258A (en) * 2007-05-14 2007-11-21 腾讯科技(深圳)有限公司 Method and device for generating video microform
CN101090445A (en) * 2006-06-15 2007-12-19 富士胶片株式会社 Image processing method, image processing device, image processing program and image browsing system
CN101510313A (en) * 2009-03-13 2009-08-19 腾讯科技(深圳)有限公司 Method, system and medium player for generating GIF

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070237225A1 (en) * 2006-03-30 2007-10-11 Eastman Kodak Company Method for enabling preview of video files
CN101090445A (en) * 2006-06-15 2007-12-19 富士胶片株式会社 Image processing method, image processing device, image processing program and image browsing system
CN101075258A (en) * 2007-05-14 2007-11-21 腾讯科技(深圳)有限公司 Method and device for generating video microform
CN101510313A (en) * 2009-03-13 2009-08-19 腾讯科技(深圳)有限公司 Method, system and medium player for generating GIF

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024924A (en) * 2015-07-30 2015-11-04 中国传媒大学 Intelligent life diary gif picture system
CN105024924B (en) * 2015-07-30 2018-02-09 中国传媒大学 Intelligent life diary cardon system
CN108055587A (en) * 2017-11-30 2018-05-18 星潮闪耀移动网络科技(中国)有限公司 Sharing method, device, mobile terminal and the storage medium of image file
CN111405306A (en) * 2020-03-20 2020-07-10 深圳宇翊技术股份有限公司 PIS streaming media service method based on capturing and secondary encoding after playing

Also Published As

Publication number Publication date
SG173703A1 (en) 2011-09-29
MY158426A (en) 2016-10-14
CN101510313A (en) 2009-08-19

Similar Documents

Publication Publication Date Title
WO2010102525A1 (en) Method for generating gif, and system and media player thereof
WO2019086037A1 (en) Video material processing method, video synthesis method, terminal device and storage medium
WO2022048478A1 (en) Multimedia data processing method, multimedia data generation method, and related device
TWI592021B (en) Method, device, and terminal for generating video
CN106804003B (en) Video editing method and device based on ffmpeg
CN106233706B (en) Apparatus and method for providing backward compatibility of video with both standard and high dynamic range
US11670339B2 (en) Video acquisition method and device, terminal and medium
CN108881767B (en) Screen recording terminal system and method for realizing screen recording by using same
US20160283097A1 (en) Gesture based interactive graphical user interface for video editing on smartphone/camera with touchscreen
CN101540861A (en) Playing method, system and mobile terminal of video file
KR100597667B1 (en) mobile communication terminal with improved user interface
KR100726258B1 (en) Method for producing digital images using photographic files and phonetic files in a mobile device
WO2016188276A1 (en) Video playing method, client and computer storage medium
WO2022143253A1 (en) Video generation method and apparatus, device, and storage medium
WO2019242274A1 (en) Content processing method and device
CN104916298A (en) Coding and decoding methods, coding and decoding devices, electronic equipment and audio picture generating method
WO2023061414A1 (en) File generation method and apparatus, and electronic device
JP2014030153A (en) Information processor, information processing method, and computer program
WO2012055190A1 (en) Method and apparatus for setting user interface
WO2019237966A1 (en) Method and apparatus for making image poster according to video, and terminal device
KR20110106577A (en) Method for reproducing content using received information through network and display apparatus thereof
CN114285836B (en) Video playing method, device and medium
JP2019220207A (en) Method and apparatus for using gestures for shot effects
WO2008138253A1 (en) An apparatus and method for instant messaging image capture
JP5238849B2 (en) Electronic device, electronic device control method, and electronic device control program

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC

122 Ep: pct application non-entry in european phase

Ref document number: 10750321

Country of ref document: EP

Kind code of ref document: A1