개발자/Raspberry Pi

라즈베리 파이에서 Gstreamer 설치 테스트 스트리밍하는 방법

지구빵집 2016. 8. 31. 15:15
반응형






G 스트리머 홈페이지  : https://gstreamer.freedesktop.org/ 



GStreamer 홈페이지입니다. 최근까지도 자료들이 꾸준히 업데이트되고 있습니다.


~$ wget http://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-0.10.8.tar.bz2

~$ bzip2 -d gst-rtsp-0.10.8.tar.bz2

~$ tar xvf gst-rtsp-0.10.8.tar

~$ cd  gst-rtsp-0.10.8


위의 명령어를 차례로 입력합니다. Gstreamer RTSP 서버 프로그램을 다운받고 압축을 푸는 과정입니다. 


그러면 이제 Gstreamer 라이브러리를 설치해야 합니다. 서버의 버전과 호환이 되야하기 때문에 더 높은 GStreamer 패키지를 설치해도 다음과 같은 명령어를 통해 라이브러리를 받으셔야 합니다.


/gst-rtsp-0.10.8 $ sudo apt-get install libglib2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly



위 명령어를 실행해서 설치하는 과정의 메지시입니다.


pi@raspberrypi:~/gst-rtsp-0.10.8 $ sudo apt-get install libglib2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다

상태 정보를 읽는 중입니다... 완료

gstreamer0.10-plugins-base 패키지는 이미 최신 버전입니다.

gstreamer0.10-plugins-base 패키지 수동설치로 지정합니다.

다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:

  libgssapi3-heimdal libheimntlm0-heimdal

Use 'apt-get autoremove' to remove them.

다음 패키지를 더 설치할 것입니다:

  autopoint debhelper gettext gir1.2-gst-plugins-base-0.10 gir1.2-gstreamer-0.10 gstreamer0.10-gconf gstreamer0.10-tools

  gstreamer0.10-x intltool-debian liba52-0.7.4 libasprintf-dev libcdaudio1 libdirac-encoder0 libgettextpo-dev libgettextpo0

  libgstreamer-plugins-bad0.10-0 libmail-sendmail-perl libmpcdec6 libmpeg2-4 libopencore-amrnb0 libopencore-amrwb0 libpcre3

  libpcre3-dev libpcrecpp0 libsidplay1 libslv2-9 libsys-hostname-long-perl libtwolame0 libunistring0 libxml2 libxml2-dev

  libzvbi-common libzvbi0 po-debconf

제안하는 패키지:

  dh-make gettext-doc frei0r-plugins libglib2.0-doc gstreamer0.10-doc sidplay-base xsidplay slv2-jack libmail-box-perl

다음 새 패키지를 설치할 것입니다:

  autopoint debhelper gettext gir1.2-gst-plugins-base-0.10 gir1.2-gstreamer-0.10 gstreamer-tools gstreamer0.10-gconf

  gstreamer0.10-plugins-bad gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-tools gstreamer0.10-x

  intltool-debian liba52-0.7.4 libasprintf-dev libcdaudio1 libdirac-encoder0 libgettextpo-dev libgettextpo0 libglib2.0-dev

  libgstreamer-plugins-bad0.10-0 libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libmail-sendmail-perl libmpcdec6

  libmpeg2-4 libopencore-amrnb0 libopencore-amrwb0 libpcre3-dev libpcrecpp0 libsidplay1 libslv2-9 libsys-hostname-long-perl

  libtwolame0 libunistring0 libxml2-dev libzvbi-common libzvbi0 po-debconf

다음 패키지를 업그레이드할 것입니다:

  libpcre3 libxml2

2개 업그레이드, 39개 새로 설치, 0개 제거 및 121개 업그레이드 안 함.

19.8 M바이트 아카이브를 받아야 합니다.

이 작업 후 48.7 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까? [Y/n] y

받기:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpcre3 armhf 2:8.35-3.3+deb8u4 [301 kB]

받기:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libxml2 armhf 2.9.1+dfsg1-5+deb8u2 [705 kB]

