VideoIO.jl icon indicating copy to clipboard operation
VideoIO.jl copied to clipboard

RGB4 with codec libx264 not currently supported

Open jessebett opened this issue 5 years ago • 5 comments

This is the result of saving pngs from Plots.jl with the default savefig("filename.png") and then loading that file with `load("filename.png"). This results in a file with

julia> typeof(load("filename.png))
Array{RGB4{Normed{UInt8,8}},2}

However, trying the defaults in #182 fails with Error:

julia> encoder = prepareencoder(load(imgs[1]))
ERROR: VideoIO: Encoding image element type RGB4{Normed{UInt8,8}} with
        codec libx264 not currently supported

jessebett avatar Jun 05 '19 22:06 jessebett

Thanks! It's not specific to #182 (which is now merged)

It would be good to figure out a generic strategy for mapping eltypes to ffmpeg pixel formats, or just add a few more cases to cover the common ones

IanButterworth avatar Jun 05 '19 22:06 IanButterworth

I have some similar issues, but with encodevideo, following the example

VideoIO: Encoding image element type ColorTypes.RGBA{FixedPointNumbers.Normed{UInt8,8}} with codec libx264 not currently supported

henry2004y avatar Oct 24 '19 18:10 henry2004y

Evidently we need to generalize conversion between a variety of RGB formats (and more) but for now could you convert from RGBA to RGB, @henry2004y?

IanButterworth avatar Oct 24 '19 19:10 IanButterworth

I'm having the same issue as @jessebett , is there any solution yet?

tachsin avatar Sep 28 '20 21:09 tachsin

Sorry this hasn't been fixed yet, but as above you can just RGB(img) whenever you pass the image to VideoIO

IanButterworth avatar Sep 28 '20 22:09 IanButterworth