This process is taking very large amount of space, and waste a lot of time, ffmpeg can decode any video and feed it to dain directly, can you add this feature? The project isn't open source, that is very disappointing and nobody can help you with this, but here is api example https://www.ffmpeg.org/doxygen/0.6/api-example_8c-source.html