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

Abhinav_Bhatia
Wed, 25 Aug 2021 17:05:11 +0000
General Usage

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)

I want to do something like:

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.

2 posts - 2 participants