dukebw / lintel

A Python module to decode video frames directly, using the FFmpeg C API.
Apache License 2.0
261 stars 38 forks source link

how does it perform compared to ffmpeg-python ? #24

Open zzc-master opened 5 years ago

zzc-master commented 5 years ago

Hi, I am wondering how does it perform compared to ffmpeg-python ? https://github.com/kkroening/ffmpeg-python

dukebw commented 5 years ago

Hi, Lintel is different from ffmpeg-python because Lintel directly links to the libav libraries, whereas ffmpeg-python pipes commands to FFmpeg through stdio. I found that piping through stdio caused performance issues with too much parallelism (threads or processes).

zzc-master commented 5 years ago

Hi, Lintel is different from ffmpeg-python because Lintel directly links to the libav libraries, whereas ffmpeg-python pipes commands to FFmpeg through stdio. I found that piping through stdio caused performance issues with too much parallelism (threads or processes).

Thanks, I see. Here is another question. If I install OpenCV library with FFmpeg support, I can use videocapture to read videos. How does it perform compared to Lintel?

dukebw commented 5 years ago

I think Lintel would definitely be no slower than OpenCV, and there might be some overhead (due to all the OO) in OpenCV that makes Lintel a bit faster. But I doubt it, they are probably the same speed because they are doing the same thing (calling libav APIs). I think OpenCV only supports an ancient version of FFmpeg, and doesn't use the send/receive_frame API, last time I checked.

dukebw commented 5 years ago

I would certainly welcome any profiling to compare the two :).