stretching or shrinking a video track to match length of another track

Peeteey wrote on 4/25/2023, 9:40 PM

Hi kids,

I filmed a concert using two identical cameras, have done for years with these cameras, but for some reason, one of the output files seems to play slightly faster than the other.

Lets imagine there's a clap for syncing at the beginning of the video and another one at the end of the video. both cameras filmed the whole thing with the same settings but for some reason, if I match up the clap in the two videos at the beginning of the track, by the clap at the end, they're out of sync. It's as if one video track is playing minutely faster than the other.

Is there a function to automatically stretch or shrink (speed up or slow down I guess) the second clip to match the first clip?

In a free editor I used to use years ago, it had a function where I could mark a point at the beginning of both videos, say the hand clap, and then mark a point at the end of both videos, say the second hand clap which is now out of sync but *should* be in sync, and the program would adjust one clip so that they're both now synchronised all the way through.

Can MEP '22 Premium do anything like this?

If not, how do I do it other than manually stretching or shrinking the second clip and getting it to match by trial and error?

 

Thanks!

Pete

Comments

CubeAce wrote on 4/26/2023, 2:23 AM

@Peeteey

Hi Pete.

Are the cameras on remote controls and can both be started at the same time? Are there significant distances between the two ant the subject matter?

Did you check on the mediainfo that both cameras used the same video format and frame speed?

Yes there is a frame speed adjustment available in MEP 2022 for manual adjustment and it may be possible to sync the videos in Multi-cam mode.

If however you recorded one or both cameras that allowed for a variable speed frame rate you may have to convert those files to constant frame rates first.

Again that information should be available in the MediaInfo programs' text view.

Ray.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5011

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2130 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 21TB of 8 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 560.81 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."

AAProds wrote on 4/26/2023, 2:41 AM

@Peeteey

how do I do it other than manually stretching or shrinking the second clip

It's unclear whether you mean using Object Stretch mouse mode. If you're not, this mode allows you to stretch an object at will:

The left end is fixed, drag the right end of an object to stretch it.

All my forum comments are based on or refer to my System 1.

My struggle is over! I built my (now) system 2 in 2011 when DV was king and MPEG 2 was just coming onto the scene and I needed a more powerful system to cope. Since then we've advanced to MP4 and to bigger and bigger resolutions. I was really suffering, not so much in editing (with proxies) but in encoding, which just took ages. A video, with Neat Video noise reduction applied, would encode at 12% of film speed. My new system 1 does the same job at 160% of film speed. Marvellous. I'm keeping my old system as a capture station for analogue video tapes and DV.

System 1

Windows 11 v23H2 severely modified by Openshell and ExplorerPatcher

Power supply: 850W Cooler Master (should have got modular)

CPU: Intel i7 13700K running at 3400mhz, cooled by a Kraken 2x140mm All In One liquid cooler.

RAM: 64gb (2x32gb sticks) G.Skill "Ripjaws" DDR4 3200Mhz

GPU 1: iGPU UHD 770

GPU 2: NVidia RTX 3060Ti Windforce 8gb

C drive: NVME 500gb

Various other SSD and HDDs.

Monitor: 27"/68cm Samsung, 2560 x 1440, 43 pixels/cm.

MEP 2021 version 20.0.1.80

Movie Studio 2023 version 22.0.3.172

Magix Video Easy version 7.0.1.145

System 2

(Still in use for TV and videotape capture)

Windows 10 v22H2

CPU: i5-750 at 2670mhz with 12gb RAM

Onboard IEEE1394 (Firewire) port

GPU: ATI Radeon HD 4770 (512mb) which is ignored by MEP

Hard drives: C Drive 256gb SSD, various other HDDs.

Monitor: Dell 22"/56cm, 1680x1050, 35 pixels/cm

MEP 2021 version 20.0.1.80

Movie Studio 2023 version 22.0.3.172

VPX 12

johnebaker wrote on 4/26/2023, 5:52 AM

@Peeteey

. . . . I filmed a concert using two identical cameras . . . .

What is the make/model of the cameras ?

@CubeAce commented '. . . a variable speed frame rate .... information should be available in the MediaInfo programs' text view. . . .

To add to this - see this tutorial on how to setup MediaInfo, which Ray linked to, and analyse a video clip to get the data required.

