# Trouble exporting video with VideoExport library - no errors but no .mp4 written to file

**URL:** https://discourse.processing.org/t/trouble-exporting-video-with-videoexport-library-no-errors-but-no-mp4-written-to-file/42306
**Category:** Libraries
**Created:** [June 29, 2023, 12:28am UTC](https://discourse.processing.org/t/trouble-exporting-video-with-videoexport-library-no-errors-but-no-mp4-written-to-file/42306 "2023-06-29T00:28:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DarkLight](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DarkLight](https://discourse.processing.org/u/DarkLight)
#### Post date: [June 29, 2023, 12:28am UTC](https://discourse.processing.org/t/trouble-exporting-video-with-videoexport-library-no-errors-but-no-mp4-written-to-file/42306/1 "2023-06-29T00:28:21Z")

</div>

Hello.

I’m not sure what’s going on. I see that the VideoExport library is installed, I can navigate to it. The directory I am saving to does exist. I’m not getting any error, the drawing runs but no frames are saved. I basically want to turn it into a gif. Not sure if this is the best way.

This is the code from a post I saw on Twitter. It’s really cool but it also runs really slow on my PC.

```auto
import com.hamoid.*;

VideoExport videoExport;

void setup(){
  size(800,800);
  videoExport = new VideoExport(this, "C:/Users/.../Documents/Processing/.../TestVideo.mp4");
}

void draw(){
  background(random(255), random(255), random(255)); // Randomly change background color
  videoExport.saveFrame();
  
  if(frameCount == 30 * 10) //Stop recording after 10 seconds
  {
    videoExport.endMovie();
    exit();
  }
}

```

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [July 1, 2023, 5:24am UTC](https://discourse.processing.org/t/trouble-exporting-video-with-videoexport-library-no-errors-but-no-mp4-written-to-file/42306/2 "2023-07-01T05:24:23Z")

</div>

Hi @DarkLight,

Always good to look inside the given examples coming with a library.

ie:

> <https://github.com/hamoid/video_export_processing/blob/master/examples/basic/basic.pde>

You’ll notice, that there is a call to …

`videoExport.startMovie();`

… right after creating the VideoExport instance, which seems to be missed in your code above…

Cheers  
— mnse

PS: there is also a library called GifAnimation which you can check out…

> **[GitHub - akiljohnson1/GifAnimation: Processing 3.x port of Extrapixels'...](https://github.com/akiljohnson1/GifAnimation)**
>
> Processing 3.x port of Extrapixels' GifAnimation library - GitHub - akiljohnson1/GifAnimation: Processing 3.x port of Extrapixels' GifAnimation library
