nickneubrand
Posts: 29
Joined: Fri Apr 26, 2013 4:54 am

Raspivid Pygame Stream

Sun May 19, 2013 5:43 am

Hey,

Does anyone know what the camera is labeled, when regarding its device name. When you use code in pygame to access a camera you use:

cam = pygame.camera.Camera("/dev/video0", (640,480))

The problem is /dev/video0 doesn't work. Is there another label that I can use to get a video stream. Keep in mind I am not using a network. I just want a window to pop up(which I already have) and show me what the camera is pointed at. Any help would be appreciated.

I have heard OpenCV might work but I would like to run it via python/pygame if possible

Thanks

User avatar
recantha2
Posts: 287
Joined: Wed Nov 14, 2012 9:34 am
Location: Potton, Bedfordshire
Contact: Website Facebook Twitter

Re: Raspivid Pygame Stream

Sun May 19, 2013 7:25 am

The camera is not mounted in that way. Someone is looking at writing drivers so that it _can_ be mounted, but it's likely to be months away.
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog

Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam

nickneubrand
Posts: 29
Joined: Fri Apr 26, 2013 4:54 am

Re: Raspivid Pygame Stream

Sun May 19, 2013 8:21 am

damn, thats upsetting

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Raspivid Pygame Stream

Sun May 19, 2013 8:26 am

Get creative , maybe a pipe can solve your problem (popen etc.)

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

nickneubrand
Posts: 29
Joined: Fri Apr 26, 2013 4:54 am

Re: Raspivid Pygame Stream

Sun May 19, 2013 8:27 am

im completely new to raspberry pi so i have no idea what a "pipe" is

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Raspivid Pygame Stream

Sun May 19, 2013 8:53 am

http://www.tuxfiles.org/linuxhelp/iodirection.html

After that , have a look into "Named Pipes" and/or
Pythons os.* and Subprocess modules.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

nickneubrand
Posts: 29
Joined: Fri Apr 26, 2013 4:54 am

Re: Raspivid Pygame Stream

Sun May 19, 2013 9:15 am

Thanks for the reply, I get the concept, but honesty I think this is way out of my range of capability. I'll continue to look at it, but for my low level knowledge on linux I don't think this is going to be a viable option for me.

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Raspivid Pygame Stream

Sun May 19, 2013 9:58 am

Hey , the Raspi is a learning tool.
If you did learn programming at some point , you should be
able to grasp the command line.

Lots of tutorials are online , here one which i've found via Google

http://cli.learncodethehardway.org/book/

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Camera board”