Vegas Movie Studio 13 to Handbrake for 1080p 60fps

Augie wrote on 9/9/2016, 2:31 PM

I'm an amateur. I hope documenting and discussing my research will help others. And thank you to everyone on the Vegas and Creative COW forums for the information they've provided over the years -- information that helped an amateur like me understand any of this.

I want to use Handbrake's ConstantQuality feature to render my Vegas Movie Studio (VMS) 1080p 60fps projects to H.264.

  • x264 is the H.264 encoder that Handbrake uses
  • CRF is x264's term: Constant Rate Factor
  • ConstantQuality is Handbrake's term for an x264/CRF encode

Following this excellent guide's "Better" instructions:

I set out to use VMS to render an intermediate DNxHD file for use in Handbrake. I downloaded the latest version from here:

At first (before subsequent posts in this thread), I thought DNxHD didn't support 1080p 60fps. It turns out that 1080p/59.94 (and true 60) are supported resolutions:

However, they are not available to select from the DNxHD Configure screen's Resolutions dropdown. Fortunately, selecting another available frame rate from the dropdown works because it's overridden by the Frame rate setting on the Video tab itself. See my second post in this thread and this discussion:

Before I realized I could produce a DNxHD 1080p60 intermediate, I tested another Avid codec, DNxHR. The newer DNxHR codec is resolution independent:

But the resulting 1080p60 render isn't Handbrake-compatible. I tried. Handbrake cannot successfully scan it as a source.

I also tested other intermediate formats mentioned in this thread and, additionally, the HuffYUV and Ut codecs I've read about elsewhere:

They are all accessible under Video for Windows and are all truly lossless except for CineForm:

So my non-DNxHD intermediate options are, from smallest to largest file size:

  • Lagarith
  • Ut
  • HuffYUV 2.1.1
  • Sony YUV

and from fastest to slowest render times in my tests (see below):

  • Lagarith
  • Ut
  • Sony YUV
  • HuffYUV 2.1.1

So my best non-DNxHD choice is Lagarith, right? From a mathematical efficiency perspective, yes. But watching the subsequent Handbrake H.264 renders in VLC and WMP, the best contrast comes from the DNxHD and Sony YUV intermediates, with blacks as deep as the source. The other codecs produce a slightly washed-out look.

Bottom line: DNxHD offers the best combination of quality and file size, though with a longer rendering time than the other options. If you don't want to use DNxHD and quality is your first priority, find the hard drive space in order to use the Sony YUV intermediate. Otherwise, if your Lagarith-sourced Handbrake H.264 renders look as good as your Sony YUV-sourced Handbrake H.264 renders, use Lagarith. It produces smaller files and renders even faster. Ut is a close second to Lagarith, efficiency-wise.

Another option is frameserving. Frameserving feeds video to a non-Vegas encoder directly from Vegas, no intermediate render required. Two methods to frameserve to the x264 encoder that Handbrake uses:

My Tests

Dell XPS 8300
Intel Core i7-2600 CPU @ 3.40 GHz

  • 4 cores
  • 8 logical processors

8.00 GM RAM
Windows 7 64-bit
AMD Radeon HD 6700 Series
VMS set to use the AMD:

Notes

When you install a new codec, you must restart VMS for it to appear in the Video Format dropdown.

I thought rendering to my original source's format would be a good intermediate. But my original source is AVCHD and, I've subsequently learned, AVCHD is H.264. So I would have been rendering an H.264 intermediate to render an H.264 in Handbrake -- two generations of lossy compression.

If the ultimate destination is YouTube/Vimeo, why not just upload the intermediate since YouTube/Vimeo are going to re-encode whatever you upload anyway? File size. Even if YouTube/Vimeo accept the various intermediates, and I don't know that they do, uploading files of that size is restrictive or impossible.

 

Comments

Augie wrote on 9/9/2016, 3:01 PM

My render settings...

 

DNxHD

Video

Audio

  • Audio format: Uncompressed
  • Sample rate (Hz): 48,000
  • Bit depth: 16
  • Channels: Stereo

Streaming

  • Prepare for streaming: Checked [default]
  • Optimization: Fast start [default]

Project

  • Video rendering quality: Best

 

Video for Windows (AVI)

Started with the "HD 1080-24p YUV" template

Video

Audio

  • Audio format: PCM Uncompressed
  • Sample rate (Hz): 48,000
  • Bit depth: 16
  • Channels: Stereo

Project

  • Video rendering quality: Best

 

Handbrake

Reference: https://mattgadient.com/2013/06/12/a-best-settings-guide-for-handbrake-0-9-9/

