I am facing a difficult headache where I need to optimize the performance of a outsourced piece of code. In this outsourced application I need to cut, trim, scale and crop video.
I see they were using some kind of FFMPEG Library (without NDK), but the performance was very terrible. It takes the app 30 seconds to
-vf crop=480:480:0:80 -preset ultrafast -threads 5 -vcodec libx264 -acodec copy
a 15 seconds 640x480 videos. I need it to crop in 2 or 3 seconds, just like how Instagram did with their videos.
Any suggestion, tutorial or general approach to this? Should I continue to optimize the FFMPEG parameters, should I compile FFMPEG using NDK
and use other FFMPEG Wrapper, or should I use TextureView
? I also need to apply filter like -vf curves
, so maybe TextureView is not the right approach.