Save in Quicktime-compatible format (not H264 - MPEG-4 AVC (part 10) )

I think this catches a lot of people out, not just in Julia.

The default also does not play in Firefox, and FF tells you it is a bad encoding (the error message is deliberately wrong and WontFix), so you fiddle with the encoder options instead of target_pix_fmt

Here’s my code to create a Firefox compatible video from still images

    firstimg = RGB{N0f8}.(load(imgnames[1]))
    open_video_out("$(vfname).$(ftype)", firstimg, framerate=24, target_pix_fmt =VideoIO.AV_PIX_FMT_YUV420P) do writer
        @showprogress "Encoding video frames.." for i in eachindex(imgnames)
           img = RGB{N0f8}.(load(imgnames[i]))
           write(writer, img)
        end
    end
2 Likes