Foundation Camera Board information


427 posts   Page 14 of 18   1 ... 11, 12, 13, 14, 15, 16, 17, 18
by poing » Sun May 19, 2013 10:26 am
jamesh wrote:Well, the increase will be about 50% vertically, a bit less horizontally- noticeable but not huge.


If the default still image originates from a 1080p frame the used dimension is 1440 x 1080 pixels or 1.5 MP. If you can use the full sensor you use 2592 x 1944 pixels or 5 MP which is roughly 100% more both horizontally and vertically.
Posts: 1099
Joined: Thu Mar 08, 2012 3:32 pm
by mikerr » Sun May 19, 2013 10:40 am
Further evidence is that you can get wider uncropped field of view than the default by giving a horizontal resolution of 3500
viewtopic.php?f=43&t=44077

It's true that I find video quality stunning, but still quality only "very good", but not amazing,
hopefully it turns out stills are currently using the 1080p option,
so a quality improvement for us all in the works ;)
Got a Pi Camera? View it in my android app - Raspicam Remote ! No software required on the pi
User avatar
Posts: 1166
Joined: Thu Jan 12, 2012 12:46 pm
Location: NorthWest, UK
by Nu7s » Sun May 19, 2013 12:41 pm
Just wanted to say thanks for releasing this. I've been playing around with it since I recieved it yesterday, and I'm really impressed with the quality and ease of use. Thanks! :D
Posts: 57
Joined: Wed Jul 25, 2012 9:14 am
by mikec79 » Sun May 19, 2013 7:41 pm
James,

Would I get a mp4 video out of RaspiVid if I change line 695 in RaspiVid.c
Code: Select all
encoder_output->format->encoding = MMAL_ENCODING_H264;

to
Code: Select all
encoder_output->format->encoding = MMAL_ENCODING_MP4V;


I found the following in mmal_param_convert.c, and I'm guessing those are our encoding options:
Code: Select all
static string_pair_t video_codec_enums[] = {
      { "h264",  MMAL_ENCODING_H264 },
      { "h263",  MMAL_ENCODING_H263 },
      { "mpeg4", MMAL_ENCODING_MP4V },
      { "mpeg2", MMAL_ENCODING_MP2V },
      { "vp8",   MMAL_ENCODING_VP8 },
      { "vp7",   MMAL_ENCODING_VP7 },
      { "vp6",   MMAL_ENCODING_VP6 },
   };
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by jamesh » Sun May 19, 2013 7:54 pm
Er, never tried it. Possibly...I can check which encoders are built in to the firmware tomorrow.

In the meantime, no harm in trying it....