받기:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdirac-encoder0 armhf 1.0.2-7.1 [286 kB]

받기:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libunistring0 armhf 0.9.3-5.2 [253 kB]

받기:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgettextpo0 armhf 0.19.3-2 [115 kB]

받기:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmpcdec6 armhf 2:0.1~r459-4.1 [32.1 kB]

받기:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmpeg2-4 armhf 0.5.1-7 [54.1 kB]

받기:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main libopencore-amrnb0 armhf 0.1.3-2.1 [80.4 kB]

받기:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main libopencore-amrwb0 armhf 0.1.3-2.1 [42.0 kB]

받기:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpcrecpp0 armhf 2:8.35-3.3+deb8u4 [140 kB]

받기:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main libzvbi-common all 0.2.35-3 [61.3 kB]

받기:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main libzvbi0 armhf 0.2.35-3 [235 kB]

받기:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcdaudio1 armhf 0.99.12p2-13 [46.3 kB]

받기:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgstreamer-plugins-bad0.10-0 armhf 0.10.23-7.4 [764 kB]

받기:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main libslv2-9 armhf 0.6.6+dfsg1-2 [24.9 kB]

받기:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-plugins-bad armhf 0.10.23-7.4 [1,874 kB]

받기:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main autopoint all 0.19.3-2 [413 kB]

받기:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main gettext armhf 0.19.3-2 [1,167 kB]

받기:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main intltool-debian all 0.35.0+20060710.1 [29.8 kB]

받기:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main po-debconf all 1.0.16+nmu3 [220 kB]

받기:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main debhelper all 9.20150101+deb8u2 [817 kB]

받기:22 http://mirrordirector.raspbian.org/raspbian/ jessie/main gir1.2-gstreamer-0.10 armhf 0.10.36-1.5 [674 kB]

받기:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main gir1.2-gst-plugins-base-0.10 armhf 0.10.36-2 [612 kB]

받기:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-tools armhf 0.10.36-1.5 [663 kB]

받기:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer-tools armhf 0.10.36-1.5 [629 kB]

받기:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-gconf armhf 0.10.31-3+nmu4 [706 kB]

받기:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-plugins-good armhf 0.10.31-3+nmu4 [1,878 kB]

받기:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main liba52-0.7.4 armhf 0.7.4-17 [28.9 kB]

받기:29 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsidplay1 armhf 1.36.59-6 [60.6 kB]

받기:30 http://mirrordirector.raspbian.org/raspbian/ jessie/main libtwolame0 armhf 0.3.13-1.1 [47.3 kB]

받기:31 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-plugins-ugly armhf 0.10.19-2.1+b1 [390 kB]

받기:32 http://mirrordirector.raspbian.org/raspbian/ jessie/main gstreamer0.10-x armhf 0.10.36-2 [621 kB]

받기:33 http://mirrordirector.raspbian.org/raspbian/ jessie/main libasprintf-dev armhf 0.19.3-2 [31.0 kB]

받기:34 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgettextpo-dev armhf 0.19.3-2 [128 kB]

받기:35 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpcre3-dev armhf 2:8.35-3.3+deb8u4 [413 kB]

받기:36 http://mirrordirector.raspbian.org/raspbian/ jessie/main libglib2.0-dev armhf 2.42.1-1 [2,472 kB]

받기:37 http://mirrordirector.raspbian.org/raspbian/ jessie/main libxml2-dev armhf 2.9.1+dfsg1-5+deb8u2 [616 kB]

받기:38 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgstreamer0.10-dev armhf 0.10.36-1.5 [1,380 kB]

받기:39 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgstreamer-plugins-base0.10-dev armhf 0.10.36-2 [745 kB]

받기:40 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsys-hostname-long-perl all 1.4-3 [11.6 kB]

받기:41 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmail-sendmail-perl all 0.79.16-1 [26.6 kB]

내려받기 19.8 M바이트, 소요시간 17초 (1,103 k바이트/초)