Based on the built-in High Profile preset because YouTube recommends the High profile:

Musicvid's tutorial has you change Advanced options, but those options are not available anymore. One reason he had you change them is so you could re-import the resultant MP4 into Vegas. But using just the settings above, you can re-import into Vegas now:

Eagle Six wrote on 9/9/2016, 8:21 PM

Hi Augie,

In the DNxHD configure screen I select 1080p/29.970 DNxHD 220 10-bit, then 'OK'.  In the template I change the 'Frame rate:' to '59.940000'.

I don't have any original source at 1080p/59.940, so I took a 1080p/29.970 source file into SMS13P, changed the project to 59.940, rendered out to DNxHD 220 10-Bit 59.940, MediaInfo reports it is now 59.940 422 10-bit DNxHD, brought it back into SMS13P which matches the project setting at 59.940 and Handbrake renders it out to 59.940.  Hope this helps avoid the other hoops you are going through.

Best Regards....George

System Specs......
Corsair Obsidian Series 450D ATX Mid Tower
Asus X99-A II LGA 2011-v3, Intel X99 SATA 6 Gb/s USB 3.1/3.0 ATX Intel Motherboard
Intel Core i7-6800K 15M Broadwell-E, 6 core 3.4 GHz LGA 2011-v3 (overclocked 20%)
64GB Corsair Vengeance LPX DDR4 3200
Corsair Hydro Series H110i GTX 280mm Extreme Performance Liquid CPU Cooler
MSI Radeon R9 390 DirectX 12 8GB Video Card
Corsair RMx Series RM750X 740W 80 Plus Gold power pack
Samsung 970 EVO NVMe M.2 boot drive
Corsair Neutron XT 2.5 480GB SATA III SSD - video work drive
Western Digitial 1TB 7200 RPM SATA - video work drive
Western Digital Black 6TB 7200 RPM SATA 6Bb/s 128MB Cache 3.5 data drive

Bluray Disc burner drive
2x 1080p monitors
Microsoft Window 10 Pro
DaVinci Resolve Studio 16 pb2
SVP13, MVP15, MVP16, SMSP13, MVMS15, MVMSP15, MVMSP16

Augie wrote on 9/10/2016, 2:21 AM

Thank you so much, George! And I thought I'd been so thorough. I see now that that's been discussed before, too:

I'll render my test project using a DNxHD intermediate and edit my original post with the results so it doesn't lead anyone astray.

Eagle Six wrote on 9/11/2016, 5:43 PM

