有没有想过您在Imgur等网站上看到的那些长GIF(GIFs)是如何创建的?很多时候,创作者会拍摄一段视频,将整个内容转换为动画GIF,然后叠加文字以使其具有娱乐性。
现在这篇文章(post isn)不会教你如何从头到尾创建那些精美的GIF ,但它会教你如何拍摄视频并至少将其转换为动画(GIFs)GIF。我将写另一篇关于如何将文本和图形添加到GIF的文章。
我将在本教程中使用Photoshop CC,因为它允许您在尺寸、质量、框架等方面对最终产品进行更多控制。
导入前转换视频
在开始之前,您可能需要将视频转换为Adob e Photoshop(Adobe Photoshop)支持的文件格式。(file format)例如,我从我的 iPhone 上拍摄了一段视频并将其下载到我的电脑上。然后我尝试将视频导入Photoshop,但出现以下错误:
Could not complete the Video Frames to Layers command because the file has no video frames.
该视频是MOV 文件(MOV file),但Photoshop不支持Apple使用的编解码器。为了解决此类问题,您需要下载HandBrake之类的程序来转换视频。
使用HandBrake(HandBrake)非常容易。只需单击(Just click)文件-(File)选择源(Choose Source)并选择您的视频文件(video file)。此时,您真正需要做的就是单击“开始编码(Start Encode)”按钮。默认情况下,它将使用右侧列出的快速 1080p30预设。( Fast 1080p30)他们有很多预设,所以选择一个适合你的。请注意,您可以稍后在Photoshop中降低GIF的分辨率,因此您不必在HandBrake中这样做。
使用H.264 视频(H.264 video)编解码器将其转换为MP4 文件(MP4 file)后,我们现在可以将其导入Photoshop中。
(Import Video and Create GIF)在Photoshop中(Photoshop)导入视频并创建 GIF
打开 Photoshop CC 并单击文件(File),然后单击导入(Import),然后单击视频帧到图层( Video Frames to Layers)。
选择您的视频文件,然后单击打开(Open)。这将弹出一个对话框,其中包含视频的小预览和几个选项。
现在,如果您希望将整个视频作为GIF动画,请继续将单选按钮(radio button)保留为“从开始到结束”(From Beginning to End)。如果您只需要一部分,请选择仅选定范围(Selected Range Only),然后使用视频下方的修剪控件来选择范围。
此外,为了尽可能减小最终GIF的大小,还可以限制帧数。例如,如果您选中该框并将其保留为 2 帧,这意味着Photoshop将从视频中删除每隔一帧。
最后,您需要确保选中Make Frame Animation框。单击“确定(Click OK)”,您的视频应在Photoshop中以帧的形式导入。如果程序崩溃,您可能需要在尝试导入之前进一步降低视频质量。
现在我们要做的就是将帧保存为动画GIF。要在Photoshop CC中执行此操作,您需要单击文件(File)-导出(Export)-保存为 Web (Save for Web) (旧版)((legacy))。请注意,在将其保存为GIF之前,您可以根据需要编辑和删除帧。
在此对话框中,您必须使用许多选项。它们中的大多数会影响GIF的质量,您将能够在左侧的预览区域中看到。(preview area)右侧窗格是您进行大部分调整的地方。
在顶部,您会看到一个名为Preset的下拉菜单。您可以单击它并选择其中一个预设值,也可以自己调整值。选择其中一种预设会降低GIF的质量,但也会使其更小。确保在Preset下方的下拉列表中选择了GIF。
在Image Size的底部,您可以调整GIF的最终输出分辨率(output resolution)。因此,如果您的视频是 1920×1080 或 4K,您可能希望在此处显着减少它。在动画(Animation)下,您可以为循环选项选择( Looping Options)永远(Forever)、一次(Once)或自定义(Custom)。默认情况下,GIF会连续循环播放。您可以使用底部的控件播放GIF以查看其外观。
单击保存(Click Save)并选择一个位置来保存您的GIF。就是这样。Photoshop使从视频创建动画(Photoshop)GIF(GIFs)变得非常容易,并允许您调整设置以使其恰到好处。另外,请阅读我关于如何使用Photoshop从图像创建动画(Photoshop)GIF(GIFs)的帖子。享受!
How to Create a GIF from a Video using Photoshop CC
Ever wonder how those long GIFs you see on sites like Imgur are created? A lot of tіmes, the creators take a νideo, convert the whole thing into an animated GIF, and then superimpose text to make it entertaining.
Now this post isn’t going to teach you how to create those fancy GIFs from start to finish, but it will teach you how to take a video and at least convert it to an animated GIF. I’ll write up another post on how you can add text and graphics to your GIF.
I’ll be using Photoshop CC for this tutorial because it allows you to have more control over the final product in terms of size, quality, frames, etc.
Convert Video Before Importing
Before you start, you may need to convert your video to a file format that Adobe Photoshop will support. For instance, I took a video from my iPhone and downloaded it onto my computer. I then tried to import the video into Photoshop, but got the following error:
Could not complete the Video Frames to Layers command because the file has no video frames.
The video was a MOV file, but the codec that Apple uses is not supported in Photoshop. In order to fix this type of problem, you need to download a program like HandBrake to convert the video.
It’s very easy to use HandBrake. Just click on File – Choose Source and pick your video file. At this point, all you really have to do is click the Start Encode button. By default, it will use the Fast 1080p30 preset that you see listed on the right. They have many presets, so choose the one that works for you. Note that you can reduce the resolution of the GIF in Photoshop later on, so you don’t have to do it in HandBrake.
Once it has been converted to an MP4 file using the H.264 video codec, we can now import it into Photoshop.
Import Video and Create GIF in Photoshop
Open Photoshop CC and click on File, then Import and then Video Frames to Layers.
Pick your video file and click Open. This will bring up a dialog with a small preview of the video and a couple of options.
Now if you want the entire video as a an animated GIF, go ahead and leave the radio button to From Beginning to End. If you only need a portion, choose Selected Range Only and then use the trim controls below the video to pick the range.
In addition, to reduce the size of the final GIF as much as possible, you can also limit the number of frames. For example, if you check the box and leave it at 2 frames, that means Photoshop will remove every other frame from the video.
Lastly, you need to make sure the Make Frame Animation box is checked. Click OK and your video should be imported as a bunch of frames in Photoshop. If the program crashes, you may need to reduce the quality of the video even further before trying to import.
Now all we have to do is save the frames as an animated GIF. To do this in Photoshop CC, you need to click on File – Export – Save for Web (legacy). Note that before saving it out as a GIF, you can edit and delete frames as desired.
On this dialog, there are a bunch of options that you will have to play around with. Most of them will affect the quality of the GIF, which you will be able to see in the preview area on the left. The right pane is where you will make most of the adjustments.
Up at the top, you’ll see a dropdown called Preset. You can click on that and choose one of the presets or you can adjust the values yourself. Choosing one of the presets will reduce the quality of the GIF, but will make it smaller also. Make sure that GIF is selected in the dropdown below Preset.
At the bottom under Image Size, you can adjust the final output resolution for your GIF. So if you video was 1920×1080 or 4K, you probably will want to reduce it significantly here. Under Animation, you can choose Forever, Once or Custom for Looping Options. By default, the GIF will loop continuously. You can use the controls at the bottom to play the GIF to see how it looks.
Click Save and choose a location to save your GIF. That’s about it. Photoshop makes it very easy to create animated GIFs from videos and allows you to tweak the settings to get it just right. Also, read my posts on how to create animated GIFs from images using Photoshop. Enjoy!