embeded/raspberry pi2015. 9. 15. 12:43

bcm2835-v4l2 모듈만 불러주면 해결

(테스트 라즈비안 2015.5.5일자 클린상태)

---

uv4l2를 설치해서 되는건진 테스트 필요 (sd 밀고 다시 설정하고.. 아으 ㅋㅋㅋㅋ)

$ sudo apt-get install uv4l uv4l-raspicam uv4l-raspicam-extras uv4l-server uv4l-uvc uv4l-xscreen uv4l-mjpegstream 

---


Camera Enable로 설정 후 재부팅

$ sudo raspi-config


$ sudo modprobe bcm2835-v4l2

$ lsmod | grep v4l

bcm2835_v4l2           37265  0

videobuf2_vmalloc       5397  1 bcm2835_v4l2

videobuf2_core         34020  1 bcm2835_v4l2

v4l2_common             3766  2 bcm2835_v4l2,videobuf2_core

videodev              124141  3 bcm2835_v4l2,v4l2_common,videobuf2_core


$ dmesg

[ 6468.552996] media: Linux media interface: v0.10

[ 6468.574380] Linux video capture interface: v2.00

[ 6468.610013] bcm2835-v4l2: scene mode selected 0, was 0

[ 6468.610559] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720

[ 6468.615652] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.


$ ls -al /dev/video0

crw-rw-rwT+ 1 root video 81, 0  9월 15 12:37 /dev/video0 


