<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;"><b style="font-size: 14pt; line-height: 1.5;"><span style="font-size: 18pt; color: #000000;">gstreamer로 해보는 라즈베리파이 카메라 테스트.</span></b></p>
<div style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;">
   <hr style="border-right: 0px none black; border-bottom: 0px none black; border-left: 0px none black; border-top-style: solid; border-top-color: black; border-image: initial; height: 1px;" />
   </div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;"><b style="font-size: 13px; line-height: 20px;"><span style="color: #000000; font-size: 9pt;">*사용 OS : raspbian(debian wheezy) 2014-12-24 / windows7 64</span></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;"><b style="font-size: 13px; line-height: 20px;"><span style="color: #000000; font-size: 9pt;">*사용 프로그램 : g</span><span style="color: #000000; font-size: 9pt;">streamer1.0</span></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;"><b style="font-size: 13px; line-height: 20px;"><br /></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;"><span class="imageblock" style="border: 1px solid rgb(221, 221, 221); padding: 5px; margin: 5px 0px; display: inline-block; width: 630px; font-size: 9pt; line-height: 1.5; text-align: center; height: auto; max-width: 100%;"><span data-url="https://t1.daumcdn.net/cfile/tistory/235B043F54B6F73724?download" data-lightbox="lightbox" style="cursor: pointer;"><img src="https://t1.daumcdn.net/cfile/tistory/235B043F54B6F73724" width="630" filename="rpi_carmera_test.jpg" filemime="image/jpeg" style="border: 0px; cursor: pointer; max-width: 100%; height: auto;" /></span></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;"><br /></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">얼마전 라즈베리파이 카메라&nbsp;모듈을(pi-cam)</span><span style="font-size: 10pt; color: #000000;">&nbsp;구입 하였습니다. 테스트를 해보기위해 인터넷을 검색해&nbsp;</span><a href="http://www.doepiccoding.com/blog/?p=212" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none; font-weight: bold;"><span style="font-size: 10pt; color: #0900ff;">VLC를 사용한 스트리밍</span></a><span style="font-weight: bold; font-size: 10pt; color: #000000;">,&nbsp;<span style="color: #0900ff;"><a href="http://www.rasplay.org/?p=7174" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="color: #0900ff;">mjpg-stream을 사용한&nbsp;</span></a></span></span><span style="font-size: 10pt; color: #0900ff;"><a href="http://www.rasplay.org/?p=7174" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none; font-weight: bold;"><span style="color: #0900ff;">웹스트리밍</span></a><span style="color: #000000;">을&nbsp;</span></span><span style="font-size: 10pt; color: #000000;">수행해 보았습니다. 두가지 자료 모두 정상적으로 카메라 영상을 볼수 있었지만 지연시간이&nbsp;길어서&nbsp;</span><span style="font-size: 10pt; line-height: 1.5; color: #000000;">(상황에 따라 약3~10초 정도 되었었습니다.)</span><span style="font-size: 10pt; line-height: 1.5; color: #000000;">&nbsp;만족스러운 테스트 결과를 얻을수 없었습니다.</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">그러던중&nbsp;<b><a href="http://cafe.naver.com/pipc/4585" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="color: #0900ff;">gstreamer을 활용한 스트리밍</span></a></b>은 지연</span><span style="font-size: 10pt; color: #000000;">시간이 상당히 짧다는 내용(약 0.2초)&nbsp;</span><span style="font-size: 10pt; color: #000000;">을 검색할수 있었습니다. 테스트를 위해 내용을 수행보려 했지만 검색된 내용은 리눅스에서 영상을 출력하고 있었습니다. 필자는 윈도우에영상출력 테스를 하려고 하였기&nbsp;때문에 몇가지 내용의 검색을 더 수행하였습니다.</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">&nbsp;</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">자료를 검색해 종합하여 정상적인 실행및 테스트를 할수 있었습니다. 또한 매우 짧은 지연시간을&nbsp;</span><span style="font-size: 10pt; color: #000000;">확인할수 있었습니다. 아래 내용은 필자가 수행했던&nbsp;설치 방법및 실행&nbsp;방법을&nbsp; 정리해보았습니다.</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b><br /></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b><br /></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b><span style="font-size: 12pt; color: #000000;">1. 라즈베리파이 카메라 설정.</span></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;"><br /></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">$ sudo raspi-config</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><font color="#000000"><span style="font-size: 13px; line-height: 20px;">* 5 Enable Camera 항목&nbsp;</span></font><span style="color: #000000; font-size: 13px; line-height: 20px;">E</span><span style="color: #000000; font-size: 13px; line-height: 20px;">nter</span><font color="#000000"><span style="font-size: 13px; line-height: 20px;">키 누른후&nbsp;Enable 선택후&nbsp;</span></font><span style="color: #000000; font-size: 13px; line-height: 20px;">E</span><span style="color: #000000; font-size: 13px; line-height: 20px;">nter</span><font color="#000000"><span style="font-size: 13px; line-height: 20px;">키&nbsp;입력.</span></font></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><font color="#000000"><span style="font-size: 13px; line-height: 20px;">* &lt;Finish&gt; 선택하여 Enter키 누른후&nbsp;&lt;Yes&gt;에&nbsp;</span></font><span style="color: #000000; font-size: 13px; line-height: 20px;">E</span><span style="color: #000000; font-size: 13px; line-height: 20px;">nter</span><font color="#000000"><span style="font-size: 13px; line-height: 20px;">키눌러 재부팅.</span></font></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><font color="#000000"><span style="font-size: 13px; line-height: 20px;"><br /></span></font></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><font color="#000000"><span style="font-size: 13px; line-height: 20px;"><br /></span></font></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b><span style="font-size: 12pt; color: #000000;">2. 라즈베리파이 gstreamer 설치/실행.</span></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="color: #000000; font-size: 10pt; line-height: 1.5;">$ sudo apt-get update</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">$ sudo apt-get install gstreamer1.0</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; line-height: 1.5; color: #000000;">(* raspbian 2014-12-14 버전에서는 별도의 저장소 추가 없이 설치가 가능하였습니다.)</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">$raspivid -t 0</span><span style="font-size: 10pt; color: #000000;">&nbsp;-w 800 -h 600 -fps 30 -hf -vf -b 50000000 -o - | gst-launch-1.0 -e -vvvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=[타켓 컴퓨터 IP]</span><span style="font-size: 10pt; color: #000000;">&nbsp;port=5000</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b><span style="font-size: 12pt; color: #000000;">3. 윈도우 gstreamer</span><span style="font-size: 12pt; color: #000000;">&nbsp;설치/실행.</span></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 9pt; line-height: 1.5;"><br /></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">아래링크에서 사용하고있는&nbsp;윈도우 시스템에 맞는 패키지를 다운 받은후 설치합니다.</span><span style="font-size: 10pt; line-height: 20px; color: #333333;">(complete를 선택하여 &nbsp;설치합니다. Typical 선택시 WARNING: erroneous pipeline: no element "avdec_h264" 에러가 발생할수 있습니다.)</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; line-height: 1.5; color: #000000;">32비트 :&nbsp;</span><a href="http://gstreamer.freedesktop.org/data/pkg/windows/1.4.5/gstreamer-1.0-x86-1.4.5.msi" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none; font-size: 9pt; line-height: 1.5;"><span style="font-size: 9pt;"><b><span style="color: #0900ff;">http://gstreamer.freedesktop.org/data/pkg/windows/1.4.5/gstreamer-1.0-x86-1.4.5.msi</span></b></span></a></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 9pt; line-height: 1.5;"><span style="font-size: 10pt; color: #000000;">64비트 :&nbsp;</span><a href="http://gstreamer.freedesktop.org/data/pkg/windows/1.4.5/gstreamer-1.0-x86_64-1.4.5.msi" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="font-size: 9pt;"><b><span style="color: #0900ff;">http://gstreamer.freedesktop.org/data/pkg/windows/1.4.5/gstreamer-1.0-x86_64-1.4.5.ms</span></b><span style="color: #0900ff;">i</span></span></a></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 9pt; line-height: 1.5;"><br /></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; line-height: 1.5; color: #000000;">*&nbsp;시작을 눌러 cmd를 입력후 Enter키를 눌러 cmd창을 열어줍니다.</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">C:\&gt; cd gstreamer</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">C:\gstreamer&gt; cd 1.0</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">C:\gstreamer\1.0&gt; cd x86_64 [32비트일경우 cd x86]</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">C:\gstreamer\1.0\x86_64&gt; cd bin</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000;">C:\gstreamer\1.0\x86_64\bin&gt; gst-launch-1.0 -e -v udpsrc port=5000&nbsp;! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 12pt;"><b><span style="color: #000000;">* 기타사항</span></b></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b style="font-size: 13px; line-height: 20px;"><br /></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><b style="font-size: 13px; line-height: 20px;"><span style="color: #000000;">Issue 1&gt;</span><span style="color: #000000;">&nbsp;URL :&nbsp;</span><a href="http://pmice.tistory.com/292#comment10104514" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="color: #0900ff;">http://pmice.tistory.com/292#comment10104514</span></a></b></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 13px; line-height: 20px; color: #000000; background-color: #ffffff;">윈도우 gstreamer1.0 1.4.5버전에서는&nbsp;gdpdepay 파이프라인을 선언한 실행이 가능한것을 확인하였습니다.&nbsp;(낮은 버전 사용시&nbsp;</span><span style="font-size: 9pt; line-height: 1.5; color: #000000; background-color: #ffffff;">WARNING: erroneous pipeline: no element "gdpdepay" 에러로 인하여 실행을 할수 없었습니다.)</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="color: #000000;">[ 명령어 예제&nbsp;]</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="text-align: left; background-color: #f9f9f9;"><span style="font-size: 10pt; color: #000000; background-color: #ffffff;">라즈베리파이 : $&nbsp;</span><span style="font-size: 10pt; color: #000000; background-color: #ffffff;">raspivid -t 0 -h 720 -w 1280 -fps 25 -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=[라즈베리파이IP] port=5000</span></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 10pt; color: #000000; background-color: #ffffff;">윈도우 :&nbsp;</span><span style="font-size: 10pt; color: #000000; background-color: #ffffff;">C:\gstreamer\1.0\X86_64\bin&gt;&nbsp;</span><span style="font-size: 10pt; line-height: 1.5; color: #000000; background-color: #ffffff;">gst-launch-1.0 -v tcpclientsrc host=[라즈베리파이IP] port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 12pt;"><b><span style="color: #000000;">* 참고URL</span></b></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 9pt; line-height: 1.5;"><br /></span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="font-size: 9pt; line-height: 1.5; color: #000000;">1) &nbsp;</span><a href="http://robogoby.blogspot.kr/2014/01/raspi-camera-gstreamer-10-w-windows-7.html" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="color: #0900ff;">http://robogoby.blogspot.kr/2014/01/raspi-camera-gstreamer-10-w-windows-7.html</span></a></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e; text-align: justify;"><span style="color: #000000;">2) &nbsp;</span><a href="http://www.raspberrypi.org/forums/viewtopic.php?p=491075" target="_blank" class="tx-link" style="color: #666666; text-decoration-line: none;"><span style="color: #0900ff;">http://www.raspberrypi.org/forums/viewtopic.php?p=491075</span></a></p>
<p><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;" /><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;">출처:&nbsp;</span><a href="https://pmice.tistory.com/292" style="color: #666666; text-decoration-line: none; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;" target="_blank">https://pmice.tistory.com/292</a><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #8e877e;">&nbsp;[프미케의 낙서장]</span></p>