For clarity.......MusicVID appears to have replied to this thread (although I don't see his reply now) commenting about the DNxHD 220 10-bit being extra air over 8-bit.  I used the DNxHD 220 10-bit as an example, but MusicVID's comment has value.  There is no gain (actually loss with time to render and file size) to render out 8-bit source as 10-bit.  And, if the original source brought into Vegas or Movie Studio was ProRes 422 HQ, the best Vegas or Movie Studio can do with it is 8-bit.  Thank You MusicVID for pointing this out, as my use of the example may have been misleading to others.

I'll leave my previous post unedited so this update post makes since.

Best Regards.......George

System Specs......
Corsair Obsidian Series 450D ATX Mid Tower
Asus X99-A II LGA 2011-v3, Intel X99 SATA 6 Gb/s USB 3.1/3.0 ATX Intel Motherboard
Intel Core i7-6800K 15M Broadwell-E, 6 core 3.4 GHz LGA 2011-v3 (overclocked 20%)
64GB Corsair Vengeance LPX DDR4 3200
Corsair Hydro Series H110i GTX 280mm Extreme Performance Liquid CPU Cooler
MSI Radeon R9 390 DirectX 12 8GB Video Card
Corsair RMx Series RM750X 740W 80 Plus Gold power pack
Samsung 970 EVO NVMe M.2 boot drive
Corsair Neutron XT 2.5 480GB SATA III SSD - video work drive
Western Digitial 1TB 7200 RPM SATA - video work drive
Western Digital Black 6TB 7200 RPM SATA 6Bb/s 128MB Cache 3.5 data drive

Bluray Disc burner drive
2x 1080p monitors
Microsoft Window 10 Pro
DaVinci Resolve Studio 16 pb2
SVP13, MVP15, MVP16, SMSP13, MVMS15, MVMSP15, MVMSP16

Musicvid wrote on 9/12/2016, 2:41 PM

Sorry for bailing on my previous post. I still see lots of moving targets.

If 10 bit source is dithered to 8 bit in Vegas, the result is worse than doing the same in Handbrake. See the other thread linked above for evidence.

For 8 bit source, there is no dithering applied anywhere, so that is a non-issue. Upsampling does not "up-dither" or interpolate 8 bit to 10 bit (unless its in a packed Cineform for instance). Same amount of water in a larger glass.

For critical grading, compositin, and generated media effects in a 32 bit float environment, there may be added value in rendering a 10 bit intermediate in Vegas, and let Handbrake do the dither from 10 bit to 8 bit. If you detect no banding or moire in the Vegas renders, and the shadow detail looks ok, there is probably no point in the 10 bit intermediate, but there is no harm either.

If you are creating a YUV intermediate in Vegas (DNxHD uses YUV compression but can flag RGB levels correctly), a 10 bit YUV intermediate is preferable to 8 bit YUV, but only if the source is truly 4:4:4 RGB. Laurence dug out the mathematical logic of this some time back, but it remains to be seen if anyone can actually SEE the differences in viewing.

There is lots of background noise on the internet about this, largely due to what I call "alchemic thinking." Sometimes in limited applications, bloggers make the right suggestion for entirely delusional reasons.

10 bit output is now possible in Handbrake by juggling a couple of libraries and scripts. Since it is not yet a widespread delivery option, the capability is there largely for hobbyists at this time.

Those are my impressions, of course, and they have changed over time, but maybe I've covered a couple of bases; hope I haven't screwed anything up.

 

Eagle Six wrote on 9/12/2016, 3:21 PM

If 10 bit source is dithered to 8 bit in Vegas, the result is worse than doing the same in Handbrake. See the other thread linked above for evidence.

For 8 bit source, there is no dithering applied anywhere, so that is a non-issue. Upsampling does not "up-dither" or interpolate 8 bit to 10 bit. Same amount of water in a larger glass.

For critical grading, compositin, and generated media effects in a 32 bit float environment, there may be added value in rendering a 10 bit intermediate in Vegas, and let Handbrake do the dither from 10 bit to 8 bit. If you detect no banding or moire in the Vegas renders, and the shadow detail looks ok, there is probably no point in the 10 bit intermediate, but there is no harm either.

If you are creating a YUV intermediate in Vegas (DNxHD uses either color space), a 10 bit YUV intermediate is preferable, but only if the source is truly 4:4:4 RGB. Laurence dug out the mathematical logic of this some time back, but it remains to be seen if anyone can actually SEE the differences in viewing.

There is lots of background noise on the internet about this, largely due to what I call "alchemic thinking." Sometimes in limited applications, bloggers make the right suggestion for entirely delusional reasons.

10 bit output is now possible in Handbrake by juggling a couple of libraries and scripts. Since it is not yet a widespread delivery option, the capability is there largely for hobbyists at this time.

Those are my impressions, of course, and they have changed over time, but maybe I've covered a couple of bases.

I agree.  Thank You.

 

Best Regards....George

System Specs......
Corsair Obsidian Series 450D ATX Mid Tower
Asus X99-A II LGA 2011-v3, Intel X99 SATA 6 Gb/s USB 3.1/3.0 ATX Intel Motherboard
Intel Core i7-6800K 15M Broadwell-E, 6 core 3.4 GHz LGA 2011-v3 (overclocked 20%)
64GB Corsair Vengeance LPX DDR4 3200
Corsair Hydro Series H110i GTX 280mm Extreme Performance Liquid CPU Cooler
MSI Radeon R9 390 DirectX 12 8GB Video Card
Corsair RMx Series RM750X 740W 80 Plus Gold power pack
Samsung 970 EVO NVMe M.2 boot drive
Corsair Neutron XT 2.5 480GB SATA III SSD - video work drive
Western Digitial 1TB 7200 RPM SATA - video work drive
Western Digital Black 6TB 7200 RPM SATA 6Bb/s 128MB Cache 3.5 data drive

Bluray Disc burner drive
2x 1080p monitors
Microsoft Window 10 Pro
DaVinci Resolve Studio 16 pb2
SVP13, MVP15, MVP16, SMSP13, MVMS15, MVMSP15, MVMSP16

Augie wrote on 9/19/2016, 4:08 PM

I've edited my first two posts to reflect the discussion thus far. George and Musicvid, thank you for your help!

Augie wrote on 9/30/2016, 12:06 AM

Hard Drive Location and Speed

I don't own any SSD hard drives.

My tests above started with raw footage on a USB 2.0 external hard drive (EHD1). My intermediate and Handbrake renders were written to my PC's internal hard drive (C:). Source > destination:

  • Intermediate - EHD1 > C:
  • Handbrake - C: > C:

Because the quality is the same but the rendering time in my tests above was almost twice as fast, I considered using a Sony YUV intermediate instead of DNxHD. But the Sony YUV files are so large that I would have to render out to an EHD.

As soon as I involved an EHD as a destination -- either the same EHD the raw footage is on (EHD1) or a different EHD (EHD2) -- the Sony YUV render times more than tripled. And if I had thought about rendering DNxHD out to an EHD, those times almost doubled:

Bottom line: Rendering Sony YUV out to my PC's internal hard drive is the fastest option, but my internal hard drive doesn't have the free space needed. So I'm back to the second fastest option: rendering DNxHD out to my internal hard drive. If I wanted to render DNxHD to an EHD, I could do that, knowing that it will take almost twice as long. But it's just as fast as rendering Sony YUV to an EHD -- actually, slightly faster -- and the file size is much smaller.

P.S. Notice all of the "Handbrake from DNxHD" render times are essentially the same. Encoding time must be the limiting factor, not hard drive read/write time. I assume that means a 3.0 USB EHD or an SSD wouldn't make those particular renders any faster.

Musicvid wrote on 10/3/2016, 7:32 AM

Interesting posts, but you've tested apples against oranges looking for your ideal speed / size balance.

Sony YUV 10 bit is a practically-lossless intermediate that relies on chroma subsampling to achieve smaller sizes, and for most purposes is every bit the equal of the benchmark, RGB 4:4:4 8 bit.

DNxHD is a lossy intermediate that is another layer down in the food chain from the "pure" YUV codecs, sacrificing some quality for the sake of compression. You will not see a difference among these first three I mentioned, except after multiple sequential generations of encodes.

Your approach to testing is decidedly linear and thorough. As an educator, I admire that. However, shifting your visual thinking model to something that is more vertical and hierarchial may help your understanding quite a bit.

Let's start with the first general rule of encoding: Size, Quality, Speed. Pick two. This is doubly important when choosing a visually lossless codec as an intermediate to an external processor or encoder.

When choosing for your needs, pick a class of encoders and test within, not among groups. That will save the mental gymnastics trying to make sense of it all. Here, in the order of my testing protocol, is the vertical pyramid of intermediate encoders arranged in order of mathematical accuracy. Keep in mind that playability should never be considered for interapplication use -- these are not delivery codecs. For editing, however, some including Cineform and MPEG compression are paritcularly suited to the Vegas preview engine.

I. Uncompressed RGB. This is the benchmark, Mathematically lossless4:4:4 sampling. Renders the fastest, produces the largest files. Survives multiple generations of renders unscathed.

II. Compressed RGB. Included Huffy, Lagarith, Magic, UT, when used in RGB mode! Uses lossless compression, smaller files, slightly longer render times than uncompressed. Some people have reported insignificant rounding errors past 6 generations, but I didn't push my tests that far.

III. Pure YUV -- still AVI intraframe, achieves smaller files than RGB through Y'CbCr chroma subsampling. Sony YUV is the only one worth mentioning here because it stands head and shoulders above the rest, and the 10 bit is a great substitute for Uncompressed up to about five generations. I'm curious enough to test Magic in YUV mode against it at some point -- no predictions based on what people have been saying.

IV. Compressed YUV -- Intraframe. Slower encoding, but still the go-to choice for production houses. ProRes, DNxHD, Cineform, etc, All wonderful codecs for balancing size and quality. I use DNxHD because it is highly portable across platforms and destination encoders. 

V. Compressed YUV -- Interframe. Now we've opened a can of worms. Oldies-but-goodies like MPEG and h264 can be configured as visually lossless or all-intra, relatively high-bitrate intermediates. Many Vegas users like MPEG compression in the newer wrappers because of the ability to smart-render multiple generations. Otherwise, multiple subsequent generations are not the best use for these. Wonderful quality at higher bitrates, the smallest files, and preview pretty well if you've got a fast system.

Unfortunately, I didn't finish compiling my second round of tests because they involved 22 codecs. You can see the comparisons for RGB encoders (didn't test Magic, but the quality claims are believable.

https://www.vegascreativesoftware.info/us/forum/intermediates-part-i-seven-lossless-codecs--84932/

Once you've picked a class of codecs to work within (most people make a choice based on the size of their egos, not their application), you can narrow your choices to a point that suits you on the triaxial model -- speed, quality, size. Hope this saves you some backpeddling. You are not the first to embark down this trail.

That all being said, your wisest choice is Vegas Pro with Vegas2Handbrake frameserving. But that's a whole 'nuther discussion.


: