[TriEmbed] Issues with streaming a webcam from my RPi

Ken carver_dude at hotmail.com
Sun Sep 22 09:42:13 CDT 2013


Issues with streaming a webcam from my RPiYour cpu /memory bandwidth is probably more limiting than your network. X, xterm, and your vnc server is taking up 75% of your CPU, which could be affecting how well you can process and transfer the video. Kill your VNC server and just telnet or ssh into it and you might get much better results.

From: The MacDougals 
Sent: Friday, September 20, 2013 11:51 PM
To: 'Triangle Embedded Computing Interest Group' 
Subject: Re: [TriEmbed] Issues with streaming a webcam from my RPi

Not much else going on with the system.

 

top - 22:04:03 up 47 min,  1 user,  load average: 0.46, 0.18, 0.10

Tasks:  84 total,   1 running,  83 sleeping,   0 stopped,   0 zombie

%Cpu(s): 63.2 us, 18.7 sy,  0.0 ni, 17.1 id,  0.3 wa,  0.3 hi,  0.3 si,  0.0 st

KiB Mem:    448776 total,   150456 used,   298320 free,    15036 buffers

KiB Swap:   102396 total,        0 used,   102396 free,    70788 cached

 

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                            

2011 root      20   0 34172  15m 6120 S  29.2  3.6   0:19.55 Xorg                                                                               

2526 pi        20   0 93488  10m 7936 S  24.0  2.5   0:04.94 lxterminal                                                                         

2014 pi        20   0 17936 7584 4500 S  21.4  1.7   0:19.22 x11vnc                                                                             

2085 motion    20   0 52104 9088 1724 S   2.6  2.0   1:17.17 motion                                                                             

2539 pi        20   0  5116 1336  972 R   1.6  0.3   0:01.07 top                                                                                

2291 pi        20   0 81988 9000 6628 S   0.6  2.0   0:09.12 lxpanel                                                                            

   11 root      20   0     0    0    0 S   0.3  0.0   0:01.02 kworker/0:1                                                                        

2247 pi        20   0 12792 1504 1264 S   0.3  0.3   0:00.25 lxsession                                                                          

2289 pi        20   0 15260 6216 4520 S   0.3  1.4   0:01.16 openbox                                                                            

    1 root      20   0  2144  728  620 S   0.0  0.2   0:01.79 init 

...              

 

 

Exiting my VNC session does not impact the BW I see.

With Chrome trying to connect, the results look similar.

 

Oh well.  I could try a clean install, I guess.

 

---> Paul

 

 

 

From: TriEmbed [mailto:triembed-bounces at triembed.org] On Behalf Of The MacDougals
Sent: Friday, September 20, 2013 11:08 PM
To: 'Triangle Embedded Computing Interest Group'
Subject: Re: [TriEmbed] Issues with streaming a webcam from my RPi

 

I isolated my network to just the RPi and my Computer and still only get 2.8K/s.

 

 

 

From: TriEmbed [mailto:triembed-bounces at triembed.org] On Behalf Of The MacDougals
Sent: Friday, September 20, 2013 10:42 PM
To: 'Triangle Embedded Computing Interest Group'
Subject: [TriEmbed] Issues with streaming a webcam from my RPi

 

I had this working fine in June, but not so much today.

The setup is mostly like what is outlined here: http://iiternal.blogspot.com/2013/01/a-cheap-surveillance-camera-using.html

Things look fine on the RPi side (the date is wrong):

Jan 26 21:15:51 raspberrypi motion: [0] Processing thread 0 - config file /etc/motion/motion.conf

Jan 26 21:15:51 raspberrypi motion: [0] Motion 3.2.12 Started

Jan 26 21:15:51 raspberrypi motion: [0] Created process id file /var/run/motion/motion.pid. Process ID is 2088

Jan 26 21:15:51 raspberrypi motion: [0] Motion running as daemon process

