Interlacing question... once more unto the breach..

Hulk wrote on 12/26/2021, 6:49 PM

With the move to UHD we're almost at the end of the interlacing nightmare. But alas there is always a clip here or there from an old camera that splits the frames! I think this clip is from my Canon HF M500 camcorder. Right as the motorcycle drives (about 15 seconds) by the camera close up you will see very noticeable interlacing in the Vegas timeline. I have found no good way to put those frames back together so I just leave the properties set to "progressive" and the interlacing method to "None" and let the playback device deal with it.

It's strange. When viewed in Vegas it shows the deinterlacing artifacts quite strongly. But when that clip is played natively in Potplayer whatever deinterlacing method Potplayer is using cleans it up nicely, even in stills with Potplayer paused. Can anyone give me some insight into what is going on here and how best to deal with clips like this in Vegas?

Yes, that's my daughter and I know she should have a real motorcycle helmet on. Just riding in the backyard under my supervision.

Here's a link to the clip I'm referencing: https://www.dropbox.com/s/q8518yci0i9b3ft/72%20-%20Video%20-%20-11-01-18-16-19.mp4?dl=0

Any insights appreciated.

Mark

Comments

john_dennis wrote on 12/26/2021, 7:45 PM

@Hulk

Download and look at this.

https://drive.google.com/drive/folders/12vE9qm4WzJ0aebejFhfkiBfZk73hBQE3?usp=sharing

If you like it, I'll 'splane how it's done.

Hint: Happy Otter Scripts

Hulk wrote on 12/26/2021, 8:43 PM

Okay I'm very curious? How'd you do that?! I have Happy Otter Scripts BTW.

Thanks for taking the time to check it out.

john_dennis wrote on 12/26/2021, 10:04 PM

@Hulk

Stop the presses! Hold the phone!

You don't need to deinterlace that video. The issue is that your media is variable frame rate. Vegas doesn't handle VFR that well. That's why the FFMPEG based apps fix the problem. You could run it through Handbrake and convert to CFR with good results.

If you would rather use Happy Otter Scripts, Wayne show you how to do it here:

https://vimeo.com/414271488/b80168621d

Here are my Import Assist results with your file.

Hulk wrote on 12/26/2021, 10:47 PM

Thank you so much for figuring this out. First, I was wrong about the camera that created that video. It came from my Google Pixel 2 phone.

Also simply by right-clicking the clip properties and selecting "Conform to Project Frame Rate" the issue is resolved. Once you clued me in to the fact that it was a variable frame rate video I started looking around

Very interesting. I'm thinking to wrap my head around why Vegas would play this variable frame rate video with a double image in the first place. Somehow Vegas is expecting a frame to be where it is not and is superimposing two frames on top of each other. I still can't figure it out exactly as it seems like the same clip would need to be in two different tracks offset by 1 frame with 50% opacity. Or that is how Vegas' render engine is interpreting the clip.

Thanks so much!

Mark

john_dennis wrote on 12/26/2021, 11:59 PM

@Hulk

Glad you got it figured out.

Former user wrote on 12/27/2021, 4:55 AM

See if this help.

@lan-mLMC Today in almost 2022, to de-interlace video there really is only 1 option, and that is QTGMC, it's the best way of not throwing out data in a high quality conversion, go from 60 fields to 60 full and unique frames. It used to be really technical but now there are GUI's where you load your video and press go. There's also commercial AI based stuff too that create the 60fps output. No idea if it's noticeably better

Reasons for doing this is feeding into NLE's for a progressive render instead of using Vegas's lower quality options and also you should never upload interlaced video to YT, as it does the 30fps conversion to progressive throwing away data

wwaag wrote on 12/27/2021, 11:46 AM

HOS currently supports QTGMC in a number of its tools including Render+, AviDub, and ImportAssist. For importing interlaced footage into Vegas, use of ImportAssist is the best option since it supports de-interlacing before adding media to the timeline. While ImportAssist and Render+ only support selection of presets, AviDub provides complete command line access which is extremely useful for restoration work with SD materials such as DV or Hi8.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

john_dennis wrote on 12/27/2021, 12:30 PM

Mark went down the rabbit hole when he tried to deinterlace media that was not interlaced. The real issue here is variation in frame rate of the source media compared to the Project Frame Rate.

Mediainfo of Mark's Source

General
Complete name                            : C:\Users\John\Desktop\Deinterlace Me\72 - Video - -11-01-18-16-19.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42)
File size                                : 99.9 MiB
Duration                                 : 38 s 46 ms
Overall bit rate                         : 22.0 Mb/s
Encoded date                             : UTC 2018-11-01 20:19:43
Tagged date                              : UTC 2018-11-01 20:19:43
xyz                                      : +40.0876-074.6897/
com.android.version                      : 9

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 1 frame
Format settings, GOP                     : M=1, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 38 s 35 ms
Bit rate                                 : 21.9 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 30.000 FPS
Minimum frame rate                       : 29.654 FPS
Maximum frame rate                       : 30.447 FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.352
Stream size                              : 99.5 MiB (100%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : UTC 2018-11-01 20:19:43
Tagged date                              : UTC 2018-11-01 20:19:43
Color range                              : Full
Color primaries                          : BT.601 PAL
colour_primaries_Original                : BT.601 NTSC
Transfer characteristics                 : BT.709
transfer_characteristics_Original        : BT.601
Matrix coefficients                      : BT.601
mdhd_Duration                            : 38035
Codec configuration box                  : avcC

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 38 s 46 ms
Duration_FirstFrame                      : 51 ms
Bit rate mode                            : Constant
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 445 KiB (0%)
Title                                    : SoundHandle
Language                                 : English
Encoded date                             : UTC 2018-11-01 20:19:43
Tagged date                              : UTC 2018-11-01 20:19:43
mdhd_Duration                            : 38046

For variations in frame rate of this magnitude, Mark's solution to Conform to Project Frame Rate for the media on the Vegas 19-458 timeline produces the same correction inside Vegas Pro as external applications.

I'm curious to know how much frame rate variation Vegas can accommodate. Like all good researcher projects, one discovery just leads to more questions...

@Hulk @wwaag @Former user @lan-mLMC

Hulk wrote on 12/27/2021, 1:40 PM

I didn't know there was such a thing as variable frame rate. Well, not since the hand crank camera's back in the early 20th century anyway. The conform to project action seems to set the frame rate ratio at 0.999 and that fixes the ghosting problem that I mis-identified at interlacing artifacts.

wwaag wrote on 12/27/2021, 9:02 PM

The issue was not the fact that it was variable frame rate, but rather a different frame rate--30 rather than 29.97. Hence the conforming frame rate ratio of .999.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Former user wrote on 12/27/2021, 9:11 PM
 

For variations in frame rate of this magnitude, Mark's solution to Conform to Project Frame Rate for the media on the Vegas 19-458 timeline produces the same correction inside Vegas Pro as external applications.

I'm curious to know how much frame rate variation Vegas can accommodate. Like all good researcher projects, one discovery just leads to more questions...

@Hulk @wwaag @Former user @lan-mLMC

@john_dennis Check using your Vegas, but I think conforming to 30fps jumps 501?

if you go frame by frame in that region, there is an unnatural jump in the position of the motorbike

So I guess for perfection you would want to do the VFR to CFR conversion?, but in this example it hardly matters

john_dennis wrote on 12/27/2021, 11:13 PM

"The issue was not the fact that it was variable frame rate, but rather a different frame rate--30 rather than 29.97. Hence the conforming frame rate ratio of .999."

@wwaag is correct that the issue is the difference between the Project Frame Rate (29.97FPS) and the media frame rate (30FPS). The variation from 30 FPS displayed by Mediainfo appears to have no effect on the rendered output if one uses a 30 FPS Project Frame Rate and renders to 30 FPS. I observed zero difference frames when putting the rendered output back on the timeline..

john_dennis wrote on 12/27/2021, 11:38 PM

"Check using your Vegas, but I think conforming to 30fps jumps 501?

if you go frame by frame in that region, there is an unnatural jump in the position of the motorbike."

@Former user

Conforming the original source to the Project Frame Rate (29.97) within Vegas and rendering to a 30 FPS Magic YUV RGBA AVI, I observed zero defects comparted to the source video on the Vegas timeline.

"So I guess for perfection you would want to do the VFR to CFR conversion?"

I've concluded the VFR to CFR conversion is not necessary or desirable for this source video. Changing the Playback Rate by "Conform to Project Frame Rate" is the right step.

john_dennis wrote on 12/27/2021, 11:39 PM

I'm still curious about wider variations from the stated frame rate, though.

Former user wrote on 12/28/2021, 12:56 AM

 

"Check using your Vegas, but I think conforming to 30fps jumps 501?

if you go frame by frame in that region, there is an unnatural jump in the position of the motorbike."

@Former user

Conforming the original source to the Project Frame Rate (29.97) within Vegas and rendering to a 30 FPS Magic YUV RGBA AVI, I observed zero defects comparted to the source video on the Vegas timeline.

@john_dennis I replicated what you did, actually rendering the video, and I still have the problem with no frame 501, there's a jump there instead, it's the only problem I see with the entire video. Can you confirm you see this frame on your vegas timeline or in your rendered video?

If you do see it, no need to explain again, I thank you for your previous effort , i'll have a sleep and look at it again

As for playback and VFR, Vegas seems more sensitive than most. The NVENC example. Even when mediainfo says it is CFR I think there's enough variability that it causes timeline playback problems compared to transcoding the NVENC version to x264. The problems seen in scrubbing and smoothness of playback over edit points

john_dennis wrote on 12/28/2021, 1:38 AM

Yes, I have a frame 501.

Former user wrote on 12/28/2021, 6:25 AM

@john_dennis It looks like a GPU decoder bug, did you have GPU decode on, if so which decoder?

I am using Nvidia GPU decoder which works fine on everything but Vegas Pro. This is one of those sinister bugs, reducing quality of your work, but often you'd completely miss it. For this video though frame 501 is the only problem.

Yelandkeil wrote on 12/28/2021, 8:34 AM

 

I find that deactivate this item is much better for VFR-clips.

ASUS TUF Gaming B550plus BIOS3202: 
*Thermaltake TOUGHPOWER GF1 850W 
*ADATA XPG GAMMIX S11PRO; 512GB/sys, 2TB/data 
*G.SKILL F4-3200C16Q-64GFX 
*AMD Ryzen9 5950x + LiquidFreezer II-240 
*XFX Speedster-MERC319-RX6900XT <-AdrenalinEdition 24.12.1
Windows11Pro: 24H2-26100.4061; Direct3D: 9.17.11.0272

Samsung 2xLU28R55 HDR10 (300CD/m², 1499Nits/peak) ->2xDPort
ROCCAT Kave 5.1Headset/Mic ->Analog (AAFOptimusPack 6.0.9403.1)
LG DSP7 Surround 5.1Soundbar ->TOSLINK

DJI Mini4 Pro + DC-GH6/H-FS12060E: HLG4k60p
HERO5: ProtuneFlat2.7k60pLinear (WB=4800K, Shutter=auto, ISO=800)

VEGASPro22 + XMediaRecode/Handbrake + DVDArchi7 
AcidPro10 + SoundForgePro14.0.065 + SpectraLayersPro7 
K-LitecodecPack17.8.0 (MPC Video Renderer for HDR10-Videoplayback on PC) 

john_dennis wrote on 12/28/2021, 12:31 PM

@Former user

"...did you have GPU decode on, if so which decoder?"

Former user wrote on 12/28/2021, 4:57 PM

 

I find that deactivate this item is much better for VFR-clips.

@Yelandkeil Thanks for that input, YES indeed that works, I now have frame 501 with GPU decode. It looks like that should be unticked by default, not ticked