In the Video section of the analyses, if you see this line:

 Framerate mode: Variable

Then as Ray has commented you will need to convert them to Constant framerate.

John EB
Forum Moderator

Last changed by johnebaker on 4/26/2023, 10:15 AM, changed a total of 1 times.

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

browj2 wrote on 4/26/2023, 6:55 AM

@AAProds

Hi Al,

The left end is fixed, drag the right end of an object to stretch it.

Actually, you can drag either end of an object to stretch it.

The Object Stretch button is linked to the Effects/Video effects/Speed effect. Adjusting the slider/input box there will only adjust the right end with the left end fixed.

John CB

John C.B.

VideoPro X(16); Movie Studio 2024 Platinum; MM2025 Premium Edition; Samplitude Pro X8 Suite; see About me for more.

Desktop System - Windows 10 Pro 22H2; MB ROG STRIX B560-A Gaming WiFi; Graphics Card Zotac Gaming NVIDIA GeForce RTX-3060, PS; Power supply EVGA 750W; Intel Core i7-10700K @ 3.80GHz (UHD Graphics 630); RAM 32 GB; OS on Kingston SSD 1TB; secondary WD 2TB; others 1.5TB, 3TB, 500GB, 4TB, 5TB, 6TB, 8TB; three monitors - HP 25" main, LG 4K 27" second, HP 27" third; Casio WK-225 piano keyboard; M-Audio M-Track USB mixer.

Notebook - Microsoft Surface Pro 4, i5-6300U, 8 GB RAM, 256 SSD, W10 Pro 20H2.

YouTube Channel: @JCBrownVideos

AAProds wrote on 4/26/2023, 7:17 AM

@browj2

JohnCB, yes, technically you're correct but it would rarely work like that in practice. I cannot envisage a scenario where the audio is in-sync at the end but out at the start.

All my forum comments are based on or refer to my System 1.

My struggle is over! I built my (now) system 2 in 2011 when DV was king and MPEG 2 was just coming onto the scene and I needed a more powerful system to cope. Since then we've advanced to MP4 and to bigger and bigger resolutions. I was really suffering, not so much in editing (with proxies) but in encoding, which just took ages. A video, with Neat Video noise reduction applied, would encode at 12% of film speed. My new system 1 does the same job at 160% of film speed. Marvellous. I'm keeping my old system as a capture station for analogue video tapes and DV.

System 1

Windows 11 v23H2 severely modified by Openshell and ExplorerPatcher

Power supply: 850W Cooler Master (should have got modular)

CPU: Intel i7 13700K running at 3400mhz, cooled by a Kraken 2x140mm All In One liquid cooler.

RAM: 64gb (2x32gb sticks) G.Skill "Ripjaws" DDR4 3200Mhz

GPU 1: iGPU UHD 770

GPU 2: NVidia RTX 3060Ti Windforce 8gb

C drive: NVME 500gb

Various other SSD and HDDs.

Monitor: 27"/68cm Samsung, 2560 x 1440, 43 pixels/cm.

MEP 2021 version 20.0.1.80

Movie Studio 2023 version 22.0.3.172

Magix Video Easy version 7.0.1.145

System 2

(Still in use for TV and videotape capture)

Windows 10 v22H2

CPU: i5-750 at 2670mhz with 12gb RAM

Onboard IEEE1394 (Firewire) port

GPU: ATI Radeon HD 4770 (512mb) which is ignored by MEP

Hard drives: C Drive 256gb SSD, various other HDDs.

Monitor: Dell 22"/56cm, 1680x1050, 35 pixels/cm

MEP 2021 version 20.0.1.80

Movie Studio 2023 version 22.0.3.172

VPX 12

browj2 wrote on 4/26/2023, 8:17 AM

@AAProds

Hi Al,

True. I was just pointing out that it can be done.

Also, if there is uneven drift over a long duration (this has happened to me with S8 sound files), Speed can be keyframed. Alternatively, make cuts at scene changes and realign each part.

@Peeteey

Once you have the beginning lined up, go to some obvious point towards the end of the clips that you can use for alignment. Put a Snap marker (Ctrl+P) on each (obviously different locations) and then stretch the one where the snap marker is to the left, until the snap markers line up.

John CB

John C.B.

