Copy link to clipboard
Copied
I've searched on the web & gotten a few answers, but nothing seems to solve the situation.
What I've tried.
1920x1080p MPEG2, Quality 5, Min, Target, Max All Set To 60. Came out looking like crap when it was put on a dvd. Noisy, over contrasted (could be the tv), over colored (could be the tv).
720x480 MPEG2-DVD, Quality 5, Min, Target, Max All Set To 9. Came out looking worse then my previous attempt.
Anyone have a secret formula for HDV to DVD conversion?
Copy link to clipboard
Copied
I have lots of ideas for HDV -> DVD conversions and I am surprised that you have been unable to locate any of my workflows on the Premiere forums.
I can try to help you, but I need to know a few things first:
Copy link to clipboard
Copied
I apologize as I've searched google & not these forums (although that seems intelligent now, hah).
1. 1440x1080 60i original footage, should I be shooting in 30p for DVD conversion?
2. Yes.
3. I tried to output to 1920x1080/30p thinking it would give optimal quality, but I was clearly wrong. I exported straight from Premiere to Encore to be transcoded.
I am a bit new to doing the DVD thing b/c I do web episodes, so I just upload to web 99% of the time and it looks great, but this DVD conversion is just coming out terrible. Any help would be appreciated.
Thanks!
Copy link to clipboard
Copied
Try this:
On the Premiere CS4 end of things:
Now some freeware tools to get the conversion done properly:
Create a new blank text document in notepad, like such, and save this file as premiere.avs, and save it to the same folder as your .m2v and .wav file (edit the video and audio parameters to match your filenames). This is your "script" file for AviSynth:
video = "myfile.m2v"
audio = "myfile.wav"
FFMpegSource(video)
(audio == "") ? last : AudioDub(WavSource(audio))
hd2sd(OutputColorSpace="YUY2", OutputBFF=true)
Copy link to clipboard
Copied
I'm skeptical about this process. The rule of thumb is to reduce the number of transcoding as much as possible because of the quality loss in generation. I know one of the steps is outputing to a lossless codec, but generating to a first huge MPEG-2 file, then to a lagarith AVI then to another MPEG-2 seems redundant. How about just exporting to lagarith to begin with then have it transcode in Encore?
I haven't tried your method so I really can't comment the final outcome. Just curious. I myself just export to MPEG-2 compliant files using Procoder. Load to Encore to export to DVD. There isn't any transcoding process in Encore. The DVD looks beautiful even in low bit-rate.
Copy link to clipboard
Copied
The rule of thumb is to reduce the number of transcoding as much as possible because of the quality loss in generation.
Sure. That is a good rule of thumb. But 100Mbps MPEG-2 I-frame is damn near-lossless for HDV or AVCHD sources and export via AME is extremely fast. Furthermore, the file can be read and decompressed very efficiently – and, in the case of my workflow, it can be multithreaded nicely.
How about just exporting to lagarith to begin with…
Well, you can certainly output to an HD Lagarith AVI. That is an option. However, I have heard that Premiere CS4 can have occasional issues when exporting Lagarith. In any case, depending on content, the Lagarith file can be very large… even greater than the 100Mbps of the MPEG-2 file. The inspiration for using 4:2:2 MPEG2 I-frame came from Matrox's products; who offer an AVI codec that does essentially the same thing (presumably for simlar reasons).
… then have it transcode in Encore?
Well, a more important rule of thumb is that you must use a good scaling algorithm and high-quality deinterlacing (for 1080i) I/O … neither of which are present in any of Adobe's product line. Add to this the fact that my process allows many other options that blow the Adobe workflow out of the water in both quality and performance.
I myself just export to MPEG-2 compliant files using Procoder.
I have not used ProCoder in a long time. It seems to have a very good MPEG-2 encoder. However, it coists $500 – which is exactly $500 more than my method costs. ProCoder also does not have nearly as sophisticated options for scaling, deinterlacing and noise reduction.
Keep in mind, however, that ProCoder can read .avs script files directly. So, conceivably, you could:
Copy link to clipboard
Copied
Dan, thanks for sharing that knowledage. I wasn't trying to challenge you. I like to learn more too.
Taky
Copy link to clipboard
Copied
No worries. I inferred no such "challenge" from you. You asked some good questions and I provided the clearest answers I could.
Actually, I have been properly challenged on this many, many times (see the similar thread on the CS3 forum!!!). I can't really take much credit for the process – I'd give most of this to the AviSynth authors and those who have created so many incredible, free plugins for it. My goal is avail these tools to a wider audience… and to help users circumvent some of the weaknesses of Premiere. I love Premiere as an editing program, but handling of different standards and conversion between them have never been the program's strong suit.
I also try to find the combination of existing freeware tools that provide the fastest, most efficient and reliable workflow on all computers. This can be quite challenging at times, and so I update my package(s) and process(es) fairly frequently. Many of the improvements I have made to the HD->SD process are directly attributable to other users on these forums who have taken the time to help me test this stuff out.
The real bummer here is that DebugMode FrameServer will not work in CS4. That was an incredibly cool workflow. This part of the process was replaced by the MPEG2 I-frame intermediary. Although it is unfortunate that such an intermediary (and slightly-less-than-lossless, at that) is required, it probably speeds-up the process in most cases. Again, exporting CBR 4:2:2 MPEG2 I-frame from AME is crazy fast on a nice computer. And, if you are using AviSynth MT 2.5.7 (multithreaded version), you can get incredible processing speeds on 4- or 8-core machines.
Try it out: If you run into issues I am (almost) always willing to help you resolve them so that I can continue improving my process and the advice I give others.
-- Dan
Copy link to clipboard
Copied
I'm pretty happy with the Procoder output in my current workflow. Many times I show my DVD to clients they thought those are bluray disc output. yeah it's pricey but it worth it.
Copy link to clipboard
Copied
Takyc wrote:
I haven't tried your method so I really can't comment the final outcome. Just curious. I myself just export to MPEG-2 compliant files using Procoder. Load to Encore to export to DVD. There isn't any transcoding process in Encore. The DVD looks beautiful even in low bit-rate.
Hi Takyc
I have used Dans method with great results. I also have procoder (but not for this) and have always liked it.
I want to give Procoder it a try with this and compare. What output settings are you using from AME (to then feed into procoder) I am assuming your source is interlaced - 1080i - because that is where the all adobe workflow badly falls down. My sequence is 1440 x 1080i - 50 I am in PAL land - Thanks Mike
Copy link to clipboard
Copied
Mike,
I am using Matrox RTX2 card so I have an immediate codec to use. I export to Matrox HD AVI i 1080por 1080i depends on which project. then load the AVI to Procoder to export to different bit-rates for DVD, BD authoring.
30p is not a dvd or bd standard. but Procoder will nicely transcode that 30p video to 60i mpeg or h.264 for authoring.
I also make use of Procoder Watch Folder feature to encode the video on a separate computers. I put down the setup and a trick here
http://www.hv20.com/showthread.php?t=13664
it's been working very well for me. A few times, clients saw my DVD (encode with encoder) that they though tthat was HD.
Copy link to clipboard
Copied
Takyc
Thanks and that is a neat trick with the shortcuts / watch folder in procoder. And OK re your Matrox intermediate. I will match my source for output from AME, feed it into Procoder as see how the MPEG2s do in Encore. I am surprised there is no Procoder 4 yet. v3 seems to have been around for ages. Will let you know how I get on
Copy link to clipboard
Copied
You are welcome.
There're more tricks to that. Encore is very flaky on the file import from Procoder. I didn't bother H.264 because encore is just not going to work well at all (with lots of unknown strange error with only a error code). To encode MPEG-2 for BD authoring, I found out I have to rename all .m2v to .mpg. Then encore is very happy to accept the file. No problem at all.
Matrox RTx2 card is another great investment. actually their Matrox I-Frame HD AVI codec is free to download and use on a machine without the matrox card. Otherwise, you will hae to come up some intermediaate codec or lossless codec.
Taky
Copy link to clipboard
Copied
I tried your HD2SD workflow via MPEG I-Frame and it works pretty well, although I'm not shure if the result is really better than using AME with MRQ setting and *important* switching to TFF. However, the avisynth file is interpreted as 1:1 pixelratio by virtualdub, procoder, and AME. I tried to force it to 16x9 by setting parameter "OutputWidescreen=true" but this makes no difference. The only way to set clip to correct AR is to force ratio in premiere or encore manually. Unfortunately this is not possible if you want to convert in AME directly. Is there a way to set AR in the script in a way, other programs handle it correctly?
I've found an AVS Importer plugin for CS4 wich makes converting much easier. You can load the avs-file directly into premiere, encore, AME, or AFX and do not need to recode it to a lagarith-avi first. This speeds up a lot. If you like, check http://valion.net/csavs
This one seems to work better than the already known PremiereAVSPlugin 1.95.
Copy link to clipboard
Copied
although I'm not shure if the result is really better than using AME with MRQ setting
Oh, yes… it is… and faster.
and *important* switching to TFF
Does that make any in difference in quality? It shouldn't.
The only way to set clip to correct AR is to force ratio in premiere or encore manually. Unfortunately this is not possible if you want to convert in AME directly.
Correct. One of the silly things about standalone AME is that you cannot override any of its assumptions, like PAR or field order.
This speeds up a lot.
I don't really think so. Encoding 2-pass from a static AVI file will be faster than re-processing the script for each pass. Furthermore, if you use the multithreaded version of AviSynth like I do, you can get very excellent speed writing from VirtualDub. I am pretty sure that the PPro Import plugin does not multithread nicely.
If you want to try this, download AviSynth 2.5.7 MT … replace the avisynth.dll in your System32 folder (os SysWow64 on 64-bit OSes) and copy mt.dll to your AviSynth plugins folder. Now, add this as the first line of your script to:
SetMTMode(2)
Save the Lagarith .AVI file from VirtualDub. It should be a lot faster now if you have 2 or more cores/processors.
Copy link to clipboard
Copied
Dan,
thanks for the hint on the MT version. You're right, this speeds up encoding a lot. Now the import avs-script via plugin way isn't faster anymore.
and *important* switching to TFFDoes that make any in difference in quality? It shouldn't.
I tested AME in TFF and BFF and you're right again. I cannot see a difference other than the different field types. I wonder why Matrox recommend to use this setting for better quality...
But nevertheless the result of AME using MRQ seems to be slightly sharper but with a bit more contrast than the avisynth file, so it might be some kind of optical illusion. But the performance of the avisynth method is much better. I did my tests with DVCProHD 1080i50 clips to PAL, I don't know if this format affects my results.
Anyway Dan, thanks for your work. We now need some kind of program or script that does the steps (i-frame export - script writing - vdubbing to lagarith) automatically
Copy link to clipboard
Copied
We now need some kind of program or script that does the steps (i-frame
export - script writing - vdubbing to lagarith) automatically
Well, you can (kind of) do it:
video = "%PATH%/%CLIP%.m2v"
audio = "%PATH%/%CLIP%.wav"
FFMpegSource(video)
(audio == "") ? last : AudioDub(WavSource(audio))
hd2sd(OutputColorSpace="YUY2", OutputBFF=true)
But nevertheless the result of AME using MRQ seems to be slightly sharper but with a bit more contrast
I would need to see the original + both outputs to really tell you anything here. It is possible that the more jagged deinterlacing from AME could pass as extra "sharpness"… but there is just no way it can be "sharper" in any real sense. The type of scaling I use in the script is much sharper than Adobe's.
However, if you find you want more sharpness, take a look the parameters for hd2sd() for sharpening and noise reduction : Sharpness, NR, GrapeSmootherAmount. You may also want to experiment with DeintMethod=1 (the default is 2) … which will use a more accurate deinterlacer (but MUCH slower).
For example, you can modify the last line of the script:
hd2sd(OutputColorSpace="YUY2", OutputBFF=true, DeintMethod=1, Sharpness=0.5, NR=2, GrapeSmootherAmount=20)
One of many possibilties… see the hd2sd.txt file for more information. As I mentioned a few posts back, stay tuned for some updates: Next version will have even better deinterlacing options.
Copy link to clipboard
Copied
Dan,
Use the AviSynth Batch Scripter utility to create a multiple .avs files (template like such)
thank you for the link, this could be a timesaver.
However, if you find you want more sharpness, take a look the parameters for hd2sd() for sharpening and noise reduction : Sharpness, NR, GrapeSmootherAmount. You may also want to experiment with DeintMethod=1 (the default is 2) … which will use a more accurate deinterlacer (but MUCH slower).
For example, you can modify the last line of the script:
hd2sd(OutputColorSpace="YUY2", OutputBFF=true, DeintMethod=1, Sharpness=0.5, NR=2, GrapeSmootherAmount=20)
yes, I think I'll have to spend some more hours for testing all these options, I'll do.
I would need to see the original + both outputs to really tell you anything here. It is possible that the more jagged deinterlacing from AME could pass as extra "sharpness"… but there is just no way it can be "sharper" in any real sense. The type of scaling I use in the script is much sharper than Adobe's.
I made an archive with a short test sequence. http://www.mir-studios.de/test.zip . Files in the archive:
- mpeg2-i-frame.m2v + .wav (source clip)
- premiere.avs (avisynth script)
- premiere_AME_MRQ.m2v (exported from PPro timeline (MRQ enabled), clip in timeline is DVCProHD 1080i50)
- avisynth_AME.m2v (Lagarith-AVI encoded in AME with same settings as above expect MRQ)
You can campare detail sharpness pretty good at frame 100-105. I noticed some kind of color shift when comparing the avs.clip in VDub with the other converted SD clips. Look at the child's red pullover. The color tone of the .avs clip looks different. Is this an effect of the 10-bit dc-precision used by the MPEG2-I-Frame settings or are there used different ITU colorspaces? I guess the result must be right because the clip exported directly from timeline looks same than the intra-avisynth-clip in that point.
Btw, I use the YUV2 mode of Lagarith as it was recommend to me by the author when using clips in YUV2 colorspace, do you think so, too?
Copy link to clipboard
Copied
Spreeni – First, thanks for taking the time to run the test and upload the stuff for me. I was able to catch one issue in hd2sd() : I made a patch to it a while back, and in so doing caused the horizontal scaling to round down (in multiples of 4) to 700 instead of up to 704. This was an issue when WidescreenType=2,as in your sample. Not really a huge deal (the "correct" width without rounding would be 702, so it's the same error on either side). However, the "industry standard" width is 704, so it has now been fixed again and uploaded —> hd2sd package (updated)
Normally, I suggest using the default WidescreenType, which crops a tiny bit from the top and bottom instead. This is actually a little more accurate, PAR-wise … and you don't get those black bars on the sides.
WidescreenType issues aside, I did a quick comparison of the AME MRQ vs. hd2sd output sampled you provided:
Your clip was apparently a handheld shot. These can be tricky to deinterlace even with very sophisticated deinterlacing. However, in some cases static shots show up problems that are not apparent in fast-moving shots. Static regions require a very "stable" deinterlacer. I have noticed that Adobe's MRQ deinterlacing has a tendency to "shimmer" on sharp, static scenes. It also does not do a very good job of preserving sharp diagonal lines.
Copy link to clipboard
Copied
Dan,
thanks for analyzing my test clips, I didn't recognized these noisy ringing artifacts before but this explains pretty well why picture seems to be slightly sharper in AME. A question to this color range problem: How does your Avisynth-function handle this compared to AME? Is the range 16-255 compressed to 16-235 or does it simply cut the superbright parts? And, although it's not legal, if I want to keep these superbright parts, do I have to set parameters "LimitWhite, LimitBlack, LimitColor" to false?
In another post I read of your "softlimiter" function. Is it possible to combine this with hd2sd or is this unnecessary?
Another point: In the doc of hd2sd I found this:
parameter: OutputColorSpace
values: "RGB32", "RGB24", "YUY2", "YV12"
default: YV12This sets the output color space. This may need to be set for your encoder:
use "YUY2" for CCE or ProCoder
use "YV12" for HCEncoder or QuEnc
use "RGB24" for TMPEG, Adobe Media Encoder, Encore or output to RGB .avi
use "RGB32" for output to RGB .avi
I'm a little bit confused which color space is recommended for AME. RGB24 as stated above or YUV2 as you recommend at top of this post? I know this function was originally written for CS3 so I'm not sure which way would be best for CS4.
Copy link to clipboard
Copied
I'm a little bit confused which color space is recommended for AME
Well, so long as you limit the range to safe colors in AviSynth (which hd2sd does by default), it should make no difference (as far as I can tell). You might as well use YUY2, since it will make the Lagarith AVI a bit smaller. Using YUY2 wil also provide the option of keeping "unsafe" colors, while RGB will clip them entirely.
I want to keep these superbright parts, do I have to set parameters "LimitWhite, LimitBlack, LimitColor" to false?
Correct. However: It is unlikely that your camera records useful signal in the 0-16 luminance range, so any pixels in that range are probably anomalous anyway. I'd suggest leaving LimitBlack=true (default)
And, yes, hd2sd() just clips (limits) the ranges. Scaling the values would affect the overall contrast, which is not what we want here.
In another post I read of your "softlimiter" function. Is it possible to combine this with hd2sd or is this unnecessary?
Sure, it will work fine… The only downside is that if you are converting an edited sequence that contains RGB material (such as clips to which you have applied filters like Unsharp Mask, etc.). In this case, already "safe" highlights can get muted a little … but this should not be terribly noticeable anyway. (it would only affect a range of around 210 to 235, and only very slightly)
To use SoftLimiter, make sure that you are outputting YUY2 colorspace from hd2sd, then place SoftLimiter() at the end of the script:
hd2sd(LimitWhite=false, LimitColor=false, LimitBlack=false, OutputColorSpace="YUY2")
SoftLimiter()
Copy link to clipboard
Copied
Dan, does there exists an internet site of the HD2SD project where we can look for latest versions/patches?
@promter
Did you install avisynth correct and copied hd2sd files to the folders as described in the readme.txt? Use Vdub version 1.8.8 - would run more stable than previous versions.
Copy link to clipboard
Copied
@spreeni,
yes I installed all that and checked it. When I change something on the script to test, it gives me error messages like "bad script" or "invalid script" when I fix the script and try to open it, VD keeps going to "Not Responding"
Copy link to clipboard
Copied
I have never seen anything like that. For a quick test, try just loading the video without any processing using a simple script like this…
FFMpegSource("filename.m2v")
Does that work? If not, please tell me what OS you are running, computer specs, etc.
Also, take a look at the Processes in your Task Manager. Kill any "dead" VirtualDub processes that are still running (perhaps left behind by previous crashes).
Copy link to clipboard
Copied
With only that in the script, I get the following attached error: See JPEG Attachment.
Also,my video file name is: angiedepers.m2v
and the audio file is: thepote.wav
I changed the file names early this morning just because I thought that: Sequence 5.m2v and Sequence 5.wav were causing an issue but nope!
My computer speks are:
Dell
Inspiron i1720 Laptop
Rating: 3.4
Processor: Intle Core 2 Duo CPU T9300 @ 2.50 2.50
3gigs of ram
32bit OS
[EDIT]: Vista Home Premium