What I’ve done in a similar situation is have ffmpeg send a sequence of PNG images to the pipe, and then parse those from Julia. This requires PNG encoding/decoding of every frame, so not CPU efficient, but at least it is lossless. It also works in the other direction, sending frames to ffmpeg for encoding as a movie.
Code can be found here:
https://github.com/perrutquist/FFmpegPipe.jl