Page 1 of 1

Composite video input using camera interface

Posted: Sun Jul 10, 2016 5:13 pm
by mwlinder
After much trial and error, we have implemented an adapter that will capture composite video using the standard Raspberry Pi camera interface and software - no drivers or other changes are required. The adapter emulates the OV5647 camera and operates transparently to the RPi, so that Raspivid, Raspistill, etc. all work. The video is captured as 640x480 SD using camera "Mode 6".

There are a lot of posts from people that have been using other video capture solutions (USB adapters, webcams, etc.) - does anyone see a need for a capture adapter like this that uses the GPU features for compression and is compatible with current software? If there is enough interest we will be releasing it as a product.

Re: Composite video input using camera interface

Posted: Sun Jul 10, 2016 5:39 pm
by RpiName
can you provide a demo?

Re: Composite video input using camera interface

Posted: Sun Jul 10, 2016 6:05 pm
by dom
I must say that sounds impressive.
We did develop a HDMI->CSI adaptor, but the problem with HDMI is that most interesting sources (e.g. BluRay player, STB, even some games consoles) use HDCP which this couldn't handle.

Your composite interface doesn't have that issue, although obviously the quality is lower.

The obvious use case is a video transmitter - Pi connects to STB, DVD player, PVR etc and sends it through wifi where other Pi's can act as receivers in other rooms of the house.
Seems reasonably useful, but the quality of a composite source may put some off. Are you including analogue audio in support? That should seem to fit in well with this.

Re: Composite video input using camera interface

Posted: Sun Jul 10, 2016 7:21 pm
by 6by9
Sounds pretty curious.
OV5647 is a Bayer sensor, so you must be converting the YUV from your composite video input back into a Bayer format - that is an inherent quality loss. There'll also be lens shading compensation and other processing that is unnecessary on the composite video.
Secondly composite video is interlaced whilst the OV5647 is progressive, so I guess you must be doing the deinterlace too.

Personally I more want to play with an ADV7282-M chip which gives 6 analogue inputs configurable as composite, S-video, or component, to a CSI2 output, built in deinterlacer, and has Linux kernel support as part of the adv7180 driver. I just need to get that CSI2 rx peripheral driver sorted and it should all follow - I'll get there, but help always welcome.

Re: Composite video input using camera interface

Posted: Tue Jul 12, 2016 8:45 pm
by mwlinder
I'll post a demo soon - the recordings I have now were made with copyrighted material using a DVD player and so we need to make some others.

Right now we're not thinking of including audio, since there a lots of solutions out there for that and it is a challenging getting everything on a HAT size board with multiple video connectors.

Re: Composite video input using camera interface

Posted: Tue Jul 12, 2016 9:43 pm
by jbeale
6by9 wrote:OV5647 is a Bayer sensor, so you must be converting the YUV from your composite video input back into a Bayer format - that is an inherent quality loss [...] Personally I more want to play with an ADV7282-M chip [...] - I'll get there, but help always welcome.
Going from 5Mpixel down to 640x480 might also be a bit of a quality loss :-) Wish I was able to help with the v4l2 but wouldn't know where to start.

Re: Composite video input using camera interface

Posted: Thu Jul 14, 2016 2:20 am
by mwlinder
Here are a few example captures using our solution:

https://lintestsystems.com/sd1-examples

6by9, you are exactly right about how we are doing this. Of course, this is only standard definition video and so the quality of the result is limited by the source. There doesn't seem to be much degradation caused by the capture process. An ADV7180 is used on the front end.

When capturing using Raspivid, it is important to turn off the exposure compensation and automatic white balance (-ex off, -awb off, -awbg 1.0,1.0). Whatever other processing is performed under control of the driver in the GPU and doesn't seem to adversely affect the image.

We have also demonstrated HD resolution capture from both analog component and HDMI using the same process, and are considering that product as well. Using HD analog component solves the issue with HDCP without any noticeable loss of quality.

Edit: updated to working links

Re: Composite video input using camera interface

Posted: Sat Jul 30, 2016 10:15 pm
by mwlinder
We have decided to go ahead with production of this product - you can find details on our website at: http://lintestsystems.com

My post above has been updated with some better examples of actual captures, also on the website.

Re: Composite video input using camera interface

Posted: Thu Oct 20, 2016 3:14 pm
by tycokiaz
dom wrote:I must say that sounds impressive.
We did develop a HDMI->CSI adaptor, but the problem with HDMI is that most interesting sources (e.g. BluRay player, STB, even some games consoles) use HDCP which this couldn't handle.

Your composite interface doesn't have that issue, although obviously the quality is lower.

The obvious use case is a video transmitter - Pi connects to STB, DVD player, PVR etc and sends it through wifi where other Pi's can act as receivers in other rooms of the house.
Seems reasonably useful, but the quality of a composite source may put some off. Are you including analogue audio in support? That should seem to fit in well with this.
Is it possible to get this adapter? I'm currently building a quadcopter and will be using my rapsberry pi as proxy server for the 3DR Tower App for mission control. The next step should be video downlink from my gopro. the only thing needed now is the hdmi to csi adapter.

Re: Composite video input using camera interface

Posted: Thu Oct 20, 2016 9:52 pm
by Son1c
tycokiaz wrote: Is it possible to get this adapter?
You can buy it on their site https://lintestsystems.com/products/picapture-sd1 But the price is 139$ :(

Re: Composite video input using camera interface

Posted: Tue Nov 01, 2016 4:47 pm
by tycokiaz
Son1c wrote:
tycokiaz wrote: Is it possible to get this adapter?
You can buy it on their site https://lintestsystems.com/products/picapture-sd1 But the price is 139$ :(
I ment the csi-2 > hdmi adapter from Raspberry Pi mentioned by dom

Re: Composite video input using camera interface

Posted: Tue Nov 01, 2016 4:58 pm
by dom
tycokiaz wrote:I ment the csi-2 > hdmi adapter from Raspberry Pi mentioned by dom
No. I think the widespread use of HDCP limits the use of adapter too much to be a viable product.

Re: Composite video input using camera interface

Posted: Tue Nov 01, 2016 5:50 pm
by 6by9
Whilst Pi Towers haven't made the HDMI to CSI2 chip into a product, others have - http://www.auvidea.eu/index.php/theme-s ... 32-06/b101
Whilst the firmware does work with it, the code was written for a demo only and has limitations. viewtopic.php?f=38&t=120702 is the ongoing thread about getting proper kernel support working with it on Pi - it's almost back to the top of my list.
NB That is currently only doing video, not audio.

HDCP is a pain, but it seems to be used less than I'd expected. Most of the output from my Sky box that I tried doesn't use it. It's probably the same as with Macrovision on the analogue output - Box Office, and the premium channels might. Bluray will be protected. Not sure on DVD.

Re: Composite video input using camera interface

Posted: Thu Oct 12, 2017 3:08 pm
by rich1051414
Did anything come of this? I would love if a CSI to composite solution existed, as it would help deal with the headache of finding a working USB solution. All of the products that claim specific chipsets lie and it is a complete money hole trying to get the proper chipset that will work.

Re: Composite video input using camera interface

Posted: Thu Oct 12, 2017 5:43 pm
by RpiName
rich1051414 wrote:
Thu Oct 12, 2017 3:08 pm
Did anything come of this?
for hdmi->csi:
https://www.linux-projects.org/2017/07/ ... -tc358743/