VideoPro X(16); Movie Studio 2024 Platinum; MM2025 Premium Edition; Samplitude Pro X8 Suite; see About me for more.

Desktop System - Windows 10 Pro 22H2; MB ROG STRIX B560-A Gaming WiFi; Graphics Card Zotac Gaming NVIDIA GeForce RTX-3060, PS; Power supply EVGA 750W; Intel Core i7-10700K @ 3.80GHz (UHD Graphics 630); RAM 32 GB; OS on Kingston SSD 1TB; secondary WD 2TB; others 1.5TB, 3TB, 500GB, 4TB, 5TB, 6TB, 8TB; three monitors - HP 25" main, LG 4K 27" second, HP 27" third; Casio WK-225 piano keyboard; M-Audio M-Track USB mixer.

Notebook - Microsoft Surface Pro 4, i5-6300U, 8 GB RAM, 256 SSD, W10 Pro 20H2.

YouTube Channel: @JCBrownVideos

Peeteey wrote on 4/27/2023, 4:39 AM

Thanks everybody, I should've been a bit clearer re the settings. The cameras are 2 (actually 4) Samsung S7 phones recording in 4k, all set to the exact same settings 25fps, same bitrate etc.

I use them to record music concerts from multiple angles. I've been using then like this for years with no issues ever, until this one file.

I thought the frame rate must've got changed somehow but nope, all settings identical.

 

Anyhoo, thanks for the comments and help, I did experiment with the mouse dragging type stretch thing but I was just wanting to find out I if MEP had some automated way of doing it, like the snap markers mentioned above, but automated.

I'll give that method a go, thanks so much again!

johnebaker wrote on 4/27/2023, 5:33 AM

@Peeteey

Hi

. . . . Samsung S7 phones recording in 4k, all set to the exact same settings 25fps, same bitrate etc . . . .

Did the MediaInfo data show if they are Variable framerate ?

If so it should tell you what the minimum and maximum framerates are. I suspect the one causing the issue has a wider range than the others, particularly if there was less 'action' in the area it was recording.

John EB

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

CubeAce wrote on 4/27/2023, 5:59 AM

@Peeteey @johnebaker

Hi.

I agree strongly with John.

Both my wife and I have Samsung phones and you have to set the frame rate manually at 4K not to get a variable frame rate on ours. Yes you set a frame rate that the phone will then uses as a base frame rate. Most phones will do that at higher resolutions to save storage space.

You may have achieved this but it is best to check the data with MediaInfo as Windows cannot supply that information. It is very unlikely that two phones will keep to the same frame rates at the same time if they have different viewpoints.

Ray.

Last changed by CubeAce on 4/27/2023, 6:00 AM, changed a total of 1 times.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5011

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2130 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 21TB of 8 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 560.81 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."

Peeteey wrote on 4/27/2023, 3:14 PM

... is very unlikely that two phones will keep to the same frame rates at the same time if they have different viewpoints.

Thanks, i know, that's why I use a 3rd party app that lets me lock all the settings and also so I can record with the screen turned off. That way they can record for about 3 hours straight.

Anyhoo, thanks again everyone!

johnebaker wrote on 4/27/2023, 5:02 PM

@Peeteey

Hi

. . . .  I use a 3rd party app that lets me lock all the settings . . . .

What is the app?

The apps I have tried on my Samsung phone do not have the capability of specifying a Constant framerate mode.

John EB

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

Peeteey wrote on 4/28/2023, 1:59 AM

What is the app?

The apps I have tried on my Samsung phone do not have the capability of specifying a Constant framerate mode.

John EB

Hey John,

It's not made anymore unfortunately. I forget it's name off the top of my head but it was a slightly dodgy spy cam type app, hence the ability to record with the screen off. It can set Resolution, Frame rate, Bitrate etc and many other things. As I've said, it's always been consistent, until just this one anomalous file.

The previous and subsequent files recorded by the same camera during the same session are perfectly fine, just this one in the middle. May have just got a little corrupted somehow.

johnebaker wrote on 4/28/2023, 6:27 AM

@Peeteey

Hi

Thanks for the info - there are still many of these apps that allow screen off recording. Just the one file in a sequence is an 'odd' behaviour.

John EB

Last changed by johnebaker on 4/28/2023, 6:31 AM, changed a total of 1 times.

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.