패키지에서 템플릿을 추출하는 중: 100%

(데이터베이스 읽는중 ...현재 127445개의 파일과 디렉터리가 설치되어 있습니다.)

Preparing to unpack .../libpcre3_2%3a8.35-3.3+deb8u4_armhf.deb ...

Unpacking libpcre3:armhf (2:8.35-3.3+deb8u4) over (2:8.35-3.3+deb8u2) ...

Processing triggers for man-db (2.7.0.2-5) ...

libpcre3:armhf (2:8.35-3.3+deb8u4) 설정하는 중입니다 ...

Processing triggers for libc-bin (2.19-18+deb8u3) ...

(데이터베이스 읽는중 ...현재 127445개의 파일과 디렉터리가 설치되어 있습니다.)

Preparing to unpack .../libxml2_2.9.1+dfsg1-5+deb8u2_armhf.deb ...

Unpacking libxml2:armhf (2.9.1+dfsg1-5+deb8u2) over (2.9.1+dfsg1-5+deb8u1) ...

Selecting previously unselected package libdirac-encoder0:armhf.

Preparing to unpack .../libdirac-encoder0_1.0.2-7.1_armhf.deb ...

Unpacking libdirac-encoder0:armhf (1.0.2-7.1) ...

Selecting previously unselected package libunistring0:armhf.

Preparing to unpack .../libunistring0_0.9.3-5.2_armhf.deb ...

Unpacking libunistring0:armhf (0.9.3-5.2) ...

Selecting previously unselected package libgettextpo0:armhf.

Preparing to unpack .../libgettextpo0_0.19.3-2_armhf.deb ...

Unpacking libgettextpo0:armhf (0.19.3-2) ...

Selecting previously unselected package libmpcdec6:armhf.

Preparing to unpack .../libmpcdec6_2%3a0.1~r459-4.1_armhf.deb ...

Unpacking libmpcdec6:armhf (2:0.1~r459-4.1) ...

Selecting previously unselected package libmpeg2-4:armhf.

Preparing to unpack .../libmpeg2-4_0.5.1-7_armhf.deb ...

Unpacking libmpeg2-4:armhf (0.5.1-7) ...

Selecting previously unselected package libopencore-amrnb0:armhf.

Preparing to unpack .../libopencore-amrnb0_0.1.3-2.1_armhf.deb ...

Unpacking libopencore-amrnb0:armhf (0.1.3-2.1) ...

Selecting previously unselected package libopencore-amrwb0:armhf.

Preparing to unpack .../libopencore-amrwb0_0.1.3-2.1_armhf.deb ...

Unpacking libopencore-amrwb0:armhf (0.1.3-2.1) ...

Selecting previously unselected package libpcrecpp0:armhf.

Preparing to unpack .../libpcrecpp0_2%3a8.35-3.3+deb8u4_armhf.deb ...

Unpacking libpcrecpp0:armhf (2:8.35-3.3+deb8u4) ...

Selecting previously unselected package libzvbi-common.

Preparing to unpack .../libzvbi-common_0.2.35-3_all.deb ...

Unpacking libzvbi-common (0.2.35-3) ...

Selecting previously unselected package libzvbi0:armhf.

Preparing to unpack .../libzvbi0_0.2.35-3_armhf.deb ...

Unpacking libzvbi0:armhf (0.2.35-3) ...

Selecting previously unselected package libcdaudio1.

Preparing to unpack .../libcdaudio1_0.99.12p2-13_armhf.deb ...

Unpacking libcdaudio1 (0.99.12p2-13) ...

Selecting previously unselected package libgstreamer-plugins-bad0.10-0:armhf.

Preparing to unpack .../libgstreamer-plugins-bad0.10-0_0.10.23-7.4_armhf.deb ...

Unpacking libgstreamer-plugins-bad0.10-0:armhf (0.10.23-7.4) ...

Selecting previously unselected package libslv2-9.

Preparing to unpack .../libslv2-9_0.6.6+dfsg1-2_armhf.deb ...

