• 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
Explorer ,
Jun 11, 2009 Jun 11, 2009

Copy link to clipboard

Copied

I don't know what to tell you… I find the difference dramatic even in CS4, but more so in CS3. What is your source? 1080i, 1080p, 720p?

You should also try using the advanced version of my script (if you are not already). Download hd2sd and install it as described in the text file included with the .zip. Jeff Bellune has done some quality/performance comparison testing (probably much more extensive than I have done… at least recently) and I am hoping he posts his results in the near future.

Create a simple script like such (assuming you are transcoding to MPEG2 in Premiere or Encore)… this also assumes 1080i source:

AviSource("signpost.avi")

hd2sd(OutputColorspace="YUY2", OutputBFF=true)

Conversely, if you have a progressive sequence, then use:

AviSource("signpost.avi")

hd2sd(OutputColorspace="YUY2", interlaced=false)

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
Contributor ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Mr. Isaacs,

I've read most of your posts and was impressed by them.  However,  knowing my limitations with computers, I opted to use Cineform with my Premiere Pro CS3 to go from HDV to SD.

Now, I'm thinking of upgrading to Premiere CS4 and unfortunately, Cineform is having problems working with Adobe with CS4.

I was wondering if the system you worked out will work with Premiere CS4, since you mention it is for CS3?

Also, I've recently been using an AVCHD camera and I was wondering if it is possible to convert the 1920x1080 AVCHD files to widescreen SD and also 1280x720P using a variation of your technque?

I know you are busy, but I would appreciate any information you could give me.

Thanks,

John Rich

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 ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Hi John,

PMJI.

I'm compiling some data points for my comparison of quality/performance

between an all-CS4 workflow and using CS4 in tandem with hd2sd().  I'll

post the results later, as well as create a video tutorial on how to do it.

For the hd2sd() workflow now, try this:

   1. Export your AVCHD 1080i/p timeline as a 4:2:2 I-frame only MPEG2

      file.  Use a CBR of 100 Mbps if you have the disk space.

   2. Index the exported file using dgindex to create a .d2v file.

   3. Use the .d2v file as the MPEG2Source in your AviSynth script.

   4.  Make sure to install the Premiere AVS importer plug-in so that you can

      import your .avs script into Pr CS4.

   5. Import the hd2sd() .avs script file into Pr.

   6. Export to MPEG2DVD using Pr and the AME.

   7. Use Encore to author the MPEG2DVD .m2v file to DVD.

-Jeff

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
Contributor ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Jeff,

Thanks for that thorough answer as usual.  I haven't upgraded to CS4 yet, but naturally I'm looking forward to your tutorial.

John

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 ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

John,

I actually have to back away from the part of the workflow where I said to import the .avs script.  I found that rendering a sequence or exporting a sequence only uses one core (out of 8).  So the alternate method is to open the .avs script in VirtualDub and export an .avi file from there.  Import the VirtualDub .avi file into Pr and then encode that.  All of your CPU cores will be used.

-Jeff

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 ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

First, I have to deeply thank Dan for sharing his experiences with us. Its not only the fact, that he provides us with ready to use scripts - moreover its the fact that people like me, with some but not complete knowledge of this stuff, would never be able to invent such complex workflow at all.

Thank you so much Dan and thanks to pros like Jeff always hooking in and helping for the next step!

Since some weeks now I use two different workflows to downconvert 1920x1080/50i from Sony EX1 to SD-PAL widescreen streams for use on PAL-DVDs. I film fireworks displays only so my footage needs special care not to loose any detail or color

1.) just use VDub: 1."smart deinterlace" (2.8 beta 1 plugin), 2. resize (Lanczos3) to 720x576, 3. sharpen by 10

2.) Dan's advanced workflow (hd2sd latest script) with:

hd2sd("Lagarith_export_1920x1080_TFF.avi",

interlaced = true,

OutputFieldRate = 25,

Interlaced_out = false,

OutputColorSpace="RGB24",

Output601 = true,

ScaleRGBInput = true,

ExpandRGB = true,

ResizeSharper = true,

NR=5,

DeintMethod = 1 )

I've tried those settings to:

     OutputHeight = 576,OutputWidth = 720,OutputWidescreen = true ,WidescreenType = 0

but that OutputHeight resulted in invalid 480lines-videos (a bug or my mistake?)

I always export with Lagarith lossess codec YUY2, interlaced, TFF, 1920x1080, 32bit, max. depth (because Debugmode does not work with PP CS4.1 anymore) and encode with TMPGEnc 4 XPress to DVD streams.

So, here's my problem:

1. workflow with VDub is so easy and indeed give nice results. But I know that VDub converts to RGB somehow and I am sure that it won't make it that exacat like Dan.

2. Dan's workflow works , but I am not 100% happy with that. First it seems that it has little more artefcats, the moving picture of a roof (just a test) is more noisy then that with VDub and Dan's script cuts parts from top/bottom of the image.

I have more questions but this is most important at the moment: can I scale the 1980x1080 with hd2sd exactly to 720x576 anamorphic SD without cropping anything (like VDub does it so well)?!

Thanks a lot,

till hopefully soon!

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 ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

Hi Kuro ---

Lots of stuff to cover… I'll guess I'll start with the difference between my workflow and the VirtualDub one:

  1. You are correct. VirtualDub filters only work in RGB, so there are likely more conversions taking place than are optimal
  2. Lanczos3 is not as nice a resizer as AviSynth's Spline36 method (in my opinion) -- more ringing without any other benefits
  3. Using SmartDeinterlace and then resizing will result in progressive output --- my script (by default) creates interlaced output from interlaced sources
  4. It is correct to crop a few pixels from the top and bottom because 1920x1080 square pixels is not exactly the same area as PAL SD anamorphic. To maintain a correct aspect ration conversion between these formats, you must either:
    • crop a tiny bit from the top and bottom (WidescreenType=1), or…
    • add borders to the sides (WidescreenType=2).
    The way it works is that 1920x1080 -> 702x576 ... so you need to compensate for the difference between 702 and 720.

    Regardless, setting WidescreenType=0 will override this and simply strech it to fit (like you did in VirtualDub)

Some of your settings are redundant (and many simply are the default anyway). You can simply use a script like this to get what you want (I think?), which will produce TFF 576i output:

hd2sd("1920x1080.avi", DeintMethod=1, WidescreenType=0, NR=5, OutputColorSpace="RGB24")

If you want progressive output (like your VirtualDub workflow produced) try:

hd2sd("1920x1080.avi", DeintMethod=1, WidescreenType=0, NR=5, OutputColorSpace="RGB24", OutputFieldRate=25, SmoothTime=false)

NOTE: To disable field blending, SmoothTime should be set to false as in my example above. The results will probably be more similar to what you got using SmartDeinterlace in VirtualDub.

I have no idea why you are seeing "more artifacts" with my workflow vs. the one you used in VIrtualDub. Could you possibly post some still grabs to show me this?

Also, you may want to try using NR=7 instead… it will be much faster and it will likely produce comparable results.


[UPDATE: there is indeed a bug with the OutputHeight setting… Originally, this setting was only implemented so that you could create D1 NTSC-compliant output @ 720x486. I tried to expand that functionality to allow odd-sized output of all kinds, but I apparently screwed it up! For now, just avoid setting OutputWidth / OutputHeight altogether. I'll fix these in the next revision]


[UPDATE #2: I found and fixed the error with the OutputHeight setting. I am working on some other things for the new revision and I'll probably release it in a week or so once I have had time to test everything out. The new version will have several new deinterlacing methods to choose from and improved performance in multithreaded environments + a few fixed like the OutputHeight issue… thanks for spotting this one!]

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 ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

Thank you so much for the quick answer, Dan!

reg. 3.: I try progressive output of uncompressed avis to compare different renderings as best as possible. I use TMPGEnc to interlace with TFF again for DVDs but use PP's timeline to put several renderings (out of VDub and/or your scripts) to compare videos in detail (by turning video tracks on/off or export single frames as tiffs). I would not know how to compare 2 videos other way - and since I have to deinterlace in any case for scaling, I keep it progressive till the very last moment. When I am through the testing there is no problem to let your script do the interlacing for DVD streams.

reg. 4.: Ohhhu, I did not calculate that. So I would prefer WidescreenType=2 to keep any pixel from width and height (even with wide angle lense and large distance there is always some image contents at the edges I would not like to cut away). But those black bars could be seen on a flat TV. Mmmmh. Of course "native" resolution is always the best - but how do you judge the stretching like VDub does it regarding the picture quality? Yes, the aspect ratio would be slightly wrong (but in the night sky nobody will notice), but would the stretching badly affect the details/sharpness when I render to 720x576 without cropping?

I used/posted some of your default values "just to remember what I do" and maybe to change while trying. But I am not sure if the

ScaleRGBInput = true,

ExpandRGB = true,

is wise to use - I did it because somehow I thought it would be more accurate color.

I will try the hints you gave me and will report. Regarding the artefacts I will check more in detail and for sure I can provide some footage when I keep this opinion

Thank you again,

till very soon with new results!

[update]Thank you for improving your script - I look forward for any new version.[/update]

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 ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

There is no harm (quality-wise) to using WidescreenType=0. It will simply cause hd2sd() to skip the cropping and scale it to 720 width instead of 702.

If you are making interlaced DVDs, the only way to evaluate quality is to encode it to MPEG-2, burn it to DVD and watch it on a TV set… preferably an interlaced CRT.

ExpandRGB is true by deafult, so you need not include it (there is no harm in doing so, however). ScaleRGBInput is really only useful if your source uses a codec such as Matrox's MPEG-2 I-frame HD codec with "Expanded" colorspace selected. Your input is Lagarith RGB, so this will artifically boost contrast and should not be used (unless TMPEG maps RGB(0,0,0) -> Y(0), which I am unsure of).

On that note, my are you using TMPEG? Not that it's bad or anything, but have you considered using another MPEG-2 encoder? What about using Premiere or Encore for this purpose? Which program are you using for DVD authoring?

Please let me know your system specs. I can probably drastically improve performance if you are using a multi-core / multi-processor system.

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 ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

I just tried a little more and the results, just a gut feeling - no prove, are:

- your workflow is noticable sharper at movements, so your method does not add that much motion blur

- color seems to be more accurate (reds of roofs are deeper without greenish tint of VDub only)

- in movements there seem to be more noise/artefacts on roof tops as with VDub (sharpen by 10 <> sharpness 0.5)

hd2sd("1920x1080.avi", DeintMethod=1, WidescreenType=2, NR=7, OutputColorSpace="RGB24", OutputFieldRate=25, SmoothTime=false, Sharpness=0.5)

I will tomorrow evening provide you a short sequence of my roof footage. It will be several 100MB though...


I've spend all my money to buy EX1 and i7/920 PC (XP32, will change to Win7, 6GB RAM (3.3 used), nVidia GT9600) to change from SD with VX2100 and PP1.5 to HD. For authoring I use DVDLab 2.x since years. Encoding: TMPGEnc is as flexible as I would like to have it and it has some nice noise reduction feature for the final encoding.

I never had similar results with AME from PP CS4, even when using your or VDub-workflow. Its simply awful. I will give the HCEncoder a try too...

Thank you very much again, this seems to pull me out of the puddle...

Ps.: attached is just a quick screenshot of my roof test

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 ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

First of all - thank you Dan for your awesome work! I use hd2sd script every day, nothing compares to it!

But as I'm using 8-core machine, is it possible to use them all? Right now, if I'm using the script like this:

hd2sd("my1080i.avi", interlaced_out=false, OutputWidth=1280, OutputHeight=720) to produce 720p, 50fps file, it uses only one core 100% (the last one if I view it on Task Manage). It doesn't matter if I'm using TMPGEnc or S.U.P.E.R. to produce h264 mp4, both can use only one core if I'm using this script.

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 ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

Download and install MT AviSynth.

Put this as the first line of your AVS script:

SetMTMode(2,0)

That'll use "mode 2", which is the fastest mode that works with most filters.  It'll also use as many cores/CPUs as you have available.

-Jeff

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 ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

Thanks, Jeff!

Strange things happened - seems like I'm doing something wrong, or there is some kind of mismatch of Avisunth different versions...?

I downloaded MT_07.zip, extracted this and copied MT.dll to the Avisynth plugins folder and avisynth.dll into windows/system32 folder (replaced the old one). Then tested the new script with SetMTMode(2,0) in first line with VirtualDub, just playing it - all the cores were nicely in work (near 90%) and the resized video played in real time. Tried the same thing script in TMPGEnc - it imports it, but crashes then I start to encode. S.U.P.E.R. produced a small video file, where there was a red text on black background: Script error:there is no function named "SetMTMode" and the path, where script was taken. Another test with VirtualDub results the same error message. Tried to copy the avisynth.dll again to windows/system32 and noticed, that there had appeared a newer version somehow (311kB), replaced it again (299kB), now VirtualDub works as in first test, but not anymore as soon as I try to encode with S.U.P.E.R. or with TMPGEnc. I also tried to uninstall Avisynth 2.5.8 and install the 2.5.7, but it didn't help.

What I am doing wrong?

If somebody asks, why I'm so keen on SUPER or TMPGEnc - actually I'm not, simply I don't know, how to make h264 file in mp4 container, using VirtualDub.

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 ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

If you got it to work with VirtualDub the first time and again after replacing the .dll file, then the problem is that SUPER or TMPGEnc is changing something along the way.  I don't use either of those programs, so I'm not much help.

If you can't find the magic bullet to fix either SUPER or TMPGEnc, try replacing the .dll file again and export from VirtualDub as a Lagarith AVI file.  Then load the Lagarith AVI file into your compression program.

-Jeff

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
Engaged ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

Jeff,

How do you think the HD to SD conversion with the new Media Encoder update works?  Do you find it at all better then 4.1?

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 ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

The 720p60 workflow works correctly now, and the quality is at least as

good as the old DI method I outlined in my tutorial.

I haven't tested the quality of the other HD formats because I haven't

had the time (and probably won't for a while).

You should test for yourself and let us know what you think.

-Jeff

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
Community Expert ,
Nov 16, 2009 Nov 16, 2009

Copy link to clipboard

Copied

Did a test from hdv to sd-dvd (streight from timeline with MRQ) and Dan's methode is still way better.

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 ,
Jun 16, 2009 Jun 16, 2009

Copy link to clipboard

Copied

Hi Dan,

I've uploaded the first footage. It's "MXF for NLE" from Sony EX1 and should work with PP CS3/CS4, I hope:

http://78.46.70.4/tmp/dan/1080-50i.mxf (135MB)

Just export as "Microsoft AVI" with Lagarith lossless codec, 1920x1080/50i, YUY2, 32bit, max depth and use that video as "source".

I then create 2 videos to compare:

1.) VDub: 1."smart deinterlace" (2.8 beta 1 plugin), 2. resize (Lanczos3) to 720x576, 3. sharpen by 10

Save as AVI in VDub...

2.) hd2sd("1080-50i.avi", DeintMethod=1, WidescreenType=0, NR=7, OutputColorSpace="RGB24", OutputFieldRate=25, SmoothTime=false, Sharpness=0.5)

Open that script without filters and save as AVI in VDub. It does not have the same aspect ratio as the VDub-video - its crops from left and right side.


My impression is:

1.) VDub

