Interlacing frames from videos

TL,DR: This is a call for help to improve de-interlacing in VideoIO.

Thanks to @ianshmean, VideoIO has received a large number of significant improvements lately. These changes make VideoIO a viable tool for reading and writing videos. There is however a few remaining issues to deal with. One of them is interlacing. Here is a MWE:

import FileIO, VideoIO
file = download("https://s3.eu-central-1.amazonaws.com/vision-group-file-sharing/Data%20backup%20and%20storage/Yakir/interlacing.mkv")
f = VideoIO.openvideo(file)
img = VideoIO.read(f)
FileIO.save("interlacing.jpg", img)

While a closeup of the extracted image looks like this:

ffmpeg manages to remedy the artifact with its yadif filter:

ffmpeg -i interlacing.mkv -vframes 1 -vf yadif interlacing.jpg

Can someone please take a look at this ffmpeg filtering example and help us convert it to Julia, similarly to how VideoIO's examples are? Alternatively, suggest a simpler way to implement filters?

The relevant VideoIO issue is here.

Thanks in advance!

1 Like

:+1:t2:As I mentioned on slack, I likely won’t have time to take this on. So I’ll just say that I learned from @kevin.squire that the best way to tackle new ffmpeg features is to convert the c examples.

As an example, https://github.com/JuliaIO/VideoIO.jl/blob/master/examples/encodevideo.jl is the conversion of https://www.ffmpeg.org/doxygen/trunk/encode_video_8c-example.html