Unpacking libslv2-9 (0.6.6+dfsg1-2) ...

Selecting previously unselected package gstreamer0.10-plugins-bad:armhf.

Preparing to unpack .../gstreamer0.10-plugins-bad_0.10.23-7.4_armhf.deb ...

Unpacking gstreamer0.10-plugins-bad:armhf (0.10.23-7.4) ...

Selecting previously unselected package autopoint.

Preparing to unpack .../autopoint_0.19.3-2_all.deb ...

Unpacking autopoint (0.19.3-2) ...

Selecting previously unselected package gettext.

Preparing to unpack .../gettext_0.19.3-2_armhf.deb ...

Unpacking gettext (0.19.3-2) ...

Selecting previously unselected package intltool-debian.

Preparing to unpack .../intltool-debian_0.35.0+20060710.1_all.deb ...

Unpacking intltool-debian (0.35.0+20060710.1) ...

Selecting previously unselected package po-debconf.

Preparing to unpack .../po-debconf_1.0.16+nmu3_all.deb ...

Unpacking po-debconf (1.0.16+nmu3) ...

Selecting previously unselected package debhelper.

Preparing to unpack .../debhelper_9.20150101+deb8u2_all.deb ...

Unpacking debhelper (9.20150101+deb8u2) ...

Selecting previously unselected package gir1.2-gstreamer-0.10.

Preparing to unpack .../gir1.2-gstreamer-0.10_0.10.36-1.5_armhf.deb ...

Unpacking gir1.2-gstreamer-0.10 (0.10.36-1.5) ...

Selecting previously unselected package gir1.2-gst-plugins-base-0.10.

Preparing to unpack .../gir1.2-gst-plugins-base-0.10_0.10.36-2_armhf.deb ...

Unpacking gir1.2-gst-plugins-base-0.10 (0.10.36-2) ...

Selecting previously unselected package gstreamer0.10-tools.

Preparing to unpack .../gstreamer0.10-tools_0.10.36-1.5_armhf.deb ...

Unpacking gstreamer0.10-tools (0.10.36-1.5) ...

Selecting previously unselected package gstreamer-tools.

Preparing to unpack .../gstreamer-tools_0.10.36-1.5_armhf.deb ...

Unpacking gstreamer-tools (0.10.36-1.5) ...

Selecting previously unselected package gstreamer0.10-gconf:armhf.

Preparing to unpack .../gstreamer0.10-gconf_0.10.31-3+nmu4_armhf.deb ...

Unpacking gstreamer0.10-gconf:armhf (0.10.31-3+nmu4) ...

Selecting previously unselected package gstreamer0.10-plugins-good:armhf.

Preparing to unpack .../gstreamer0.10-plugins-good_0.10.31-3+nmu4_armhf.deb ...

Unpacking gstreamer0.10-plugins-good:armhf (0.10.31-3+nmu4) ...

Selecting previously unselected package liba52-0.7.4.

Preparing to unpack .../liba52-0.7.4_0.7.4-17_armhf.deb ...

Unpacking liba52-0.7.4 (0.7.4-17) ...

Selecting previously unselected package libsidplay1.

Preparing to unpack .../libsidplay1_1.36.59-6_armhf.deb ...

Unpacking libsidplay1 (1.36.59-6) ...

Selecting previously unselected package libtwolame0.

Preparing to unpack .../libtwolame0_0.3.13-1.1_armhf.deb ...

Unpacking libtwolame0 (0.3.13-1.1) ...

Selecting previously unselected package gstreamer0.10-plugins-ugly:armhf.

Preparing to unpack .../gstreamer0.10-plugins-ugly_0.10.19-2.1+b1_armhf.deb ...

Unpacking gstreamer0.10-plugins-ugly:armhf (0.10.19-2.1+b1) ...

Selecting previously unselected package gstreamer0.10-x:armhf.

Preparing to unpack .../gstreamer0.10-x_0.10.36-2_armhf.deb ...

Unpacking gstreamer0.10-x:armhf (0.10.36-2) ...

