[sip-comm-dev] Tests with video - some problems


#1

Now that I'm a proud owner of a Web Cam I started to test
SC with video, mainly to see the multi-stream behavior of
ZRTP. All the following tests were done on an openSuse 11.1,
KDE 4.1.3, decent v4l2 driver and environment. The SC
was updated from SVN just yesterday and "ant rebuild" was
done.

During the tests I got several problems (as usual :slight_smile: ).

On a first call I could see the picture (video) at the calling
side of SC, not on the called part.

On a second call I could see pictures on both sides, but the
receiving side reported quite a lot of messages:

聽聽聽聽聽[java] [h264 @ 0x2dbd330]number of reference frames exceeds max (probably corrupt input), discarding one

and the picture "stuttered" quite often. The video stream was not
encrypted/secured in any way.

After I plugged off / plugged on the Webcam SC refused to work
with it, a black screen on the calling side, nothing on the receiver,
wireshark show no video RTP stream.

See the following error messages:

聽聽聽聽聽[java] opened v4l2 device
聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] V4L2CaptureStream::dispose()
聽聽聽聽聽[java] V4L2CaptureStream::dispose: waiting for thread to stop
聽聽聽聽聽[java] MMAP: Cannot allocate memoryfg2_startCapture(): assignMBufs: Cannot allocate memoryV4L2CaptureStream::dispose: thread stopped

聽聽聽聽聽[java] 13:48:29.562 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: fg2_startCapture failed: -1

聽聽聽聽聽[java] com.lti.civil.CaptureException: fg2_startCapture failed: -1
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

聽聽聽聽聽[java] fg2_startCapture failed: -1

Well, after some work (plug off / plug in) luvcview worked again and showed
a nice picture. Again starting SC. Now I received the following:

聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Adding buffers to dirver Queue
聽聽聽聽聽[java] Turning streaming on
聽聽聽聽聽[java] Capturing started
聽聽聽聽聽[java] Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] 14:45:03.101 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

Seems that luvcview sets the WebCam to some mode that SC doesn't like ?

However, plug off/plug in didn't cure the problems. No picture so far. For the
first time when it worked the WebCam was plugged in during boot thus it was a
"fresh" setup of the camera

Some other stuff I noticed: quite often, after starting a video call, the system
nearly stops working (a dual core AMD 4200, 2GB main mem). The load sky-rockets,
paging/swapping starts and nearly brings the system down. Some evaluation shows:

- one Thread of SC is nearly in a busy loop, its CPU time goes up constantly and
聽聽very fast
- The complete memory of the system is somehow allocated, not for cache but for
聽聽processes

I started SC with WebCam plugged in: shortly after the start nearly all memory
is used, just by starting SC and doing nothing (only the automatic REGISTER
processing). Stopping SC releases the memory and the system returns to normal
behaviour.

After all, SC seems to require quite some system resources.

Some ideas or thoughts?

Regards,
Werner

路路路

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey (again :slight_smile: ) Werner,

These are very valuable. Could you please open an issue for them too?

If you could also attach a short description of the steps that are
necessary to reproduce them then that would be extremely helpful and
would *greatly* facilitate debugging and the fix!

Cheers
Emil

Werner Dittmann wrote:

路路路

Now that I'm a proud owner of a Web Cam I started to test
SC with video, mainly to see the multi-stream behavior of
ZRTP. All the following tests were done on an openSuse 11.1,
KDE 4.1.3, decent v4l2 driver and environment. The SC
was updated from SVN just yesterday and "ant rebuild" was
done.

During the tests I got several problems (as usual :slight_smile: ).

On a first call I could see the picture (video) at the calling
side of SC, not on the called part.

On a second call I could see pictures on both sides, but the
receiving side reported quite a lot of messages:

聽聽聽聽聽[java] [h264 @ 0x2dbd330]number of reference frames exceeds max (probably corrupt input), discarding one

and the picture "stuttered" quite often. The video stream was not
encrypted/secured in any way.

After I plugged off / plugged on the Webcam SC refused to work
with it, a black screen on the calling side, nothing on the receiver,
wireshark show no video RTP stream.

See the following error messages:

聽聽聽聽聽[java] opened v4l2 device
聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] V4L2CaptureStream::dispose()
聽聽聽聽聽[java] V4L2CaptureStream::dispose: waiting for thread to stop
聽聽聽聽聽[java] MMAP: Cannot allocate memoryfg2_startCapture(): assignMBufs: Cannot allocate memoryV4L2CaptureStream::dispose: thread stopped

