# VideoExport: movie duration not matching up with mp3

**URL:** <https://discourse.processing.org/t/videoexport-movie-duration-not-matching-up-with-mp3/17259>\
**Category:** Libraries\
**Created:** [January 22, 2020, 7:45pm UTC](https://discourse.processing.org/t/videoexport-movie-duration-not-matching-up-with-mp3/17259 "2020-01-22T19:45:54Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 19, 2025, 6:49pm UTC](https://discourse.processing.org/t/videoexport-movie-duration-not-matching-up-with-mp3/17259/8 "2025-07-19T18:49:13Z")

</div>

> [@Chrisir](#):
>
> frameRate(secondsDurationAudioFile / DesiredNumberOfFramesFromFormulaAbove);

`frameRate` is `fps` or `frames/second`

Your formula is not correct:

```auto
secondsDurationAudioFile / 
DesiredNumberOfFramesFromFormulaAbove 
= seconds/frames

```

> [@Chrisir](#):
>
> Okay, but how can I tell my Sketch to produce this many frames??

> **[frameCount / Reference](https://processing.org/reference/framecount)**
>
> The system variable frameCount contains the number o frames displayed since the program started. Inside setup() the value is 0 and during the first iteration of draw it is 1, etc.

I am sure you can cook something up to stop when you hit the desired frameCount.

Example here:  
_[Movie Maker: Time gap between movie and its audio file - #2 by glv](https://discourse.processing.org/t/movie-maker-time-gap-between-movie-and-its-audio-file/46748/2)_

`:)`

---

_[View the full topic](https://discourse.processing.org/t/videoexport-movie-duration-not-matching-up-with-mp3/17259)._