Note that some of those formats wont be feasible at 1080p30 (the VP ones are not fully HW accelerated - they do use the GPU, but don't have the extra HW support that the H264 encoder has)
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11568
Joined: Sat Jul 30, 2011 7:41 pm
by jamesh » Sun May 19, 2013 7:57 pm
ps. You'll also have the kudos of being the first person ever to get it working on a Pi. If it works....
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11568
Joined: Sat Jul 30, 2011 7:41 pm
by Bleugh » Mon May 20, 2013 2:56 am
Guys,
it ain't gonna be easy to remove the IR filter on these things!,
the filter itself is held in place on the sensor by the black, square 'plastic' lens holding casing - see photo attached.
The filter is tucked nicely under the circle at the 4 corners
to remove it needs the rear body of the module to be dismantled, problem is, there's a line of epoxy on the flexible circuit board which won't be removable easily

removing the lens is fairly easy though - just scrape off the three small blobs of epoxy that lock the thread in place, and twist the lens, holding the body firm (it's not glued onto the PCB very firmly)

Also, the module specs seem very similar to the Sunny P5V01A, which there's a datasheet available,
just looks likely that it's a different mounting than the 01A and non autofocus
RASPBERRY PI CAMERA MODULE DISMANTLEDsmallest.jpg
dismantled camera module
RASPBERRY PI CAMERA MODULE DISMANTLEDsmallest.jpg (60.28 KiB) Viewed 4560 times


P5V01A
5.0M AF
8.5*8.5*5.4
1/4"
OV5647
Kantatsu
T5ES
Posts: 8
Joined: Fri Sep 14, 2012 2:34 am
by mikec79 » Mon May 20, 2013 4:38 am
jamesh wrote:Er, never tried it. Possibly...I can check which encoders are built in to the firmware tomorrow.

In the meantime, no harm in trying it....

Note that some of those formats wont be feasible at 1080p30 (the VP ones are not fully HW accelerated - they do use the GPU, but don't have the extra HW support that the H264 encoder has)


No luck so far :(
Code: Select all
pi@raspberrypi ~ $ userland/build/bin/raspimp4 -o video2.mp4
mmal: mmal_vc_port_enable: failed to enable port vc.ril.video_encode:in:0(OPQV): ENOSPC
mmal: mmal_port_enable: failed to enable connected port (vc.ril.video_encode:in:0(OPQV))0xcdcd90 (ENOSPC)
mmal: mmal_connection_enable: output port couldn't be enabled
mmal: main: Failed to connect camera video port to encoder input
mmal: Out of resources (other than memory)
mmal: Failed to run camera app. Please check for firmware updates
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by poing » Mon May 20, 2013 8:21 am
Bleugh wrote:Guys,
it ain't gonna be easy to remove the IR filter on these things!,
the filter itself is held in place on the sensor by the black, square 'plastic' lens holding casing - see photo attached.
The filter is tucked nicely under the circle at the 4 corners
to remove it needs the rear body of the module to be dismantled, problem is, there's a line of epoxy on the flexible circuit board which won't be removable easily

removing the lens is fairly easy though - just scrape off the three small blobs of epoxy that lock the thread in place, and twist the lens, holding the body firm (it's not glued onto the PCB very firmly)

Also, the module specs seem very similar to the Sunny P5V01A, which there's a datasheet available,
just looks likely that it's a different mounting than the 01A and non autofocus
RASPBERRY PI CAMERA MODULE DISMANTLEDsmallest.jpg


P5V01A
5.0M AF
8.5*8.5*5.4
1/4"
OV5647
Kantatsu
T5ES


Is the filter very stiff? If it's just a thin sheet it might be possible to use epoxy on the end of a stick and glue that to the filter. Then when bonded pull the filter out. Just a thought.
Posts: 1099
Joined: Thu Mar 08, 2012 3:32 pm
by dom » Mon May 20, 2013 12:03 pm
mikec79 wrote:I found the following in mmal_param_convert.c, and I'm guessing those are our encoding options:
Code: Select all
static string_pair_t video_codec_enums[] = {
      { "h264",  MMAL_ENCODING_H264 },
      { "h263",  MMAL_ENCODING_H263 },
      { "mpeg4", MMAL_ENCODING_MP4V },
      { "mpeg2", MMAL_ENCODING_MP2V },
      { "vp8",   MMAL_ENCODING_VP8 },
      { "vp7",   MMAL_ENCODING_VP7 },
      { "vp6",   MMAL_ENCODING_VP6 },
   };

Sorry, the chip doesn't have support to encode those formats. h264 and mpeg4 are supported, although I've not tested mpeg4.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3998
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by wallarug » Mon May 20, 2013 12:11 pm
dom wrote:
mikec79 wrote:I found the following in mmal_param_convert.c, and I'm guessing those are our encoding options:
Code: Select all
static string_pair_t video_codec_enums[] = {
      { "h264",  MMAL_ENCODING_H264 },
      { "h263",  MMAL_ENCODING_H263 },
      { "mpeg4", MMAL_ENCODING_MP4V },
      { "mpeg2", MMAL_ENCODING_MP2V },
      { "vp8",   MMAL_ENCODING_VP8 },
      { "vp7",   MMAL_ENCODING_VP7 },
      { "vp6",   MMAL_ENCODING_VP6 },
   };

Sorry, the chip doesn't have support to encode those formats. h264 and mpeg4 are supported, although I've not tested mpeg4.

:( Have to buy licence :(
Youtube Channel: http://www.youtube.com/user/CMDenterprises
Project page: http://code.google.com/p/cmd-robot/
~~ Now selling Apps on the Google Play, WP and Apple App Stores. ~~
Posts: 432
Joined: Mon May 14, 2012 8:21 am
by dom » Mon May 20, 2013 12:22 pm
wallarug wrote::( Have to buy licence :(

It's not a licence issue. There's just not the support in the hardware or the demand for the software to be written.

There is very little demand for us to produce, say, an MPEG2 encoder, when we have hardware support for h264 which is between 2 and 4 times as efficient in quality/size.
Hence, there doesn't exist an MPEG2 encoder.

There is more demand for decoders, due to legacy content/equipment, so more formats are supported for decode.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3998
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by mikec79 » Mon May 20, 2013 4:40 pm
dom wrote:Sorry, the chip doesn't have support to encode those formats. h264 and mpeg4 are supported, although I've not tested mpeg4.


No problem. I would be very happy with mpeg4.
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by dom » Mon May 20, 2013 5:05 pm
mikec79 wrote:No problem. I would be very happy with mpeg4.


Technically that is the one other encoder the hardware can support, but that does require licencing, and I doubt there will be sufficient demand to make the lengthly licencing procedure worthwhile.

When h264 is free (already licenced), how many people will pay money for a substantially less efficient codec?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3998
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by jbeale » Mon May 20, 2013 5:35 pm
Just to clarify... there is licensing required to emit a MPEG4 (.mp4) stream ("wrapper" around H.264) that is separate from the H.264 license?
User avatar
Posts: 1976
Joined: Tue Nov 22, 2011 11:51 pm
by dom » Mon May 20, 2013 5:38 pm
jbeale wrote:Just to clarify... there is licensing required to emit a MP4 stream ("wrapper" around H.264) that is separate from the H.264 license?

No. mp4 is a container, unrelated to the mpeg4 codec. No licence is required for that.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3998
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by mikec79 » Mon May 20, 2013 5:38 pm
dom wrote:Technically that is the one other encoder the hardware can support, but that does require licencing, and I doubt there will be sufficient demand to make the lengthly licencing procedure worthwhile.

When h264 is free (already licenced), how many people will pay money for a substantially less efficient codec?


Is there a way to get the h264 video in an mp4 container straight from the gpu?

I've seen post on converting the h264 video to mp4 using AVCONV and FFMPEG, but it would be much nicer if the original output was in a more usable format like mp4.
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by Cheetah » Mon May 20, 2013 5:43 pm
jbeale wrote:Just to clarify... there is licensing required to emit a MPEG4 (.mp4) stream ("wrapper" around H.264) that is separate from the H.264 license?

.mp4 != MPEG4 != H.264

Technically speaking, H.264 is a subset of the MPEG4 spec (Part 10, Advanced Video Coding). As a result, .mp4 and .m4v files often contain H.264 video, but ...

There is also a Part 2, Advanced Simple Profile, and I believe this is what is commonly referred to as MPEG4 video, and this may also be contained in .mp4 and .m4v files as I understand it.

I'm guessing from the examples that what's being emitted currently is a raw video stream? It shouldn't be too hard to wrap that in a standard container format.
User avatar
Posts: 33
Joined: Fri Jan 04, 2013 4:17 am
by mikec79 » Mon May 20, 2013 6:16 pm
would it be possible to set the container type using MMAL using a line like the following?

Code: Select all
encoder_output->format->container = XA_CONTAINERTYPE_MP4;


or

Code: Select all
encoder_output->format->container = MMAL_CONTAINERTYPE_MP4;
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by jamesh » Mon May 20, 2013 6:40 pm
mikec79 wrote:
dom wrote:Technically that is the one other encoder the hardware can support, but that does require licencing, and I doubt there will be sufficient demand to make the lengthly licencing procedure worthwhile.

When h264 is free (already licenced), how many people will pay money for a substantially less efficient codec?


Is there a way to get the h264 video in an mp4 container straight from the gpu?

I've seen post on converting the h264 video to mp4 using AVCONV and FFMPEG, but it would be much nicer if the original output was in a more usable format like mp4.


I've been looking in to inserting direct to a container, but there are issues with the GPU firmware - untested code that isn't included in the Raspberry Pi firmware build. SO its not a quick fix.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11568
Joined: Sat Jul 30, 2011 7:41 pm
by Cheetah » Mon May 20, 2013 6:55 pm
jamesh wrote:I've been looking in to inserting direct to a container, but there are issues with the GPU firmware - untested code that isn't included in the Raspberry Pi firmware build. SO its not a quick fix.

Wouldn't it be easier, and more maintainable, if the containerization was done in the userspace app? I wouldn't think there would be much CPU load associated with that.
User avatar
Posts: 33
Joined: Fri Jan 04, 2013 4:17 am
by jamesh » Mon May 20, 2013 7:01 pm
Cheetah wrote:
jamesh wrote:I've been looking in to inserting direct to a container, but there are issues with the GPU firmware - untested code that isn't included in the Raspberry Pi firmware build. SO its not a quick fix.

Wouldn't it be easier, and more maintainable, if the containerization was done in the userspace app? I wouldn't think there would be much CPU load associated with that.


Possibly. You (ie community) already have the code producing the stream, so anyone out there is welcome to add the containerisation code.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11568
Joined: Sat Jul 30, 2011 7:41 pm
by dom » Mon May 20, 2013 7:29 pm
Cheetah wrote:
jamesh wrote:I've been looking in to inserting direct to a container, but there are issues with the GPU firmware - untested code that isn't included in the Raspberry Pi firmware build. SO its not a quick fix.

Wouldn't it be easier, and more maintainable, if the containerization was done in the userspace app? I wouldn't think there would be much CPU load associated with that.


Yes it would. The very first release of Raspberry Pi included a read_media component with support for some containers. But some common formats were completely missing (e.g. ts) and others were incomplete.
It all ran on the GPU and was closed source, so if it didn't do what you wanted, then tough. It also required an ugly service running on the arm to handle file accesses.

It's not hard to link with libffmpeg (like omxplayer does) which supports every possible container and is constantly improved. I think that's the correct solution.

In fact no code is needed something like
Code: Select all
raspivid -o - | ffmpeg -r 30 -i pipe:0 -vcodec copy video_out.mkv


should work just fine.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3998
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by mikec79 » Mon May 20, 2013 7:41 pm
jamesh wrote:I've been looking in to inserting direct to a container, but there are issues with the GPU firmware - untested code that isn't included in the Raspberry Pi firmware build. SO its not a quick fix.



Thanks, I guess I'll stick with using the VLC browser plugin to display a live stream via a html page.
Posts: 18
Joined: Thu Oct 18, 2012 12:27 am
by fastmapper » Sat May 25, 2013 10:03 pm
Here is a focal length update.

Now that the full field of view is available for still photos, I have repeated my estimation of focal length. To do this I took photos of a measuring tape at 6 different distances from the camera. I estimate that the focal length of my Raspberry Pi camera is 3.60+/-0.01mm.

It would be great if the EXIF tags of raspistill images could be populated with a focal length of 3.6mm until a better value is available.
Posts: 26
Joined: Wed Mar 27, 2013 3:54 am