THE GIMP Bible PHẦN 9 pps

76 328 0
THE GIMP Bible PHẦN 9 pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Part IV: Exploring Filters and Effects it. You can pause playback by clicking the middle Pause button. Clicking the third button in this set, featuring a backward-facing play icon, does a reverse real-time playback of your video sequence. Tip If you click the Play or Reverse Play buttons, you can still change the options and settings in the playback window. This feature is really quite helpful because it allows you to interactively make changes and adjust- ments while the sequence is still playing. The only exception to this is the Button Array and Position Scale. If you run your mouse over the button array or click the position scale’s shuttle, playback stops and you get the more fine-grained control of these interfaces.  FIGURE 20-3 The playback control buttons along the bottom of the Videoframe Playback window Along the right side of the Video Options tab is a series of settings that you can use to get more control over your playback. These settings are described in the following list:  Current Frame Number — This is the frame of your sequence that is currently on dis- play in the playback preview on the left of this window. When you’re scrubbing or allow- ing GAP to continually play, this field continually updates its value. You can also manually type in a number here and the playback window takes you directly to that frame when you press Enter. To the right of this number field are two additional buttons which can help you define your playback range:  Set Start Frame — Click this button to take the current frame number and define it as the start frame for your preview. This is helpful if you have a long video sequence and you’re interested in previewing only a section of it.  Set End Frame — Clicking this button performs a similar operation, except it sets the end frame of your preview sequence.  Start Frame — This numeric value defines the frame number at which your playback preview starts. You can set it by clicking the Set Start Frame button mentioned previously or by explicitly typing in the value you want. Clicking the button to the right of this field doesn’t do anything in the GIMP interface. Instead, it sends the start value to standard out. That is, if you start GIMP from a terminal window, you can see this number get printed there when you click that button. It’s helpful for debugging, but not of much use to regular users.  End Frame — Like the Start frame field, this value defines the last frame number in your playback preview’s range. Also like the Start Frame field, the button to the right of this one sends the end frame value to standard out for debugging purposes.  Playback Speed — This defines the playback speed, or frame rate, of your sequence. By default, the value for this is the standard film frame rate of 24fps, or frames per second. 570 Chapter 20: Working with Video-Specific Functions in GIMP If you’re working in video, you need to change this value to the frame rate your source video uses. If you’re in a country using the NTSC standard, like the U.S., you’ll probably use 29.97fps. Other parts of the world tend to use the PAL standard of 25fps. The cool thing, though, is that you also have the ability to set this to whatever arbitrary frame rate you want. This is particularly helpful for hand-drawn animation work, which can often happen at non-standard frame rates. Clicking the button to the right of this field reverts the frame rate value to its previous setting.  Video Preview Size — As mentioned earlier in this section, GAP’s video playback feature can create an interim cache of smaller thumbnail versions of each frame in your sequence. This improves the performance of the playback preview, allowing for a preview that plays in real time. Depending on how powerful your computer is, you may have to adjust the size of these cache images. This is the field where you make those adjustments. By default, the value is set to 256 pixels. This defines the maximum width of the cache images. You can type in this field to define any arbitrary width that you want and the height will be scaled proportionally. If you click the button to the right of this field it toggles the value in this field between 128 and 256. Also, if you Shift+click this button, it sets the cache previews to full size, up to a maximum value of 800 pixels.  Loop — This option, enabled by default, causes your video sequence to play continually. If you click the play button with this option enabled, as the playback reaches the last frame in its range, it jumps back to the beginning and keeps playing. The same is true if you click the Reverse Play button.  Selection Only — Also enabled by default, this ensures that the playback plays only the range defined by the Start Frame and End Frame fields. With this option disabled, the preview shows all the frames in the entire sequence.  Ping Pong — This option is similar to Loop, but with one major difference. Instead of jumping to the beginning of the preview when it gets to the end, the Ping Pong option causes the animation to play in reverse when it gets there. If you watch the Position Scale’s shuttle move while the preview plays, you’ll notice that it bounces back and forth like the ‘‘ball’’ in that magnificently old-school video game, Pong. This option is disabled by default. Also note that if both Loop and Ping Pong are enabled, Ping Pong takes prece- dence.  Thumbnails — Keep this option enabled to allow the playback preview to use image caching. If you disable this feature, GIMP needs to load and dynamically scale each frame of your sequence on the fly. Enabling this check box saves RAM usage, but can be a serious impediment to playback performance.  Exact Timing — By keeping this option enabled, the playback preview tries to maintain the frame rate you defined as much as possible. To guarantee that the correct frame gets shown at the correct time, the preview may skip loading a few frames. If you absolutely need to see each frame in your sequence and you’re not concerned with it running at the correct frame rate, disable this option. At the very bottom of these settings is a short status message for feedback. Typically it just says Ready; however when playing your sequence, it lets you know if any processing is being done, such as generating or regenerating thumbnails for the image cache so you can have real-time playback. 571 Part IV: Exploring Filters and Effects Tip The playback feature of GAP does not currently retain your settings after you close the window. So for example, if you’re using a frame rate other than the playback default of 24fps, the next time you choose Video  Playback, you need to remember to change the frame rate back to what you need it to be.  Audio Options If you click the Audio Options tab in the Videoframe Playback window, you get a series of set- tings like the ones shown in Figure 20-4. In a nutshell, this tab gives you the ability to load an audio file or extract audio from a video file and play it along with your video sequence. This is a very powerful feature for animation because it helps you ensure that your images synchronize with the audio of the piece. In particular, if you have a character speaking dialogue and you’re animating lip sync, this capability is absolutely critical. FIGURE 20-4 The Audio Options tab of the Videoframe Playback window Following is a description of each of the fields and buttons in this tab:  Audiofile — This field shows the path to your chosen sound file. The file you choose does not necessarily have to be a pure audio file. It can also be a video file that has audio multiplexed, or mixed into it. By default this field is empty. If you know the exact path to your file, you can type it directly into this field. Alternatively, you can click the Browse button to the right of the field, indicated with ellipses ( ), to get a File Chooser where you can navigate through your hard drive to find the file you need.  Enable — This is a quick toggle to enable or disable audio playback with your video preview. If you don’t have a file loaded or you want to see your sequence without audio, simply make sure this check box is disabled. 572 Chapter 20: Working with Video-Specific Functions in GIMP  Volume — This controls the playback volume of your audio. Think of the value in this field as a scaling value. That is, if you keep Volume at its default value of 1.00, the playback uses the original volume of the sound file. If you increase the value to 2.00, the playback will be twice as loud as the original. On the flip side, setting the Volume value to 0.50 sets the playback volume to be half as loud.  Offset — On the chance that your video sequence doesn’t start in the same place as your audio, you need to offset either the video or the audio so they can be synchronized. That is why this field exists. This value, measured in frames, nudges the video sooner or later rela- tive to the audio. The thing to note, though, is that the audio is trimmed to fit the video.Asan example, imagine you have a video sequence set to play back at 24fps. If you set the offset value to –24, then when you start playing the preview, there is one second (24 frames) of silence before the audio starts to play. However, if you set the offset value to 24, the audio starts playing immediately with the video, but it starts one second into the audio file.  Original Audio — This check box works in concert with the offset value. By default, it’s disabled, meaning that whatever you have in the Offset field takes precedence. How- ever, if you enable this check box, the playback preview assumes that the audio and video sequence both start at the same point. This is functionally equivalent to setting the offset to zero. The advantage of this toggle, though, is that you can quickly switch it to zero if you need to and you won’t lose anything you’ve entered as the Offset.  Audiotrack — If you’re pulling audio that’s been multiplexed into a video file, this option can be quite useful. Many video file formats support having multiple audio channels. For example, there may be a channel for dialogue and a separate channel reserved for music or sound effects. If you have one of these types of video files, you can stipulate which audio channel you want to use. If not, the default value of 1 works just fine.  Extract Audio — This button works with the previous setting. If you want to use audio that’s been multiplexed into a video file, you need to extract that audio before the play- back preview can recognize it. So once you’ve picked your file and stipulated which audio track to pull from it, click this button and GAP liberates your audio from its video-encoded prison so you can use it with your video sequence.  Copy As Wavfile — Decoding audio can be a nasty business. If it’s multiplexed with a video file or compressed in a format like MP3 or Ogg Vorbis, it can be computationally expensive to decode these files to raw audio. You can usually get better playback per- formance in the preview if you’re using a file in WAV format. To facilitate this, you can click this button and GAP transcodes your encoded or extracted audio to a WAV file and saves it to your hard drive. When you click this button, a dialog like the one in Figure 20-5 appears. Use this dialog to choose where your new WAV file is saved as well as what sam- ple rate you want this new audio file to use. When it’s done transcoding, the new file is listed in the Audiofile field at the top of the Audio Options tab.  Reset — If you need to knock the volume and offset values back to their defaults of 1 and 0, respectively, click this button. The lower half of the tab provides numerical values and information about your chosen audio file. In particular, the Audiotime and Videotime values are really helpful for getting tight syn- chronization between your video sequence and your sound. 573 Part IV: Exploring Filters and Effects FIGURE 20-5 The file dialog for saving a WAV file for use with the video playback Preferences The third tab in the Videoframe Playback window, shown in Figure 20-6, provides you with a set of options to control the playback’s performance and its interface. FIGURE 20-6 The Preferences tab in the Videoframe Playback window The first set of options in this tab deals with how the video playback feature handles its image cache. You may find that while you’re playing your sequence, the playback preview skips or pauses to regenerate the cache. The reason for this is that the cache is too small for the num- ber of preview images you have at that size. Of course, you could try to fix things by reducing 574 Chapter 20: Working with Video-Specific Functions in GIMP the preview image size or shortening the playback range. However, if you need the larger pre- view images and you need to see the longer sequence, the only remaining thing that you can do is increase the amount of memory used to store your image cache. You do this by adjusting the value in the Cache Size field. Beneath the Cache Size field is a numerical value that shows how many frames are currently cached and how much memory those frames are taking up. You can use these two values to get a pretty good idea of how much space you need for your cache. To do this, click the Reset button at the top of the tab. This empties out the frame cache. Once you do that, click the Play button at the bottom of the window and your cache should start to get populated. After a few frames get cached (maybe 10–30), click the Pause button and take a look at the values for Cached Frames. By seeing how much space these few cached frames take up, you can extrapolate how much space you need for the full sequence. The next two options in this tab are entirely interface-related. These two check boxes toggle the visibility of the Button Array and Position Scale on the Video Options tab. By default, they’re both turned on, but if you want to play back your sequence without inadvertently stopping it by running your mouse over the Button Array, it may be helpful to disable it here. The last thing available in this tab is a Save button. Clicking this button saves the preferences for video playback so they’re available the next time you run Videoframe playback. Bear in mind, though, that this only stores the information from the Preferences tab. Settings from Video Options, like frame rate, are not saved at all. Hopefully this gets resolved in a future version of GAP, but in the meantime, that’s just how things are. Encoding Video Not only can you use GAP to create quick playback previews of your videos or animations, but GAP is also capable of producing an actual video file as well. This is particularly useful if you have a long sequence that you want to play at full size. However, full-sized frames may be larger than the 800-pixel limit of the Videoframe Playback window and you may not have enough memory to create a cache large enough to hold your full sequence. Of course, it’s also good for generating deliverable content. Since the release of GAP 2.6.6, which includes support for the FFMPEG video encoding and decoding library, I’ve started using GAP to generate short video clips from sequences of still frames, rather than typing an FFMPEG command from the terminal window with a lengthy string of switches and options. To get started with this, load up a frame from your image sequence and choose Video  Master Videoencoder. When you do this, you get a window like the one in Figure 20-7 offering multiple tabs for video and audio, plus some additional features to aid the encoding process. The first thing to note about this window is the Output field and Status bar at the bottom. Because these things don’t change regardless of what settings you choose, they’re persistent 575 Part IV: Exploring Filters and Effects across all tabs. Output controls where your encoded video file goes on your hard drive, as well as what its filename is. You can either explicitly type a path and name here, or you can click the Browse button to the right of the field to get a File Chooser window for graphically picking where your encoded file goes. The Status bar remains empty and blank until you actually hit OK and start encoding. Then it gives you a progress indicator to show how long you have to wait until the encoded video is complete. FIGURE 20-7 The Master Videoencoder feature of GAP opens a multi-tabbed window that lets you control how your image sequence becomes a video file Setting Video Options Video encoding is a highly technical topic that could be a book unto itself. As such, this chapter can’t cover all the nuanced terminology and definitions involved with that topic. However, it does walk you though how to access these options and what options work well for a few specific situations. The following list covers the settings available to you through the Video Options tab.  Input Mode — This series of radio buttons controls what type of input you’re feeding to the encoder. As covered in Chapter 19, GAP can recognize, and therefore encode, one of three input types:  Frames — Frames are a sequence of still images that represent each frame in a video or animation. This is the most typical format for large projects. 576 Chapter 20: Working with Video-Specific Functions in GIMP  Layers — GIMP natively supports creating animated GIF images by using layers as each frame in the animation. GAP also supports this feature for encoding video files.  Storyboard — Storyboards are interesting beasts in GIMP terms. As covered in Chapter 19, they’re text files that can point to still-frame images as well as video files. If you want to take the input from a storyboard file and encode a video file to produce an animatic, or storyboard set to time, this is the way to do it. Something to remember here, though, is that if you choose this option, you must load the storyboard file in the Extras tab of this window. This is explained more later in this chapter, but it’s worth mentioning now.  From Frame — Whether you’re using frames, layers, or storyboard items, you need to stipulate which unit the encoded video starts at. GAP does its best to guess this for you, but if you need a custom value, this is what you modify.  To Frame — Like the From Frame setting, this designates where the animation ends. By default, GAP guesses for you and loads the highest-value frame, layer, or storyboard element it can find. However, if you need a custom value, you enter it here.  Width/Height/Framesize — You’re probably working on your animation or video at full size. However, if you’re just producing a quick preview or you’re generating a video file to go online, you may want to encode to a smaller size. The Width and Height fields allow you to set an explicit size in pixels, but you can also use the Framesize drop-down to the right of these fields to choose from a handful of standard sizes.  Framerate — This value, set in frames per second, controls how fast your animation or video plays back. For convenience, the drop-down menu to the right of this field provides you with some standard frame rates so you can avoid typing.  Videonorm — If you’re encoding video that’s intended for television, you definitely want to pay attention to this setting. It actually controls the shape of the pixels in your video file. Up until this point, everything you’ve done in GIMP has involved square pixels. However, some television standards like NTSC actually use rectangular pixels. The options in this drop-down menu let you control your pixel aspect to match a given standard. If you want to keep using square pixels, just set this to Undefined.  Encoder — This is where the really technical part of video encoding comes in. The latest version of GAP gives you four options to choose from when you click on the drop-down menu next to this label:  FFMPEG — FFMPEG is a Free Software library for encoding and decoding video. It’s extremely powerful and renowned for its reputation to convert nearly any video format to another by leveraging a variety of third-party libraries. Although FFMPEG is an excellent and powerful library, it’s worth mentioning that some of the codecs it supports — namely H.264 and MPEG-4 — place this library in a somewhat gray legal area with respect to patent and intellectual property laws. You can read more detailed information on the FFMPEG web site at http://www.ffmpeg.org/legal.html. The short version is this: if you’re using FFMPEG for personal, non-commercial pur- poses, you’re not likely to run into any trouble. 577 Part IV: Exploring Filters and Effects  Single Frames — This option does as its name implies; it generates a sequence of still images rather than a single video file. This setting is most useful if you’re encoding a GAP Storyboard that has a variety of video input types. Using this option unifies the storyboard to a single project that you can edit further.  Raw Frames — This option behaves exactly like the Single Frames option in all cases except for one very specific case. If your output is stipulated as JPEG images and you’re using the Storyboard input mode with source footage that is JPEG images, JPEG-encoded video, MPEG1 video, or Motion JPEG video, GAP copies those frames directly to the output without recompressing them. This makes the encoding process faster and allows you to forgo any generational loss due to recompressing in the lossy JPEG format.  AVI1 — This is an older encoding setting that ships by default with GAP. If you don’t have FFMPEG installed on your computer, you should at least be able to encode with this format. It doesn’t support the diverse codecs that FFMPEG does, but the files it creates should be universally readable. Video Formats and Video Codecs I t’s worth pausing here to cover the difference between a video format and a video codec. The definitions of these two things are actually pretty straightforward. Think of a video format as a container. Inside this container is video data and audio data. The video data that’s stored in whatever video format you choose is compressed with a video codec , an algorithm that encodes and decodes your video to and from its compressed format. For example, AVI is a container format that can hold video encoded in a variety of codecs, including DV, MPEG-4, or JPEG compression. Pretty simple, huh? Where things start getting complicated is that some formats share names with codecs. For instance, you can have MP4 file. This file uses the MPEG-4 video format, and within that format, you can encode your video to a number of different types of MPEG-4 implementations, such as H.264, ‘‘standard’’ MPEG-4, or one of three different kinds of Microsoft MPEG-4 codecs. Additionally, some codecs behave as their own containers. For instance, the DV, or digital video, format used in many digital video cameras is often stored and read in its own raw DV format rather than being wrapped in an AVI or QuickTime container. Regardless of these bits of confusing naming conventions, the differentiation between a format and a codec remains the same. For instances where you’re discussing codecs and formats that share the same name, you’re best off asking the other person to specify which one they’re talking about. Setting FFMPEG Parameters The default encoder that the Master Videoencoder presents you with is FFMPEG and by all accounts it’s the best option. It gives you the most flexibility and the most choices of codecs to use for compressing your video file. If you choose FFMPEG from the Encoder drop-down menu, the next thing you should do is click the Parameters button to the left of it. Upon clicking it, GAP opens the window shown in Figure 20-8. 578 Chapter 20: Working with Video-Specific Functions in GIMP FIGURE 20-8 The FFMPEG Video Encode Parameters window is where you control how FFMPEG encodes your video file FFMPEG’s flexibility is a bit of a double-edged sword. Though you have virtually limitless con- trol of the encoding process at your fingertips, this also means that there’s a potential for a mind- bogglingly large number of choices and decisions. Fortunately, GAP attempts to simplify the process by offering you a set of presets in the drop-down menu at the top of the window. Specif- ically, you’re given four separate codec choices and different quality levels associated with each one. They are as follows:  DiVX — Of the presets listed here, the DiVX options are the most Internet-friendly, offer- ing the best quality video at the smallest file sizes. Your choices here are Default, High Quality, Low Quality, and Windows. For most situations, Default should work fine. How- ever, if you want to have the greatest chance of your video playing on Windows, the Win- dows option may be better for you. 579 [...]... the originating image These two options let you choose either the odd lines or the even lines as your basis Then the missing lines are interpolated from the lines you choose You can control the smoothness of this interpolation with the numeric field to the left A value of 0.00 gives you no interpolation whereas a value of 1.00 gives you the smoothest possible interpolation Deinterlace Frames x 2 — The. .. the Extract Videorange window looks like after you click the Video Range button FIGURE 20-16 Using the Video Playback interface to interactively define the video range for your frame extraction Use this interface to determine the range of frames you want to extract Use the Button Array and the Position Scale to see the content of each frame You can use the buttons to the right of the window to set the. .. parameter and the next few ones beneath it control the name of each frame that gets extracted By default, frames follow the pattern of frame_000001.xcf, frame_000002.xcf, and so on This value controls the front of the filename, including the full path, up to the number of the frame To make things easier, you can click the Browse button to the right of this field and use the File Chooser to control where the frame... so you can either manually type in the sample rate you want to use or you can use the drop-down menu to the right of the field to choose from a set of standard presets Something to remember here is that if you increase the sample rate to be greater than that of your source file, the sound quality of the new file is the same as that of the original However, if you reduce the sample rate, the output audio... chapter is focused on what they do, how to get them, and any ‘‘gotchas’’ that you may run across when installing them 601 IN THIS CHAPTER Using the GIMP Plugin Registry to find plug-ins Understanding some of the most useful plug-ins Part V: Advanced Topics The GIMP Plugin Registry The first place to go looking for plug-ins is the online GIMP Plugin Registry at http: //registry .gimp. org This web site features... Installing Scripts Of the two types of plug-ins, scripts are the simplest to install If you download them from the registry, they should be pretty easy to pick out The script file usually has a scm extension at the end of the filename Installing them is as easy as copying that file to your GIMP scripts folder You can actually have more than one and it varies a bit depending on whether you’re using GIMP in Linux,... entered, the Master Videoencoder gives you the ability to store these settings to your hard drive for future use To do this, click the Save button at the bottom of this tab This brings up a File Chooser window where you can save a text file that maintains these settings for you Then the next time you want to use GAP to encode video, you can reload these settings by clicking the Load button and finding the. .. video, the options in this window are easy: leave them blank Of course, assuming you do have sound for your video, the options here are important Everything is driven from the Audiofile text field at the top of the window At its simplest, you click the Browse button to the right of the field and pick your audio file from the File Chooser that appears 586 Chapter 20: Working with Video-Specific Functions in GIMP. .. you can use the links in the center of the page under the Browse the Registry heading You can often quickly find interesting plug-ins by using the tag cloud Each plug-in that’s added to the registry can be tagged with a word or phrase that pertains to it, just like you can tag resources in GIMP s Brushes dialog The tag cloud, shown in Figure 21-2, shows all the tags that have been used on the registry... this is the temporary output file in RIFF WAV format that the Audioconvert feature creates It should be the value of $IN with _tmp.wav appended to the end of it $RATE — This is the sample rate that you specify in the Samplerate field of the Audio Options tab If you want your converted file to have the same sample rate as the original file, then it’s not critical that you include this variable in the Options . this value to the frame rate your source video uses. If you’re in a country using the NTSC standard, like the U.S., you’ll probably use 29. 97fps. Other parts of the world tend to use the PAL standard. to the beginning of the preview when it gets to the end, the Ping Pong option causes the animation to play in reverse when it gets there. If you watch the Position Scale’s shuttle move while the. playback uses the original volume of the sound file. If you increase the value to 2.00, the playback will be twice as loud as the original. On the flip side, setting the Volume value to 0.50 sets the playback

Ngày đăng: 09/08/2014, 12:21

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan