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.
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
Ann Bens, Dec 2, 2013 12:25 PM
Jim's right (I can't believe I said that!) : There are just more options for doing things like this on PC. The whole "freeware coommunity" is more or less PC based.
(Is there an emoticon for that "Sad Mac" face like you get when their OS crashes?)
> Chances are good there are equivalent utilities out there for Macs
Yeah, but can you run AviSynth on Mac? I think not... I don't know about "bootcramp" or whatever it is. I could be wrong.
To my knowledge, DebugMode is the only frameserver output that works with CS3. There is no Mac version. Somebody please make a post here if you find one (or any other frameserver that works with CS3, Mac or Windows -- I'd love to test it out!)
NOTE: I freely admit to my anti-Mac bias. Sorry Mac users: No hard feelings, right? I simply cannot abide an OS that only recently saw fit to use two mouse buttons :) Truth be told, I am a freeware junkie which precludes me from ever going back to Mac.
>Yeah, but can you run AviSynth on Mac? I think not... I don't know about "bootcramp" or whatever it is. I could be wrong.
You can and I have. One advantage of the Intel-based Macs is that you can also install Windows and choose which OS to boot into using "bootcamp". My Mac Pro is either a native OS X or Win XP system, depending upon which I choose. To test your workflow I used PPro CS3 running in Windows, loading an HD project I had edited with PPro Mac on the same machine. It worked fine. Of course, those running PPro Mac only don't have this option...
The freeware workflow is great, but I sincerely hope Adobe's engineers can improve Premiere so we don't have to go down that road anymore.
>But I guess you need to own a Mac + a license for PPro CS3 Windows. That may be only a small crowd of folks, no?
True. I have a license for PPro Win primarily for use on my laptop in the field, with a second installation on my Mac Pro Windows partition. I much prefer OS X to Windows, but there are definite advantages to keeping XP available.
I have to say that Dan has been unrelenting in his quest to educate people on the benefits of his workflow in going From HDV to SD DVD. I did some testing some months ago using his technique and the results looked pretty good but it was really difficult to judge just how much difference there was between an Adobe Media Encoder (AME) generated DVD file and the Frameserver/Avisythn process. To get a better means of comparing the two techniques, I recently used both work flows within CS3 to generate two DVD MPeg2 files from the same HDV source.
I then imported both files into a PP2 DVD NTSC 16x9 MPEGPro project. I laid the two video files on top of each other, in synch and then using the motion effect, split the screen so that the Avisynth-generated video and the AME-generated video were displayed simultaneously showing the lower half of both video files. I then exported the split screen to a DVD MPeg2 file and subsequently burned this onto a DVD.
Using a non-upscaling Sony DVD player (DVP-NS75P) and a 30" Sony Wega (KV-30HS420) Hi-def CRT based TV, previewed the split screen results. I can assure you that when viewing the two images directly, there is no question that Dan's workflow produces a sharper image with better colour and less motion blur. The difference is quite significant and I can assure you that I will be using his workflow from this point onwards to produce SD DVDs from HDV Premiere Projects.
You have done a great job Dan, not only in developing this workflow but also in having the perseverance to keep this in front of the Adobe forum folks. Thanks again for the help you have provided me in getting this process up and running.
Thanks so much, Ron. I agree that this process highlights some critical weaknesses in PPro -- and it is certainly my intention to keep these issues in focus. Many users "don't know what they're missing" -- and they should. This is professional software and professional results are to be expected.
As Hugh Hansard pointed out in the other thread, Premiere's problem with HD -> SD conversions is a function of several limitations:
1.) colorspace conversions
2.) aspect ratio conversions
3.) scaling algorithms
.. and I'll add to this list:
4.) the lack of a decent deinterlacer. Preferably a "very smart" adaptive and/or motion estimating deinterlacer with framerate-doubling capability.
It appears (from posts made by Wil Renczes on this forum) that aspect ratio and color matrix conversions will be fixed in CS4. Let's hope that they plan to improve scaling algorithms and provide a decent adaptive bob-deinterlacer also. (well, we'll see about that).
As Dan mentions, deinterlacing is a key issue You can not properly scale without deinterlacing. In my previous post, I bundled deinterlacing into scaling, but it is really an issue in of itself. When I got access to my final workflow, we were using a predictive-motion algorithm prior to scaling. This was the primary fix for the frame/field artifacts and haloing. Dan is correct, it is key.
Well, Jim. 30i -> 24p is easy enough. But going the other way without artifacts and/or duplicate fields is impossible. However, if you seriously want to look at ways to convert 24p -> 30i, try the Doom9 forums. I am certain that someone (smarter than I am) would help you find the best way.
Ed, I have an HV20 that I use for my HDV work. I have had tremendous success with Dan's workflow doing the following:
1. export movie from PP3 with Upper Field First selected in the Video tab of the Export dialog.
2. use the parameter "OutputBFF=true" in the AVS script, if you are using Dan's advanced script. I tried both ways (upper/lower), and it only looks excellent if you use this parameter with BFF=true.
Otherwise, I see the same chopiness that you are describing.
When I export from Adobe Media Encoder, I noticed that the default was Lower Field First, so it prompted me to try it with Dan's workflow when I didn't get great results the first time.
I have encoded several DVDs using clips from my HV20 and they look great - much better than standard Adobe Media Encoder based DVDs on my 50" plasma HDTV with a standard (non-upscaling) DVD player.
I also purchased the Cinema Craft Encode Basic ($58) which I load AVS files into - works great and can be purchased online here:
As mentioned on another thread, I am seeing that it takes about 1 hour of 2-pass VBR encoding time, per minute of video from PP3. So a 10 minute video project in PP3 takes about 10 hours total (across 2-passes) to encode with Dan's workflow and CCE Basic.
Well, in general you just need to tell your MPEG2 encoder that you are feeding it TFF and to flag it as such.
What are you using to encode? If you are using CCE, I believe TFF is the default, but check to make sure it is set to this. Make sure it is not shifting the video up by one line (it has an option to do this to reverse the field order of the source).
If you are using Encore to encode, I'd recommend BFF instead. Encore may assume 720x480 video is always BFF, like DV.
If the field order looks wrong then it probably is. Reverse it (either in my AviSynth script or in your encoder) and it should look fine.
>2. use the parameter "OutputBFF=true" in the AVS script, if you are using Dan's advanced script. I tried both ways (upper/lower), and it only looks excellent if you use this parameter with BFF=true.
I ran the advanced script in VirtualDub -- I have the hd2sd.avsi file in the AVISynth plugin directory and other than what was already in the basic script sample from Dan, I only copied in this additional script into the premiere.avs file: hd2sd("debugtest4.avi", OutputFieldRate=60, OutputBFF=false, NR=5, Sharpness=0.5, VerticalBlur=0.5)
I am getting this error when I tell Virtual Dub to run the premiere.avs script:
"AVISynth open failure: script error: invalid arguments to function "isRGB" (hd2sd.avsi, line 52).....*\premiere.avs, line 16).
Cant seem to get the advanced script to work!
Also, regarding field order, if we are specifying the outputbff=true parameter, should I comment-out this command: "SelectEvery(4,1,2)" ?
Ed, I got this error in one of Dan's previous versions of hd2sd.avsi - which he has since corrected. I suggest redownloading the latest script from his guide page. I downloaded it Thursday night (he updated it on Wednesday, 7/2/08 with this fix) and used it successfully.
I'm editing an XDCam 1440x1080 file and everthing is good, BUT when I export the file with the Media Encoder I have try all the presets but there is no preset what showing me a fullscreen 16:9 1440 movie.
What preset or settings must I use to give me an 16:9 fullscreen output???
> I downloaded it Thursday night (he updated it on Wednesday, 7/2/08 with this fix) and used it successfully.
Yep. If something doesn't work right, always check that you've got the latest version of the script. I try to test things as thoroughly as possible, but mistakes happen: Fortunately, there are now a good number of others who are you using these scripts so I'm more likely to find and fix problems!
On another note, I noticed somebody from Adobe was browsing my example page on Premiere's interlaced scaling issues: It was apparently from a link in an email. Let's hope that means that some of the Adobe folks are at least discussing these problems internally.
OK - the newer script fixed the error - thanks again for quick and helpful replies.
Dan - nice job on this. I wasn't a believer that it would be worth it to run these 3rd party plugs, scripts, etc., but it does make a visible difference.
Here is one part of the workflow I'm not sure I understand though -- I am using ProCoder 3 to do my encoding to m2v for DVD. When I try and open the premiere.avs script it gives me errors, but when I open the avi file that I have created via VirtualDub (by "save as *.avi" from VDub) it appears I am getting the end product as intended. Can one of you confirm I am essentially doing the same thing this way?
One thing that seems out of sorts is that it is only taking about 10 minutes for VirtualDub to save out my avi file (2 min video saving as 3.4GB avi). Kevin mentioned more like one hour per minute so am I not getting the full benefit here. My PC is dual core AMD 3000+ with 4GB Ram - nothing special.
> I wasn't a believer ... but it does make a visible difference
I know. It's always that way! Nobody here ever believes me (boo hoo). The difference is huge.
> When I try and open the premiere.avs script it gives me errors...
I haven't used ProCoder in years. It supposedly supports .avs input. Can you please tell me the exact error? Which "version" of my script are you using: the basic one or the hd2sd() function?
In any case, saving the AVI from VirtualDub should be the same, except that there's an unnecessary RGB conversion -- not that it really makes much difference.
Perhaps ProCoder wants RGB? If you are using the basic script, try adding the line
ConvertToRGB24() at the end of the script. Or, pass the parameter
OutputColorSpace="RGB24" to the hd2sd() function in the advanced workflow.
> One thing that seems out of sorts is that it is only taking about 10 minutes for VirtualDub to save out my avi file (2 min video saving as 3.4GB avi).
Great! This also depends on the complexity of your project and a million other factors. Saving to an intermediary .AVI requires more disk space, but can greatly speed up encoding -- especially on the 2nd pass of 2-pass encoding. Also, Kevin is using CCE. Perhaps ProCoder is faster, I don't know.
>I haven't used ProCoder in years. It supposedly supports .avs input. Can you please tell me the exact error? Which "version" of my script are you using: the basic one or the hd2sd() function?
The error reads: AviSource: Could not decompress frame 0
(E:\*myfilepath*\premiere.avs, line 1)
I'm using the hd2sd()script -- I think?!? I've selected some script commands you had in your text file and added to what was originally the 'basic' avs file I created from your basic workflow. Of course nothing would work then until I placed your hd2sd.avsi file into the plugin directory of AviSynth.
>Or, pass the parameter OutputColorSpace="RGB24" to the hd2sd() function in the advanced workflow.
Perhaps I am running before I've learned to walk, but you lose me with that one. What do you mean by "pass the parameter"? I tried adding the command you suggested but perhaps it was done incorrectly as I still get the same error.
If not out of line in the forum, I will copy and paste my script file from my 'premiere.avs' file that I am trying to open in Procoder and maybe you can see my obvious error? debubtest3.avi is my signpost file created by DEBUGMODE FS from premiere**
[Here is the script - less only the comments marked with #]
That should work. Output will be 29.97i (TFF), YUY2 colorspace if your source is 29.97i.
In the future, please email me the script instead of posting here so as not to confuse others or clog up the thread. After it's all working for you, you may want to post the script you used, your MPEG2 encoder settings, etc.
I added ONLY the line you provided and Procoder worked! Nice results and it only took about 10 minutes to encode the 1:51 second video.
I hate to wear out my welcome with more questions, but I am still a little confused on what you were meaning by telling me to do 'upper field first' in your latest post? I already had the script to do UFF [(SelectEvery(4,1,2)] and I have UFF selected in my export settings in Premiere. Are you suggesting something else?
Thanks very much for all of your time and assistance. I owe you an apology for thinking this was all a colossal over-kill considering my HD-SD videos already seemed to be looking good. It's the fine lines in the video that really suffer in the transition without doing this avisynth. I will enjoy the better outputs and it really wasn't that hard to get going with this workflow.
Ed, are you using 2-pass VBR for your Procoder? Are you feeding directly from PP3 -> DebugModeFrameserver -> Procoder? or are you creating an intermediate file from VirtualDub before having it go to Procoder?
It's taking me a good hour to encode each minute of video, and I'm not sure that its the encoder that's slowing me down. I'm using PP3 --> DebugModeFrameserver --> CCE Basic encoder.
When I encode with AME (Adobe-only workflow), it's much, much quicker - however not the results I want... I'm running on a new Quad core and it's not being utilized.
> I added ONLY the line you provided ... I already had the script to do UFF [(SelectEvery(4,1,2)]...
If you are using the hd2sd() function, your .avs file should consist of EXACTLY ONE LINE (as quoted in my last response). Delete all the other statements and leave only the hs2sd(...) command. The script is a "one liner", so to speak.
> and I have UFF selected in my export settings in Premiere
As you should. HDV is TFF but DVD can be either. The hd2sd() function uses TFF by default. OutputBFF=true can be set to reverse the field order, which seems to be better when encoding with Adobe Encore.
CCE and other encoders make it easy to specify the field order of the source, so it doesn't really matter which you use as long as your encoder is aware of it.
> I'm running on a new Quad core and it's not being utilized
It won't be -- as least when outputing via AviSynth. AviSynth is not a multi-threaded app (there is an MT version of, but it requires a different approach to take advantage of it -- which most of the existing plugins won't benefit from anyway.)
For maximum encoding speed (especially for longer projects and 2-pass encoding) I suggest writing an intermediary .AVI file from VirtualDub. This will allow CCE or ProCoder to use whatever resources they need to comrpess the file.
Also take a look at HC Encoder -- the freeware MPEG2 encoder I recommended on my workflow page. I've always been pleased by its results and I'm curious how it stacks up against ProCoder and CCE, as I've never really done a "head to head" comparison.
HC Encoder also has an option to automatically write a lossless file (not an AVI, but a proprietary format) on the first pass which it then encodes from on the next pass.
Yes - I do 2 pass VBR with a minimum bit rate of 7000, avg. bit rate of 7500, and max @ 7900.
>Are you feeding directly from PP3 -> DebugModeFrameserver -> Procoder? or are you creating an intermediate file from VirtualDub before having it go to Procoder?
This is where I was having trouble understanding what exactly I was supposed to do. When I run debugmodeframeserver as my export from Premiere, it gives me the signpost file. I was then taking my script and opening it up in VirtualDub to scrub the footage. At first, I was putting out an intermediary avi file (about 3.4GB in size for 1 min 51 second video). It took about 10 minutes to encode.
Then, I tried opening up my avs script directly in Procoder, and it worked. Took about the same amount of time as it did to encode the intermediate file. **But now it seems my procoder is not happy with my avs script even though I made no changes? Working on that right now...
>If you are using the hd2sd() function, your .avs file should consist of EXACTLY ONE LINE (as quoted in my last response). Delete all the other statements and leave only the hs2sd(...) command. The script is a "one liner", so to speak.
Aahhhhh....I thought you stacked up different scripts in the avs file (the one you suggested naming as premiere.avs in your guide) to pile in all the settings you wanted, such as color correction, sharpening, interlaced or progressive, etc.
So now my avs file is only one line, and the hd2sd.avsi is located in my avisynth directory. Can I make various selections, such as adding the "OutputBFF=true" WITHIN the hd2sd.avsi file versus doing so in the premiere.avs file?
I'm so close to getting it figured out but now I don't understand where I make my choices on the various options such as interlaced or progressive, TFF or BFF, etc.