JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
126 stars 53 forks source link

Should we use sws-scale for encoding? #285

Closed galenlynch closed 3 years ago

galenlynch commented 3 years ago

Given the inaccuracies with encoding color described in #283 and #284, and also how hard it will be to e.g. add support for encoding YUV444 videos, perhaps one thing we could do is uses ffmpeg's sws_scale to convert between pixel formats, as we already do for decoding. Input Julia buffers could be transferred into a frame that has a nearly 1:1 relationship with the Julia buffer, and then sws_scale could convert that frame into a pixel format that the encoder accepts and the user specifies.