Chris1975
Posts: 17
Joined: Wed Sep 05, 2012 11:43 pm

Re: My Camera arrived today... what now?

Tue May 14, 2013 2:58 pm

Newark/Element 14 went down in the middle of my order. :x
Oh,well . I'll have to try again later.

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

Re: My Camera arrived today... what now?

Tue May 14, 2013 3:43 pm

I've just posted a way of streaming from your camera module to Bambuser.com which is a service you can register for free for.
http://www.recantha.co.uk/blog/?p=4052
The scripts on the blog show how to convert your stream live to flv format and send it over the rtmp protocol.
--
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

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: My Camera arrived today... what now?

Tue May 14, 2013 4:16 pm

jamesh wrote:
towolf wrote:
As soon as the raw h264 bitstream leaves your binary you lost all timing information attached to the frames. This really properly needs a real streaming solution, not just netcatting a bitstream across the network via a fifo. That's at best a poor-mans streaming solution.

Either this has to get packaged in RTP or RTSP frames or it needs muxing at the time of capture.

And V4L will have to happen sooner or later too.
You are correct that there is no timing information in an H264 stream. I'm going to look in to 'containing' the stream at some point, but there are technical problems there, so it's not a quick job. As to it being a poor mans streaming solution - well, the camera only costs $25, so it's designed for poor men....

But as long as both ends know what the FPS is, you should be good enough for most purposes, since the camera board doesn't do audio the syncing issues are not so great.
But that's the point! You need precise timing to be able to sync with external or separate sound, among other things that also need precise timestamps.

If sound were muxed at the time of capture it wouldn't be so necessary, but without it, it is crucial for AV synch.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23879
Joined: Sat Jul 30, 2011 7:41 pm

Re: My Camera arrived today... what now?

Tue May 14, 2013 4:34 pm

towolf wrote:
jamesh wrote:
towolf wrote:
As soon as the raw h264 bitstream leaves your binary you lost all timing information attached to the frames. This really properly needs a real streaming solution, not just netcatting a bitstream across the network via a fifo. That's at best a poor-mans streaming solution.

Either this has to get packaged in RTP or RTSP frames or it needs muxing at the time of capture.

And V4L will have to happen sooner or later too.
You are correct that there is no timing information in an H264 stream. I'm going to look in to 'containing' the stream at some point, but there are technical problems there, so it's not a quick job. As to it being a poor mans streaming solution - well, the camera only costs $25, so it's designed for poor men....

But as long as both ends know what the FPS is, you should be good enough for most purposes, since the camera board doesn't do audio the syncing issues are not so great.
But that's the point! You need precise timing to be able to sync with external or separate sound, among other things that also need precise timestamps.

If sound were muxed at the time of capture it wouldn't be so necessary, but without it, it is crucial for AV synch.
My point was that since the camera does not have a microphone, the majority of people using it won't need the syncing. Like I said - MOST purposes.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: My Camera arrived today... what now?

Tue May 14, 2013 4:54 pm

recantha2 wrote:The scripts on the blog show how to convert your stream live to flv format and send it over the rtmp protocol.
Cool, I can't test this at work (ports are blocked), but I wonder if you can simplify the setup, and avoid the mkfifo step:

Code: Select all

/opt/vc/bin/raspivid -o - -w 400 -h 300 -t 10000000 -b 500000 | avconv -f h264 -r 25 -i pipe:0 -metadata title="Raspberry Pi Camera Module (LIVE)" -f flv rtmp://<RTMP URL>/<RTMP KEY> &

RaspberryCheesecake
Posts: 20
Joined: Fri Aug 31, 2012 11:02 am

Re: My Camera arrived today... what now?

Tue May 14, 2013 7:11 pm

Ravenous wrote:
RaspberryCheesecake wrote:I'm hoping to design a case for it using the same 3D printing that I used for my RPi case,
So what shape camera case are you going to make? :D Bird decoy or novelty plastic Hasselblad? :D

It's going to be fun watching all the crazy shapes people come up with...
It will be a shape that is suitable for mounting the camera module in the focus mount of my telescope, it will be a box with a 1" cylinder to go into the mount.

User avatar
ds18s20
Posts: 81
Joined: Fri Dec 23, 2011 5:44 am
Location: San Francisco

Re: My Camera arrived today... what now?

Tue May 14, 2013 7:46 pm

so in summary; when would one expect for the camera to show up as /dev/video0 or is that simply impossible due to whatever reason?

mikerr
Posts: 2781
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: My Camera arrived today... what now?

