Page 1 of 1

Clips starting in sync but finishing out of sync

PostPosted: Mon Feb 15, 2021 10:47 am
by spacepuppy
Hi guys, got a possibly strange one?

I record music videos for my YouTube and do basic edits to it using Resolve (I'm on 16.2.3.015). I don't have a proper camera but use my Iphone 11 and Ipad Pro 2nd Gen whic are good enough for what I do. I record at 4K 30FPS and do the Audio seperately with proper mics.

For a project I did over the weekend I had two around 20 minute video files - one from each device. As usual, once I had optimised the footage, I lined up the clips with the clap I made at the start to get the audio and two clips in sync and that's all fine. THe audio from the two cameras is perfectly lined up with the video and also the seperate audio I recorded. However by the end of the footage one of the cameras is half a second or so behind the other and is totally out of time. Having watch the footage in it's entirety there is no single point in which it drops out of sync, the footage just seems to gradually slow down over time. What's interesting is that if it was slowing down you'd expect the pitch of the audio to drop too but there's no effect on that, just the timing of the notes.

I've checked and rechecked and there's no setting on either device that should lead to this, I've also not done anything to the clips bar generating optimised media to make the editing process smoother. I can't see any reason for this to be happening at all and It's not something I've ever come across before. The clips should all line up perfectly.

Any suggestions appreciated!

Re: Clips starting in sync but finishing out of sync

PostPosted: Tue Feb 16, 2021 8:04 am
by Peter Chamberlain
Phones generally dont record a fixed frame rate, so your 30fps is not really true and so the audio becomes out of sync.

Re: Clips starting in sync but finishing out of sync

PostPosted: Thu Feb 18, 2021 2:28 pm
by Shaun_Thee_Sheep
I need some help with the same thing but there is frame drops in the video that leads to 3-4 seconds of delay between video and audio over the 10 minute clip. Do I need to add a sound buffer around every frame drop or is there an easier way to solve this. Consistent recording fps isn't possible since I'm recording an unstable game.

Re: Clips starting in sync but finishing out of sync

PostPosted: Thu Feb 18, 2021 3:03 pm
by Jim Simon
Shaun_Thee_Sheep wrote:Consistent recording fps isn't possible since I'm recording an unstable game.

This would solve that, and is the best way to work with any screen recording.

https://www.blackmagicdesign.com/products/ultrastudio

Re: Clips starting in sync but finishing out of sync

PostPosted: Thu Feb 18, 2021 3:49 pm
by smunaut
@Jim : That's not cheap (less expensive than I'd thought though) and also requires TB3 which not everyone has ... and doesn't even necessarily work for gaming setup. (My setup uses freesync and send a variable framerate to the monitor, nothing that recorder would be able to do about that).

@Shaun : Hopefully a halfway decent recording setup would still record the correct timestamp of each frame in the video and you should be able to use ffmpeg to convert that to a fixed framerate and to some mezzanine codec that will make working with it easier in Resolve.

@Ben : Even if everything is constant rate, two distinct devices will never be perfectly in sync, they don't use atomic reference clocks internally ... 0.5s over 20 min is 400ppm (part per million) error. That's a bit high, usually a typical crystal oscillator is +- 20-50 ppm. But then some hardware just take liberties, like if they can't generate a 60 fps exact refresh rate and will use 60.1 instead and figure no one will care but that's a 1600 ppm error right there.

Re: Clips starting in sync but finishing out of sync

PostPosted: Thu Feb 18, 2021 4:16 pm
by Jim Simon
smunaut wrote:My setup uses freesync and send a variable framerate to the monitor, nothing that recorder would be able to do about that.

The point of using an external recorder is actually to eliminate variable frame rates, which are a no-no for editing.

Re: Clips starting in sync but finishing out of sync

PostPosted: Thu Feb 18, 2021 7:51 pm
by smunaut
I know but my point was that external recorders don't necessarily solve all issues. In some games having to disable freesync would be a major hindrance. You might not even be using HDMI to begin with and have a display port connection ...

I don't see any technical reason why a properly designed software screen recorder can't produce a fixed frame rate. Just because frames are rendered at a variable rate doesn't mean you have to record them at that rate, just snapshot whatever the last rendered frame every 1/60th of a second. Some frames will be skipped, some repeated ... doesn't matter much.

