Hello,
Is there an simple example program to use RPi camera module as video streaming like usb webcam?
Thank you for your attention.
Regards
Sony
Raspberry Pi camera module
Raspberry Pi camera module
- Attachments
-
- PiCam.JPG (81.07 KiB) Viewed 14393 times
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Raspberry Pi camera module
I presume you mean streaming from the pi to a computer using SSH as Matt and I did with his robot (It had a camera on it then!).
On the Pi create a file (e.g. startvideofeed.sh) with only the following: -
raspivid -o - -t 0 -hf -w 640 -h 360 -fps 25 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554}' :demux=h264
Change permissions:-
sudo chmod +x startvideofeed.sh
Run the file ./startvideofeed.sh
On the main computer open VLC from the 'Media' menu select 'Open Networkstream'. Enter rtsp://192.168.2.111:8554/ (Where 192.168.2.111 is the IP of the Pi)
On the Pi create a file (e.g. startvideofeed.sh) with only the following: -
raspivid -o - -t 0 -hf -w 640 -h 360 -fps 25 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554}' :demux=h264
Change permissions:-
sudo chmod +x startvideofeed.sh
Run the file ./startvideofeed.sh
On the main computer open VLC from the 'Media' menu select 'Open Networkstream'. Enter rtsp://192.168.2.111:8554/ (Where 192.168.2.111 is the IP of the Pi)
Re: Raspberry Pi camera module
Thank for reply,
I mean streaming video with gambas. I has been tried a webcam with gambas to stram the video.
By use drawingarea I can see the current video via webcam.
Now I want to change the webcam with PiCam.
regards
Sony
I mean streaming video with gambas. I has been tried a webcam with gambas to stram the video.
By use drawingarea I can see the current video via webcam.
Now I want to change the webcam with PiCam.
regards
Sony
- Attachments
-
- MyWebCam_test.tar.gz
- (18.17 KiB) Downloaded 592 times
Re: Raspberry Pi camera module
Hi sony, you asked for the code on my blog, so here it is.
As I mentioned, it is not finished (typical!). It will stream video (which I use to set the camera up and check focus) and it will capture at 90fps, but it doesn't do both at the same time.
To stream, this program simply runs the stream.sh script. You also need to install VLC.
The real-time clock stuff won't make any sense. I use it in conjunction with a simple RPi time server, so I can time stamp files.
My original blog post: https://captainbodgit.blogspot.co.uk/20 ... 90fps.html
As I mentioned, it is not finished (typical!). It will stream video (which I use to set the camera up and check focus) and it will capture at 90fps, but it doesn't do both at the same time.
To stream, this program simply runs the stream.sh script. You also need to install VLC.
The real-time clock stuff won't make any sense. I use it in conjunction with a simple RPi time server, so I can time stamp files.
My original blog post: https://captainbodgit.blogspot.co.uk/20 ... 90fps.html
- Attachments
-
- 4_sony.zip
- (23.01 KiB) Downloaded 549 times
Re: Raspberry Pi camera module
Re: MyWebCam_test on RPi, do you have: /dev/video0 and v4l2 driver?
If the software is a bit old, update:-
sudo rpi-update
sudo apt-get update
sudo apt-get upgrade
Still no /dev/video0?, run: sudo modprobe bcm2835-v4l2
If the software is a bit old, update:-
sudo rpi-update
sudo apt-get update
sudo apt-get upgrade
Still no /dev/video0?, run: sudo modprobe bcm2835-v4l2
Re: Raspberry Pi camera module
Hi Steve,
The program MyWebCam_test has been tested and running. My problem is my webcam device have max frame rate at 30 fps, so I decided to change the webcam with PiCam that have frame rate at 90fps. I just need small program like MyWebCam_test by using PiCam as my reference to develop my idea. My project is shoot the image on moving object with camera device.
The program MyWebCam_test has been tested and running. My problem is my webcam device have max frame rate at 30 fps, so I decided to change the webcam with PiCam that have frame rate at 90fps. I just need small program like MyWebCam_test by using PiCam as my reference to develop my idea. My project is shoot the image on moving object with camera device.
- Attachments
-
- Capture1.JPG (53.35 KiB) Viewed 14362 times
Re: Raspberry Pi camera module
I use for higher fps to get good image, currently I use 30fps can't copied the the moving object clearly.
I use gray scale video and by using drawingarea I copy an sample area then count the pixel.
How I count? I copied the image, the corner pixel value as reference value. I get all pixel value in the sample area and compare with reference value. Let's say if pixel value > 10 then I add counter until all pixel value compared.
I use gray scale video and by using drawingarea I copy an sample area then count the pixel.
How I count? I copied the image, the corner pixel value as reference value. I get all pixel value in the sample area and compare with reference value. Let's say if pixel value > 10 then I add counter until all pixel value compared.
- Attachments
-
- Capture2.JPG (33.94 KiB) Viewed 14353 times
Re: Raspberry Pi camera module
Hello,
Now I am able to appearing the actual video with command below:
Shell "raspistill -t 0 -p 454,266,350,350 -ex auto -hf -rot 180 -ifx none"
My problem I can not copying the video to Drawingarea as picture.
Please help me to copying the object outside of form1.form
Sony
Now I am able to appearing the actual video with command below:
Shell "raspistill -t 0 -p 454,266,350,350 -ex auto -hf -rot 180 -ifx none"
My problem I can not copying the video to Drawingarea as picture.
Please help me to copying the object outside of form1.form
Sony
Re: Raspberry Pi camera module
hello,
Base on source code from https://github.com/charlie-ogier/PiCam
I made a small program to copied the screen but the object from picamera can not copied.
please help me.
Sony
Base on source code from https://github.com/charlie-ogier/PiCam
I made a small program to copied the screen but the object from picamera can not copied.
please help me.
Sony
- Attachments
-
- myPiCam2.tar
- (50 KiB) Downloaded 570 times