Time consumption of ffio - dongrixinyu/ffio GitHub Wiki
test speed of ffio
aiming to test the speed of Python wrapper for FFmpeg-C-API compared with pure FFmpeg-C-API
The test condition:
AMD x86_64 (16 cpu cores),
Ubuntu 18.04, gcc, FFmpeg-6.0, Python 3.10.
video: 29.97fps, 1920*1080p, 2M/s
running 1 loop of decode-ffio is composed of decode-C(purely call FFmpeg-C-API to get 1 frame) and decode-py-convertor(convert C image frame to python format, numpy default). Same to encoder items.
The table below shows that decoding 1 frame costs 15.84ms in average, in which 1.49ms is used to convert decoded image in C format(unsigned char *) to python format(numpy, etc.). encoding 1 frame costs 11.96ms in average, in which 2.03ms is used to do C-py format conversion.