Hi guys interested in video streaming,
I'm running the latest of trunk with a few local optimizations to the
JNIEncoder on Ubuntu Karmic with Apple iSight. I'm testing a P2P call
with H.264 video streaming in both directions, the call window is in
its default size. The CPU utilization of SIP Communicator is roughly
150%, most of the time more.
Looking at a breakdown of the system load shows that:
1. 46% of the time was spent in the kernel. Not surprising I presume.
I guess it also has to do with the V4L2 driver utilized by the video
2. 12% was given to libcivil.so and, more specifically, to its
uyvy2bgr. A bit of an unexpected entry for the second place. While SIP
Communicator takes more than 150% of the CPU, Cheese manages to
capture and display the video frames with only 10% CPU utilization!
3. 6% was allocated to libffmpeg.so i.e. the native counterpart of our
H.264 encoder and decoder. While H.264 encoding is kind of supposed to
be heavy on the CPU, LTI-CIVIL still managed to beat it.
The top of the breakdown of the java process looks like:
1. 47% for com.sun.media.codec.video.colorspace.JavaRGBToYUV.convert24.
Taking in account the result of libcivil.so from the system-wide
profile, I guess converting between RGB and YUV is pretty intensive,
more than encoding and decoding H.264 at the same time.
2. 25% of the Java time is in
Whatever it's converting, it still sounds an awful lot to me.
3. 0.1989% for the first pure SC entry in the profile
Only included here for the purposes of comparison.
I think it's worth looking into what LTI-CIVIL and JMF know (or rather
don't know) about converting between RGB and YUV. I've already entered
the following issues in our issue tracker which should track the
progress of finding answers to these questions:
Optimize ImageScaler. It seems like the best for us is to find a good
way to convert in a single go (read JMF Codec) between as many RGB and
YUV types as possible. Is FFmpeg's libswscale the answer?
video4linux2 video CaptureDevice. I guess one could fix LTI-CIVIL
instead, I don't personally plan on digging into LTI-CIVIL and I'd
rather go with our own, JNI video4linux2 JMF CaptureDevice