<p>I always prefer to use more precise framerate values in my calculations: <code>29.97</code> is <code>30000/1001</code>.</p>
<p>Your command (<code>ffmpeg -i &lt;input&gt; -filter:v fps=29.97 &lt;output&gt;</code>) changes the amount of frames per second but the presentation time stamps (PTS) remain the same and that is the reason why duration of the video does not change. You need to change PTS as well:</p>
<pre><code>-vf &quot;setpts=PTS*((30000/1001)/30),fps=30000/1001&quot;
</code></pre>
<p>Audio needs a separate filter:</p>
<pre><code>-af &quot;atempo=(30/(30000/1001))&quot;
</code></pre>
<p>The command to change your video framerate from <code>30</code> to <code>29.97</code> should look like this:</p>
<pre><code>ffmpeg -i input.mp4 -vf &quot;setpts=PTS*((30000/1001)/30),fps=30000/1001&quot; -af &quot;atempo=(30/(30000/1001))&quot; output.mp4
</code></pre>

CC BY-SA 4.0
2022-02-16T13:00:38.657Z
Thanks so much! This has got me on the right lines. It still doesn't quite line up, but it is shorter. I need to do a bit of fiddling to work out why this hasn't worked for my videos, but it looks like it's got me on the right tracks
Simon
CC BY-SA 4.0
2022-02-16T13:19:52.977Z
@Simon "It still doesn't quite line up" - maybe your hardware use some other value than `30000/1001` for `29.97`? You can try to re-encode your videos to make them all use some natural number as the framerate (instead of the fraction) to see if that helps.
Lex
CC BY-SA 4.0
2022-02-16T19:09:57.210Z
Yeah, that's what I thought. I'll do some experiments and figure it out - but those commands were the ones I was missing! Thanks very much.
Simon
CC BY-SA 4.0
2022-02-15T19:05:03.297Z
2022-02-15T19:23:18.477Z
2022-02-15T19:23:18.477Z
Lex
<p>I have three videos that I am trying to sync so I can setup a multi-camera editing project (I'm using Vegas Pro)</p>
<p>Two are at 29.97fps and one is at 30fps. If I manually sync them all at the start, by the end of the clip, the 30fps video has drifted slightly out of sync.</p>
<p>I've tried a few different things (manually dropping the odd frame and resyncing the clips, compressing the time of the clip so it syncs up at the end). These work, but they require quite a bit of work when editing lots of clips, so I'm looking for a way to streamline my workflow.</p>
<p>I've been fiddling with ffmpeg to find a simple command to convert the 30fps footage to 29.97 (I was hoping it would be possible without re-encoding it).</p>
<p>I've tried a few things including:</p>
<p><code>ffmpeg -i &lt;input&gt; -filter:v fps=29.97 &lt;output&gt;</code></p>
<p>But that doesn't change the audio or overall time of the video, so the audio still drifts out of sync.</p>
<p>Is someone able to help me identify what the correct ffmpeg command would be to convert the video so that it syncs with my other tracks?</p>
<p>(As an aside, the reason I've ended up in this mess is that I'm using iPads and iPhones for the footage. Every iOS device I've used produces video at 29.97 fps, <em>except</em> for one of the iPads which always produces video at 30fps. I have no idea why as it's the same model and running the same version of iOS, but for some reason, it's different from every other device and no amount of fiddling with the settings seems to change it)</p>

<ffmpeg><conversion><framerate><vegas-pro><ios>
Converting Video from 30 fps to 29.97fps so Audio Syncs to Other 29.97fps Videos with ffmpeg
Simon
# Converting Video from 30 fps to 29.97fps so Audio Syncs to Other 29.97fps Videos with ffmpeg

(Asked by: username_0 on 2022-02-15)

I have three videos that I am trying to sync so I can setup a multi-camera editing project (I'm using Vegas Pro)

Two are at 29.97fps and one is at 30fps. If I manually sync them all at the start, by the end of the clip, the 30fps video has drifted slightly out of sync.

I've tried a few different things (manually dropping the odd frame and resyncing the clips, compressing the time of the clip so it syncs up at the end). These work, but they require quite a bit of work when editing lots of clips, so I'm looking for a way to streamline my workflow.

I've been fiddling with ffmpeg to find a simple command to convert the 30fps footage to 29.97 (I was hoping it would be possible without re-encoding it).

I've tried a few things including:

`ffmpeg -i  -filter:v fps=29.97`

But that doesn't change the audio or overall time of the video, so the audio still drifts out of sync.

Is someone able to help me identify what the correct ffmpeg command would be to convert the video so that it syncs with my other tracks?

(As an aside, the reason I've ended up in this mess is that I'm using iPads and iPhones for the footage. Every iOS device I've used produces video at 29.97 fps, *except* for one of the iPads which always produces video at 30fps. I have no idea why as it's the same model and running the same version of iOS, but for some reason, it's different from every other device and no amount of fiddling with the settings seems to change it)

**Tags:** ffmpeg, conversion, framerate, vegas-pro, ios


---

## 1 answers

### Answer by username_1 on 2022-02-15. Score: 0 | Accepted answer

I always prefer to use more precise framerate values in my calculations: 29.97 is 30000/1001.
Your command (ffmpeg -i  -filter:v fps=29.97 ) changes the amount of frames per second but the presentation time stamps (PTS) remain the same and that is the reason why duration of the video does not change. You need to change PTS as well:
-vf "setpts=PTS*((30000/1001)/30),fps=30000/1001"

Audio needs a separate filter:
-af "atempo=(30/(30000/1001))"

The command to change your video framerate from 30 to 29.97 should look like this:
ffmpeg -i input.mp4 -vf "setpts=PTS*((30000/1001)/30),fps=30000/1001" -af "atempo=(30/(30000/1001))" output.mp4

> **Comments:**
> **username_0**: Thanks so much! This has got me on the right lines. It still doesn't quite line up, but it is shorter. I need to do a bit of fiddling to work out why this hasn't worked for my videos, but it looks like it's got me on the right tracks  
> **username_1**: @username_0 "It still doesn't quite line up" - maybe your hardware use some other value than `30000/1001` for `29.97`? You can try to re-encode your videos to make them all use some natural number as the framerate (instead of the fraction) to see if that helps.  
> **username_0**: Yeah, that's what I thought. I'll do some experiments and figure it out - but those commands were the ones I was missing! Thanks very much.  

---

