# Is there a simple way of making a sequence of 3d array of UInt8 into a video?

**URL:** <https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992>\
**Category:** General Usage\
**Tags:** video, videoio\
**Created:** [August 25, 2021, 5:05pm UTC](https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992 "2021-08-25T17:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhinav\_Bhatia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abhinav_bhatia/32/18748_2.png) [@Abhinav\_Bhatia](https://discourse.julialang.org/u/Abhinav_Bhatia)\
**Post date:** [August 25, 2021, 5:05pm UTC](https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992/1 "2021-08-25T17:05:12Z")

</div>

Is there a simple way to save a sequence of Array{UInt8, 3} as a video? Can’t find any documentation on this. [Writing Videos · VideoIO.jl (juliaio.github.io)](https://juliaio.github.io/VideoIO.jl/latest/writing/)

I want to do something like:

```julia
import VideoIO
imgstack = map(x->rand(UInt8, 100, 100, 3), 1:100) #vector of 3D arrays. RGB.
encoder_options = (crf=23, preset="medium")
VideoIO.save("video.mp4", imgstack, framerate=30, encoder_options=encoder_options)

```

This works for grayscale images i.e., when `framestack = map(x->rand(UInt8, 100, 100), 1:100) #vector of 2D arrays`.

Would appreciate any help.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 25, 2021, 6:01pm UTC](https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992/2 "2021-08-25T18:01:27Z")

</div>

[https://juliaio.github.io/VideoIO.jl/latest/writing/#Supported-Colortypes](https://juliaio.github.io/VideoIO.jl/latest/writing/#Supported-Colortypes)

you need `RGB{N0f8}` as eltype if you want to produce colored video output