- less artefacts and smoother image
- more pale / wrong colors

2.) hd2sd

- less motion blur (especially at small fence on front roof)

- more realistic color
- more noisy, especially on roofs in distance

I am very curious to hear your comments, Dan. If it does not work for you I can upload different formats...

Thanks in advance!

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 ,
Jun 16, 2009 Jun 16, 2009

Copy link to clipboard

Copied

OK, thanks for the file. It is always good to have test material from actual users.

I realized that there was a problem with WidescreenType=0 (probably something I screwed up when I modified the OutputWidth / OutputHeight functionality) … It was accidentally cropping some off of the sides, when it should not have been cropping at all. I have uploaded an updated package here.

I did a quick comparison between hd2sd() and your VirtualDub workflow. I really have no idea what you are talking about.

I mean, both outputs like fine enough, because deinterlacing 1080i and scaling it down to 576 (or 480) will hide a great deal of interlacing artifacts anyway.

But I think you are missing the main point here: the VirtualDub workflow is 1080i -> 576p … while, by default, hd2sd() is 1080i -> 576i.

In the case of PAL, the default OutputFieldRate=50 performs 1080/50i -> 1080/50p -> 576/50p -> 576/50i

It's a whole different ballgame. You can't get resized interlaced output using SmartDeinterlace in VirtualDub. It is simply a "deinterlacer," while the methods in hd2sd() are "bob deinterlacers" that create full-resolution, double-framerate progresive video from an interlaced source.

When OutputFieldRate=25, the fields are either blended (default), which is much like the "Blend" method in VDub's SmartDeinterlace ... or decimated (discarded) when SmoothTime=false, like SmartDeinterlace's other methods.

VirtualDub's colors are "wrong" because it is assuming the wrong colorspace for the input. I assume this problem would go away if you created you Lagarith .avi as RGB. This should work in CS4 but not in CS3, because CS3 handles HD colorspace conversions incorrectly.

