embeded/raspberry pi2015. 9. 20. 18:28

패키지 설치

$ sudo apt-get update

$ sudo apt-get install gstreamer1.0 gstreamer1.0-omx


server

$ raspivid -t 0 -w 1280 -h 720 -fps 30 -hf -b 2000000 -n -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.219.148 port=5000


client

$ gst-launch-1.0 -v tcpclientsrc host=192.168.219.148 port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false


라즈베리 2B -> B

성능 차이도 있긴 하지만.. CPU 점유율이 상당히 낮다 (라즈베리 2B)

top - 18:37:16 up 39 min,  3 users,  load average: 0.12, 0.38, 0.31

Tasks: 108 total,   1 running, 107 sleeping,   0 stopped,   0 zombie

%Cpu(s):  2.7 us,  0.4 sy,  0.0 ni, 96.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st

KiB Mem:    884384 total,   492260 used,   392124 free,    29196 buffers

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


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

 6214 pi        20   0 42812  13m 6260 S  22.1  1.5   0:21.53 gst-launch-1.0

반면.. 클라이언트는 성능이 꾸져서 인가.. cpu가 하늘을 찌른다 .. ㄷㄷㄷ(라즈베리 B)

top - 18:37:31 up 19 min,  2 users,  load average: 1.10, 0.98, 0.66

Tasks:  67 total,   1 running,  66 sleeping,   0 stopped,   0 zombie

%Cpu(s): 89.1 us,  2.6 sy,  0.0 ni,  7.9 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st

KiB Mem:    445804 total,   406424 used,    39380 free,    27972 buffers

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


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

 6411 pi        20   0 99.2m  23m  12m S  89.3  5.5   1:41.95 gst-launch-1.0 


현재 상황으로는... 2b -> b 로는 스트리밍이 전혀 안되는 상황..

옵션이 문제인가..


라즈베리 B -> 2B

라즈베리 B.. 보내는 쪽은 낮네

 top - 19:00:28 up 18 min,  2 users,  load average: 0.06, 0.13, 0.13

Tasks:  68 total,   1 running,  67 sleeping,   0 stopped,   0 zombie

%Cpu(s):  5.0 us,  3.7 sy,  0.0 ni, 90.3 id,  0.0 wa,  0.0 hi,  1.0 si,  0.0 st

KiB Mem:    380780 total,    68340 used,   312440 free,    10220 buffers

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


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

 2325 pi        20   0 38028 9004 6220 S   5.9  2.4   1:03.73 gst-launch-1.0


라즈베리 2B.. 받는 쪽은 하늘을 찌른다. ㄷㄷㄷ

top - 19:00:32 up 17 min,  2 users,  load average: 2.44, 2.46, 1.71

Tasks: 106 total,   1 running, 105 sleeping,   0 stopped,   0 zombie

%Cpu(s): 49.4 us,  5.5 sy,  0.0 ni, 44.9 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st

KiB Mem:    884384 total,   218004 used,   666380 free,    17676 buffers

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


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

 2543 pi        20   0  158m  48m  12m S 168.8  5.6  27:10.75 gst-launch-1.0 






Posted by 구차니