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 X1500 + Panasonic X920 + GoPro Hero 11 Black

Desktop: MB: MSI B650P, CPU: AMD Ryzen 9700X, RAM: G'Skill 32 GB DDR5@6000, Graphics card: MSI RX6600 8GB, SSD: Samsung 970 Evo+ 1TB (NVMe, OS), HDD WD 4TB, HDD Toshiba 4TB, OS: Windows 10 Pro 22H2

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

Author of FFMetrics and FFBitrateViewer

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.

Last changed by wwaag on 3/28/2020, 9:13 PM, changed a total of 2 times.

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.

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 X1500 + Panasonic X920 + GoPro Hero 11 Black

Desktop: MB: MSI B650P, CPU: AMD Ryzen 9700X, RAM: G'Skill 32 GB DDR5@6000, Graphics card: MSI RX6600 8GB, SSD: Samsung 970 Evo+ 1TB (NVMe, OS), HDD WD 4TB, HDD Toshiba 4TB, OS: Windows 10 Pro 22H2

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

Author of FFMetrics and FFBitrateViewer

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.

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.

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 X1500 + Panasonic X920 + GoPro Hero 11 Black

Desktop: MB: MSI B650P, CPU: AMD Ryzen 9700X, RAM: G'Skill 32 GB DDR5@6000, Graphics card: MSI RX6600 8GB, SSD: Samsung 970 Evo+ 1TB (NVMe, OS), HDD WD 4TB, HDD Toshiba 4TB, OS: Windows 10 Pro 22H2

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

Author of FFMetrics and FFBitrateViewer

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.

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.

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 X1500 + Panasonic X920 + GoPro Hero 11 Black

Desktop: MB: MSI B650P, CPU: AMD Ryzen 9700X, RAM: G'Skill 32 GB DDR5@6000, Graphics card: MSI RX6600 8GB, SSD: Samsung 970 Evo+ 1TB (NVMe, OS), HDD WD 4TB, HDD Toshiba 4TB, OS: Windows 10 Pro 22H2

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

Author of FFMetrics and FFBitrateViewer

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).

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.