Some suggestions for your script:

NR=7 seems to be to strong and it is smoothing too much detail. You can try to mitigate this by adding FFT3DAmount=128… but I think that your source is clean enough to simply use NR=2 instead, which will be much faster to process.

I also think that settings Sharpness=0.5 is too high. It introduces some ringing artifacts and, more importantly, super-sharp video rarely compressed well to DVD bitrates and does not always look very nice on interlaced TVs.

Lastly, you way want to try the default deinterlacing method (DeintMethod=2). While it is "inferior" to DeintMethod=1 in most cases, it is a lot faster to process and sometimes gets nicer results regardless. And, as I said, the resizing will cure a great deal of the problems anyway.

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 ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

Thank you very much for your new version, Dan! It is overwhelming how much you care and support your script! Thank you for your time to answer my nooby questions

I did a quick comparison between hd2sd() and your VirtualDub workflow. I really have no idea what you are talking about.
I mean, both outputs like fine enough, because deinterlacing 1080i and scaling it down to 576 (or 480) will hide a great deal of interlacing artifacts anyway.

This is a fundamental decision for me. I check/try this since several weeks and at some -very soon- point I will say "hey, that's best!". I have very similar footage all the time and when I found the 100% perfect settings I will keep them for ever. If I do not feel its the best, I will always be unsure...

I am 100% sure that I will end with your hd2sd() but I want to -a- understand it fully and -b- to have the best possible output out from it.
That's why I compare 576/25p from both methods (VDub and yours). Although I will never use 576/25p its the source for the interlacing afterwards. But I see the interlacing at the next step - before I have to be sure with the "source", because 576/25p I am able to compare on my PC with 24''-TFT.


In the case of PAL, the default OutputFieldRate=50 performs 1080/50i -> 1080/50p -> 576/50p -> 576/50i.... while the methods in hd2sd() are "bob deinterlacers" that create full-resolution, double-framerate progresive video from an interlaced source.

Indeed, I did not know that you create real 1080/50p in a step between.
BTW - can your script "legally" be used to scale/deinterlace to 1080/25p or 1280x720/25p (or even 50p)? Especially a perfect 1280x720/25p for website-publishing would be great. Can I simply do it with OutputHeight and -Width?

When OutputFieldRate=25, the fields are either blended (default), which is much like the "Blend" method in VDub's SmartDeinterlace ... or decimated (discarded) when SmoothTime=false, like SmartDeinterlace's other methods.

So SmoothTime=false means it throws away half vertical resolution or do I understand you wrong?


I will try all your hints you mentioned in your last post and see, if I get a better feeling with the roofes in distance. That's the only thing which look somehow little better in VDub - but probably because of some very small setting with NR/sharpness etc or because I still have an error in understanding.

Thank you so much, I will report my findings soon again!

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 ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

No problem. The whole point of my developing this was to create a system that "works"… so I will certainly try to remedy any part this not functioning as advertised.

BTW - can your script "legally" be used to scale/deinterlace to
1080/25p or 1280x720/25p (or even 50p)? Especially a perfect
1280x720/25p for website-publishing would be great. Can I simply do it
with OutputHeight and -Width?

Well, that was my hope in adding the OutputWidth and OutputHeight parameters. It can never be "perfect" because there is no such thing as perfect deinterlacing (and the ones that approach perfection are so slow as to make them completely impractical -- especially for HD sources.)

This should work fairly well, however:

720/50p from 1080/50i (or 60p from 60i)

hd2sd(DeintMethod=1, OutputWidth=1280, OutputHeight=720)

720/25p from 1080/50i

hd2sd(DeintMethod=1, OutputWidth=1280, OutputHeight=720, OutputFieldRate=25, SmoothTime=false)

720/30p from 1080/60i

hd2sd(DeintMethod=1, OutputWidth=1280, OutputHeight=720, OutputFieldRate=30, SmoothTime=false)

There are nearly endless variations you can do on these themes, but these are good for starters.

So SmoothTime=false means it throws away half vertical resolution […] ?

Well, not really. Whenever one framerate needs to be converted to another, hd2sd() gives you the choice of either blending frames (SmoothTime=true) or dropping frames (SmoothTime=false). For another, more graphic illustration of the 50i -> 25p process:

1080/50i -> 1080/50p -> 576/50p -> 576/25p

When SmoothTime=true, each frame of the output will contain a 50% blend of 2 frames from the 50p stage.

