VFR (Variable Frame Rate) => CFR (Constand Frame Rate)

fifonik wrote on 3/28/2020, 6:02 PM

Usually I do not use VFR sources (from mobile), but in this case this was the only source and I want to keep it.

I knew that I can use HandBrake to re-encode to CFR and I did this.

However, when checked I realised that HandBrake just duplicated some frames to meet requirements.

 

Are there any way to convert VFR to CFR with some kind of interpolation?

Thanks.

 

P.S. At this time I'm playing with InterFrame2 AviSynth script. Looks good.

Last changed by fifonik

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

Comments

john_dennis wrote on 3/28/2020, 7:51 PM

Have you tried HOS Import Assist?

My VFR is iPhone which works OK in Vegas 17. I used Import Assist, though and, looking at the Compositing Difference there seemed to be some frames that were changed.

wwaag wrote on 3/28/2020, 8:33 PM

There are two ways to do this in HOS. As John mentioned, the easiest is to use the ImportAssist tool which does a pretty good job of footage from iPhones and Samsung Note9's, S8's or S9's (the only ones I've tested). No transcoding is involved so there is no loss of quality. It's also very quick. I just uploaded a demo of S9 VFR to CFR conversion in this thread https://www.vegascreativesoftware.info/us/forum/vegas-pro-16-major-problem--119396/#ca745191

The other is the FrameFixer tool in which you first find duplicate frames and then perform an interpolation using Avisynth's motion vector tools. There's a pretty detailed demo of the FrameFixer tool on the HOS website. Here's a screen grab.

Here's another demo of some Note 9 footage. https://tools4vegas.com/variable-frame-rate-demo/ Note that this was done about a year ago before creation of the FrameFixer tool which really simplifies searches for duplicate frames.

fifonik wrote on 3/28/2020, 9:22 PM

Thanks. I'm not using HOS at this time. Will try to install it and have a look.

Just curious, how is it possible to do without re-encoding when frames are interpolated?

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

wwaag wrote on 3/28/2020, 9:50 PM

Just curious, how is it possible to do without re-encoding when frames are interpolated?

If you resort to frame interpolation using FrameFixer or whatever other tool you find, then you would have to re-render. It's just that re-wrapping and conversion to CFR don't require transcoding. However, you would still re-render once editing is completed. Right? Rewrapping and conversion to CFR just avoids the initial transcoding when you import into Vegas.

fifonik wrote on 3/28/2020, 9:58 PM

I meant initial part. How it is possible to rewrap without transcoding? Even the simplest case that require adding duplicate frame require re-encoding.

P.S. For now I created bat file that I use for conversion required. I can publish it here if anyone interested in it. Unfortunately, it uses quite a few AviSynth dependances that should be installed manually.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

wwaag wrote on 3/28/2020, 10:06 PM

"How it is possible to rewrap without transcoding?" Re-wrapping just involves copying the videostream--nothing more. Transcoding re-renders the videostream and as such bring about some quality loss unless you use a lossless codec such as MagicYUV or UtVideo. Changing individual frames by any method would require transcoding.

fifonik wrote on 3/28/2020, 10:18 PM

If I understand correctly, 'rewrapping' is just changes the container and does not touch streams.

My question was -- is it possible to change VFR to CFR without altering streams?

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

wwaag wrote on 3/28/2020, 10:54 PM

"If I understand correctly, 'rewrapping' is just changes the container and does not touch streams."

Yes. Or, you can simply rewrap to the same container.

"My question was -- is it possible to change VFR to CFR without altering streams?"

Again, yes. The videostream itself is not changed--only the Presentation Time Stamp (PTS).