Sony Vegas Tips & Tricks: Encoding Video for Online Delivery
06.08.2012, 14:11
Download On2
Fliz for Flash In recent years, the most common request
Vegas users have made is to be able to export to the Flash Video (FLV)
codec directly from the Vegas timeline. As of the release of Vegas Pro
9.0, you cannot do this. You have to use a third-party encoder. You can
use Adobe (formerly Macromedia) Flash to do this of course, but you can
also use Flix and Flix Pro from On2, the company that develops the VP6
codec for Adobe. Flix Standard sells for less than $40, so it’s not
necessary for Vegas users to fork over big bucks for the Adobe suite to
get into Flash encoding. I’ve used the Flix Pro product, and I prefer it
for doing a 2-pass render out to Flash. Just as in Vegas, rendering
2-pass results in higher quality with a lower file size. Flix Pro
retails for about $250 and comes with players, skins, and batch
encoding. It has a bunch of other goodies that make it worth the extra
dough above Flix Standard, and it’s still cheaper than Adobe Flash.
I
won’t go into the Vegas details for using Flix, because there aren’t
many. You will want to render an NTSC DV file out of Vegas (Figure
1, below). Even if you start with an HD project, your render
out of Vegas should be to DV. I could not get a native .m2t or .mpg file
to load in Flix. So from the Vegas timeline, render as NTSC DV or NTSC
DV Widescreen to an .avi file. I would follow Jan Ozer’s advice from the March 2009 Moving Picture
column and render out of Vegas as Progressive.
Choose
an Encoding Preset On the File tab, click Browse and point
to the file you rendered out of Vegas. This will give you an output file
in the same directory, but you can change it. There are several presets
to start with. By default, 512K Broadband is selected (Figure
2, below). This is average by today’s standards but adequate
for embedding in a blog post, for example.
Keep
in mind that the smaller the size and bandwidth, the smaller the
overall file size, and the quicker and more stable the file will play
for all users. It is a trade-off of size versus performance. You may
also want to encode two different files, one for broadband viewers and
one smaller one for viewers with dial-up internet connections. Choose
Settings in the Vid/Aud Tab Click the Vid/Aud tab (Figure
3, below). On this tab you can choose to maintain aspect ratio
and select frame rate and encoding settings. In our widescreen example,
click No Constraints and alter the Width and Height to be 320x180.
(This change is necessary for the 1.0 Pixel Aspect Ratio.) I like to use
2-pass variable bitrate (VBR) for anything longer than a few minutes
because it provides a higher quality with a lower file size, which is
important if you have lots of downloads or limited bandwidth/storage
from your website host. But note that 2-pass encoding takes much longer
to encode.
Other settings on this tab are Stereo,
audio sampling bitrate (I would not go below the 22,050 default setting
and might go higher, depending on program material). But remember—the
more bits you use for the audio, the less you have for the video.
Back
on the File tab, click Encode. When finished, you’ll have an FLV file
ready for web distribution. In the case of our AVI sample, the filesize
is 2.8MB with 2-pass, 512Kbps encoding. MP4 is One Louder
Than MP3Apple iPods and other portable video devices play
back .mp4 video, which is H.264 video in an MPEG-4, Part 14 wrapper. The
cool thing is, .mp4 files play in the Flash player (version 9 and
above), and as I mentioned earlier, you can encode this right out of
Vegas. With the exception of one little step, it doesn’t cost you any
extra time.
I have to give huge props to Jerome Cloninger,
one of the new EventDV 25 honorees this year. The recipe for .mp4 video
playing in Adobe Flash detailed in the next section came from him, and
as he has said, "I’ve tried many settings and spent hours to get this
result.” His willingness to share his findings is one of the many
reasons he’s on the EventDV 25 list (his outstanding work is another),
and I do thank him for his contributions. Back in Vegas,
Render as MP4 (aka MPEG-4 AVC, aka H.264)In Vegas, choose
File – Render As and select MainConcept AVC/AAC (*.mp4). We’re going to
create a custom template. To do so, follow these steps:
1.
Click the Custom button. Choose Best for Video Rendering Quality (Figure
4, below).
2. Click the Video tab.
In the Frame Size drop-down, choose Custom Frame Size. Since this is
widescreen, enter the values we used earlier: 320 and 180. 3. Set
Profile to Main. Set Field Order to None (progressive scan). Set
Reference Frames at 5, and make sure Deblocking Filter is checked. 4.
Check Variable Bit Rate and Two-Pass. 5. Increasing the Maximum and
Average bps will increase the file size. For a 320 x 180 video image,
stay with the default of 768,000 and 480,000. Click the Template text
box at the top of the screen, enter a name for this new Template, and
click the disk icon on the right to save this template (I’ve named mine
MP-4 Small, as shown in Figure 5, below).
6. Click OK and click Save to render the Vegas
timeline to an MP4 file. Using these settings, the resulting MP4 file is
about 3.3 MB.
Cloninger routinely encodes full-screen internet
video (860x488) using 10Mbps max and 2Mbps average. It’s advisable to
create a different template for this—sounds like a good candidate for
MPEG-4 Large. Ya Gotta Have Some YAMBThere is
one more step to this process, but it’s a quick one: We need to reverse
the streaming bit information in the .mp4 file before it will properly
play in the Flash player. Download the free utility YAMB at http://yamb.unite-video.com (or just Google "YAMB”).
Install this program and accept all defaults.
1. Launch YAMB.
Double click on the top option, "Click to create an MP4 file…” (Figure
6, below).
2.
Click Add and select the .mp4 file you created earlier. Click Open (Figure
7, below).
3. The
video and audio streams are shown in the list box. The output shows the
same name by default; give it a different name if you don’t want to
overwrite it. 4. Click Next. The YAMB process is very quick and
painless (Figure 8, below). When the rendering and
saving process is complete, you’re ready to deploy the .mp4 file to the
web.
We’ve
covered quite a bit of ground here. While it’s possible to use the Flix
programs from On2 for standard Flash files, you can also encode H.264
files in an MPEG-4 wrapper direct from the Vegas timeline. Both
approaches offer numerous options for quality and size, and the decision
is up to you whether you want Flash or H.264. What you choose will
depend on how you assess the quality comparison, what options are
supported by your streaming host, and what your clients want and need.
Both formats will run in recent versions of the Adobe Flash player (9
and higher).
If you want to see some gorgeous high-def web video
encoded from Vegas, check out Jerome Cloninger’s website (www.jcdv.com).
Again, I’d like to mention that I’m indebted to him for his
contribution to this article. David McKnight (david at
mcknightvideo.com) is half of McKnight Video
of Houston. He is vice president of the Houston Professional
Videographers Association (HPVA), has Sony Vegas and HDV certification,
is the technical editor of the forthcoming Vegas Pro 9 Editing
Workshop (Focal Press), and is a contributor to TheFullHD Book
(VASST). He and his wife, Christie, are winners