When SmoothTime=false, each frame of the output will contain a single frame from the 50p stage and discard the other

So, providing that the deinterlacing does a good job in preserving spatial resolution, you will only be throwing away half of the temporal resolution when SmoothTime=false.

Here is my advice on that front: If you have a lot of full-screen motion (zooms, pans, car races, football games) then you definitely want to set SmoothTime=false for 50i->25p conversions. If you mostly have stuff that contains minimal motion (such as static tripod shots of interviews, etc.) then SmoothTime=false can be a good choice. In either case, you'll probably get the most natural result by shooting a 1/50" shutter speed.

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 ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

Also, if you have a multicore / multiprocessor machine, you can greatly improve the performance of DeintMethod=1 by using the multithreaded version of EEDI2. The website that was hosting this file no longer works, so I posted it here. Go to your AviSynth 2.5 plugins folder and delete the eedi2.dll file and replace it with the eedi2_imp.dll contained in the .zip file.

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 ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

I really like your broad explanations, this is very usefull for understanding the whole thing, not only taking and using your scripts!

Just an hint: In last paragraph it's 2x SmoothTime=false, probably one is true.

My footage is normally large scale fireworks displays, shot from tripod with only slow movements of the cam, no zooming. I use 1080/50i because otherwise some of the faster moving effects in the sky would stutter with 1080/25p. And filming with 1280x720/50p would be fine for internet, but its not sharp enough for Blu-ray. And I need all three formats:

1920x1080/50i for Blu-ray, 1280x720/25p for internet (eg. Youtube) and 720x576/50i for DVD.

I would love to film with 1080/50p but for that I probably need EX7 or EX1000

So, I will use the eedi2_imp.dll you provided, thanks!, and will report, how it came out finally. We will see, what questions come up in the next few days...

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 ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

You might think I'm really crazy, but have you considered the possibility of shooting 1280x720 @ 50p and then upsampling and interlacing it to 1920x1080? If you happen to have some 720p/50 footage lying around, try my sd2hd() function. It has VERY good (but slow) upscaling. Since you seem to like the "background" on exactly how these things work, the script is using EEDI interpolate – not to deinterlace, but to scale the clip 2x in both directions, so the filtering is applied in this order:

  1. 1280x720 @ 50p
  2. [ noise reduction ]
  3. 1280x1440 @ 50p
  4. 2560x1440 @ 50p
  5. [ sharpening ]
  6. 1920x1080 @ 50p

:

720p/50 -> BluRay 1080i

filename = "lagarith720p50.avi"


sd2hd(filename,

\ ScaleMethod=2, OutputWidth=1920, OutputHeight=1080,

\ Sharpness=0.75, NRStrength=25,

\ OutputColorSpace="RGB24")

720p/50 -> Internet HD @ 25p

filename = "lagarith720p50.avi"

blend = true


AviSource(filename)

(isYV12) ? ConvertToYUY2() : last

(isRGB)  ? ConvertToYUY2(matrix="rec709") : last

(blend) ? Merge(SelectEven(), SelectOdd() : SelectEven()

ConvertToRGB24(matrix="rec709")

720p/50 -> PAL DVD

filename = "lagarith720p50.avi"

hd2sd(filename, OutputColorSpace="RGB24")

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 ,
Jun 18, 2009 Jun 18, 2009

Copy link to clipboard

Copied

Dan,

I reached a point where there is no back to VDub-only-workflow

I used your new script and created another 576/25p-test with it (WidescreenType=0 -> only very little cropping compared to VDub, perfect!). Comparing the same frames one easily will recognize, how much hs2sd is better. Just see the two frames attached to this post. This is a frame from a fast zooming sequence - see the motion blur and lost sharpness at the moving outer parts of the images in the VDub-frame. Your workflow is almost as good as the original - no significant added motion blur, clear edges and shaddows, clear image in total - wonderful

So, I stop comparing yours with VDub-workflow. From now on, just the very next few days, I will try to improve the settings of hs2sd  to achive best looking sharpness/noise-reduction.

Upscaling: I did a test 720/50p -> 1080/50i and it really looks promising - but it cannot be compared to real 1080/50i from my EX1. No way. So I will stay filming in 1080/50i but will try 1-2 times filming in 1080/25p, just to be sure I really get annoying stuttering of fast moving effects. And then that's it...

THANK YOU, DAN!

I was a believer before, but now I know.

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