Tue May 14, 2013 10:00 pm

ds18s20 wrote:so in summary; when would one expect for the camera to show up as /dev/video0 or is that simply impossible due to whatever reason?
further up the thread:
jamesh wrote:I haven't had time to learn V4L and implement a driver I'm afraid. I'm hoping someone will come up to the plate for helping out on that one.
i.e. no timescale there
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
Grid
Posts: 22
Joined: Fri Jan 04, 2013 5:02 pm
Location: Lodz, Poland

Re: My Camera arrived today... what now?

Wed May 15, 2013 11:34 am

Can any of you lucky camera board owners share a sample raw *.264 file from the Pi?
Fix instead of throwing away. Save the planet one gadget at a time.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 1:39 pm

jamesh wrote:
towolf wrote: But that's the point! You need precise timing to be able to sync with external or separate sound, among other things that also need precise timestamps.

If sound were muxed at the time of capture it wouldn't be so necessary, but without it, it is crucial for AV synch.
My point was that since the camera does not have a microphone, the majority of people using it won't need the syncing. Like I said - MOST purposes.
Alright, alright. Let's first of all see what we can do with the current tools. They seem to be quite sophisticated already. Thanks for that.

Long term, I don't think you'd have to get into muxing and network code yourself necessarily.

If fate ordains that someone else steps up to write a video4linux driver, other projects can be used for that.

I'm quite fond of GStreamer. One can plug together complex pipelines on the command-line with it and achieve RTP streaming, simultaneous disk dumps, muxing, remuxing, live view etc. Anything one could wish for. It even has an fdsrc module, so I guess one can start right away to use the stdout from raspicam.

If video4linux is too limited to expose all features that the CLI tools have now, perhaps a Gstreamer-specific raspicam module would be an alternative.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23879
Joined: Sat Jul 30, 2011 7:41 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 1:53 pm

towolf wrote:
jamesh wrote:
towolf wrote: But that's the point! You need precise timing to be able to sync with external or separate sound, among other things that also need precise timestamps.

If sound were muxed at the time of capture it wouldn't be so necessary, but without it, it is crucial for AV synch.
My point was that since the camera does not have a microphone, the majority of people using it won't need the syncing. Like I said - MOST purposes.
Alright, alright. Let's first of all see what we can do with the current tools. They seem to be quite sophisticated already. Thanks for that.

Long term, I don't think you'd have to get into muxing and network code yourself necessarily.

If fate ordains that someone else steps up to write a video4linux driver, other projects can be used for that.

I'm quite fond of GStreamer. One can plug together complex pipelines on the command-line with it and achieve RTP streaming, simultaneous disk dumps, muxing, remuxing, live view etc. Anything one could wish for. It even has an fdsrc module, so I guess one can start right away to use the stdout from raspicam.

If video4linux is too limited to expose all features that the CLI tools have now, perhaps a Gstreamer-specific raspicam module would be an alternative.
Doesn't gstreamer run on top of V4L2 anyway?

Looks like there will be some imminent movement on V4L2, but as with anything, these sorts of things take time.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

mikerr
Posts: 2781
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: My Camera arrived today... what now?

Wed May 15, 2013 1:58 pm

With a bit of lateral thinking:

Gstreamer (and motion for that matter) can use ip cameras as input,
- you can make a "local ip camera" out of the raspicam

Basically by using the raspistill command as a cgi script on apache running on pi,
http://www.raspberrypi.org/phpBB3/viewt ... 12#p349512

then gstreamer would access it via http://localhost/cgi-bin/raspicam
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: My Camera arrived today... what now?

Wed May 15, 2013 2:24 pm

mikerr wrote:With a bit of lateral thinking:

Gstreamer (and motion for that matter) can use ip cameras as input,
- you can make a "local ip camera" out of the raspicam

Basically by using the raspistill command as a cgi script on apache running on pi,
http://www.raspberrypi.org/phpBB3/viewt ... 12#p349512

then gstreamer would access it via http://localhost/cgi-bin/raspicam
Wouldn't it be easier, and cleaner, if the camera programs had a command line option to redirect the output to stdout?

mikerr
Posts: 2781
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: My Camera arrived today... what now?

Wed May 15, 2013 2:31 pm

The raspicam progams do, but motion can't use stdin as its camera input - gstreamer might be able to?
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: My Camera arrived today... what now?

Wed May 15, 2013 2:38 pm

