Welcome,
Guest
{JFBCLogin}
|
25 Jan 2021
New boarders will have their posts moderated - Don't worry if you cannot see your post immediately.
Read More...
Read More...
TOPIC:
Frame rate and audio drift muddle 17 May 2023 07:12 #125511
Hi all,I have got myself in a massive muddle with different frame rates and audio drift.I have a primary timeline which is footage of me, wearing headphones watching a video on my computer. You can’t see what’s on the screen as the camera is pointed at my face. However, the mic picked up some audio from my headphones (which was planned).I have a secondary timeline which is a screen recording of the footage. I want to overlay this video so people can see what point of the video I am at at certain parts of the video.The footage of me is recorded at 25fps. The screen record footage is recorded at 23.98. The project is set to 25fps. When I did a quick test run it looked fine as the 23.98 footage is a tiny portion of the overall screen and most people will be watching me.I didn’t take into account the audio drift between the two fps. As I can hear the audio in the clip with me I can line up exactly where it starts but obviously it starts to drift as time goes on. I understand why this is but I thought I could easily correct this by adjusting the frame rate.I have tried frame sampling set to optical flow and then rendered, however it makes no difference so I am not sure if I am doing that right.I then thought I would try running it through handbrake. Handbrake detects the clip as H.264 25 FPS (I don’t know why it detects it as 25 FPS) and then when I export it as 25FPS, it still drifts but a little less.I don’t have access to compressor (in case someone recommends that).Where do I go from here?
|
|
Please Log in to join the conversation. |
Frame rate and audio drift muddle 17 May 2023 11:07 #125514
Final Cut is usually very good at dealing with clips of different frame rates. If your project is set to 25fps and you add a 23.98fps clip to the timeline, it is automatically interpolated so that its overall length is correct in real time. So, sound should still be in sync when 23.98fps clip is lined up with 25fps. I have timelines with GoPro footage, Video Camera footage and iPhone footage all shot at different frame rates and the sound, when lined up, stays in sync. "Optical Flow" will not alter the length of any clip. It just interpolates the frames in a different way to make the footage look better and avoid staggers in the movement. It is interesting that Handbrake detects the footage you think is at 23.98fps as 25fps. That suggests that something is odd with its metadata and possibly Final Cut Pro is reading it incorrectly as a 25fps clip hence the drift in sync. In order to change the duration of the clip (and match its sync points up to the footage of you) you can change its speed in the timeline. Try changing its speed to 96% and see if that gets it back in sync with your primary footage. You might have to play with the exact figure until it works. Select the clip and choose the menu item: Modify>Retime>Custom Speed... |
|
Please Log in to join the conversation. |
Frame rate and audio drift muddle 17 May 2023 11:13 #125515
Thanks for the reply. I tried dropping the 23.98 into its own 25 fps time line and exported that out and then imported back in to my project but that still didnt work. That helped but only a very small amount. If I take an example I have marked points on each time line at a specific part to see how far out it is and I have the following:Clip with me - 15:09:13 (Inspector says 25fps) Clip from OBS - 14:59:12 (inspector says 23.98fps rate conform optical flow) Clip from OBS placed on a separate 25fps timeline then shared out and imported back in : 14:58:07 (inspector says 25fps). I have then used your idea on the clip from OBS and that worked fine. I changed the speed at whatever the calculation was for 23.09/25 and that seems to have sorted it and I can't notice if by doing that there is any shift in pitch. its good enough for what I want so thanks for that. |
|
Please Log in to join the conversation.
Last edit: by stitch666.
|
Frame rate and audio drift muddle 17 May 2023 11:24 #125516
There won't be any shift in pitch if the two clips are now in sync as their sound will be running at the same speed. If you think about it - it has to be that way. A two minute recording of sound if played to last two minutes will always have the same pitch. The pitch will only change if the recording is played back at a speed that caused it to last more or less than two minutes. So, as long your primary 25fps footage is correct, altering the running time of your other footage to match it, will not only correct the sync but also correct the pitch. |
|
Please Log in to join the conversation.
Last edit: by Zabobon.
|
Frame rate and audio drift muddle 17 May 2023 13:46 #125517
All clips on the timeline can only have one frame rate for final playback. That is called "rate conforming." The NLE will do whatever is necessary to achieve that. For example, it may discard frames, create duplicate frames, or retime the clip to run at the timeline frame rate. This varies with each different combination of frame rates. E.g., when putting 24.0 clips into a 29.97 timeline, it will use "3:2 pulldown". In certain rate-conforming scenarios, using frame interpolation, blending, or optical flow smoothing can be effective. However -- when putting 23.98 clips into a 25 fps timeline, it will retime the 23.98 clip to run at 25 fps. If that 23.98 clip has an audio track, that audio will also be sped up by 4.25%. If another audio track is associated with the 25 fps material, it will drift with respect to the retimed 23.98 audio. NLEs will usually use pitch correction, but that doesn't change the altered running time of the audio channel. The best solution is to realize ahead of time the difficulty that shooting or recording certain non-matching frame rates impose on the editing process and avoid that. If it's already recorded, in the case of mixed 23.98 and 25.0 frame rates where you want to preserve both audio and video sync, I think your only option is to use a software tool that provides a "frame discarding" algorithm while transcoding the 23.98 material to 25.0 fps. E.g. the open-source command-line tool FFmpeg can do this using this syntax: ffmpeg -i InputFile23_98.mov -r 25 -y OutputFile_25fps.mp4 You would then take that converted 25 fps output file and use it in place of the original 23.98 fps file. That should allow audio and video from the original 23.98 file converted to 25.0 fps to stay in sync with other 25.0 native material. This conversion is very slow and compute-intensive, which might be why the normal algorithm that NLEs use for 23.98 to 25.0 fps is retiming. |
|
Please Log in to join the conversation. |