Pr generally does a bad job scaling footage down; especially interlaced footage.
There is a switch you can throw that will improve it somwewhat but at the cost of long render times. On the seq preferences there is a box you can check to do "high quality scaling". Try it and see if that improves it enough for you. If not, search these threads for a 3rd party solution provided by Dan Isacs.
That’s Dan Isaacs… easier to seach fro me when spelled correctly . Also try some searches for hd2sd ... and be sure to look in the CS4 forum, as I have changed some things from my CS3 workflow.
And Curt is correct: Premiere’s default scaling method is pretty bad; and even their "high quality" options are pretty lame (in their performance as much as their quality). Please read what you can on this forum about the subject. You'll likely wind up sending me a PM to clarify things at some point. That's OK. I'm used to it! One of these days I'll publish my "official" CS4 workflows and it will be easier for everybody.
One of these days I'll publish my "official" CS4 workflows and it will be easier for everybody.
Then Curt will make it into a FAQ.
I appreciate the help. I will do as suggested.
First of all thanks for all the great info you have posted regarding this topic. I started using your process last year (cs3) and found the quality to be outstanding. I am currently confronted with a problem that maybe you can steer me into a good direction. I have a three camera multicam project shot in 1440x1080 HDV format, and each of the videos (90 minutes each) requires color correction. So when I finally get everything edited, and export to the frameserver/hcencoder (using the hd2sd workflow) it takes FOREVER (quad core system)! I estimated about 60 hours of continuous processing (the average time is about 0.7 FPS with the color correction task). In the past I would usually get about 5-6 fps processing time to convert using the hd2sd workflow, or about 7-8 hours of processing time . Obviously this is big (time) obstacle to get over.
It sounds like the CS4 scaling is better, but not as good as the hd2sd workflow ( i don't have cs4 yet). So what I did is export to bluray a 1440x1080 (1.333 aspect) the timeline. This took about 16 hours (a lot of time, but significantly less than trying to frameserve with the color correction). My thinking is that I will then use this file and frameserver/hcencoder using the hd2sd workflow, which is going to take another 7-8 hours to process, but at least I know the quality is there. Do you see any flaws in this workflow, or would have an alternative workflow in mind? The blu ray m2v file that I created looks very good (CBR, 25mbs, highest quality setting). When I imported the file back into premiere it can in clean (1440x1080 project) with no rendering required. When I played back on the timeline to see how good it looked I was very pleased (even thinking about now getting a blu-ray burner since I have a file ready for authoring in encore). I guess another question to ask is do you know why the frameserver/hcencoder method is so slow, is it because of how cs3 processes the color correction concurrently with the frameserver tasks?
Tim – I'd say you're correct about the "bottleneck" between color correcting, frameserving, hd2sd() processing, HC encoding… those are a lot of simultaneous tasks to accomplish, I suppose.
Rather than exporting a BluRay version (though this may be fine for your purposes) I recommend outputting a very high-bitrate MPEG2 file, such as 100Mbps using I-frames only (in AME, choose generic MPEG2 and set both M and N frames to 1) to avoid temporal compression. This should make the file render and decode faster, though I have not actually tested Premiere/AME's performance to verify this.
This will serve as a 100Mbps "master," from which you can transcode your lower-bitrate Blu-Ray and scaled-down DVD version without signifant generational loss or added processing time.
To create the .m2v for your DVD, get a copy of Donald Graft's DGIndex program and DGMpgDec AviSynth plugin.
1.) Open your 100Mbps MPEG2 file in DGIndex
2.) Choose File/Save Project, which will create a .d2v file (myproject.d2v in this example)
3.) Use AviSynth to open the .d2v file, by creating a script like such (using any other options you like) and save it as myproject.avs:
4.) Open your myproject.avs file in HC Encoder and create the DVD-compliant MPEG-2 video stream.
If you haven't already, try using the Settings3/use lossless file option in HC Encoder, which can greatly speed up the second encoding pass (at the expense of disk space). Be sure to click LLSetPath and choose a temp folder to store the lossless intermediary.
thanks for the info. I will try your suggestions... but I have a question, and I'm pretty sure the answer is obvious, but I think I am just not thinking this through all the way.... when you say to make a simple script using as little as the following two lines...
I get an error message in HC encoder saying the AVIsynth script error, no function named MPEG2Source. This makes since "to me" as I could not find a file by this name.... but I suspect what I am either reading, or what I think it is telling me, I am interpretting the wrong way. Anyway, I guess you could say that I am confused as to what exactly is causing the error message. Do I make this file "MPEG2Source" using a different process, or should downloaded it at some point in time (but obviously didn't)
TIm --- You need to copy the DGDecode.dll file (included with DGMpgDec / DGIndex) into the AviSynth plugins folder so that it can parse the .d2v files.
What file did you open with HC Encoder?
You SHOULD be opening your .avs script file which will convert to the MPEG2 1440x1080 video (using the .d2v index that DGIndex created) to SD resolution, such as: (assuming interlaced source and output)
Got it working now, looks pretty good.
The advanced setting in the AME do i leave them default?
AME? Do you mean HC? In any case, MPEG settings are a whole other deal.
As for HC Encoder, important settings are:
Main : bitrate : average
7000 (adjust as needed) Main : bitrate : maximum 8500
Main : profile
Main : dc prec
10 (or try 9 for less "mosquito noise")
Main : aspect ratio
16x9 (or 4x3 if that's what your source is)
Main : miscellaneous : SMP
Main : miscellaneous : scene change
Main : miscellaneous : autogop
yes Main : miscellaneous : closed gop no
Settings 1 : interlacing options [a]
interlaced (unless your content is 24p, then choose progressive) Settings 1 : interlacing options [b] TFF (unless, of course, your input is BFF) Settings 1 : Adaptive Quantization 1 (I have no real advice on this, set it as desired)
Settings 2 : VBR bias
50 (There is a sort of 'bug' in HC 0.23… VBR bias needs to be kept high to prevent bitrate overruns) Settings 2 : Colorimetry BT.470-2M (NTSC) … or BT.470-2BG (PAL)
Settings 3 : Reload Avisynth
* or you can use the intermediate lossless file option, which is usually a better choice. You then need to click LLPath set to choose a temp folder where the (often huge) intermediary file will reside. Using the lossless option will greatly speed-up the second pass of encoding.
Matrix : built-in matrix MPEG (by default) … but try FOX1, FOX2, and FOX3 for low, medium and high bitrates, respectively.
Ah thanks very much.
I've been doing a bit of reading. It seems the VBR process in both AME and HC Encoder are not true VBR, but what it being called Constrained VBR, meaning a Target or Average bitrate is asked for up front. Are you aware of any encoders, free or pay, that have true VBR encoding? One that will ask for a Maximum only?
No idea, Jim.
Oh well. Thanks.
thanks again for your previous input. In regards to the HC encoder, I noticed that it is not using all of the CPU cores on my system (quad core). AME typically gobbles up all available CPU's but HCencoder is running at only 25-30%. Is there a setting that I am missing so that I can tell it to use all cores on my computer? Quite honestly, I never noticed this before, but when I was looking at the hd2sd.txt file I saw one entry in a script that was CPU=4... this got my attention and when I processed my next job did notice that the CPU was not being fully utilized.
It's funny how these things come up in cycles… We were just talking about this in the CS3 forum.
The problem seems to be with AviSynth and the way it handles multithreading. Without getting too in-depth about it, here's a way you can speed things up quite a bit:
- create your .avs script for hd2sd() as before
- open your .avs file in VIrtualDub, choose "Fast Recompress" from the video menu, use the Lagarith lossless codec for compression (in the Lagarith codec options, be sure Multithreading is enabled)
- choose FIle / Save as .AVI and write this to disk
- create another .avs script that references the Lagarith AVI file, like such:
- Open this script in HC Encoder… and be sure to choose HC's "reload Avisynth" option (Settings 3)
There are some other ways to optimize this also, but I don't have time to get into those right now. Stay tuned…
(There is a sort of 'bug' in HC 0.23… VBR bias needs to be kept high to prevent bitrate overruns)
I have not found that to be the case. I've been experimenting with HC for the past several days, and the Max bitrate reported has never exceeded my setting with the bias set to 0.
I also wanted to say that HC does indeed offer the type of encoding I was looking for. It's called CQ or Constant Quantization. The simple explanation is that this mode uses only the bits necessary to achieve the desired quality. There are no targets or averages to hit. If the video needs more bits, it uses them. If it needs less, it uses less. You can still specify a Maximum so that the resultant file remains DVD legal. I'm running my first test right now.
You'll see, Jim. The problem will happen eventually if VBR bias is too low, and it seems to be dependent on the source. I remember one job I did (which is how I figured out the problem) where there were 4 segments I was trying to write to DVD. One of them would just not "behave" ... I reencoded the file, but Encore kept throwing errors when I tried to compile the DVD. I eventually experimented and found that the problem went away when I increased VBR bias (to 50, if memory serves me).
I knew that HC does CQ… I guess I just didn't put this together with what you were asking me about.
BTW, Jim: Did you ever get a new PC or are you still clunking around on that old P4?
"...Settings 2 : Colorimetry BT.470-2M (NTSC)..."
Would that also apply to DV source, or only when downconverting HD source?
(P.S. Still clunking)
Yes, this applies to all NTSC output. I mean, you could also choose DEFAULT (which is actually "none") and it will not affect the quality. The reason I prefer to have the SDE included is so that some savvy device could possibly use this information to display the colors more properly on HDTVs, etc.. I don't know if any upscaling DVD/BluRay players or HDTVs currently do this, but they might – or at least they might do this in the future.
Basically, it just removes any ambiguity about the color system used on the encoding.