15 Replies Latest reply on Mar 7, 2012 12:50 PM by danoanh1

    Problem with HD2SD workflow - VirtualDub crashes

    Marcus Koch Level 1

      I tried to follow Dan's and Jeff's HD to SD workflow using HD2SD. The possible results are much better than the Premiere conversion, but I have problems with VirtualDub that is crashing. All the components were installed according to the video of Jeff Bellune (I hope I didn't mess up).


      My system runs on Windows 7 64-bit, Intel i7 CPU, 12 GB memory, Quadro 4000 graphics card. I'm still running CS5.03, because I want to finish my current project before updating. I further have the AXIO LE (actuall drivers) installed.


      Here are my steps:


      My footage is HD422 and HD-EX material from a PDW700 and an EX-3. It is recorded in 1080i50. My timeline is a Matrox HD1080 timeline.


      Step 1. Export MPEG I-frame


      Using AME I'm exporting an MPEG I-frame clip "Classes-I.m2v" + "Classes-I.wav" with the following settings:


      Encoder: Main Concept,

      Multiplexer: none,

      Quality: 5,

      TV Standard: PAL,

      Frame Size: 1920x1080,

      Frame Rate: 25fps,

      Field Order: Upper,

      Pixel Aspect Ratio: Square,

      Profil: 4:2:2, Level: High,

      Render at Maximum Depth: off,

      Bitrate Encoding: CBR,

      M/N Frames: 1,

      Color Primaries: ITU-R. Rec. 709,

      Use Maximum Render Quality: off


      Question: Are there any benefits or disadvantages using the Matrox I-frame codec instead?


      Step 2: GDIndex

      I now generate the 2dv file "Classes-I.2dv" with DGIndex. The Information window shows Interlaced format with BT.709.


      Step 3: AVISynth script

      I created the following AVISynth script "Classes.avs":

      SetMTMode (2,0)


      hd2sd(Interlaced=true, OutputFieldRate=50, OutputColorSpace="RGB32")


      According to the hd2sd info text file I set RGB32 to encode within Encore.

      I also tried to use "YUY2" to encode with ProCoder 3.


      Step 4: Creating SD file

      I open VirtualDub 32-bit.

      For "Compression" I select Lagarith, RGB(default), Multithreaded

      I open "Classes.avs" and select "Save as AVI".

      VirtualDub starts to encode for a fraction of a second (18 frames) and then crashes with kernelbase. I added the thread call stack at the end of this post.


      Crash reason: Unhandled Microsoft C++ Exception

      Crash context:
      An exception occurred in module 'KERNELBASE'.


      I'm able to render with the lagarith codec from AME. For testing VirtualDub I tried to encode to the Matrox DV codec. It crashed, too, but this time at frame 19. I was able to choose the RGB uncompressed mode to render with VirtualDub, but it didn't work after the lagarith crash. I had to restart the system. Restarting VirtualDub didn't help.


      Can anybody tell me how I can get VirtualDub to work with the lagarith codec or something else?


      Step 5:

      The resulting SD-AVI file with the RGB uncompressed codec looks sharp and good, but on fast movements it seems to have a smear effect (played with Media player). When I check it with GSpot it doesn't indicate any upper or lower fields.Can it be that the file was rendered progressive? GSpot shows 25 fps. Loading the file into Premiere it shows No fields (Progressive Scan), too. I assume that the fields are just copied in one frame.


      I created the MPEG2 DVD file once with Procoder and once with AME from Premiere (I used both times the file with the RGB color space to limit the testing work, since the main problem is sharpness and motion. The hd2sd info file recommends YUY2 for ProCoder. I will test this later.)


      When I drag the AVI file into Procoder it shows lower fields first, but I can choose different options. To keep the field order of the source material I chose manually upper field and set the aspect ratio of the source to 16:9. As the target I chose MPEG2-DVD mastering quality. Here the field order shows upper field first. I can't change the setting in Procoder. The ratio is set to 16x9 again. The result looks good and the movement is smooth.


      To compare I also created a MPEG2 DVD file with AME from Premiere. Since the Interprete Footage dialog showed Progessive I switched it manually to Upper Fields. The resulting movement is fine, but the image was blurry again! I played around with Max Render and Max BitDepth. I have to do the test agains. There must be an error. It seemed that I needed to set only one of them to get pretty good results, but it didn't matter wich one. Since I have a GPU supported card it should not matter if Max Render is selected or not.


      Besides Media Player I tried to compare the files in VLC, too. In VLC the videos show in general more motion artifacts, but it might be just VLC deinterlacing. Can anybody recommend me a good player? Should I drop the files into Premiere and whatch them on my JVC broadcast monitor via the Matrox output to get the best comparison?



      I also saw that DebugMode FrameServer is now available in 64-bit. Does the DGIndex workflow has any other advantage than just being faster in the sum? I would prefer the to use the FrameServer, instead of the MPEG-I workflow since it would eliminate the space required for the interim file? I can let the system render over night when I don't use it.


      Thanks for any help.




      [Please do not post crash logs]


      Windows UAE:

      Problem signature:
        Problem Event Name: APPCRASH
        Application Name: VirtualDub.exe
        Application Version:
        Application Timestamp: 4d150e35
        Fault Module Name: KERNELBASE.dll
        Fault Module Version: 6.1.7601.17514
        Fault Module Timestamp: 4ce7bafa
        Exception Code: e06d7363
        Exception Offset: 0000b727
        OS Version: 6.1.7601.
        Locale ID: 1031
        Additional Information 1: 6e2c
        Additional Information 2: 6e2c5b7dda76ef819de36e144d50d576
        Additional Information 3: 9a96
        Additional Information 4: 9a968b4f6589cce1e779aaaf6506f518

        • 1. Re: Problem with HD2SD workflow - VirtualDub crashes
          Marcus Koch Level 1

          Hi, I got more strange behaviour from VirtualDub. Suddendly the conversion with Lagarith worked. When I tried to save again with a new file name it crashed again. I first had the assumption that it mattered if the program window is on the left or the right monitor, but after a few more test I got one more run and some more crashes. Interestingly those were now not always at the bginning, but at verious points into the video.



          • 2. Re: Problem with HD2SD workflow - VirtualDub crashes
            Marcus Koch Level 1

            I removed the SetMTMode line from the script. The conversion runs slower, but fine now. Are there any know bugs or workarounds?



            • 3. Re: Problem with HD2SD workflow - VirtualDub crashes
              Jeff Bellune Level 5

              What versions?







              I just did a successful conversion to Lagarith AVI with 1080i60 source footage.


              Dan specifically recommends RGB24, not RGB32, for Encore.

              Lagarith is at version 1.3.25

              I used version 1.5.7 of DGMPGDec

              I used version 2.5.7 of AviSynth

              hd2sd should be dated 15 January, 2010.


              I do not have the Matrox codecs installed.  I would recommend uninstalling them as they caused significant problems with Pr and other things on my system.  NB: I don't have any Matrox hardware installed, either.


              Two workarounds exist that I have used with MT:
















              EDIT: Since you have Matrox stuff installed, some or none of the tools may work properly, or work at all.  You may want to consider sticking to an all-Matrox workflow.  I've never used or tested anything Matrox.

              1 person found this helpful
              • 4. Re: Problem with HD2SD workflow - VirtualDub crashes
                Marcus Koch Level 1

                Hi Jeff, thanks for your reply.


                Lagarith is at version 1.3.25 (the same)

                I used version 1.5.8 of DGMPGDec (newer than yours)

                I used version 2.5.8 of AviSynth (newer than yours)

                hd2sd is dated 15 January, 2010 (the same)


                I can't deinstall the Matrox codecs now, because I created a Matrox sequence. I wanted to deinstall the card after this project is finished. The new Axio 5 drivers actually don't do much work anymore. The Matrox card becomes mostly an I/O card. Things are pretty much done by the Premiere Mercury engine now. Also the export from Premiere works fine. My problem is with VirtualDub. At this step there is no Premiere/Matrox involved anymore. I will try the workarounds.


                I heard that FrameServer is available as a 64-bit plugin now. I couldn't find the link. Can you tell me where I can download it?



                • 5. Re: Problem with HD2SD workflow - VirtualDub crashes
                  Jeff Bellune Level 5

                  There apparently are 2 versions now: the one I am using is a dev version of the "Advanced FrameServer", which grew out of Satish's original open-source code.  I've heard of, but not tested, a 64-bit version of the DebugMode Frameserver.  I haven't even tried looking for it yet.


                  When the Advanced FrameServer is released, links will be posted in the appropriate topic in the Video Lounge:




                  1 person found this helpful
                  • 6. Re: Problem with HD2SD workflow - VirtualDub crashes
                    Marcus Koch Level 1

                    Hi Jeff,


                    I tried this option and it worked:







                    I converted the resulting SD-AVI file with ProCoder 3.06 (works on Win7). I also tried to convert the I-frame MPEG2-file directly in ProCoder into MPEG2-DVD with the same MPEG-settings (2 pass, master quality, target 5952, max 8000). The direct conversion with ProCoder shows several differences, but overall looks better. I loaded all files, plus the original HD and the I-frame clips into Premiere, set them on the same frame and compared in the source window. I will setup my broadcast monitor later and compare again via the Matrox HD-SDI output.



                    The SD-AVI image produced by hd2sd cuts of a view lines from the top and the bottom. I assuem this is by the different format ratios between SD and HD.

                    The I-frame/Procoder workflow keeps the whole image in the SD frame and therefore squeezes the image vertically a little bit. I think this is bad. I can set a filter in ProCoder that crops the image. Jeff, do you off hand know how much it would be?



                    The result of the hd2sd workflow looks OK, but you can see that detail is lost. Cloth looks more flat. Interestingly the colors luck more vibrant, which creates part of the flat surface luck.

                    the ProCoder image has more detail, but has a little bit less vibrance.


                    Overall Sharpness/Artifacts:

                    It is hard to tell, because of the different color vibrances, but the sharpness is similar. The MPEG artifacts are less visible in the ProCoder workflow.


                    Jeff, can you tell me if there is anything I can do to get the colors match more the original? It seems that the I-frame ProCoder route is easier and faster. Is there a tool that can tell me the color space that is used in a video?



                    • 7. Re: Problem with HD2SD workflow - VirtualDub crashes
                      Jeff Bellune Level 5

                      From the hd2sd text file:


                      Crops when needed for optimal apect ratio conversion while using all visible pixels.   On normal HD -> SD conversions, this will crop 14 pixels from the top and bottom of a 1080 HD source [10 from a 720p source] prior to scaling


                      MediaInfo will show you the color space and the chroma sub-sampling.


                      As for the rest, I'd just go with the workflow that produces the results you like best.



                      • 8. Re: Problem with HD2SD workflow - VirtualDub crashes
                        Jim_Simon Level 8
                        The possible results are much better than the Premiere conversion


                        Have you tried exporting out of CS5 or 5.5 yet?  Dan wrote the script because 4.0 didn't do a very good job at scaling.  5 and 5.5 have gotten much better at it.

                        • 9. Re: Problem with HD2SD workflow - VirtualDub crashes

                          I've have recently tried the HD to SD conversion in PP5.... In my opinion the quality is still lacking.  I'm doing a few more tests to confirm to make sure its not a perceptual issue related to the source content.  Should have more info later today.

                          • 10. Re: Problem with HD2SD workflow - VirtualDub crashes
                            Marcus Koch Level 1

                            Hi Jim,


                            I tried to export directly from CS 5.03. Since the introduction of the Max Render Setting in CS4.x the result is not as bad anymore, but still not sufficient. I haven't tried CS 5.5, yet, but I didn't hear that there is any improvement in HD to SD converstion.


                            I just found this Adobe blog last week:



                            Using a supported GPU card improves the scaling quality, so I bought a Quadro 4000. Still the result is not good. The picture looks still too blurry. If you use the hd2sd workflow or what I did using a MPEG I-frame/ProCoder workflow the quality is visually better and sufficient for me. I read that the bad HD to SD conversion in Premiere is also a problem of color space conversion,  aspect ratio conversion and a bad deinterlacer. I don't know how much is still true. It might be that Premiere CS 5 works fine using progressive footage, but still not with interlaced footage. Does anybody has some insight or did some more testing, yet?


                            I attended a road show regarding CS5.5 in Germany last week. I talked to Adobe employees and was very suprised that they had no idea about the HD to SD problems.



                            • 11. Re: Problem with HD2SD workflow - VirtualDub crashes
                              Jim_Simon Level 8
                              CS 5 works fine using progressive footage, but still not with interlaced footage.


                              Ah.  I've only worked with progressive myself.

                              • 12. Re: Problem with HD2SD workflow - VirtualDub crashes
                                Marcus Koch Level 1

                                Hi Jim,


                                did you do some more testing already?


                                I did some more tests and compared them on my HD and SD broadcast monitors. It seems that something went wrong in the first test series. I assume that I had the focus in the source window when I called AME with strg+M. So the displayed MPEG was encoded again. This time AME did a good job.


                                My footage is HD422 and XDCAM EX material. I started with 1080i50 material that I have on a Matrox timeline. (I didn't test it against a Premiere timeline due to time constraints, the fact that I needed the Matrox timeline to preview the result on the HD and SD monitors, and because my project sits in a Matrox timeline anyway. Since CS5 the Matrox card mainly acts as an in/out board.) The testing footage has a light yellow wall, wirth chairs in front of it and framed pictures, or a white wall with white curtains. Both times people were dancing wearing bright blue and pink tops or dark suits and dotted dresses.



                                a) use AME to directly render MPEG-2 DVD (max bit depth, same quality settings as mastering quality in ProCoder: 2-pass, target 5.92, max 8, )

                                b) render I-frame MPEG-2 file, convert with hd2sd, convert with AME into MPEG-2 DVD (quality settings as in a))

                                c) render I-frame MPEG-2 file, convert with hd2sd, convert with ProCoder 3 into MPEG-2 DVD (mastering quality)

                                d) render I-frame MPEG-2 file, convert with ProCoder 3 into MPEG-2 DVD (mastering quality)


                                I can't really see any difference in the image quality between the four versions. The difference I see is in color. AME produces source true colours. The MPEG-2 DVD files produced with ProCoder have more saturated colors. I was able to replicate the effect with an increase of saturation to 120% and making the Master curve a bit steeper.


                                Comparing the a) and b) showed practically no difference. I could see a very slight differences on metallic highlights, but nothing to justify the extra work and time. With hd2sd I produced a YUY and a RGB32 AVI-file that I converted with AME. There was no difference in the resulting colors.


                                So using a GPU produces sufficient results for HD to SD conversion.



                                • 13. Re: Problem with HD2SD workflow - VirtualDub crashes
                                  Marcus Koch Level 1

                                  Hi Jim,


                                  have you been able to do some testing?



                                  • 14. Re: Problem with HD2SD workflow - VirtualDub crashes
                                    Jim_Simon Level 8

                                    I actually wasn't planning on doing any more.  At least not yet.  The 24p footage I generally work with gets exported just fine through PP.  I don't see the need for Dan's script.

                                    • 15. Re: Problem with HD2SD workflow - VirtualDub crashes

                                      Hi guys,


                                      I am trying to use the hd2sd but failing in doing so for some reason.


                                      I have tried to load the script identical to Jeff's tutorial but when i open up the avs script on virtual dub it says source error: there is no function called "hd2sd"


                                      I have placed the hd2sd in the avisynth2.5/plugins folder and cannot understand why it won't work?


                                      I have tried using without hd2sd - and my other question is will the hd2sd make a bigger difference than






                                      Your help is much appreciated.... losing my mind....