• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

HDV --> SD DVD Workflow (DebugMode FrameServer, AviSynth)

Explorer ,
Jul 02, 2008 Jul 02, 2008

Copy link to clipboard

Copied

While the old thread contains a wealth of great information, I've decided to break away from it. It's too old, too long, too confusing... In summary:

Many users are aware that Premiere/AME/Encore does a "less than stellar" job of converting 1080i HDV to interlaced SD DVD. I (and others) have tried every conceivable combination of options and found none that provided "professional quality" conversions. This is largely due to the way that Premiere handles scaling of interlaced material ... Example #1 ... Example #2 ... and Premiere's failure to convert from the HDV color matrix (Rec.709) to the SD specification (Rec.601).

In an effort to solve these problems, I developed a workflow (using several third-party freeware tools) that achieves results far superior to that of Premiere and/or Encore by themselves.

I have written a guide for this workflow, including step-by-step instructions and links to download all the required tools.

This page also contains a link to a more advanced option for doing these conversions (using mostly the same tools). Please do not attempt the advanced version unless you have already implemented my "basic" workflow!

The page and linked files will be updated frequently. It is a work in progress, but should already provide excellent quality. I look forward to comments and suggestions from this community (as always).

Enjoy! -- Dan

Views

150.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 486 Replies 486
New Here ,
Jul 11, 2008 Jul 11, 2008

Copy link to clipboard

Copied

Well, I tried reinstall/install/uninstall the tools used with this superb script, but the problem always remains the same;
Avisynth refuses to load the dll's I put on it's plug in directory..
Then I decided to make a system restore and re-install the tools pack provided; it works !
S5trange but this is how I got ride of the problems with Avisynth/VirtualDub

I changed the folowing on the script;

i Lanczos4Resize(720,480)
i #AddBorders(8,0,8,0)

thank you for support Dan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 11, 2008 Jul 11, 2008

Copy link to clipboard

Copied

Glad it now works for you, Abdessamad.

> I changed the folowing on the script

That's fine. Have you tried the "advanced" version of the workflow referenced on the bottom of my page? (It's actually a lot easier to use, but it requires a bunch of plugins.) There is a parameter that controls this scaling. The default is WidescreenType=1, which fills the screen while maintaining an accurate aspect ratio by slightly cropping off the top and bottom.

You can duplicate this method in the basic script like such:
Lanczos4Resize(720,492).Crop(0,6,-0,-6) # NTSC
# Lanczos4Resize(720,588).Crop(0,6,-0,-6) # PAL

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Dan
Just a quick question in relation to Matrox.

I have used your excellent script but after reading your message about Matrox I want to try this. I presume the workflow would be:-
Export the timeline as a Matrox HD Avi
Alter the .avs script to reference the Matrox HD Avi file
Open Virtualdub and open the .avs file
File save as uncompressed Avi file
Import the Avi file in Encore and burn the DVD

Do I need to change the YUV / RGB setting in the script?

If I have misunderstood anything or missed anything out I would be grateful for your input.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Yes, Ian. That's the gist of it... So that I can answer you correctly, are you using my basic workflow or the hd2sd() function?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

In answer to: Valera, "HDV --> SD DVD Workflow?" #237, 14 Jul 2008 4:21 pm

> interlaced 16:9 to SD 16:9

That's what the "basic" script does. My "advanced" hd2sd() function also does this by default.

> progressive 16:9 to SD 16:9

I answered another user in the other thread with regard to 720p. 1080p should be the same. The basic script is here:

As for the "advanced version" using hd2sd():


hd2sd(interlaced=false)


Please read the text file in my hd2sd.zip file for more information about other settings, etc.

> no 16:9 in avisynth

AviSynth has no concept of "16:9" or any other PAR/DAR but that does not matter. Just tell your MPEG2 encoder that the input is 16x9 and you'll be all set.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Dan

I'm using the advanced script (hd2sd)

(using Matrox, edited footage in 1440*1080i and want to out put good quality PAL widescreen DVD)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

Well, using the advanced script, you should be able to use the Matrox .AVI without any real modifications... However, I think may have found a problem with the way RGB input (such as the Matrox codec delivers) is handled in my script. This gets confusing, as the Matrox codec has options for its YUV->RGB conversion (Standard, Expanded).

So...

Try it like this...
hd2sd("matrox_hdv1080i.avi", OutputColorSpace="RGB24")

... and if it looks to contrasty, this this instead:

AviSource("matrox_hdv1080i.avi")
ConvertToYUY2(matrix="rec601")
hd2sd(OutputColorSpace="RGB24", input601=true)

The first example corresponds to the Matrox "Expanded" mode, while the second is for "Standard" mode. Got me?

I need to test a few things and if there is irregular handling of RGB input (for non-Matrox files) I'll modify the function. It's due for an update anyway, as I've made a few adjustments over the last few weeks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

Thanks for that Dan. I'll try these out tonight and let you know how I got on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

hd2sd() has been updated. Download here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2008 Jul 18, 2008

Copy link to clipboard

Copied

