{"id":286499,"date":"2017-05-17T16:55:03","date_gmt":"2017-05-17T12:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286499"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286499","title":{"rendered":"\u041e\u043d\u043b\u0430\u0439\u043d \u0432\u0438\u0434\u0435\u043e\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0441 \u043f\u043b\u0430\u0442\u044b Orange Pi One"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/7df\/06f\/df5\/7df06fdf58184f2f971579c823a89aa2.jpg\"\/><br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043d\u043b\u0430\u0439\u043d \u0432\u0438\u0434\u0435\u043e\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u0438\u043a\u0430 Orange Pi One.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0443 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<br \/>  1) <a href=\"https:\/\/ru.aliexpress.com\/item\/Orange-Pi-One-ubuntu-linux-and-android-mini-PC-Beyond-and-Compatible-with-Raspberry-Pi-2\/32603308880.html?spm=2114.13010608.0.0.Ba1Txs\">\u041f\u043b\u0430\u0442\u043a\u0430<\/a> \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438<br \/>  2) <a href=\"https:\/\/ru.aliexpress.com\/item\/50-MP-HD-Camera-USB-Webcam-rotator-for-Laptop-Desktop-PC-Computer\/32764372984.html?spm=2114.13010608.0.0.Ba1Txs\">\u0412\u0435\u0431\u043a\u0430\u043c\u0435\u0440\u0430<\/a><\/p>\n<p>  \u0410 \u044d\u0442\u043e 810+155 = 965\u0440.- \u0442.\u0435. \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0434\u0430\u0436\u0435 \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a.<\/p>\n<p>  \u0418\u0442\u0430\u043a \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u044d\u0442\u043e \u0432\u0435\u0449\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0441\u0435\u0442\u044c. \u0422.\u0435. \u043d\u0443\u0436\u0435\u043d \u0441\u0435\u0440\u0432\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0420\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438\u0431\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443.<\/p>\n<p>  \u0421\u043f\u0435\u0440\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c- \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043a\u0430\u043c\u0435\u0440\u044b:<\/p>\n<pre><code class=\"bash\">opigaz@orangepione:~$ lsusb ... Bus 002 Device 002: ID 1908:2311 GEMBIRD ...<\/code><\/pre>\n<p>  \u041a\u0430\u043c\u0435\u0440\u0430 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u043a\u0430\u043c\u0435\u0440\u044b.<\/p>\n<p>  \u042f \u043f\u043e\u0448\u0451\u043b \u043b\u0451\u0433\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 OpenCV:  <\/p>\n<pre><code class=\"bash\">opigaz@orangepione:~$ sudo apt install python-opencv<\/code><\/pre>\n<p>  \u041d\u0430\u0448\u0451\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"python\">import cv2 import numpy  cap = cv2.VideoCapture(0)  #ignore the errors cap.set(3, 960)        #Set the width important because the default will timeout                        #ignore the error or false response cap.set(4, 544)        #Set the height ignore the errors r, frame = cap.read() cv2.imwrite(&quot;photo.jpg&quot;, frame)<\/code><\/pre>\n<p>  \u0418 \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043d\u0438\u043c\u043e\u043a:  <\/p>\n<pre><code class=\"bash\">opigaz@orangepione:~$ python cam.py<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/4f6\/a95\/4f5\/4f6a954f56f744748d04e9fa97cadf80.jpg\"\/><\/p>\n<p>  \u041d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043a\u043e\u0442\u0430\u043a\u0442 \u0435\u0441\u0442\u044c!<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e API \u00abvideo for Linux\u00bb \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u043c\u0435\u0440\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442.\u043a. \u043f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0440\u0430\u0437\u0434\u0430\u0447\u0438(\u0430 \u043b\u0443\u0447\u0448\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445). \u0418, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u042f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b ffmpeg \u0438 vlc, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">cvlc v4l2:\/\/\/dev\/video0 :v4l2-standard=mpeg2 :input-slave=alsa:\/\/hw:0,0 :live-caching=300 :sout=&quot;#transcode{vcodec=WMV2,vb=800,scale=1,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:8080\/stream.wmv}&quot;<\/code><\/pre>\n<p>  \u0410 \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\">vlc -vvv http:\/\/192.168.100.10:8080\/stream.wmv<\/code><\/pre>\n<p>  \u0416\u0435\u043b\u0435\u0437\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/c19\/0d2\/5ef\/c190d25efceb45ae84cef98b93f281e3.jpg\"\/><\/p>\n<p>  \u0410 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u043e\u0432:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/8b3\/f1b\/85e\/8b3f1b85e66c406ca270555b180d3fbf.jpg\"\/><\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u043d\u0451\u043c vlc.<\/p>\n<p>  PS:<br \/>  \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0430\u043c\u044b\u043c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0431\u044b\u043b\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043c\u0435\u0440\u0430 \u0438 \u043f\u043b\u0430\u0442\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u0440\u0438\u0447\u0451\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043b\u0430\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0432\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0435\u0449\u0430\u043d\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/8a2\/21b\/79b\/8a221b79bbe243debb310b22905453ce.jpg\"\/><br \/>  PPS:<br \/>  \u0416\u0430\u043b\u044c, \u0447\u0442\u043e \u043c\u043e\u044e \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0432\u044b\u043f\u0438\u043b\u0438\u043b\u0438. \u0425\u043e\u0442\u0435\u043b \u0434\u043e\u043d\u0435\u0441\u0442\u0438 \u043d\u0430\u0440\u043e\u0434\u0443, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0432\u0437\u044f\u0442\u044c \u0434\u0435\u0448\u043c\u0430\u043d\u0441\u043a\u0443\u044e \u0436\u0435\u043b\u0435\u0437\u043a\u0443 \u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328892\/\"> https:\/\/habrahabr.ru\/post\/328892\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/7df\/06f\/df5\/7df06fdf58184f2f971579c823a89aa2.jpg\"\/><br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043d\u043b\u0430\u0439\u043d \u0432\u0438\u0434\u0435\u043e\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u0438\u043a\u0430 Orange Pi One.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-286499","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286499"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286499\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}