# Processing Video library inconsistent behavior with jumping

**URL:** <https://discourse.processing.org/t/processing-video-library-inconsistent-behavior-with-jumping/24214>\
**Category:** Libraries\
**Created:** [September 29, 2020, 8:59am UTC](https://discourse.processing.org/t/processing-video-library-inconsistent-behavior-with-jumping/24214 "2020-09-29T08:59:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musiciantriescoding](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/musiciantriescoding/32/7662_2.png) [@musiciantriescoding](https://discourse.processing.org/u/musiciantriescoding)\
**Post date:** [September 29, 2020, 8:59am UTC](https://discourse.processing.org/t/processing-video-library-inconsistent-behavior-with-jumping/24214/1 "2020-09-29T08:59:03Z")

</div>

Hello everyone! I am experiencing some inconsistent behavior from the Processing video library.

What I’m trying to do:

- I’m making a video sampler with a midi keyboard. When I play a key, the video jumps to a timestamp and plays.

What I’m getting:

- When jumping to certain time stamps, there is almost no delay/latency, but jumping to others, the delay/latency is huge.

My code:

```auto
import processing.video.*;
import themidibus.*;
// load video clip in setup
void draw(){
    image(vid,0,0);
}
void noteOn(Note note){
    switch(note.pitch()){
        case 48:
            video.jump(107.3);
            break;
        case 49:
            video.jump(100.5);
            break;
        default:
            break; 
    }
}

```

Notes:

- The video is 10 MB in size, 2 minutes long and has a resolution of 768x432 and mp4 format
- I’m using the latest official version of Processing
- I’m using a 2008 Black MacBook with
- 
  - Intel core2 duo

- 
  - 3gb RAM

Does anyone know why this might be? My current hypotheses are

1. If the timestamps are simple (divisible by 2 and 5, eg. 100.0), the delay is small. Similarly, if the timestamps are not easily divisible (eg. 107.34), the delay is big.
2. My computer is just too weak…