The linux screen capture I use actually does CFR just fine, but it's not for gaming, that's just general desktop. I guess people are using shadowplay which AFAIU doesn't do CFR. And in that case, I'd recommend the transcoding approach I detailed above.

Re: Clips starting in sync but finishing out of sync

PostPosted: Fri Feb 19, 2021 12:07 am
by Uli Plank
Shadowplay is the worst regarding VFR. But OBS is doing it too if the computer is stressed by running other demanding software.

Maybe one day somebody is developing a better solution. Until now, it's Freesync off and external recording.

Re: Clips starting in sync but finishing out of sync

PostPosted: Fri Feb 19, 2021 12:51 pm
by Shaun_Thee_Sheep
@Jim I maybe should have said that my goal in recording an editing is merely just to save moments that I have while gaming with friends. I don't have money to throw away like that.

@smunaut I'll definitely look into ffmpeg, I do use shadowplay to record as I have a GTX1060 6GB and it reaches 100% usage while gaming so obs records very poorly.

Thank you for the help.

Re: Clips starting in sync but finishing out of sync

PostPosted: Fri Feb 19, 2021 3:31 pm
by Jim Simon
smunaut wrote:I don't see any technical reason why a properly designed software screen recorder can't produce a fixed frame rate.

There may not be. Just no one I know of has yet created a software screen recorder that does the job properly (and that includes recording to a proper codec like ProRes or DNx.)

Re: Clips starting in sync but finishing out of sync

PostPosted: Fri Feb 19, 2021 3:33 pm
by Jim Simon
Shaun_Thee_Sheep wrote:@Jim I don't have money to throw away like that.

Well, you're using professional software. I tend to recommend people do so in a professional manner. There are plenty of other options for non-professionals.

Ultimately, it's about using the right tool for the job. An ARRI Alexa is nice, but I wouldn't choose that to shoot a kid's birthday party. (For sure I'd go home with frosting on the sensor!) Resolve is also great, but won't be the right NLE for every edit.

Shot Cut, for example, may handle your media better than Resolve.

Re: Clips starting in sync but finishing out of sync

PostPosted: Sat Feb 20, 2021 6:17 am
by Uli Plank
Or LumaFusion, which was developed with VFR in mind for clips from smartphones.

Re: Clips starting in sync but finishing out of sync

PostPosted: Sat Feb 20, 2021 10:25 am
by smunaut
Jim Simon wrote:Well, you're using professional software. I tend to recommend people do so in a professional manner. There are plenty of other options for non-professionals.


Just because it's VFR or H264/H265 doesn't mean it's not professional.

This might not be what's used in film, but there are plenty of professions where delivery is meant for the web where realistically you don't need 4k RAW or prores as input since you'll be massively compressed at the end anyway. I see tons of pro full time youtubers who have camera saving to h264 for instance. Or if you're just a freelance editor, you'd better deal with whatever the customers send you, however it was captured. Or if you need to record an e-sport competition, I'm pretty sure they won't let you disable freesync on the competitor machines just to make your job easier, you'll have to deal with it.

Now if Resolve doesn't want to deal with VFR for instance that's fine, all softwares have limitations. With limited resources you have to make choices. But if they encounter something they don't handle they should at the very least pop-up a warning ... (also, re-timing footage isn't all that different from VFR input so realistically they could handle it decently if they wanted to ...)

As for "Plenty of other options for non-professionals". Well I had a look at what I could run on my main linux workstation (the only machine I have that's anywhere close to be able to do video edits) and nothing comes even close to Resolve. The ingress/egress are its main weak points for me (although egress with v17 plugin is solvable) but compared to the other solutions downsides, having to transcode inputs first is a somewhat small price to pay ... It takes some space, but for archival, I only keep the original files (along with the transcode options), not the transcoded one, I can always transcode again if I ever need it back.

Re: Clips starting in sync but finishing out of sync

PostPosted: Sat Feb 20, 2021 1:48 pm
by Uli Plank
smunaut wrote:Just because it's VFR or H264/H265 doesn't mean it's not professional.


It's not yet supported by professional software, which was developed over the last few decades for film. Nobody said you can't generate professional content.

Don't worry, sooner or later it'll be supported. If there is a market for it, someone will develop it.
Until then, you'll need workarounds.