When using Adobe Encore as the final SD encoder for the rendred avi, it doesn't recognize that the footage is 16:9 (HD Anamorphic 1080 1.333) strange?
does this happens to you too, or I missed something?

PS : when I play the rendred file on WM player, it appears as a 16:9 footage but not after making a DVD using Encore.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 18, 2008 Jul 18, 2008

Copy link to clipboard

Copied

I don't encode with Encore much, but try this: In Encore, right click on the .AVI... "Interpret Footage..." and select SD NTSC Widescreen (or SD PAL Widescreen, depending on where you live).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2008 Jul 18, 2008

Copy link to clipboard

Copied

I think the Adobe Encore is still away from it's final shape (like the successful Adobe softs; PS, AI..) why?;

Before asking the aspect ratio question here, I tried interpreting footage as you said but when i import it to a 16:9 timeline, this timeline becomes 4:3 and the radio buttons (that allow you to switch timeline's aspect ration) are grayed out and 4:3 is selected by default.
I tried several times changing the aspect ratio by interpreting footage and didn't work, then I decided to delete this Encore project and create a new one , then, first import the rendred avi (before creating any timeline) then interpret the avi as 16:9 (1.333) and finally create a timeline with aspect ratio set to 16:9 .. and it WORKS !!!!

Strange, strange .. Encore needs more development before becoming a functional product.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 18, 2008 Jul 18, 2008

Copy link to clipboard

Copied

> then interpret the avi as 16:9 (1.333)

But it is not, right? If it is a 720x480 (or PAL 720x576) file, then the aspect ratio should be set to NTSC or PAL widescreen and not 1.333, I would imagine.

> Strange, strange .. Encore needs more development before becoming a functional product.

I agree with that completely.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

One other question guys didn't talk about is rendring for PAL SD;
I know that I have to set update
Lanczos4Resize(720,576)
on the script so as it meets with pal standards, but what about the line;
SelectEvery(4,0,3)
PAL is progressive so we don't need lower/upper-field first output?
should I leave it or comment it out
# SelectEvery(4,0,3)
and what is general HDV --> SD PAL recommendations

PS;
I checked the page (a guide for this workflow) and didn't show up, is everything okay?

Thank you DAN

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

> PAL is progressive so we don't need lower/upper-field first output?

Incorrect. PAL is interlaced. I don't know any PAL camera that is native progressive and anyway they all record to 50i format on tape.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2008 Jul 30, 2008

Copy link to clipboard

Copied

@ C. David Young

> haven't you told me that [30p -- or 25p] is not DVD compliant?

Well, there is a grey area here. The MPEG2 and DVD standards have been revised a bunch of times, so who can say. I am certainly not an expert here. You can read about the ATSC standards, but I'm not exactly sure how these relate to DVD and how they're implemented by DVD player manufacturers. There can actually be per-frame interlaced/progressive flags (such as in telecined signals)... It does get confusing.

In any case there are several possibilities for creating a 30p disc using progressive sources or deinterlaced video:

1.) progressive YV12 sampling, flagged as progressive (possibly non-compliant ??)
2.) progressive YV12 sampling, flagged as interlaced (certainly compliant but may exhibit chroma upsampling errors and be redundantly deinterlaced on progressive HDTVs)
3.) interlaced YV12 sampling, flagged as interlaced (also compliant but may be accidentally deinterlaced)

See this page: http://avisynth.org/Sampling

#1 will give maximum quality on DVD players that support it, which is probably most newer players, while #3 is probably the best "fully compliant" option. This is also (from what I've seen) the way commercial 25p PAL DVDs seem to be created. Maybe there are others who can shed more light on this.

Personally, I don't care what is "compliant" so long as DVD players play it properly. Even my ancient NAD DVD player has no problem playing "true" 30p discs. Whether it handles the chroma properly or not I have not investigated.