[링크 : http://www.ics.com/blog/raspberry-pi-camera-module]


만약 start_x를 추가하지 않아 카메라가 활성화 되지 않으면

Operation not permitted 라는 에러 메시지가 발생된다.

$ lsmod

Module                  Size  Used by

cuse                    5065  0

fuse                   81710  2 cuse

snd_bcm2835            19769  0

snd_pcm                74825  1 snd_bcm2835

snd_seq                53561  0

snd_seq_device          3650  1 snd_seq

snd_timer              18157  2 snd_pcm,snd_seq

snd                    52116  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device

uio_pdrv_genirq         2966  0

uio                     8235  1 uio_pdrv_genirq


$ sudo modprobe bcm2835-v4l2

ERROR: could not insert 'bcm2835_v4l2': Operation not permitted


$ dmesg

[   33.911831] media: Linux media interface: v0.10

[   33.932822] Linux video capture interface: v2.00

[   33.957085] : bcm2835-v4l2: error -1 while loading driver 


Camera

start_x Enable the camera module.

 start_x=1


disable_camera_led Turn off the red camera LED when recording video or taking a still picture

 disable_camera_led=1


gpu_mem minimum GPU memory for camera use

 gpu_mem=128

[링크 : http://elinux.org/RPiconfig#Camera] 


움직임 감지시 이미지로 저장하는 부분

output_normal을 off로 하면 "target_dir" 에 저장을 하지 않음

############################################################

# Image File Output

############################################################


# Output 'normal' pictures when motion is detected (default: on)

# Valid values: on, off, first, best, center

# When set to 'first', only the first picture of an event is saved.

# Picture with most motion of an event is saved when set to 'best'.

# Picture with motion nearest center of picture is saved when set to 'center'.

# Can be used as preview shot for the corresponding movie.

output_normal off


# Output pictures with only the pixels moving object (ghost images) (default: off)

output_motion off


# The quality (in percent) to be used by the jpeg compression (default: 75)

quality 75


# Output ppm images instead of jpeg (default: off)

ppm off


움직임 감지시 동영상 저장 부분. swf가 기본값이며 ffmpeg_cap_new를 off로 해주면 저장되지 않았다.

(기본값이 off라면서 on이 되어 있냐 -_-)

############################################################

# FFMPEG related options

# Film (mpeg) file output, and deinterlacing of the video input

# The options movie_filename and timelapse_filename are also used

# by the ffmpeg feature

############################################################


# Use ffmpeg to encode mpeg movies in realtime (default: off)

ffmpeg_cap_new off


# Use ffmpeg to make movies with only the pixels moving

# object (ghost images) (default: off)

ffmpeg_cap_motion off


# Use ffmpeg to encode a timelapse movie

# Default value 0 = off - else save frame every Nth second

ffmpeg_timelapse 0


# The file rollover mode of the timelapse video

# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual

ffmpeg_timelapse_mode daily


# Bitrate to be used by the ffmpeg encoder (default: 400000)

# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)

ffmpeg_bps 500000


# Enables and defines variable bitrate for the ffmpeg encoder.

# ffmpeg_bps is ignored if variable bitrate is enabled.

# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,

# or the range 2 - 31 where 2 means best quality and 31 is worst.

ffmpeg_variable_bitrate 0


# Codec to used by ffmpeg for the video compression.

# Timelapse mpegs are always made in mpeg1 format independent from this option.

# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.

# mpeg1 - gives you files with extension .mpg

# mpeg4 or msmpeg4 - gives you files with extension .avi

# msmpeg4 is recommended for use with Windows Media Player because

# it requires no installation of codec on the Windows client.

# swf - gives you a flash film with extension .swf

# flv - gives you a flash video with extension .flv

# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )

# mov - QuickTime ( testing )

ffmpeg_video_codec swf


# Use ffmpeg to deinterlace video. Necessary if you use an analog camera

# and see horizontal combing on moving objects in video or pictures.

# (default: off)

ffmpeg_deinterlace off 


motion.conf

I ended up commented these out when i was testing but not totally sure if it helped.

It's prolly ok to leave motion.conf pretty much as it was but this works fine for me and that's how it's gonna stay now it's fully working.


;netcam_url value

;target_dir value

;webcam_port 8081

;videodevice /dev/video0

[링크 : http://ubuntuforums.org/showthread.php?t=1897786] 


화면이 안떠서 디버깅을 해보니 예제로 된 /etc/motion/motion.conf 에서

thread의 경로가 잘못 잡힌 것을 발견

$ sudo motion[0] Processing thread 0 - config file /etc/motion/motion.conf

[0] Thread config file /usr/local/etc/thread1.conf not found: No such file or directory

[0] Thread config file /usr/local/etc/thread2.conf not found: No such file or directory

[0] Motion 3.2.12 Started

[0] Motion going to daemon mode 


이렇게 하니.. 8081 8082 포트로 접속이 된다.

$ sudo vi /etc/motion/motion.conf
# thread config files.

thread /etc/motion/thread1.conf

thread /etc/motion/thread2.conf

; thread /usr/local/etc/thread3.conf

; thread /usr/local/etc/thread4.conf 



8080 에서는 작동중인 쓰레드가

8081 에는 cam1


8082에는 cam2



15 프레임 캡쳐 / 15 프레임 스트리밍 해둔건데 cpu가 1개 코어 100%를 먹네.. ㄷㄷㄷ



+

그나저나 아이패드에서는 영상이 가로/세로 바꾸거나 스크롤을 하는 동안에만 잠시 보인다..

머가 문제라서 리프레시가 자동으로 안될까?


+

갤럭시 S2 에서는 다운로드..


+

IE 에서도 다운로드

크롬외에는 쓸모가 없나 -ㅁ-?

아니면.. HTTP 스트리밍이 되는.. vlc?


Posted by 구차니
프로그램 사용/VLC2015. 9. 15. 12:00

너.. 정체가 모냐?

일단은... -vvv 옵션차이로 rtsp / http 스트리밍이 되기도 하고 안되기도 한다. -_-



      --v4l2-set-ctrls <문자열>

                                 v4l2 드라이버 제어

          Set the v4l2 driver controls to the values specified using a comma

          separated list optionally encapsulated by curly braces (e.g.:

          {video_bitrate=6000000,audio_crc=0,stream_type=3} ). To list

          available controls, increase verbosity (-vvv) or use the v4l2-ctl

          application.



      --verbose-objects <문자열>

                                 어떤 객체가 디버그 메시지를

                                 출력할지 선택

          This is a ',' separated string, each object should be prefixed by a

          '+' or a '-' to respectively enable or disable it. The keyword 'all'

          refers to all objects. Objects can be referred to by their type or

          module name. Rules applying to named objects take precedence over

          rules applying to object types. Note that you still need to use -vvv

          to actually display debug message.





'프로그램 사용 > VLC' 카테고리의 다른 글

http vlc protocol  (0) 2018.11.30
vlc for windows / ascii art ㅋㅋㅋ  (0) 2016.11.22
dash with VLC  (0) 2015.09.11
VLC dshow(캡쳐장비) 해상도 설정  (0) 2015.05.23
VLC로 multicast 테스트  (0) 2014.10.22
Posted by 구차니

이제.. AEON이 남았군




UEF 처럼 챕터 별로 스샷을 올릴까 말까..

Posted by 구차니

심플하게 6개 미션 3종족!


[링크 : http://supcom.standardof.net/supreme-commander/campaign-walkthroughs/]

Posted by 구차니
Microsoft/Windows2015. 9. 14. 14:27

보호모드로 작동하면

파일을 저정하는데 저장한 경로에서 안보인다거나 하는 문제가 발생한다.

권한상의 문제로 바탕화면에 파일이 저장이 안된다거나 하는 경우가 바로 이 경우


[링크 : https://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx]

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

win7 starter / home premium 메모리 사용량  (0) 2015.11.08
win7 starter?  (0) 2015.11.07
ie 호환성 모드 -_-  (0) 2015.09.10
윈7 그림판 글꼴 부드럽게 끄기  (0) 2015.06.26
KB3045171 글꼴관련 업데이트 문제점?  (0) 2015.05.31
Posted by 구차니
embeded/raspberry pi2015. 9. 14. 14:21

라즈베리 파이는 메모리를 공유하는데

GPU에 할당되는 메모리에 따라 사용가능한 기능이 제한이 된다.


gpu_mem GPU memory in megabyte. Sets the memory split between the ARM and GPU. ARM gets the remaining memory. Min 16. Default 64

[링크 : http://elinux.org/RPiconfig]

[링크 : https://www.raspberrypi.org/documentation/configuration/config-txt.md]


요약하면.. GPU에 최저 할당 가능한 

16MB는 2D로만 쓸 수 있고(FullHD 해상도 가능)

32MB 부터 3d 가속과 비디오 가속이 가능

128MB 는 raspBMC 라는 녀석의 권장 설정값


기능적으로는 32MB 부터 전부사용은 가능하다.



256MB version


For older RaspberryPi, with 256 MB of RAM, 4 splits are available:


240/16 - The most RAM size ARM can get (240MB) with mimial GPU memory. It's the best for general computing when you don't need 3D graphics or hardware video acceleration. It has enough memory to handle 1920x1200x16bpp framebuffer resolution. While 32bpp is also working, it's not recommended since it leaves very small amount of free memory for GPU.

-

224/32 - This one is deprecated in favor of 240/16 split. It has 3D and hardware video decoding build in but since there is not enough memory to actually use it, there's little point in using it. Unless you have some problems with 240/16 split or want to use 32bpp framebuffer at highest resolution. It is possible it will be deleted in the future.


192/64 - You need at least 64MB of GPU split to use hardware video acceleration or 3D graphics. It may not be enough GPU memory for hardware accelerated video playback at highest resolution or if you need a lot of GPU memory for things like textures.


128/128 - The most RAM GPU can get. Use it when you need a lot of memory for 3D graphic card and hardware accelerated video playback in high resolution. This split is needed for RaspBMC to work properly or to play fullHD video content with omxplayer without problems.


512MB version


New versions of RaspberryPi has 512 MB of RAM. You have 4 additional splits designed for this version:


496/16 and 448/64 - like 240/16 and 192/64 split for 256MB respectively but with 256MB more RAM available for ARM. Since GPU has only 16 MB/64MB or RAM, all the limitations from 240/16/192/64 still apply.

384/128 - Similar to 128/128 split for 256MB - you should get all the graphic chip features but with reasonable amount of ARM memory. This will probably be the most universal split right now.

256/256 - Some bonus graphic card memory if you really need it, like for big textures and similar things. While 256MB of ARM memory is bigger than you could possibly have in older RaspberryPis, I don't think this one will be used on many occasions.


[링크 : http://raspberrypi.stackexchange.com/.../what-is-the-optimum-split-of-main-versus-gpu-memory]

Posted by 구차니
Programming/css2015. 9. 14. 11:32

엇.. css에서 >는 연산자가 맞긴한데.. 비교가 아니었구나

div > p는 div 하위의 p 에 대해서 css를 적용한다 라는 의미

즉, div 안에서 쓰는 p와 그냥 p를 서로 다르게 줄 수 있다는 것


element,element div, p Selects all <div> elements and all <p> elements 1

element element div p Selects all <p> elements inside <div> elements 1

element>element div > p Selects all <p> elements where the parent is a <div> element 2

element+element div + p Selects all <p> elements that are placed immediately after <div> elements 2

element1~element2 p ~ ul Selects every <ul> element that are preceded by a <p> element


[링크 : http://www.w3schools.com/cssref/css_selectors.asp]


tag

{

property: value value2 value3;

}

[링크 : http://www.w3schools.com/cssref/default.asp]

'Programming > css' 카테고리의 다른 글

css body background  (0) 2015.09.22
CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css 관련  (4) 2015.09.08
css box model  (0) 2014.05.15
크롬과 IE에서 CSS 차이점 - body / background-color  (2) 2011.03.09
Posted by 구차니

href = Hypertext REFerence

rel = RELation

type


<head>

    <link rel="stylesheet" type="text/css" href="./style.css" />

</head>


[링크 : http://www.w3schools.com/tags/tag_link.asp]

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

div span 블럭구조 및 원형테두리  (0) 2015.09.23
ul / li로 메뉴 꾸미기  (0) 2015.09.16
node.js / angular.js ...  (0) 2015.09.11
html5  (0) 2015.09.10
html event  (0) 2015.09.10
Posted by 구차니
embeded/raspberry pi2015. 9. 14. 10:00

해보려니 의존성 문제랑 여러가지 문제로 구동 불가..

omx 어쩌구가 나오는데.. 아무튼 실행하려고 하면 에러가 나면서 실행이 안된다 -_ㅠ


WARNING: erroneous pipeline: no element "h264parse" 

[링크 : http://www.onepitwopi.com/raspberry-pi/gstreamer-1-2-on-the-raspberry-pi/]

---


ㅎㄷㄷ 정규식으로 검색이라니 머지?

라즈베리 2 에서 해보려니.. gst-launch 로 되네..


서버

$ raspivid -t 0 -h 720 -w 1280 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=라즈베리파이IP port=5000


클라이언트

$ gst-launch-1.0 -v tcpclientsrc host=라즈베리파이IP port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

[링크 : http://www.rasplay.org/?p=5607]


In simple form, a PIPELINE-DESCRIPTION is a list of elements separated by exclamation marks (!). Properties may be appended to elements, in the form property=value.

[링크 : http://manpages.ubuntu.com/manpages/trusty/man1/gst-launch-1.0.1.html]


[링크 : http://www.aftermath.kr/entry/GStreamer-RTSP-with-RPi]


$ sudo apt-get install gstreamer1.0

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

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

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

주의, 정규식 'gstreamer1.0'에 대해 'libgstreamer1.0-dev'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-base'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-audiosource'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-audiosink'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'libgstreamer1.0-0'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-visualization'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'libgstreamer1.0-0-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-omx-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-ugly'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-base-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-base-doc'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-gnomevfs'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-doc'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-bad'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-base-apps'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-tools'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-omx'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-libav'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-good'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-bad-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-bad-doc'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-videosink'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-videosource'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-pulseaudio'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-ugly-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-good-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-ugly-doc'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-alsa'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-plugins-good-doc'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-libav-dbg'을(를) 선택합니다

주의, 정규식 'gstreamer1.0'에 대해 'gstreamer1.0-x'을(를) 선택합니다

주의, 'gstreamer1.0-visualization' 대신에 'gstreamer1.0-plugins-good' 패키지를 선택합니다

gstreamer1.0-alsa 패키지는 이미 최신 버전입니다.

gstreamer1.0-libav 패키지는 이미 최신 버전입니다.

gstreamer1.0-plugins-bad 패키지는 이미 최신 버전입니다.

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

gstreamer1.0-plugins-good 패키지는 이미 최신 버전입니다.

gstreamer1.0-x 패키지는 이미 최신 버전입니다.

libgstreamer1.0-0 패키지는 이미 최신 버전입니다.

libgstreamer1.0-0 패키지 수동설치로 지정합니다.

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

  autopoint debhelper gettext gir1.2-gstreamer-1.0 html2text intltool-debian

  libelfg0 libgettextpo0 libglib2.0-bin libglib2.0-dev libglib2.0-doc

  libmail-sendmail-perl libpcre3-dev libpcrecpp0 libsys-hostname-long-perl

  libunistring0 po-debconf

제안하는 패키지:

  dh-make gettext-doc gstreamer1.0-gnomevfs devhelp libmail-box-perl

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

  autopoint debhelper gettext gir1.2-gstreamer-1.0 gstreamer1.0-doc

  gstreamer1.0-libav-dbg gstreamer1.0-omx-dbg gstreamer1.0-plugins-bad-dbg

  gstreamer1.0-plugins-bad-doc gstreamer1.0-plugins-base-apps

  gstreamer1.0-plugins-base-dbg gstreamer1.0-plugins-base-doc

  gstreamer1.0-plugins-good-dbg gstreamer1.0-plugins-good-doc

  gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-dbg

  gstreamer1.0-plugins-ugly-doc gstreamer1.0-pulseaudio gstreamer1.0-tools

  html2text intltool-debian libelfg0 libgettextpo0 libglib2.0-bin

  libglib2.0-dev libglib2.0-doc libgstreamer1.0-0-dbg libgstreamer1.0-dev

  libmail-sendmail-perl libpcre3-dev libpcrecpp0 libsys-hostname-long-perl

  libunistring0 po-debconf

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

  gstreamer1.0-omx

1개 업그레이드, 34개 새로 설치, 0개 제거 및 88개 업그레이드 안 함.

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

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

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



Posted by 구차니
개소리 왈왈/블로그2015. 9. 14. 08:53

이제는 싸이월드.. 잊혀져 버린 기억이 되었지만..

그래도 이렇게 하나둘씩 접혀지고.. 백업 서비스를 제공하다니..

사진첩까지 접히게 되면 얼마나 아쉬울까... ㅠㅠ




[링크 : http://www.cyworld.com/bcenter/cybackup/html/backupCenter.asp]

'개소리 왈왈 > 블로그' 카테고리의 다른 글

크아앙 티스토리!!!  (0) 2015.10.05
방문자 급감 ㅠㅠ  (0) 2015.09.17
기분전환겸 스킨 변경  (0) 2015.09.04
네이버가.. 50% 돌파?  (2) 2015.07.31
출장 3일의 여파?  (2) 2015.07.16
Posted by 구차니