聽聽聽聽聽[java] 13:48:29.562 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: fg2_startCapture failed: -1

聽聽聽聽聽[java] com.lti.civil.CaptureException: fg2_startCapture failed: -1
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

聽聽聽聽聽[java] fg2_startCapture failed: -1

Well, after some work (plug off / plug in) luvcview worked again and showed
a nice picture. Again starting SC. Now I received the following:

聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Adding buffers to dirver Queue
聽聽聽聽聽[java] Turning streaming on
聽聽聽聽聽[java] Capturing started
聽聽聽聽聽[java] Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] 14:45:03.101 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

Seems that luvcview sets the WebCam to some mode that SC doesn't like ?

However, plug off/plug in didn't cure the problems. No picture so far. For the
first time when it worked the WebCam was plugged in during boot thus it was a
"fresh" setup of the camera

Some other stuff I noticed: quite often, after starting a video call, the system
nearly stops working (a dual core AMD 4200, 2GB main mem). The load sky-rockets,
paging/swapping starts and nearly brings the system down. Some evaluation shows:

- one Thread of SC is nearly in a busy loop, its CPU time goes up constantly and
聽聽very fast
- The complete memory of the system is somehow allocated, not for cache but for
聽聽processes

I started SC with WebCam plugged in: shortly after the start nearly all memory
is used, just by starting SC and doing nothing (only the automatic REGISTER
processing). Stopping SC releases the memory and the system returns to normal
behaviour.

After all, SC seems to require quite some system resources.

Some ideas or thoughts?

Regards,
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Emil,

Emil Ivov schrieb:

Hey (again :slight_smile: ) Werner,

These are very valuable. Could you please open an issue for them too?

sure - just a day or so. Below I give the description what I did
(I copy it over to the bug-tracker too).

If you could also attach a short description of the steps that are
necessary to reproduce them then that would be extremely helpful and
would *greatly* facilitate debugging and the fix!

Well, really nothing special. Just started SC on my openSuSe
and tried to enjoy my new WebCam :wink: .

The actions, chronological

The WebCam was plugged in during boot. Start SC - and SC shows the video
locally. Then call another SC (on XP). No picture there.

Hangup the call (from calling party). Try another call. This time,
some seconds after call set-up, the called SC also showed the video
(in this case Audio was encrypted, video not - that helped me to
fix a problem in ZRTP setup :wink: )

The third attempt to setup a call: no video was possible anymore,
I got the error messages shown below (cannot allocat memory...)

I disconnected the WebCam and re-connected again. Started SC and
tried again to setup a session. This time the system was really
overloaded as described below (memory exhausted). No video displayed
after call setup. After I stopped SC I tried luvcview and this
didn't work either just showing a black screen.

Then again, disconnect/reconnect the cam, started luvcview immediately
after reconnecting the camera - it worked again, shows a nice video.
Then starting SC, most memory was eaten up nearly immediatly after
SC start. Trying to setup a call: no video, and showing the error
message "Not a JPG file" while trying to setup a call. Seems that
luvcview sets the cam to a format/state the SC doesn't like.

Regards,
Werner

路路路

Cheers
Emil

Werner Dittmann wrote:

Now that I'm a proud owner of a Web Cam I started to test
SC with video, mainly to see the multi-stream behavior of
ZRTP. All the following tests were done on an openSuse 11.1,
KDE 4.1.3, decent v4l2 driver and environment. The SC
was updated from SVN just yesterday and "ant rebuild" was
done.

During the tests I got several problems (as usual :slight_smile: ).

On a first call I could see the picture (video) at the calling
side of SC, not on the called part.

On a second call I could see pictures on both sides, but the
receiving side reported quite a lot of messages:

聽聽聽聽聽[java] [h264 @ 0x2dbd330]number of reference frames exceeds max (probably corrupt input), discarding one

and the picture "stuttered" quite often. The video stream was not
encrypted/secured in any way.

After I plugged off / plugged on the Webcam SC refused to work
with it, a black screen on the calling side, nothing on the receiver,
wireshark show no video RTP stream.

See the following error messages:

聽聽聽聽聽[java] opened v4l2 device
聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] V4L2CaptureStream::dispose()
聽聽聽聽聽[java] V4L2CaptureStream::dispose: waiting for thread to stop
聽聽聽聽聽[java] MMAP: Cannot allocate memoryfg2_startCapture(): assignMBufs: Cannot allocate memoryV4L2CaptureStream::dispose: thread stopped