Using my hd2sd script, the output is YV12 by default. It is sampled as interlaced when OutputFieldRate > 30, and progressive when it is less (creating output like #1 above.)

You can get whatever you want out of it, however, by setting OutputColorSpace="YUY2" and then letting Encore, CCE, etc. handle the conversion for you. If you are using HC Encoder (which required YV12 input) you can do something like:


hd2sd("file.avi", OutputFieldRate=30, OutputColorSpace="YUY2")
ConvertToYV12(interlaced=true)


Then you can "flag" it as interlaced or progressive in HC Encoder as you like.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 31, 2008 Jul 31, 2008

Copy link to clipboard

Copied

Congratulations to Dan for your Workflow.
I have a HV30 Canon (PAL) and last weekend I recorded a lot during a 3 days trek in the Pirineos Mountains (Spain). Yesterday I followed the wokflow and the result was fantastic. Thanks Dan.

I would like you to know why do you recomend resizing to 704x576 for PAL SD video edition.

In my opinion, I could understand the resizing from 1440x1080 to 704x480 for NTSC video edition, because the ratio
"Vertical Transformation" / "Horizontal Transformation" is equal to 1.1, good for good transformation. (the ratio is not so good if you were transforming to 720x480 (1.125).

But, when you are resizing from 1440x1080 to 704x576 as you propose for PAL SD edition, the ratio is equal to 0,91666666. If the resizing is to 720x576 the transformation ratio is 0,9375, which is better and there is no proportional transformation in the SD image (16:9).

Is there any reason to choose 704x576 for PAL edition instead of 720x576, when you are having worse transformation ratio and you are loosing the original proportion (16:9)?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 31, 2008 Jul 31, 2008

Copy link to clipboard

Copied

sirineos, I replied to our identical post in the other thread:
Dan Isaacs, "HDV --> SD DVD Workflow?" #242, 31 Jul 2008 9:11 am

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 31, 2008 Jul 31, 2008

Copy link to clipboard

Copied

Hi,

I'm quite new at HDV.
Following the HDV to SD DVD workflow, I get 3:4 aspect ratio instead of 16 : 9.

Below please find the copy of export settings summary from Export Movie window:

"Export
Video and audio
Entire Sequence

Filetype
DebugMode FrameServer

Video Settings
Compressor:
Frame size: 1440h 1080v (1,333)
Frame rate: 25,00 frames/second
Pixel Aspect Ratio: HD Anamorphic 1080 (1.333)
Fields: Lower Field First

Audio Settings
Compressor: Uncompressed
Sample rate: 48000 samples/second
Channels: Stereo
Sample type: 16-bit"

What did I wrong?

Thanks for your help

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 31, 2008 Jul 31, 2008

Copy link to clipboard

Copied

Hi Peter --

That should be Upper Field First for HDV. Other than that, you've done nothing wrong.

VirtualDub and AviSynth have no concept of 4:3 or 16:9. If you importing the SD AVI into Encore or Premiere for encoding, be sure to go to Interpret Footage and choose the appropriate aspect ratio (PAL widescreen in your case).

Other encoders (like CCE and HC) also allow you to select the aspect ratio.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2008 Aug 01, 2008

Copy link to clipboard

Copied

Hi Dan,

Yes, the aspect ratio issue is solved. I corrected the premiere.avs for upper field, as follows:

"AviSource("d:/capture/canon/signpost.avi")
ColorMatrix(mode="Rec.709->Rec.601", clamp=false)
ConvertToRGB32()
SmoothDeinterlace(tff=true,doublerate=true,lacethresh=24,staticthresh=35,staticavg=50,edgethresh=35,blend=false,showlace=false)
Trim(1,0)

Lanczos4Resize(720,576)
AddBorders(8,0,8,0)
ConvertToYUY2()

AssumeTFF().SeparateFields()

SelectEvery(4,0,3)
Weave()
Limiter(16, 235, 16, 240)"

but in the Export Movie window the summary shows always lower field, and, of course, the movie jitters on the TV.
I changed several times between 4,0,3 and 4,1,2, but the summary did not changed!

Could you help?

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 01, 2008 Aug 01, 2008

Copy link to clipboard

Copied

Peter ---

I meant to change it in Premiere's export options, not in the script. The deinterlacer assumes Upper, so any other export setting will cause problems.

So... change Export Movie Settings/Keyframes and Rendering/Fields -> upper field first.

If you are using PPro or Encore to encode the MPEG2, use SelectEvery(4,1,2) in the script.

If you are using CCE, Procoder, HC, etc. you can set whichever output field order you want in the script (4,1,2 ... or 4,0,3) so long as your MPEG2 encoding settings reflect this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 01, 2008 Aug 01, 2008

Copy link to clipboard

Copied

Dan,

Ive used your workflow myself and as much as Id like to think this can be done natively in Adobe; it just cant. Your workflow is a very useful workaround for this shortcoming from adobe.

I suggest you change one thing in the ppro export settings. uncheck "Optimize stills". The feature has been known to cause problems with exports played outside Pr. Ive seen wacky timing problems (stills played back incorrect length) when this feature is checked under certain conditions.

Great job on this script and your support of the adobe community. There is not a single HD job I shoot where SD DVDs are not also required as a deliverable. I was working around by shooting progressive, but your workflow provides a better solution. Hopefully adobe is paying attention that their Pr user forum is filling up with 3rd party workarounds to their shortcomings.

Thank You,

Curt Wrigley

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 01, 2008 Aug 01, 2008

Copy link to clipboard

Copied

I'm very glad it's useful, Curt. Thank You. I should be releasing a new version of the advanced workflow very soon. I've made a bunch of changes/adjustments to the script over the past few weeks but I need to test it all out again. Jim S. and Jeff B. have had me pretty tied up on the DV60i -> 24p thing. :)

> I suggest you change one thing in the ppro export settings. uncheck "Optimize stills".

I know what you mean, but it seems to have no effect on DebugMode... safer to leave it off, I suppose. I'll replace the screen cap when I get a chance.

EDIT: Also, Curt... Assuming you're using the hd2sd() function (and you should be... many more options) Please post the settings you are using. I am curious what seems to work best for people, and it may help me set better defaults in later releases.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2008 Aug 01, 2008

Copy link to clipboard

Copied

Thanks Dan,

Works perfectly!

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines