EventDV.net
Search EventDV

EVENT-DV 25
2010 Awards Show
2009 All-Star Team
2008 All-Star Team
2007 All-Star Team
2006 All-Star Team


RELATED SITES
Streaming Media Producer
OnlineVideo.net
Streaming Media
EMediaLive Archive


PRIVACY/COOKIES









Copyright © 2004 -
Information Today, Inc.



Sony Vegas Tips & Tricks: Encoding Video for Online Delivery
Posted Jul 15, 2009 Print Version     Page 1of 1
  

No doubt, online video is huge these days. Whether you upload video to YouTube, Vimeo, or Facebook or host it on your own blog or website, at some point you need to get video from the Vegas timeline to the web. In this article, we’re going to discuss exporting from Vegas to Flash and H.264/MPEG-4.


A Little Background
In my articles I try to get right to the steps involved in achieving whatever result we’re after, but before we get into the process, I’d like to address a few issues first. Ultimately, your viewer will be clicking a link somewhere on the web to view video. For several years, the consensus has been that Flash Video is the way to go. Adobe claims more than 98% market penetration with its Flash player, so why would you use anything else? MPEG-4 video is used in video iPods and other devices, but one thing you may not know is that the Adobe Flash player will play MPEG-4 video too. So you have much more of a choice than Adobe’s statistical claims would lead you to believe. Video that you produce using either codec can be played by the Flash player on web browsers worldwide.

In researching this article, my initial plan was to discuss traditional FLV files in Flash only, but using MPEG-4 may ultimately be a better choice for you. And to get this out of the way up front, MPEG-4 Part 10 is both the basis of, and the wrapper around, the H.264 codec. MOV, aka QuickTime, is another wrapper. For the purposes of this tutorial, I’ll refer to MPEG-4 Part 10 as H.264 video. So, to reiterate, in this installment we are going to talk about going from Vegas to traditional Flash video, and from Vegas to MPEG-4 video using the H.264 codec. Embedding the resultant file in a webpage is best left for a future article.

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.

Using Fliz is really pretty simple, but you can adjust lots of parameters should you want to (in the Pro version).

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.

The default Flash output preset in Flix Pro

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.

Settings and parameters in the On2 Flix Pro Vid/Aud tab

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 MP3
Apple 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).

Rendering as MP$ in Sony Vegas—click the Custom button to create a custom template

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).

Creating an MPEG-4 Small template in Sony Vegas

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 YAMB
There 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).

Selecting MPEG-4 file creation in YAMB

2. Click Add and select the .mp4 file you created earlier. Click Open (Figure 7, below).

Select the MPEG-4 file

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.

Writing the file in YAMB

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 of multiple HPVA awards.

Learn more about the companies mentioned in this article in the EventDV Videographer's Guide:
{0}


EventDV Spotlight is now:
Email:
more info
more info

Print Version   Page 1of 1