mikerr wrote:The raspicam progams do, but motion can't use stdin as its camera input - gstreamer might be able to?
Ahh, I didn't know that about Motion. Good to know. I can confirm that you can pipe stdout into a gstreamer pipeline using a pipeline starting with:

Code: Select all

./capture -c 100000 -o | gst-launch-1.0  -v -e filesrc location=/dev/fd/0  !
Where capture is the program outputting on stdout.

DAFlippers
Posts: 26
Joined: Fri Aug 10, 2012 8:39 am
Location: Berkshire

Re: My Camera arrived today... what now?

Wed May 15, 2013 2:53 pm

I'm running 3.6.11+ #450 PREEEMPT Tue 14 May and having enabled the camera I can get video by running /opt/vc/bin/raspivid -d -t 100000 in a root terminal.

The video is mirror image and tends to change colour or breakup or similar. I know it isn't the camera because I rather cheekily made my order for two and both cameras exhibit the same results. I know this is early days but have others found this?

David

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23879
Joined: Sat Jul 30, 2011 7:41 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 3:00 pm

Use the hflip option to flip it back.

/opt/vc/bin/raspivid -d -t 100000 -hf

Turn off demo mode - you are probably seeing lots of effects whizzing past, so its looks flickery.

/opt/vc/bin/raspivid -t 100000 -hf
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

DAFlippers
Posts: 26
Joined: Fri Aug 10, 2012 8:39 am
Location: Berkshire

Re: My Camera arrived today... what now?

Wed May 15, 2013 3:05 pm

James,

As always, you are a star.

David

DAFlippers
Posts: 26
Joined: Fri Aug 10, 2012 8:39 am
Location: Berkshire

Re: My Camera arrived today... what now?

Wed May 15, 2013 3:35 pm

Working nicely - /opt/vc/bin/raspivid -p 10,10,192,108 -vf -t 10000

It took me a while to get the usage arguments - /opt/vc/bin/raspivid

David

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23879
Joined: Sat Jul 30, 2011 7:41 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 3:57 pm

DAFlippers wrote:James,

As always, you are a star.

David
:oops:
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

NKT
Posts: 8
Joined: Thu Apr 04, 2013 3:56 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 4:25 pm

FWIW, CPC showed as having stock last night, so I ordered, then checking a few moments ago they say "Awaiting stock", so it looks like demand has indeed been brisk.

I will post an update when it arrives (tomorrow, most likely, though it currently says "Processing" under status, and normally by now {20 hours after order} it would be saying "Complete")

Then I have to learn even more new tricks! Remote streamed "webcam" over my PiProxy, perhaps? Shedcam? Or copy that cool rangefinder rear view camera setup posted earlier... Semi-autonomous Star Wars Imperial Probe? Damn, I think I'm going to need more cameras!

DAFlippers
Posts: 26
Joined: Fri Aug 10, 2012 8:39 am
Location: Berkshire

Re: My Camera arrived today... what now?

Wed May 15, 2013 4:40 pm

Probably due to some people ordering two... :oops:

David

P.S. They both work fine.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: My Camera arrived today... what now?

Wed May 15, 2013 8:21 pm

fbutler wrote:
mikerr wrote:The raspicam progams do, but motion can't use stdin as its camera input - gstreamer might be able to?
Ahh, I didn't know that about Motion. Good to know. I can confirm that you can pipe stdout into a gstreamer pipeline using a pipeline starting with:

Code: Select all

./capture -c 100000 -o | gst-launch-1.0  -v -e filesrc location=/dev/fd/0  !
Where capture is the program outputting on stdout.
Or

Code: Select all

gst-launch-1.0 -v fdsrc 

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: My Camera arrived today... what now?

Wed May 15, 2013 10:27 pm

Grid wrote:Can any of you lucky camera board owners share a sample raw *.264 file from the Pi?

Youtube:

http://www.youtube.com/watch?v=wW1VeV66ugk

Already done a few there.

BPK
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
Contact: Website

Re: My Camera arrived today... what now?

Wed May 15, 2013 11:03 pm

Grid wrote:Can any of you lucky camera board owners share a sample raw *.264 file from the Pi?
Got ours today and am seriously impressed! Software included with it is also really well thought out and more comprehensive than we had hoped for. Congratulations to all involved think this will take Raspberry Pi and physical computing to the next level.

The first thing we wanted to do was take some footage of outdoors and have posted some videos on our pi-cars youtube video:

http://www.youtube.com/channel/UCSs2qob ... irmation=1

Youtube has obviously encoded the video further, we have so far used pretty much default settings on the camera.
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi

Return to “Camera board”