BUG - VP14 reads VirtualDub-rendered interlaced files as progressive

NickHope wrote on 12/23/2016, 3:04 AM

This zip file contains 4 clips. All were based on interlaced 1440-1080-60i HDV footage and were rendered with that same resolution, field order, and frame rate. They are:

  • MagicYUV rendered by Vegas Pro 13
  • MagicYUV rendered by VirtualDub
  • Cineform rendered by Vegas Pro 13
  • Cineform rendered by VirtualDub

The 2 files rendered by VirtualDub are correctly interpreted as interlaced by VP10, 12 and 13. However in VP14 they are wrongly interpreted as progressive. Tested in build 211.

This bug was discovered by GJeffrey (before build 211) and has been confirmed by me and Wwaag.

I did also try a DV render with the Cedocida codec and that was read correctly.

I submitted a support request about this, [Ticket#2016122617000734].

Comments

Quitter wrote on 12/23/2016, 5:01 AM

Maybe it is a problem of the files themselves?
MediaInfo interpreted the 2 Cineform-files also as progressiv:

Complete name                     : Vegas-vs-VirtualDub-interlaced-AVI\VirtualDub-HDV-Cineform.avi
Format                                   : AVI
Format/Info                            : Audio Video Interleave
File size                                : 16,9 MiB
Duration                                 : 1s 1 ms
Overall bit rate                       : 142 Mb/s
Director                                 : Nicholas Hope
Encoded by                           : Nicholas Hope
Writing library                        : VirtualDub build 35491/release
Copyright                               : Nicholas Hope

Video
ID                                       : 0
Format                                   : CineForm
Codec ID                               : CFHD
Codec ID/Info                         : CineForm 10-bit Visually Perfect HD (Wavelet)
Duration                                 : 1s 1 ms
Bit rate                                 : 142 Mb/s
Width                                    : 1 440 Pixel
Height                                   : 1 080 Pixel
Display aspect ratio               : 4:3
Frame rate                            : 29,970 (30000/1001) FPS
Scan type                              : progressiv
Bits/(Pixel*Frame)                  : 3.038
Stream size                            : 16,9 MiB (100%)

 

Complete name                     : Vegas-vs-VirtualDub-interlaced-AVI\VP13-HDV-Cineform.avi
Format                                   : AVI
Format/Info                            : Audio Video Interleave
File size                                : 17,4 MiB
Duration                                 : 1s 1 ms
Overall bit rate                       : 146 Mb/s
Director                                 : Nicholas Hope
Encoded by                           : Nicholas Hope
Copyright                              : Nicholas Hope
TCOD                                    : 0
TCDO                                   : 10010000

Video
ID                                       : 0
Format                                   : CineForm
Codec ID                                : CFHD
Codec ID/Info                         : CineForm 10-bit Visually Perfect HD (Wavelet)
Duration                                 : 1s 1 ms
Bit rate                                 : 146 Mb/s
Width                                     : 1 440 Pixel
Height                                   : 1 080 Pixel
Display aspect ratio               : 4:3
Frame rate                             : 29,970 (30000/1001) FPS
Scan type                               : progressiv
Bits/(Pixel*Frame)                   : 3.125
Stream size                             : 17,4 MiB (100%)

Camcorder: Sony CX 520 VE
Hardware:   Acer NG-A717-72G-71YD, Win 11 , i7-8750 H, 16GB, GTX 1060 6GB, 250GB SSD, 1TB HDD
NLE:  Sony Vegas Pro 13.0 Build 453
            Vegas Pro 14.0 Build 270
            Vegas Pro 21.0 Build 300

 

Grazie wrote on 12/23/2016, 5:22 AM

All were based on interlaced 1440-1080-60i HDV footage and were rendered with that same resolution, field order, and frame rate.

I trust Nick's observations - so maybe the BUG is somewhere else in the pipeline?

Interesting.

Grazie wrote on 12/23/2016, 5:23 AM

Q: Is VB used as part of the V2H? - I think it maybe . . .

NickHope wrote on 12/23/2016, 5:55 AM

Maybe it is a problem of the files themselves?
MediaInfo interpreted the 2 Cineform-files also as progressiv:

That's true, but despite that, the VP-rendered one gets correctly read as interlaced in all versions of Vegas, and pre-14 Vegas knows that the VirtualDub-rendered one isn't really progressive. So something has changed in how Vegas assesses the files. Pre-V14 Vegas was apparently interpreting the field-order of the file in a different way from MediaInfo. Maybe it's now interpreting it in the same way.

MediaInfo doesn't report anything about the field order of the MagicYUV renders. That might be because these were rendered with version 2 of the codec and MediaInfo doesn't know about that yet. But I believe this issue was also occurring with version 1 of the MagicYUV codec.

Q: Is VB used as part of the V2H? - I think it maybe . . .

I guess if the project properties are set correctly as interlaced, Vegas2Handbrake will behave itself correctly.

GJeffrey wrote on 12/23/2016, 6:21 AM

But I believe this issue was also occurring with version 1 of the MagicYUV codec.

MediaInfo doesn't report the field order even by using MagicYUV version 1 or even Uncompressed file. I guess that MediaInfo is reading the file header and avi file don't give much informations.

 

Marco. wrote on 12/23/2016, 7:06 AM

Vegas2HandBrake does not involve VirtualDub, signal passes through DebugMod Frameserver and AviSynth only.

Grazie wrote on 12/23/2016, 8:02 AM

Thanks Marco.

NickHope wrote on 1/4/2017, 1:30 AM

I had a reply from Vegas Support to the effect that the VirtualDub rendered files appear to be progressive. So, to concentrate on one of the 4 files from the zip file in the first post...

VirtualDub-HDV-Cineform.avi is read by the following as being progressive:

  • MediaInfo (both mine and Support's)
  • My VP14
  • Support's VP14
  • Support's VP13

But it's read by the following as being interlaced:

  • My VP13
  • My VP12
  • My VP10

Particularly strange that mine and Support's VP13 are reading the file differently. Perhaps that's due to a different version of the Cineform codec?

So in an attempt to establish if the file actually is interlaced or not, I made the following AviSynth script (separate-fields.avs):

AviSource("E:\VirtualDub-HDV-Cineform.avi")
separatefields()

I then opened that script in VirtualDub and stepped through the file frame by frame with the right arrow key. This is what I see:

I think that movement between every frame proves the file really is interlaced, and so the 4 things in the first list are all interpreting the file incorrectly. Right?

(All informed input greatly appreciated as this issue is starting to drive me a little insane!)

NickHope wrote on 1/4/2017, 1:39 AM

These are the codec versions I have installed:

  • GoPro CineForm Codec - CFHD.dll - v9.2.1.690
  • MagicYUV - RGB - magicyuv.dll - v1.9.9.0
GJeffrey wrote on 1/4/2017, 2:25 AM

I have exactly the same result as you 9both in VP13 and VP14) using your files.

I have MagicYUV version 1.9.9.0 and Cineform version 9.2.1.690 as well.

Screenshot of your Vdub files played in MPC-HC Version 1.7.10 x64. Both Cineform and MagicYUV show the same issue, so I don't bother putting screenshot for both files (made with Vdub).

Playing without deinterlacer

Deinterlace artifacts are clearly visible.

Playing with deinterlace shader (blend)

Blurry result as expected but no more interlaced artifacts.

Preview in VP13

Preview in VP14

It speaks by itself

And last but not least, the project properties (automatically set by Vegas during import)

VP13

VP14

The aspect ratio is also detected differently with the same file.

So there is definitely something wrong with the way VP14 decode those files.

 

NickHope wrote on 1/4/2017, 3:08 AM

Thank you.

I don't think the pixel aspect ratio (PAR) is flagged/stored within AVI files. I think VP13 (and earlier) may just have been making an intelligent guess that the PAR should be set to 1.3333 if the file has 1080x1440 resolution (and perhaps it looks at frame rate too). And so VP14 is not necessarily "wrong" to set the PAR to 1.0.

Marco. wrote on 1/4/2017, 5:21 AM

For certain kind of media such data is defined in the file "Vegas profiles.ini" which you could find at "C:\ProgramData\VEGAS\VEGAS Pro\14.0". Seems like there's been changes for VP14.

GJeffrey wrote on 1/4/2017, 5:33 AM

I don't think the pixel aspect ratio (PAR) is flagged/stored within AVI files. I think VP13 (and earlier) may just have been making an intelligent guess that the PAR should be set to 1.3333 if the file has 1080x1440 resolution (and perhaps it looks at frame rate too). And so VP14 is not necessarily "wrong" to set the PAR to 1.0.

Based on your video file, I prefer PAR 1 though, 1.1 should be perfect 😀

NickHope wrote on 1/4/2017, 5:49 AM

For certain kind of media such data is defined in the file "Vegas profiles.ini" which you could find at "C:\ProgramData\VEGAS\VEGAS Pro\14.0". Seems like there's been changes for VP14.

Thanks Marco. Fascinating. I never knew about this file! However on my system these 2 files are identical:

  • C:\ProgramData\Sony\Vegas Pro\13.0\Vegas profiles.ini
  • C:\ProgramData\VEGAS\VEGAS Pro\14.0\Vegas profiles.ini

The VirtualDub-rendered files match the requirements for Key10 in that file. i.e.:

  • File IO CLSID is "anything" (wildcard 0)
  • Subformat is "None"
  • Size X is 1440
  • Size Y is 1080
  • Frame Rate is 29.97
  • Color Bit Depth is "anything" (wildcard 0)

So therefore it should be assigned the following attributes:

  • Field Order = "Upper First"
  • Pixel Aspect Ratio = 1.3333333333
  • Alpha Channel Interpratation = "Undefined"
  • Gamma = 1

But in VP14, that's not happening.

NickHope wrote on 1/4/2017, 5:52 AM

Based on your video file, I prefer PAR 1 though, 1.1 should be perfect 😀

The food on that boat really was very very good! 🍔🍕🍽🍜🍉

John_Cline wrote on 1/4/2017, 2:09 PM

There is no mechanism in an AVI file to define aspect ratio or field order (except in the case of DV files.) If you place a clip on the timeline and go to Properties and then the Media tab, next to 'Stream" you will see a disk icon, set the parameters of your AVI file correctly and then click on the disk icon to save the profile. Next time Vegas encounters an AVI file using that codec, frame size and frame rate, it will apply the saved parameters for aspect ratio and field order.

GJeffrey wrote on 1/4/2017, 8:16 PM

There is no mechanism in an AVI file to define aspect ratio or field order (except in the case of DV files.) If you place a clip on the timeline and go to Properties and then the Media tab, next to 'Stream" you will see a disk icon, set the parameters of your AVI file correctly and then click on the disk icon to save the profile. Next time Vegas encounters an AVI file using that codec, frame size and frame rate, it will apply the saved parameters for aspect ratio and field order.


Thanks John, nice tip.

But, if I deinterlace the same file, it's now interpreted as interlaced in VP14 & VP13.

Do you know how to revert back to the original configuration?

 

I have also tried those Cineform files in Resolve. The one created by VP13 can be read, the one by Vdub can't...

NickHope wrote on 1/4/2017, 9:48 PM

...If you place a clip on the timeline and go to Properties and then the Media tab, next to 'Stream" you will see a disk icon, set the parameters of your AVI file correctly and then click on the disk icon to save the profile. Next time Vegas encounters an AVI file using that codec, frame size and frame rate, it will apply the saved parameters for aspect ratio and field order.

Thanks John! That's new to me. It works as you say for both the Cineform and MagicYUV files rendered by VirtualDub.

Do you know how to revert back to the original configuration?

Just repeat the process, setting it back to progressive field order and 1.0 PAR then click the save icon. Worked for me.

I'm curious where these user stream properties settings are stored. Did a brief search and couldn't find it.

I have also tried those Cineform files in Resolve. The one created by VP13 can be read, the one by Vdub can't...

Perhaps worth mentioning on their forum.

GJeffrey wrote on 1/4/2017, 9:55 PM

Do you know how to revert back to the original configuration?

Just repeat the process, setting it back to progressive field order and 1.0 PAR then click the save icon. Worked for me.

The problem is by doing that, both VP13 and VP14 read the files as progressive after.

NickHope wrote on 3/4/2017, 2:50 AM
I'm curious where these user stream properties settings are stored. Did a brief search and couldn't find it.

I had a reply from Support that these user stream properties are stored here:

C:\ProgramData\VEGAS Pro\14.0\Vegas Profiles.INI

Here's what mine currently contains:

[Video Media Profiles]
Key1={EA9D287B-C85A-11D3-BB3A-0050DA1A5B06}, "None", 1440, 1080, 29.970030, 32
Attributes1="Upper First", 1.333333, "None", 0.000000
Key2={EA9D287B-C85A-11D3-BB3A-0050DA1A5B06}, "None", 1440, 1080, 29.970030, 32
Attributes2="Progressive", 1.000000, "None", 0.000000
Key3={EA9D287B-C85A-11D3-BB3A-0050DA1A5B06}, "None", 1440, 1080, 29.970030, 32
Attributes3="Upper First", 1.333333, "None", 0.000000
Key4={EA9D287B-C85A-11D3-BB3A-0050DA1A5B06}, "None", 1440, 1080, 29.970030, 24
Attributes4="Upper First", 1.333333, "None", 0.000000

So they could be manually edited if one wishes.