Some observations about rendering to MPEG2

riredale wrote on 8/8/2007, 10:33 AM
For the years when I have done projects in DV, I've used the excellent CinemaCraft MPEG2 encoder to make DVD-compliant m2v files which I would then import to either Maestro (an excellent but ancient authoring program) or more recently to DVDlabPro. For the past year or two I've migrated into shooting HDV, which adds another layer of complexity.

For the past few days I've looked at a couple of paths that all start with HDV and end with a DVD. Here are my initial observations:

(1) I have edited in m2t, in Mjpeg, in Cineform, and in DV. On my fairly powerful machine (HDV rendertest in 6:21) I much prefer the smoothness and fluidity of working in the DV environment. Multiple layers and color corrections don't phase the playback one bit. I have not played with the purchased version of Cineform, but the default Cineform does not run all that well on my machine and file size is also a minor consideration. Mjpeg works okay but shows weird artifacts in the preview window if the project is set to HDV. Working directly in m2t can be done, but there are times the system really seems to be laboring, and the frame rate slows down considerably with the addition of various effects. So my present preference is to pull in the raw m2t clips and immediately GearShift them into DV proxies, and then work with the proxies.

(2) I've also learned (as no doubt many of you have) that you can encode into MPEG2 from DV, but you pay a price doing so if you live in an NTSC world. NTSC DV is 4:1:1, meaning that color sharpness is excellent in the vertical direction but horrible in the horizontal direction. Okay, fine. But when you encode to MPEG2 the vertical color resolution gets cut in half, leaving you with medium color resolution vertical and horrible resolution horizontal.

If, on the other hand, you encode to MPEG2 with any of a number of other formats (raw m2t, mjpeg, huffYUV, uncompressed, ...) then you start with excellent color resolution and wind up with medium color resolution in both vertical and horizontal directions. I didn't think it made much of a difference until I encoded red objects, which look pretty horrible in 4:1:1. So this means that while I might like to edit in a DV proxy world, I need to render to MPEG2 from a different medium.

(3) I've always enjoyed using CinemaCraft as my MPEG2 encoder, because (a) the results are terrific (b) the encoder is blindingly fast and (c) you have the ability to graphically fine-tune the bitrate for any segment of the render. In my various tests performed over the past few days, however, I've come to the conclusion that the MainConcept encoder produces results virtually identical to CinemaCraft at bitrates down as low as 3Mb/sec (CBR). In fact, at the extreme bitrate of 2Mb/sec (that no one would ever use) the MainConcept CBR output looked BETTER than that from CinemaCraft.

The blazing speed of CinemaCraft is great. I routinely got 3.8x realtime when encoding from DV. However, if I use CinemaCraft to encode from an m2t master using frameserving, that speed advantage is largely lost, since it appears it can go no faster than what Vegas is able to hand over to the frameserver. So the speed advantage is largely gone. Still, CinemaCraft gives much more encoding flexibility than MainConcept.

Anyway, at this point my muddled brain has concluded this workflow.
--Shoot in HDV
--bring m2t clips into the PC
--make DV proxies with GearShift
--edit in DV on an HDV project timeline
--for final render, GearShift back to m2t clips and render with CinemaCraft via frameserver (render with MainConcept from m2t would be nearly as satisfactory)

I think it makes more sense to render from the m2t source directly because while I like to edit in the DV environment, DV can't be used as a source for the final render, so I might as well go to the raw m2t source. Also, I can avoid any generation losses this way.

There are many other ways to get to the final destination but this is one way I'll try on my next project.

Comments

rmack350 wrote on 8/8/2007, 11:03 AM
Great post! Thanks.

When you frameserve out of an HDV project, how is the conversion to SD being handled?

Rob Mack
blink3times wrote on 8/8/2007, 11:54 AM
Power.....LOTS of power!

I edit nothing but M2T and I had a D950 dual core which could be a bit sluggish when you started getting into some of the more complicated effects. Vdub's cartoonizer plugin for example would bog my system down something awful!

Since then I have acquired a quad core and things are MUCH better, but even still as you point out, there is some clear laboring going on

I suspect that's one of the main reasons as to why Vegas is coming out with a 64 bit system. As I said before in a previous post, dv users may not gain a whole lot with the new 64bit system... but it should be a BIG difference those of us that work with M2T.

I just hope they take it a step further and include SOME KIND of mpeg smart render system!!!
riredale wrote on 8/8/2007, 2:36 PM
Rmack:

This was the subject of a post I made a few days ago.

From what I can tell at this point, Vegas will do an internal down-conversion at 4:4:4, so color information is as good as it was on the m2t clip. The MPEG2 codec will, of course, clip it to 4:2:0, but it looks better that way than the 4:1:1 of DV. With some colors I can't tell the difference, but with reds it's very obvious.

EDIT:
I should add that I CAN'T frameserve out of an HDV project. What I have to do is to temporarily tell Vegas to make my project an SD project at 720x480 (I need to temporarily change the project properties). I don't think the DV codec is involved at all; my resulting test images show good horizontal color resolution.
Laurence wrote on 8/8/2007, 2:36 PM
My workflow is similar, but I have a few other little things that help:

1. Capture m2t video using the latest version of HDVSplit (.77 Beta) with the preview window turned off, and don't do anything else with the computer during capture. This will give you m2t clips that will play as efficiently as possible with as few Vegas crashing errors as possible.

2. If you are using an external 1394 monitor and something like a Canopus box, by all means use DV proxies. If not, Pegasys MJPEG proxies are even smaller and tax your system less.

3. If you are working with many tapes as in a documentary style project, you can do your rough cutting with the m2t clips, then select the shaky footage and run the deshaker script using the Cineform codec option for the returned footage. Then you can run the timeline version of Gearshift on the deshaken timeline to generate both Cineform and the proxies. When you do this you can select a new working directory for your files and use the MJPEG codec for the proxies if you want. The Cineform HD clips will smart render really quickly since they were already rendered during the deshaker process.

Now what you end up with is your original capture subdirectory with your captured m2t clips, and a new working subdirectory with the Cineform clips and proxies which is a reasonable size, and can be worked with multipe layers and filters quite effectively on a moderately powered P4. When you render your Cineform HD masters, large portions of the project will smart-render very quickly.
Laurence wrote on 8/8/2007, 2:42 PM
Another trick:

If you use SD resolution Cineform for your proxies, you will have most of the efficiency of regular DV clips for your editing (minus the accelerated 1394 playback). What this gives you however is the correct colorspace as you work. Then, when you render your SD maste, it will smartrender just like SD DV clips, but your colorspace will be the same as your mpeg DVD render. This means that you can render your SD masters really quickly and that as long as you're not zooming in on the footage, it will look as good on the final SD DVD as if you had rendered from your original HDV clips, except that it will be WAY faster. You could also use this SD resolution Cineform master with the Cinecraft MPEG encoder.
rmack350 wrote on 8/8/2007, 2:53 PM
Thanks.

Yes, I was following the other thread, as you know. I had found that frameserving a project based on an HDV template was no problem so I think your trouble was that CC wanted to be fed SD footage. I was wondering if that's where you'd ended up or if you'd found out something new.

All good to know. Thanks,

Rob
RogerB1 wrote on 8/9/2007, 6:44 AM
What is a m2t clip? (Sorry, new to HDV editing)
Laurence wrote on 8/11/2007, 9:49 PM
It's an HDV resolution (either 1440x1080 or 1280x720) mpeg2 format that has a little extra transport information embedded. It's the file format of all the new HDV cameras. When you capture the m2t clips, you are capturing the actual video as it is encoded on your HDV camera.