Selecting previously unselected package libasprintf-dev:armhf.

Preparing to unpack .../libasprintf-dev_0.19.3-2_armhf.deb ...

Unpacking libasprintf-dev:armhf (0.19.3-2) ...

Selecting previously unselected package libgettextpo-dev:armhf.

Preparing to unpack .../libgettextpo-dev_0.19.3-2_armhf.deb ...

Unpacking libgettextpo-dev:armhf (0.19.3-2) ...

Selecting previously unselected package libpcre3-dev:armhf.

Preparing to unpack .../libpcre3-dev_2%3a8.35-3.3+deb8u4_armhf.deb ...

Unpacking libpcre3-dev:armhf (2:8.35-3.3+deb8u4) ...

Selecting previously unselected package libglib2.0-dev.

Preparing to unpack .../libglib2.0-dev_2.42.1-1_armhf.deb ...

Unpacking libglib2.0-dev (2.42.1-1) ...

Selecting previously unselected package libxml2-dev:armhf.

Preparing to unpack .../libxml2-dev_2.9.1+dfsg1-5+deb8u2_armhf.deb ...

Unpacking libxml2-dev:armhf (2.9.1+dfsg1-5+deb8u2) ...

Selecting previously unselected package libgstreamer0.10-dev.

Preparing to unpack .../libgstreamer0.10-dev_0.10.36-1.5_armhf.deb ...

Unpacking libgstreamer0.10-dev (0.10.36-1.5) ...

Selecting previously unselected package libgstreamer-plugins-base0.10-dev.

Preparing to unpack .../libgstreamer-plugins-base0.10-dev_0.10.36-2_armhf.deb ...

Unpacking libgstreamer-plugins-base0.10-dev (0.10.36-2) ...

Selecting previously unselected package libsys-hostname-long-perl.

Preparing to unpack .../libsys-hostname-long-perl_1.4-3_all.deb ...

Unpacking libsys-hostname-long-perl (1.4-3) ...

Selecting previously unselected package libmail-sendmail-perl.

Preparing to unpack .../libmail-sendmail-perl_0.79.16-1_all.deb ...

Unpacking libmail-sendmail-perl (0.79.16-1) ...

Processing triggers for libglib2.0-0:armhf (2.42.1-1) ...

Processing triggers for man-db (2.7.0.2-5) ...

Processing triggers for install-info (5.2.0.dfsg.1-6) ...

Processing triggers for gconf2 (3.2.6-3) ...

libxml2:armhf (2.9.1+dfsg1-5+deb8u2) 설정하는 중입니다 ...

libdirac-encoder0:armhf (1.0.2-7.1) 설정하는 중입니다 ...

libunistring0:armhf (0.9.3-5.2) 설정하는 중입니다 ...

libgettextpo0:armhf (0.19.3-2) 설정하는 중입니다 ...

libmpcdec6:armhf (2:0.1~r459-4.1) 설정하는 중입니다 ...

libmpeg2-4:armhf (0.5.1-7) 설정하는 중입니다 ...

libopencore-amrnb0:armhf (0.1.3-2.1) 설정하는 중입니다 ...

libopencore-amrwb0:armhf (0.1.3-2.1) 설정하는 중입니다 ...

libpcrecpp0:armhf (2:8.35-3.3+deb8u4) 설정하는 중입니다 ...

libzvbi-common (0.2.35-3) 설정하는 중입니다 ...

libzvbi0:armhf (0.2.35-3) 설정하는 중입니다 ...

libcdaudio1 (0.99.12p2-13) 설정하는 중입니다 ...

libgstreamer-plugins-bad0.10-0:armhf (0.10.23-7.4) 설정하는 중입니다 ...

libslv2-9 (0.6.6+dfsg1-2) 설정하는 중입니다 ...

gstreamer0.10-plugins-bad:armhf (0.10.23-7.4) 설정하는 중입니다 ...

autopoint (0.19.3-2) 설정하는 중입니다 ...

