SD DVD from HDV footage

MomentsVideos wrote on 3/4/2008, 9:55 PM

I have been hearing mixed messages about the quality of SD DVDs created from HDV footage using Vegas.

Is there a problem with Vegas doing this? I am hearing that people are switching on "Reduce Interlace Flicker" and applying Median and Blur filters etc.

I am shooting using an EX1 in 1440*1080 50i mode and will be breating 16:9 PAL DVDs.

I have shot 5 weddings, but am not ready to edit any of them yet.

Thanks

Comments

fausseplanete wrote on 3/5/2008, 1:18 AM
This is what I have so far reasoned to be the approach, at the expense of complexity and fiddliness..... Comments welcome.

Getting interlaced footage from one scale to another requires that it is deinterlaced before edits, then reinterlaced afterwards. When interlaced HDV is fed to an SD interlaced Project (for an SD interlaced render) then Vegas implicitly does this, using its inbuilt simple-but-fast methods (as would many NLEs). When I use it on low-motion scenes, I find Interpolated mode preserves detail best. Possibly it is good enough for scaling-down like you require.

However, both De and Re -Interlacing are in principle best done by motion compensated/estimated means. Vegas in-built deinterlacing, typical of NLEs, is fast but lower quality.
The best tool for mo-comp de & re int I know of is AviSynth.

When I choose to do mo-comp deinterlacing via AViSynth, I use TDeint, feeding a vfapi pseudo video file into Vegas for the final "conformed" render. This works very well. To get HDV into AviSynth is slightly fiddly, requiring use of DgIndex (to generate d2v index files) then MPEG2Source to read that instead.

Getting the AviSynth script's result into Vegas is also slightly fiddly. Vegas won't accept avs files directly, so one has to use VFAPI to present them as pseudo avi files.

