[Libav-user] av_read_frame surprisingly slow

ffmpeg at mxwendler.net ffmpeg at mxwendler.net
Tue Feb 26 15:52:59 EET 2019


we want to present very large video files (8K) and use the Hap codec. We
created an 8K60 mp4 file from an image sequence using ffmpeg (we can
bring up the command line if requested)

We demux the file using libav, and do the decompressing with snappy and
display with OpenGL and a custom shader. ( so no libav is used to
decompress the video stream )

Everything works fine so far, but we face performance problems. The
problems are at an unexpected location, av_read_frame()

For example, a frame has following size / times:

frame: 991 has size 24909485
decode hap: av_read_frame 19.60
decode hap: av_free_packet 1.69

So it takes almost 20ms to read a frame from the stream which has a
(compressed) size of 24MB. The disk is a m.2 disk, so reading the data
should take not much more than 1-2ms.

Does anyone have an idea / tip / clue / hint where the time is spent?

Best regards,

More information about the Libav-user mailing list