gettext (0.19.3-2) 설정하는 중입니다 ...

intltool-debian (0.35.0+20060710.1) 설정하는 중입니다 ...

po-debconf (1.0.16+nmu3) 설정하는 중입니다 ...

debhelper (9.20150101+deb8u2) 설정하는 중입니다 ...

gir1.2-gstreamer-0.10 (0.10.36-1.5) 설정하는 중입니다 ...

gir1.2-gst-plugins-base-0.10 (0.10.36-2) 설정하는 중입니다 ...

gstreamer0.10-tools (0.10.36-1.5) 설정하는 중입니다 ...

gstreamer-tools (0.10.36-1.5) 설정하는 중입니다 ...

gstreamer0.10-gconf:armhf (0.10.31-3+nmu4) 설정하는 중입니다 ...

gstreamer0.10-plugins-good:armhf (0.10.31-3+nmu4) 설정하는 중입니다 ...

liba52-0.7.4 (0.7.4-17) 설정하는 중입니다 ...

libsidplay1 (1.36.59-6) 설정하는 중입니다 ...

libtwolame0 (0.3.13-1.1) 설정하는 중입니다 ...

gstreamer0.10-plugins-ugly:armhf (0.10.19-2.1+b1) 설정하는 중입니다 ...

gstreamer0.10-x:armhf (0.10.36-2) 설정하는 중입니다 ...

libasprintf-dev:armhf (0.19.3-2) 설정하는 중입니다 ...

libgettextpo-dev:armhf (0.19.3-2) 설정하는 중입니다 ...

libpcre3-dev:armhf (2:8.35-3.3+deb8u4) 설정하는 중입니다 ...

libglib2.0-dev (2.42.1-1) 설정하는 중입니다 ...

libxml2-dev:armhf (2.9.1+dfsg1-5+deb8u2) 설정하는 중입니다 ...

libgstreamer0.10-dev (0.10.36-1.5) 설정하는 중입니다 ...

libgstreamer-plugins-base0.10-dev (0.10.36-2) 설정하는 중입니다 ...

libsys-hostname-long-perl (1.4-3) 설정하는 중입니다 ...

libmail-sendmail-perl (0.79.16-1) 설정하는 중입니다 ...

Processing triggers for libc-bin (2.19-18+deb8u3) ...

pi@raspberrypi:~/gst-rtsp-0.10.8 $



이제 컴파일을 진행합니다.


/gst-rtsp-0.10.8 $ ./configure



컴파일을 마치면 make를 입력합니다. 빌드를 진행합니다. 


/gst-rtsp-0.10.8 $ make

이제 모든 설치과정이 끝났습니다.


/gst-rtsp-0.10.8 $ cd examples



아래 명령어를 입력하면 화면에 영상이 나온다. 명령어 후반에 자신의 라즈베리 파이 IP 주소 나오는거 주의해서 입력한다.

디레이 없이 실시간으로 엄청 빠르


아래 테스트 하는 작업 폴더는 pi@raspberrypi:~/gst-rtsp-0.10.8/examples $에서 한다.


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


같은 명령어이다.


$raspivid -f -b 10000000 -fps 30 -t 0 -o - | gst-launch -v fdsrc ! h264parse! rtph264pay config-interval=1 pt=96 ! udpsink host=10.3.99.255 port=9000


아래는 실행되면서 나오는 메시지 캡쳐


pi@raspberrypi:~/gst-rtsp-0.10.8/examples $ raspivid -t 0 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch -v fdsrc ! h264parse !  rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.1.248 port=5000

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1080, height=(int)720, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0

/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"J2QAKKwrQCIC3y8A8SJq\\,KO4CXLA\\=\", payload=(int)96, ssrc=(uint)682334979, clock-base=(uint)3685334282, seqnum-base=(uint)55256

/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, width=(int)1080, height=(int)720, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0

/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 3685334282

/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 55256

