Answers.Body: <p>Your command already achieves that. When specifying <code>-r</code> as an output option, ffmpeg will change the framerate of the video, duplicating or dropping frames as necessary to achieve the same overall duration. The audio stream will be processed independently, thus not affecting the pitch (since the overall duration is not changed) or sync (since the timestamps of both streams stay aligned).</p>
  
  <p><code>-global_quality</code> is not valid. For <code>libfdk_aac</code> you should use the <code>-vbr</code> option as mentioned in the <a href="http://trac.ffmpeg.org/wiki/Encode/AAC" rel="nofollow noreferrer">AAC encoding guide</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-20T09:12:37.930Z
Answers.Text: Thanks but I need a solution that allows me to have audio matching perfectly the video rather thank be kept untouched, and I also need an audio filter applied to lower the pitch accordingly.
Answers.UserDisplayName: user3450548
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-20T11:59:20.600Z
Answers.Text: The audio *will* perfectly match the video, since both streams are synchronized based on their frame/sample timestamps. And the pitch will not be changed in any way if you're just re-encoding. Again, you're asking for keeping the same duration and pitch, and that's exactly what your command does. (If you think it does not, please show an example of that.)
Answers.UserDisplayName: slhck
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-20T22:06:03.160Z
Answers.Text: Ah i see, ffmpeg provides duplicating the frames, nice :)
Answers.UserDisplayName: user3450548
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-01T10:18:25.077Z
Answers.Text: Hello, isn't the `-vbr` tag for _Variable Bit Rate_ mode? What's the purpose of using this tag, if we want to end up with a fixed fps with the `-r` tag?
Answers.UserDisplayName: ocramot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-01T11:48:40.630Z
Answers.Text: @ocramot Video frames per second do not have anything to do with a variable bit rate in an audio stream. `-vbr` applies to the AAC encoder only.
Answers.UserDisplayName: slhck
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-20T07:52:10.110Z
Answers.LastActivityDate: 2017-06-20T12:03:46.250Z
Answers.LastEditDate: 2017-06-20T12:03:46.250Z
Answers.UserDisplayName: slhck
Body: <p>With ffmpeg is possible to convert an input 24 fps video/audio to a 25 fps one while keeping the same exact duration, and also keeping as much as possible the original audio pitch ?</p>
  
  <p>I was thinking about the -r option and also a sound filter but I don't know what to add to my command line:</p>
  
  <pre><code>ffmpeg -i input.mov -r 25 -c:v libx264 -crf 18 -c:a libfdk_aac -global_quality 3 output.mov
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T03:43:17.163Z
Comments.Text: Audio and video are processed independently. Changing video framerate won't affect the audio.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T09:11:45.143Z
Comments.Text: @Mulvya Oh so my problem is to make audio match the video perfectly and also correct the pitch, can you add a solution for that?
Comments.UserDisplayName: user3450548
Tags: <ffmpeg><dvd><25fps><pal>
Title: Convert video from 24 to 25 fps while keeping video and audio length and also correct audio pitch
UserDisplayName: user3450548
ThreadText: # Convert video from 24 to 25 fps while keeping video and audio length and also correct audio pitch
  
  (Asked by: username_0 on 2017-06-19)
  
  With ffmpeg is possible to convert an input 24 fps video/audio to a 25 fps one while keeping the same exact duration, and also keeping as much as possible the original audio pitch ?
  
  I was thinking about the -r option and also a sound filter but I don't know what to add to my command line:
  
  ```
  ffmpeg -i input.mov -r 25 -c:v libx264 -crf 18 -c:a libfdk_aac -global_quality 3 output.mov
  
  ```
  
  **Tags:** ffmpeg, dvd, 25fps, pal
  
  > **Comments:**
  > **username_1**: Audio and video are processed independently. Changing video framerate won't affect the audio.  
  > **username_0**: @Mulvya Oh so my problem is to make audio match the video perfectly and also correct the pitch, can you add a solution for that?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-06-20. Score: 2 | Accepted answer
  
  Your command already achieves that. When specifying `-r` as an output option, ffmpeg will change the framerate of the video, duplicating or dropping frames as necessary to achieve the same overall duration. The audio stream will be processed independently, thus not affecting the pitch (since the overall duration is not changed) or sync (since the timestamps of both streams stay aligned).
  
  `-global_quality` is not valid. For `libfdk_aac` you should use the `-vbr` option as mentioned in the [AAC encoding guide](http://trac.ffmpeg.org/wiki/Encode/AAC).
  
  > **Comments:**
  > **username_0**: Thanks but I need a solution that allows me to have audio matching perfectly the video rather thank be kept untouched, and I also need an audio filter applied to lower the pitch accordingly.  
  > **username_2**: The audio *will* perfectly match the video, since both streams are synchronized based on their frame/sample timestamps. And the pitch will not be changed in any way if you're just re-encoding. Again, you're asking for keeping the same duration and pitch, and that's exactly what your command does. (If you think it does not, please show an example of that.)  
  > **username_0**: Ah i see, ffmpeg provides duplicating the frames, nice :)  
  > **username_3**: Hello, isn't the `-vbr` tag for _Variable Bit Rate_ mode? What's the purpose of using this tag, if we want to end up with a fixed fps with the `-r` tag?  
  > **username_2**: @username_3 Video frames per second do not have anything to do with a variable bit rate in an audio stream. `-vbr` applies to the AAC encoder only.  
  
  ---
  
  