Jan 26 21:15:51 raspberrypi motion: [0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785

Jan 26 21:15:51 raspberrypi motion: [0] Thread 1 is from /etc/motion/motion.conf

Jan 26 21:15:51 raspberrypi motion: [1] Thread 1 started

Jan 26 21:15:51 raspberrypi motion: [1] cap.driver: "uvcvideo"

Jan 26 21:15:51 raspberrypi motion: [1] cap.card: "Microsoft® LifeCam VX-2000"

Jan 26 21:15:51 raspberrypi motion: [1] cap.bus_info: "usb-bcm2708_usb-1.3.4"

Jan 26 21:15:51 raspberrypi motion: [1] cap.capabilities=0x04000001

Jan 26 21:15:51 raspberrypi motion: [1] - VIDEO_CAPTURE

Jan 26 21:15:51 raspberrypi motion: [1] - STREAMING

Jan 26 21:15:51 raspberrypi motion: [1] Config palette index 8 (YU12) doesn't work.

Jan 26 21:15:51 raspberrypi motion: [1] Supported palettes:

Jan 26 21:15:51 raspberrypi motion: [1] 0: YUYV (YUV 4:2:2 (YUYV))

Jan 26 21:15:51 raspberrypi motion: [1] 1: MJPG (MJPEG)

Jan 26 21:15:51 raspberrypi motion: [1] Selected palette YUYV

Jan 26 21:15:51 raspberrypi motion: [0] motion-httpd/3.2.12 running, accepting connections

Jan 26 21:15:51 raspberrypi motion: [0] motion-httpd: waiting for data on port TCP 8080

Jan 26 21:15:51 raspberrypi motion: [1] Test palette YUYV (320x240)

Jan 26 21:15:51 raspberrypi motion: [1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000000

Jan 26 21:15:51 raspberrypi motion: [1] found control 0x00980900, "Brightness", range -16,16

Jan 26 21:15:51 raspberrypi motion: [1] #011"Brightness", default -8193, current 0

Jan 26 21:15:51 raspberrypi motion: [1] found control 0x00980901, "Contrast", range 1,32

Jan 26 21:15:51 raspberrypi motion: [1] #011"Contrast", default 57343, current 16

Jan 26 21:15:51 raspberrypi motion: [1] found control 0x00980902, "Saturation", range 0,60

Jan 26 21:15:51 raspberrypi motion: [1] #011"Saturation", default 57343, current 18

Jan 26 21:15:51 raspberrypi motion: [1] found control 0x00980903, "Hue", range -45,45

Jan 26 21:15:51 raspberrypi motion: [1] #011"Hue", default -8193, current 0

Jan 26 21:15:51 raspberrypi motion: [1] found control 0x00980910, "Gamma", range 100,200

Jan 26 21:15:51 raspberrypi motion: [1] #011"Gamma", default 61432, current 150

Jan 26 21:15:51 raspberrypi motion: [1] mmap information:

Jan 26 21:15:51 raspberrypi motion: [1] frames=4

Jan 26 21:15:51 raspberrypi motion: [1] 0 length=153600

Jan 26 21:15:51 raspberrypi motion: [1] 1 length=153600

Jan 26 21:15:51 raspberrypi motion: [1] 2 length=153600

Jan 26 21:15:51 raspberrypi motion: [1] 3 length=153600

Jan 26 21:15:51 raspberrypi motion: [1] Resizing pre_capture buffer to 1 items

Jan 26 21:15:51 raspberrypi motion: [1] Started stream webcam server in port 8081

I can use wget on my desktop computer (win7-64) and see the connection and a trickle of data:

$ wget 192.168.0.3:8081

--2013-09-20 22:35:19--  http://192.168.0.3:8081/

Connecting to 192.168.0.3:8081... connected.

HTTP request sent, awaiting response... 200 OK

Length: unspecified [multipart/x-mixed-replace]

Saving to: `index.html'

    [                    <=>                ] 130,974     2.95K/s

Nothing shows up when I try to connect with Chrome.

I am thinking the issue is with the 2.9K/s data transfer rate.

pi at raspberrypi /var/log $ ifconfig

eth0      Link encap:Ethernet  HWaddr b8:27:eb:3a:de:a1  

          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:8888 errors:0 dropped:0 overruns:0 frame:0

          TX packets:9888 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:504663 (492.8 KiB)  TX bytes:7587363 (7.2 MiB)

Any suggestions?

---> Paul



--------------------------------------------------------------------------------
_______________________________________________
Triangle, NC Embedded Computing mailing list
TriEmbed at triembed.org
http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
TriEmbed web site: http://TriEmbed.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20130922/554b72c5/attachment.htm>


More information about the TriEmbed mailing list