/GstPipeline:pipeline0/GstGDPPay:gdppay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"J2QAKKwrQCIC3y8A8SJq\\,KO4CXLA\\=\", payload=(int)96, ssrc=(uint)682334979, clock-base=(uint)3685334282, seqnum-base=(uint)55256

/GstPipeline:pipeline0/GstGDPPay:gdppay0.GstPad:src: caps = application/x-gdp, streamheader=(buffer)< 0100010000a6000000acffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be9900004773744576656e744e65777365676d656e742c207570646174653d28626f6f6c65616e2966616c73652c20726174653d28646f75626c6529312c206170706c6965642d726174653d28646f75626c6529312c20666f726d61743d28477374466f726d6174294753545f464f524d41545f54494d452c2073746172743d2867696e74363429302c2073746f703d2867696e743634292d312c20706f736974696f6e3d2867696e74363429303b00, 010001000002000000f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee5500006170706c69636174696f6e2f782d7274702c206d656469613d28737472696e6729766964656f2c20636c6f636b2d726174653d28696e742939303030302c20656e636f64696e672d6e616d653d28737472696e6729483236342c207370726f702d706172616d657465722d736574733d28737472696e6729224a3251414b4b7772514349433379384138534a715c2c4b4f3443584c415c3d222c207061796c6f61643d28696e742939362c20737372633d2875696e74293638323333343937392c20636c6f636b2d626173653d2875696e7429333638353333343238322c207365716e756d2d626173653d2875696e7429353532353600 >

/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps = application/x-gdp, streamheader=(buffer)< 0100010000a6000000acffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be9900004773744576656e744e65777365676d656e742c207570646174653d28626f6f6c65616e2966616c73652c20726174653d28646f75626c6529312c206170706c6965642d726174653d28646f75626c6529312c20666f726d61743d28477374466f726d6174294753545f464f524d41545f54494d452c2073746172743d2867696e74363429302c2073746f703d2867696e743634292d312c20706f736974696f6e3d2867696e74363429303b00, 010001000002000000f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee5500006170706c69636174696f6e2f782d7274702c206d656469613d28737472696e6729766964656f2c20636c6f636b2d726174653d28696e742939303030302c20656e636f64696e672d6e616d653d28737472696e6729483236342c207370726f702d706172616d657465722d736574733d28737472696e6729224a3251414b4b7772514349433379384138534a715c2c4b4f3443584c415c3d222c207061796c6f61643d28696e742939362c20737372633d2875696e74293638323333343937392c20636c6f636b2d626173653d2875696e7429333638353333343238322c207365716e756d2d626173653d2875696e7429353532353600 >

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock


네트워크 스트리밍을 위하여 아래 명령어를 넣는다. 여기서 아래에 입력 명령어에 나오는  IP 주소 두 군데를 현재 라즈베리 파이의 IP 주소로 넣는다. 포트 번호는 그대로 한다. 


아래 테스트 하는 작업 폴더는 pi@raspberrypi:~/gst-rtsp-0.10.8/examples $에서 한다.


$raspivid -t 0 -h 720 -w 1280 -fps 25 -b 2000000 -vf -hf -n -o - | gst-launch -v fdsrc ! h264parse ! gdppay ! tcpserversink host=192.168.1.248 port=5000 | ./test-launch "( tcpclientsrc host=192.168.1.248 port=5000 ! gdpdepay ! avdec_h264 ! rtph264pay name=pay0 pt=96 )"


그리고 스트리밍을 지원하는다음 팟플레이어에서 동영상 스트리밍을 볼 수 있다. vlc 플레이어에서는 잘 안된다. 더구나 스마트 폰에서 vlc 플레이어는 검은 화면~ㅠㅠ


다음 팟 플레이어를 설치하고 테스트


주소줄에 rtsp://192.168.1.248:8554/test 


를 입력한다. 여기서도 포트번호는 그대로 둔다. 내부적으로 8554로 설정된거 같고 위 명령어의 포트번호 5000은 의미가 없는것 같다.



이미지 출처 : https://dvsgaming.org/a-beginners-guide-to-pc-streaming-software/





반응형