聽聽聽聽聽[java] 13:48:29.562 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: fg2_startCapture failed: -1

聽聽聽聽聽[java] com.lti.civil.CaptureException: fg2_startCapture failed: -1
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

聽聽聽聽聽[java] fg2_startCapture failed: -1

Well, after some work (plug off / plug in) luvcview worked again and showed
a nice picture. Again starting SC. Now I received the following:

聽聽聽聽聽[java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
聽聽聽聽聽[java] discover_inputs()
聽聽聽聽聽[java] Found sources: 1
聽聽聽聽聽[java] 0 - Camera 1 (2)
聽聽聽聽聽[java] Assigning buffers
聽聽聽聽聽[java] assignMBufs()
聽聽聽聽聽[java] Adding buffers to dirver Queue
聽聽聽聽聽[java] Turning streaming on
聽聽聽聽聽[java] Capturing started
聽聽聽聽聽[java] Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
聽聽聽聽聽[java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
聽聽聽聽聽[java] 14:45:03.101 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] com.lti.civil.CaptureException: Not a JPG file ?
聽聽聽聽聽[java] : 0
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
聽聽聽聽聽[java] at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)

Seems that luvcview sets the WebCam to some mode that SC doesn't like ?

However, plug off/plug in didn't cure the problems. No picture so far. For the
first time when it worked the WebCam was plugged in during boot thus it was a
"fresh" setup of the camera

Some other stuff I noticed: quite often, after starting a video call, the system
nearly stops working (a dual core AMD 4200, 2GB main mem). The load sky-rockets,
paging/swapping starts and nearly brings the system down. Some evaluation shows:

- one Thread of SC is nearly in a busy loop, its CPU time goes up constantly and
聽聽very fast
- The complete memory of the system is somehow allocated, not for cache but for
聽聽processes

I started SC with WebCam plugged in: shortly after the start nearly all memory
is used, just by starting SC and doing nothing (only the automatic REGISTER
processing). Stopping SC releases the memory and the system returns to normal
behaviour.

After all, SC seems to require quite some system resources.

Some ideas or thoughts?

Regards,
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hey Werner,

Werner Dittmann wrote:

Well, really nothing special. Just started SC on my openSuSe
and tried to enjoy my new WebCam :wink: .

The actions, chronological

The WebCam was plugged in during boot. Start SC - and SC shows the video
locally. Then call another SC (on XP). No picture there.

Does this happen every time? If yes, then could you please add it to the
new issue? Otherwise, that is if it doesn't happen every time, do you
think you can find some steps that help reproduce it?

Cheers
Emil

路路路

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Emil,

well, I did some more discovery and now found a reason.

The second system, a Windows XP, does _not_ have a WebCam
_and_ has a very strict firewall that does not allow incomming
data on UDP ports, only "related" data once some application
sent data using that UDP port. This was the reason we modified
address detection some time ago.

The SC on the XP systems does not send any video data and
thus the port is not opened and cannot receive video data
from the other system. Audio is no problem, it's bi-directional.

Why did it work then? Simple: I use ZRTP. After the audio session
completed the ZRTP negotiation it triggered sending of Hello
packets also for the video session - and these Helloe packets
"drilled" the hole in the firewall and SC on the XP system
could receive the video stream.

Why it didn't work the very first time? I don't know exactly,
but I suspect that I didn't wait for the video to appear or
the the first time too many packet were discared as the warning
messages indicate (se my first post of this thread).

This of course does not explain the other problem with SC and
video on my Linux box - that remains to be solved.

I'll do some more tests once I get the XP sytsem again in my
configuration and the problem with SC/video are solved on my
Linux box.

BTW, could this be a problem for NAT'ed SC in the same mode?
Often NAT devices open the port only after a first packet was

Regards,
Werner

Emil Ivov schrieb:

路路路

sent by the system behind the NAT.

Hey Werner,

Werner Dittmann wrote:

Well, really nothing special. Just started SC on my openSuSe
and tried to enjoy my new WebCam :wink: .

The actions, chronological

The WebCam was plugged in during boot. Start SC - and SC shows the video
locally. Then call another SC (on XP). No picture there.

Does this happen every time? If yes, then could you please add it to the
new issue? Otherwise, that is if it doesn't happen every time, do you
think you can find some steps that help reproduce it?

Cheers
Emil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net