The Vegas project is set to SD Progressive (even though the final product is to be interlaced). In Vegas, the pseudo avi files properties need to be manually changed to say "Progressive" etc. else they default to interlaced (regardless of the file's actual nature). Vegas can then render to a HuffYuv progressive SD master.

From this progressive master, one can now derive reinterlaced copies, though this a new area for me, still in experimentation. Best-in-principle though longest processing-time method ought to be to have deinterlaced at the beginning to double-framerate (each field becomes a frame). TDeint(mode=1) would have done that. Then when reinterlacing, get AviSynth (say) to pick alternate fields from alternate frames. Otherwise, if one had deinterlaced to standard framerate (where two fields become one frame) at the beginning (e.g. by Vegas implicit deinterlacing to a progressive project or by explicitly using TDeint(mode=0) ) then can use AviSynth's MVFlowFps (with MVAnalyse) to estimate what the missing time-instants would have looked like. Can for example feed these through to a Vegas Interlaced project for render to the final Mpeg2 for a DVD. Again, may need to manually change the media properties for the pseudo-avi files from AviSynth/Vfapi.

AviSynth is a whole new area too long to describe here but the best way to start is by using AvsP to experiment with scripts then using VFAPI to frameserve into Vegas (which won't accept avs files directly).

The following link might also help:
http://www.hv20.com/showthread.php?p=57638

Please report any success/failure! I hope to get an EX1 one day. I wonder how good its 50i mode is, given that this cam has a progressive sensor. For PAL I suppose 25p would be the norm but does the cam have a 50p mode also? Should be able to feed the same process, just no need to deinterlace first.
johnmeyer wrote on 3/5/2008, 9:40 AM
To get HDV into AviSynth is slightly fiddly, requiring use of DgIndex (to generate d2v index files) then MPEG2Source to read that instead.

I've done most of what you describe, including using VFAPIconv to read the results of the AVS script back into Vegas. However, why do you use the above to get the HDV into AVISynth? Why not simply put all your HDV into Vegas and then frameserve from that into the script? The first line in most of my AVISynth scripts is simply:

source=AVISource("D:\Frameserver.avi")

Also, it seems to me that you might get a much cleaner workflow by simply editing the HDV and doing everything in Vegas, as if you were going to render to HDV tape or BluRay. However, at that last step, frameserve from Vegas to your AVISynth script; use TDeint to deinterlace; then read the output of this back into a second instance of Vegas using VFAPIconv. Stick this on the timeline and, with no further editing other than ensuring that the source field properties are correct (progressive) and the project properties are correct (SD interlaced, lower field first) go ahead and render.

And, if you are going out to DVD, I don't even think I'd bother to interlace. I'd just render to SD MPEG-2 as progressive and then let my DVD player figure out what to do. Of course I'd render a few minutes that way and a few minutes interlaced to see which was better (as well as render the same thing directly from the original project to SD MPEG-2 just to see if the result is markedly better than letting Vegas do the whole thing.

Finally, FWIW, the only issue I have had when doing HDV to SD MPEG-2 DVD (i.e., a normal DVD) is that the result seems a little soft. I've done a lot of basketball this way, and sure never seen any motion artifacts (I shoot with a FX1), but it is soft. So, for me, I would NEVER use any blur, but actually might be tempted to do a little sharpening (although I have not done this).
StormMarc wrote on 3/5/2008, 10:41 AM
Has anyone tried the After Effects method? I'm going to try that on my next project. Basically you bring an intermediate file (like Cineform) into AE and use the "stretch" function in the "output module" to resize it to DV widescreen. The codec used is "Huffyuv". You then bring it into your MPEG encoder and supposedly the final quality is really good. Some guys at DV Info net swear by it. I'll post a report as soon as I try it.

Marc
fausseplanete wrote on 3/5/2008, 3:49 PM
John,

Not sure what you mean by frameserving, do you mean by using Satish's (DebugMode) one? Or is there some other way you would recommend? (I have no experience of this).

I guess you are advising to do the editing in Vegas with Project and Render modes set same as the source media (HDV, interlaced). Then I guess the script pulls the result into itself for processing to deinterlace and resize (down) to SD. Makes sense, just never thought about it that way round. How reliable is it?

To pull results from the script, I suppose one could supply it (via vfapi) to another Vegas instance or else run it inside AvsP and use Tools>SaveAsAvi (which runs avs2avi which accesses various VFW codecs). Is that right? I would use Cineform (Neo HDV) as preferred target format but (the way I tried it at least, for PAL 720x576) it blanks the bottom line. Revealed this by differencing with the original (track compositing in Vegas). Unexplained so far...

Interesting to hear that DVD players (all? most?) might implicitly reinterlace - something to be experimented with. Using a second stage of Vegas essentially to do the reinterlacing - that I am not so sure about, because unless it is motion-compensated, it could only work by averaging or repeating frames to "tween" the fields. I think that would produce some blurring/ghosting/jerking of motion. Likewise if the DVD player did it in that simple way. I intend to make benchmarks (in AviSynth) and to do some experiments in order to compare these.

By the way, I normally mo-comp deinterlace prior to Vegas because I typically shoot live events wide then pan&scan (i.e. digitally zoom) the HDV in Vegas for better framing etc. Loss of resolution is not an issue as long as it is maintained above that of the target deliverable (SD or web). This is where fine details of mo-comp deinterlacing matter. I appreciate that would not be relevant to a straightforward conversion from full-frame HDV to SD (as per the original question of this Thread).
johnmeyer wrote on 3/5/2008, 6:03 PM
Not sure what you mean by frameserving, do you mean by using Satish's (DebugMode) one? Yup. Download here:

Frameserver

The neat thing about doing this is that there is no encoding: each frame is fed to the script in uncompressed format. If you serve out using YUY2, there is no color translation (which is what you want). All you do is install frameserver, and then go to the Render As dialog. You will have a new choice, "Frameserver," and when you select that, you specify a file name and Vegas/Framerver creates a "signpost" AVI, just like the VFAPIconv tool you are already using.

I guess you are advising to do the editing in Vegas with Project and Render modes set same as the source media (HDV, interlaced). Then I guess the script pulls the result into itself for processing to deinterlace and re-size (down) to SD. Yes. Although I don't know if I would do the re-size to SD in AVISynth. Vegas is pretty good at that sort of thing. Just make sure you select "Best" in the Render As dialog whenever you change resolution. That is what "best" is for (don't know why Sony chose that term because it doesn't make anything look better when doing normal renders without anything needing to change resolution, at least not as far as I know).

To pull results from the script, I suppose one could supply it (via vfapi) to another Vegas instance or else run it inside AvsP and use Tools>SaveAsAvi (which runs avs2avi which accesses various VFW codecs). Is that right? Not quite sure I follow you on that one. What I do is open two instances of Vegas. In the first instance, I do all the editing at HD resolutions. I frameserve from that into my AVISynth script. That's what I just discussed above. Then, to get the results of the AVS script back into Vegas, I run VFAPIconv and Add the AVISynth script to that, and then click on Convert. This utility is an ancient hack and a little flaky at times, as you may have already found. I seem to have better luck never changing the file name it picks, and I also put that file in a different folder than the one I use for the frameserver placeholder. I then simply put the "AVI" placeholder file, that VFAPIconv creates in about two seonds, into the second instance of Vegas and use Vegas to encode. I also sometimes use the MainConcept external MPEG-2 encoder which can open the AVS file directly which really makes the workflow simple, and avoids the sometimes flaky VFAPIconv utility (although once it successfully creates the AVI signpost file, everything seems to work just fine -- it is getting it to create the signpost that is sometimes hit and miss).

Interesting to hear that DVD players (all? most?) might implicitly reinterlace - something to be experimented with.When you think about it, you will realize that they MUST be able to do this. All those "Hollywood" movies you watch are encoded from film as progressive, with the 3:2 pulldown flag set. This not only adds the extra fields necessary to get the correct playback speed at 29.97 when using 24 fps source material, but your DVD player also is displaying it on your TV set and it looks great. Since I still watch on my old 4:3 1989 CRT big screen, it is obviously interlaced. Everything looks great.

Interlacing progressive is easy; deinterlacing back to progressive is not. It's a little like backing up a trailer with your car: the mechanics backing up are entirely different than going forward and you can get into situations that you can't get back out of.



Laurence wrote on 3/5/2008, 7:27 PM
You guys are making it harder than it needs to be. Just make sure of the following:

1. You set your project settings to "best:" for render quality.
2. You select the correct interlaced HDV template.
3. You select a deinterlace method. It doesn't matter if it is blend fields or interpolate. It just matters that you have a deinterlace method selected.

With the project settings set correctly all you need to do is render to a 60i widescreen NTSC (or 50i PAL) mpeg2 template. Vegas will do the rest.

If you want to do the same thing in VirtualDub, you would need to use the three following filters: a deinterlace to fields side by side filter, a lancos3 resize, then a deinterlace filter set to fold the two side by side fields back into one interlaced image. It works great but Vegas does really close to the same thing without you having to think about it.

The way to check your interlaced downrez is as follows:

1/ Use a 1394 to NTSC (or PAL) convertor box.
2/ Set up a new NTSC (or PAL) project timeline.
3/ Import the SD downrez into the new project timeline.
4/ Preview using the 1394 to NTSC (or PAL) convertor box and a regular SD monitor.
5/ Stop the video in the middle of some fast motion.

If you did everything properly you should see the image flicker between two positions which correspond to fields that were captured a sixtieth of a second apart. If you don't see this, you did the downrez wrong. It should look a little better than if you shot in SD format to begin with.
johnmeyer wrote on 3/5/2008, 7:40 PM
You guys are making it harder than it needs to be.

I think you are correct. If you use the "best" setting, many of the problems (all of them?) associated with the HDV to SD conversion should go away. I was just trying to show how you can use an AVISynth script with Vegas, something that can be extremely useful (for noise reduction, as an example).
MomentsVideos wrote on 3/5/2008, 10:45 PM

So, after all this discussion you are saying that all I need to do is set the setting to Best and have the correct interpolate option set?

So, no need for exporting to other software etc. Is this correct?
MomentsVideos wrote on 3/5/2008, 11:09 PM

So, for clarification..

Camera set to 1440*1080 50i
No other changes to camera settings

Vegas using HDV project setting., HDV 1440*1080 50i

Set to Best Render

Interlace to Blend.

I will have no problems when I render to SD DVD.

Is this correct statement?
John_Cline wrote on 3/6/2008, 12:24 AM
Yes, the statement is correct.
farss wrote on 3/6/2008, 1:11 AM
Maybe.
Probably safe with the EX1 set to 50i but not so if using 25p.
Quite likely you'll need to wrangle the resolution if your output could end up on an interlaced display. Rendering to progressive makes no difference if the display interlaces it.

Bob.
fldave wrote on 3/6/2008, 4:10 AM
If you have a lot of fast motion, I would set the deinterlace setting to Interpolate. That reduces jaggies in fast motion, at the expense of dropping a field
johnmeyer wrote on 3/6/2008, 8:40 AM
Yes, your statement is correct.
StormMarc wrote on 3/6/2008, 8:51 AM
Personally I've found the downconversions from HDV to SD to be a little disappointing. They tend to go soft as many people on this forum have complained about. It's useable but not as good as it could/should be in my opinion when starting with such a higher resolution format. I'm going to keep experimenting and will post if I find a better solution.

Marc
Laurence wrote on 3/6/2008, 9:00 AM
If you have a lot of fast motion, I would set the deinterlace setting to Interpolate. That reduces jaggies in fast motion, at the expense of dropping a field

When you are going from HD interlaced to SD interlaced, the deinterlace method you select doesn't matter because the footage doesn't actually get deinterlaced.

What is important is that you select a deinterlace method. If you don't each frame will be treated as if it was progressive and resized, interlace comb edges and all. This really looks terrible at any point where there is motion.

For some reason, Vegas looks at the "select deinterlace method" tab and decides whether it is going to resize the video as a single frame or as separate even and odd line frames based upon whether or not this tab is checked. Thus it is really important to check this tab if the footage is interlaced and equally important not to select it if the footage is progressive. This is confusing to most people because it is natural to assume that this tab only affects deinterlacing. This is not actually the case. This tab also affects interlaced to interlaced resizes and progressive to progressive resizes.

If no deinterlace method is selected and you resize interlaced footage, you will get horrible looking squiggles during fast motion. If the footage is progressive and you select a deinterlace method, you will lose half your vertical resolution during any resize. This is not mentioned in the manual or help files anywhere. I only know it because it was what I realized when I tried to figure out why I was having so much trouble with resizes in Vegas.

It doesn't make any sense to me that Vegas does it that way, but I have done enough tests to be very confident that that is indeed what Vegas does.
Laurence wrote on 3/6/2008, 9:13 AM
Let me simplify this a little:

If you are working on a project with only interlaced video, ALWAYS select a deinterlace method (blend fields or interpolate based upon your preference). This will ensure that all your renders, both interlaced and progressive will come out properly.

If you are working on a project with only progressive video, NEVER select a deinterlace method since it will chop your vertical resolution in half during any renders that involve resizing.

If you are doing a project that is a mix of interlaced and progressive footage, the best compromise is to select a deinterlace method since chopping the vertical resolution in half on the progressive parts doesn't look anywhere near as bad as the resized interlace comb (squiggle) will on the interlaced parts.