# Play video file and inspect the images

**URL:** <https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049>\
**Category:** OpenMV Boards\
**Created:** [September 27, 2024, 11:16am UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049 "2024-09-27T11:16:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [September 27, 2024, 11:16am UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049/1 "2024-09-27T11:16:06Z")

</div>

Hi there,

I save a video in mp4 via the ide with right clicking in the image viewer.

Is it possible later on to load this file and test scripts on this video?

What i do now is to load images on the sd card and open them in the frame buffer to test scripts.

Trying to find a better way.

I don’t know if i am clear on my question though. if not i will try more.

What i want is to test scripts on office instead to be on the installations and test the scripts live.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 27, 2024, 3:00pm UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049/2 "2024-09-27T15:00:34Z")

</div>

Yes, use the IDE to convert the mp4 file to an image I/o stream .bin file. After you do that you can load it on the camera.

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [September 28, 2024, 8:41am UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049/3 "2024-09-28T08:41:04Z")

</div>

thanks for that!  
I dont know why i didnt thought about that before.  
used the:

```auto
img = stream.read(copy_to_fb=True, loop=True, pause=True)

```

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [October 9, 2024, 12:34pm UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049/4 "2024-10-09T12:34:11Z")

</div>

hi there.  
Although i tested and worked now pops up an “invalid pixel format” error  
The only difference is that again new release and firmware update made.  
Every time i make an update something happens.  
The updates are continuous and i cannot follow up as it seems.  
I don’t know what happened this time but the code is very simple.  
Global shutter installed on h7 camera.  
The video was wvga2 at 200 pixels height.  
I used the simple example as to my successful test:

```auto
import image
import time

stream = image.ImageIO("/stream.bin", "r")

clock = time.clock() # Create a clock object to track the FPS.
while True:
    clock.tick()
    img = stream.read(copy_to_fb=True, loop=True, pause=True)
    # Do machine vision algorithms on the image here.
    print(clock.fps())

```

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [October 9, 2024, 3:14pm UTC](https://forums.openmv.io/t/play-video-file-and-inspect-the-images/10049/5 "2024-10-09T15:14:05Z")

</div>

ok i think i figure this out by converting again the bin file with the new ide…
