Writing videos doesn't work correctly on Mac M1 Monterey
Opened this issue · 2 comments
davidalencia commented
When I write a video with RGB{N0f8} the video isn't viewable by any video player.
I am running julia with a mac M1 Monterey
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.2.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
This is the minimal code to create a falling video
using VideoIO
framestack = map(x->rand(RGB{N0f8}, 100, 100), 1:100) #vector of 2D arrays
encoder_options = (crf=23, preset="medium")
framerate=24
open_video_out("video.mp4", framestack[1], framerate=framerate, encoder_options=encoder_options) do writer
for frame in framestack
write(writer, frame)
end
end
This appears when you try to open the video. Is spanish for: "The document couldn't be open"
giordano commented
Works for me with VLC, sounds like a problem with QuickTime? Side note, your code isn't reproducible, it's missing imports of ColorTypes
and FixedPointNumbers
.
bjarthur commented
i'm able to open videos in quicktime if i pass codec_name="libx264", target_pix_fmt=VideoIO.AV_PIX_FMT_YUV422P
into open_video_out
. should consider making this the default on macs since quicktime is the default video player and is otherwise broken.