# Increasing play speed decoding from mp4 file

**URL:** <https://forums.developer.nvidia.com/t/increasing-play-speed-decoding-from-mp4-file/274708>\
**Category:** Jetson Orin NX\
**Tags:** gstreamer\
**Created:** [December 1, 2023, 6:51pm UTC](https://forums.developer.nvidia.com/t/increasing-play-speed-decoding-from-mp4-file/274708 "2023-12-01T18:51:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [April 12, 2024, 3:08am UTC](https://forums.developer.nvidia.com/t/increasing-play-speed-decoding-from-mp4-file/274708/9 "2024-04-12T03:08:12Z")

</div>

Hi,  
Please set _sync=0_ to _appsink_ like:

```auto
import sys
import cv2

def read_cam():
    cap = cv2.VideoCapture("filesrc location=test.mkv ! matroskademux ! h264parse ! nvv4l2decoder enable-max-performance=1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink sync=0 ")
    if cap.isOpened():
        count = 0;
        while True:
            ret_val, img = cap.read();
            if not ret_val:
                break;
            count = count + 1
            if count % 150 == 0:
                print("decoded frames:", count)
    else:
        print("rtsp open failed")

    cap.release()

if __name__ == ' __main__':
    read_cam()

```

So that you can get decoded buffers immediately. If you need to have interval between the buffer, you can add delay while calling _cap.read()_

---

_[View the full topic](https://forums.developer.nvidia.com/t/increasing-play-speed-decoding-from-mp4-file/274708)._
