embeded/raspberry pi2018. 9. 11. 22:33

걍 미는게 편할까.. 업데이트 하는게 편할까..

경고를 보고 하는 절차를 보니 걍 밀고 새로 설정하는게 편하겠는데..?


[링크 : https://linuxconfig.org/raspbian-gnu-linux-upgrade-from-jessie-to-raspbian-stretch-9]

'embeded > raspberry pi' 카테고리의 다른 글

raspbian stretch - node.js  (0) 2018.09.13
라즈베리 3B stretch 한글 설정  (0) 2018.09.13
node.js on rpi  (0) 2018.09.11
라즈베리 파이 USB 사운드 카드로 녹음 및 재생하기  (4) 2018.09.10
라즈베리 파이 SPI 속도  (0) 2018.05.18
Posted by 구차니
embeded/raspberry pi2018. 9. 11. 22:00

내 라즈베리가 버전이 구버전인지 심각하게 구버전이 설치된다.. -_-

그런 이유로 컴파일 해서 할거 아니라면 일단 포기

(혹은 배포판 버전업?)

$ sudo apt-get install nodejs npm

$ node --version

v0.10.29



---

아무 생각없이 했더니 에러가 난다 -ㅁ-

$ npm install -g express-generator

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules'

npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules']

npm ERR!   errno: 3,

npm ERR!   code: 'EACCES',

npm ERR!   path: '/usr/local/lib/node_modules',

npm ERR!   fstream_type: 'Directory',

npm ERR!   fstream_path: '/usr/local/lib/node_modules/express-generator',

npm ERR!   fstream_class: 'DirWriter',

npm ERR!   fstream_stack:

npm ERR!    [ '/usr/lib/nodejs/fstream/lib/writer.js:171:23',

npm ERR!      '/usr/lib/nodejs/mkdirp/index.js:46:53',

npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }

npm ERR!

npm ERR! Please try running this command again as root/Administrator.


npm ERR! System Linux 4.9.35-v7+

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "express-generator"

npm ERR! cwd /home/pi

npm ERR! node -v v0.10.29

npm ERR! npm -v 1.4.21

npm ERR! path /usr/local/lib/node_modules

npm ERR! fstream_path /usr/local/lib/node_modules/express-generator

npm ERR! fstream_type Directory

npm ERR! fstream_class DirWriter

npm ERR! code EACCES

npm ERR! errno 3

npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules'

npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23

npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53

npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR!     /home/pi/npm-debug.log

npm ERR! not ok code 0 


그런데.. 윈도우용 node랑은 verbose mode 설정이 다른건가?

이런 설치 메시지를 윈도우 용에서는 본적이 없네?

$ sudo npm install -g express-generator

/usr/local/bin/express -> /usr/local/lib/node_modules/express-generator/bin/express-cli.js

express-generator@4.16.0 /usr/local/lib/node_modules/express-generator

├── sorted-object@2.0.1

├── commander@2.13.0

├── ejs@2.5.7

├── mkdirp@0.5.1 (minimist@0.0.8)

└── minimatch@3.0.4 (brace-expansion@1.1.11) 


$ npm i node-rtsp-stream-es6

node-rtsp-stream-es6@1.0.6 node_modules/node-rtsp-stream-es6

├── jsmpeg@1.0.0

└── ws@1.1.5 (options@0.0.6, ultron@1.0.2)


$ npm install ws node-rtsp-stream-es6

ws@6.0.0 node_modules/ws

└── async-limiter@1.0.0


node-rtsp-stream-es6@1.0.6 node_modules/node-rtsp-stream-es6

├── jsmpeg@1.0.0

└── ws@1.1.5 (options@0.0.6, ultron@1.0.2)


$ npm install jsmpeg

jsmpeg@1.0.0 node_modules/jsmpeg


그나저나 아무생각이 없었는데..

라즈베리 debian에 ffmpeg이 없네?

[링크 : https://github.com/.../(RPi)-Compile-FFmpeg-with-the-OpenMAX-H.264-GPU-acceleration]

Posted by 구차니
Microsoft/Windows2018. 9. 11. 19:56

윈7에서 잘쓰던 넘이 안보여서 찾아보니

시계 옆에 한 줄 있는게 그거란다.. -_-

miix320 에서 터치로 안되는건 아니니 일단 찾은김에 그냥 클릭하고 살아야지


[링크 : http://mastmanban.tistory.com/945]

'Microsoft > Windows' 카테고리의 다른 글

win10 cmd tab 자동완성  (0) 2018.10.12
윈10을 쓰면서 느끼는 의아함.. - 배터리  (4) 2018.10.07
iis 401.3 - Unauthorized  (0) 2018.08.27
서피스 펜(바로가기 버튼) + devcon  (4) 2018.08.22
win10 1804 버그.. -_-  (0) 2018.08.21
Posted by 구차니

네이버 지도 글들은 아니지만

일단 네이버 예제를 보면 실수 3 자리와 소수 7 자릿수로 나타나는데

그걸 담을 적절한 방법을 찾아 보면 될 듯

(*10해서 10자리라던가?)



[링크 : https://stackoverflow.com/...-ideal-data-type-to-use-when-storing-latitude-longitudes-in-a-mysql]

[링크 : https://dev.mysql.com/doc/refman/5.6/en/spatial-types.html]

Posted by 구차니

되긴 하지만 처음 시점이 0초로 잡힌다고..

html5 video 처럼 얘도 1초 단위다 -_ㅠ


[링크 : https://github.com/phoboslab/jsmpeg/issues/108]


JSMpeg.Player API

A JSMpeg.Player instance supports the following methods and properties:


.play() – start playback

.pause() – pause playback

.stop() – stop playback and seek to the beginning

.destroy() – stops playback, disconnects the source and cleans up WebGL and WebAudio state. The player can not be used afterwards.

.volume – get or set the audio volume (0-1)

.currentTime – get or set the current playback position in seconds 

[링크 : https://github.com/phoboslab/jsmpeg]

'Programming > javascript & HTML' 카테고리의 다른 글

rest api ajax / jquery with HTTP header  (0) 2018.09.12
자바 스크립트 변수  (0) 2018.09.12
html5 video timestamp  (0) 2018.09.11
html내 <script>의 올바른 위치(?)  (0) 2018.09.04
jquey ajax 테스트  (4) 2018.09.03
Posted by 구차니

초 단위로 설정이나 읽는게 가능

(프레임 단위나 msec 단위는 안되는 듯)


[링크 : https://stackoverflow.com/questions/6380956/current-duration-time-of-html5-video]

[링크 : https://www.w3schools.com/tags/av_prop_currenttime.asp]

'Programming > javascript & HTML' 카테고리의 다른 글

자바 스크립트 변수  (0) 2018.09.12
JSMpeg timestamp  (0) 2018.09.11
html내 <script>의 올바른 위치(?)  (0) 2018.09.04
jquey ajax 테스트  (4) 2018.09.03
jquery 복수 속성 선택하기  (0) 2018.08.30
Posted by 구차니
Programming/node.js2018. 9. 11. 15:51



npm ls -g --depth 0 

[링크 : https://stackoverflow.com/..list-all-globally-installed-modules-with-one-command-in-ubuntu]


npm uninstall -g <package> 

[링크 : https://docs.npmjs.com/getting-started/uninstalling-global-packages]

'Programming > node.js' 카테고리의 다른 글

node.js JSON.parse()  (0) 2018.09.12
node-rtsp-stream 사용  (2) 2018.09.12
node-rtsp-stream 윈도우에서 설치하기는 실패?  (0) 2018.09.11
node.js HTTP 요청하기  (0) 2018.09.10
cURL 그리고 REST  (6) 2018.09.09
Posted by 구차니
Linux/centos2018. 9. 11. 15:48

췟.. 귀찮네 -_ㅠ


curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

sudo yum -y install nodejs

yum install gcc-c++ make 

[링크 : https://nodejs.org/ko/download/package-manager/]

'Linux > centos' 카테고리의 다른 글

KVM spice 원격 접속시 No route to host  (0) 2019.01.28
yum checkupdate  (0) 2019.01.25
centos 서비스 등록하기  (0) 2018.12.03
centos 서비스 자동시작  (0) 2018.11.16
mobaxterm - centos 에서 X11 포워딩 안되는 경우 해결책  (0) 2018.09.12
Posted by 구차니


[링크 : https://pjreddie.com/darknet/yolo/]

[링크 : https://github.com/pjreddie/darknet]

    [링크 : http://pgmrlsh.tistory.com/5]

[링크 : http://openresearch.ai/t/yolo-you-only-look-once-unifed-real-time-object-detection/67]

[링크 : http://darkpgmr.tistory.com/170]

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

uas - USB Attached SCSI  (0) 2018.09.13
db 정규화  (0) 2018.09.12
MTD - Moving Target Defense  (0) 2018.09.08
MNIST 데이터베이스  (0) 2018.06.22
VGA DMT 스펙  (0) 2018.06.11
Posted by 구차니
Programming/node.js2018. 9. 11. 15:03

한줄 요약

ffmpeg 패키지가 node.js의 패키지가 아닌 실제 바이너리를 의미함.. -_-

윈도우건 리눅스건 상관없는데, node-rtsp-stream 문제가 있는 것으로 보임


---

패키지 까는데 윈도우에서 하고 있어서 열심히 에러 뿜뿜 해주심 -_-


C:\> npm install -g node-rtsp-stream

npm WARN notice [SECURITY] ws has the following vulnerabilities: 2 high, 1 low. Go here for more details: https://nodesecurity.io/advisories?search=ws&version=0.4.32 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.


> ws@0.4.32 install C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws

> (node-gyp rebuild 2> builderror.log) || (exit 0)



C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

이 솔루션의 프로젝트를 한 번에 하나씩 빌드합니다. 병렬 빌드를 사용하려면 "/m" 스위치를 추가하십시오.

MSBUILD : error MSB3428: Visual C++ 구성 요소 "VCBuild.exe"을(를) 로드할 수 없습니다. 이 문제를 해결하려면 1) .NET Framework 2.0 SDK를 설치하거나, 2

) Microsoft Visual Studio 2005를 설치하거나, 3) 해당 구성 요소가 다른 위치에 설치되어 있는 경우에는 그 위치를 시스템 경 로에 추가하십시오.  [C:\Users\user\AppDa

ta\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws\build\binding.sln]

MSBUILD : error MSB3428: Visual C++ 구성 요소 "VCBuild.exe"을(를) 로드할 수 없습니다. 이 문제를 해결하려면 1) .NET Framework 2.0 SDK를 설치하거나, 2

) Microsoft Visual Studio 2005를 설치하거나, 3) 해당 구성 요소가 다른 위치에 설치되어 있는 경우에는 그 위치를 시스템 경 로에 추가하십시오.  [C:\Users\user\AppDa

ta\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws\build\binding.sln]

+ node-rtsp-stream@0.0.3

added 6 packages in 21.052s

[링크 : https://www.npmjs.com/package/node-rtsp-stream]


걍 깔았더니 또 에러 뿜뿜해주심

C:\>npm install -g windows-build-tools


> windows-build-tools@4.0.0 postinstall C:\Users\user\AppData\Roaming\npm\node_modules\windows-build-tools

> node ./dist/index.js




Downloading BuildTools_Full.exe

[============================================>] 100.0% of 3.29 MB (3.29 MB/s)

Downloaded BuildTools_Full.exe. Saved to C:\Users\user\.windows-build-tools\BuildTools_Full.exe.


Starting installation...

Please restart this script from an administrative PowerShell!

The build tools cannot be installed without administrative rights.

To fix, right-click on PowerShell and run "as Administrator".

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! windows-build-tools@4.0.0 postinstall: `node ./dist/index.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the windows-build-tools@4.0.0 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-09-11T05_51_43_564Z-debug.log 

[링크 : https://superuser.com/questions/1032689/how-do-i-add-vcbuild-exe-to-windows-10-w-o-visual-studio]


C:\>npm install -g windows-build-tools


> windows-build-tools@4.0.0 postinstall C:\Users\user\AppData\Roaming\npm\node_modules\windows-build-tools

> node ./dist/index.js




Downloading BuildTools_Full.exe

[>                                            ] 0.0% (0 B/s)

Downloaded BuildTools_Full.exe. Saved to C:\Users\user\.windows-build-tools\BuildTools_Full.exe.


Starting installation...

Launched installers, now waiting for them to finish.

This will likely take some time - please be patient!


Status from the installers:

---------- Visual Studio Build Tools ----------

Successfully installed Visual Studio Build Tools.

------------------- Python --------------------

Python 2.7.15 is already installed, not installing again.


Now configuring the Visual Studio Build Tools..


All done!


+ windows-build-tools@4.0.0

added 142 packages in 102.328s 


영안되는거 같아서 삭제하고 다시 까는데 또 안되는 느낌 -_-

C:\>npm install -g node-rtsp-stream


> ws@0.4.32 install C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws

> (node-gyp rebuild 2> builderror.log) || (exit 0)



C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

이 솔루션의 프로젝트를 한 번에 하나씩 빌드합니다. 병렬 빌드를 사용하려면 "/m" 스위치를 추가하십시오.

C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws\build\bufferutil.vcxproj(20,3): err

or MSB4019: 가져온 "C:\Microsoft.Cpp.Default.props" 프로젝트를 찾을 수 없습니다. <Import> 선언에 지정한 경로가 올바른지 그리고 파일이 디스크에 있는지 확인하십시오.

C:\Users\user\AppData\Roaming\npm\node_modules\node-rtsp-stream\node_modules\ws\build\validation.vcxproj(20,3): err

or MSB4019: 가져온 "C:\Microsoft.Cpp.Default.props" 프로젝트를 찾을 수 없습니다. <Import> 선언에 지정한 경로가 올바른지 그리고 파일이 디스크에 있는지 확인하십시오.

+ node-rtsp-stream@0.0.3

added 6 packages in 5.346s 


췟.. 모듈 인식을 못한다.

C:\tt>node app.js

module.js:549

    throw err;

    ^


Error: Cannot find module 'node-rtsp-stream'

    at Function.Module._resolveFilename (module.js:547:15)

    at Function.Module._load (module.js:474:25)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (C:\Users\classact\Desktop\tt\app.js:1:72)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3) 


영 안되는 기분인데.. 

아무튼 우리의 친구 VLC를 깔고

만만한(?) 동영상 하나 받고

[링크 : https://archive.org/download/BigBuckBunny]


중요 : ffmpeg 실행파일이 필요하므로 적절한 위치에 압축풀고 윈도우 경로를 지정해준다.

[링크 : https://ffmpeg.zeranoe.com/builds/]


클라이언트에는 이거 하나 더 추가해주고

var WebSocket = require('ws') 

client = new Websocket('ws://localhost:9999');

player = new jsmpeg(client, {

    canvas: canvas // Canvas should be a canvas DOM element

});

[링크 : https://stackoverflow.com/questions/21441867/referenceerror-websocket-is-not-defined]


아놔.. window is not defined -_- 아 몰라 배째 


---

아 몰라 머리아프네 ㅠㅠ


[링크 : https://github.com/phoboslab/jsmpeg]

[링크 : https://jsmpeg.com/]

[링크 : https://www.npmjs.com/package/node-rtsp-stream]

[링크 : https://www.npmjs.com/package/jsmpeg]

[링크 : https://phoboslab.org/log/2013/05/mpeg1-video-decoder-in-javascript]

[링크 : https://github.com/Wifsimster/node-rtsp-stream-es6] <<

[링크 : https://github.com/phoboslab/jsmpeg/blob/master/view-stream.html]

'Programming > node.js' 카테고리의 다른 글

node-rtsp-stream 사용  (2) 2018.09.12
node.js 글로벌 모듈 목록보기  (0) 2018.09.11
node.js HTTP 요청하기  (0) 2018.09.10
cURL 그리고 REST  (6) 2018.09.09
node.js rtsp 스트리밍  (0) 2018.09.07
Posted by 구차니