This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question on camera/capture interface

Other Parts Discussed in Thread: TVP5146, AM3517

Hi Guys!

 Can someone tell me how to start with capture device? I am mostly working on display, codecs and players. I have no idea how to start with camera. Following can be helpful.

1) What kind of camera works on OMAP3 board from Mistral?

2) Can I give input from TV feed also?

3) I have seen loopback demo along with SDK. That uses

#define CAPTURE_DEVICE        "/dev/video0"
#define CAPTURE_NAME        "Capture"

Although there is no node like /dev/video. I know I can always create one. But my query is- does capture demo work?

Please provide info which you feel can help in baby step :)

  • 1. I do not believe there are any camera modules for the OMAP35x EVM currently, in theory you could make one to interface to most any camera by creating a custom daughterboard and writing up a custom driver (probably based on existing code in the kernel)

    2. There is a daughter board that attaches to the underside of the OMAP35x EVM  which adds in the ability to capture video from a composite source, however I am not sure when exactly it will be available (I have not yet seen one in person). This is likely what the capture demo is using. 

    3. As far as I know the demo will work if you have the daughter board hardware, though since that is not out there yet the demo is not very useful yet. 

    Out of the box today the easiest way to do a video capture now would be to get a USB camera or USB TV card and try to port a driver for it to the OMAP, that way you would need no custom hardware and you could likely find relatively portable source out on the net. 

  • 1. The Mistral boards don't have support for camera or decoder interface. To have video capture functionality you need to have OMAP3 daughter card. But currently this daughter card is not available widely and is in experimental stage.

    2. The current driver supports NTSC/PAL inputs through composite or S-Video interface. But there are no plans (for the driver) to support raw sensor/camera even though the daughter card might have camera interface.

    Hope this clarifies.

     

  • Hi!

     

    I have usb quickcam webcam with me. I compiled drivers from ./driver/media/video/usbvideo/ as module. I compiled vicam.ko, quickmessenger.ko and usbvideo.ko. My webcam has PID_0x08DA while driver available with kernel had 0x08F0 defined. Logitech forum says this shoud work. Only thing missing was BIT_MASK and BIT_WORD defines which I got from another forum.

    insmod was successful. I can not test webcam because board curently available with me has broken usb. My question is, will it work once I recieve new board.

  • Unfortunately it is hard to say for sure if it will work, it certainly is possible, and what you have may work. I can point you to a thread from the Beagle Board forums where there was some discussion of using a USB camera there, it may be of some help though they seem to be using Angstrom as opposed to the generic kernel included with the EVM.

  • I again have a dummy question. Is it possible to run Angstrom on Mistral EVM. I know SOC is different and peripherals may also be different. But if I can use Angstorm, webcame is reported to be working lately with Angstorm on Omap.

  • I have seen Angstrom running on Mistral EVM; therefore, it is possible; it is not readily available, but it should not be too hard to port.

  • Sivaraj R said:

    1. The Mistral boards don't have support for camera or decoder interface. To have video capture functionality you need to have OMAP3 daughter card. But currently this daughter card is not available widely and is in experimental stage.

    2. The current driver supports NTSC/PAL inputs through composite or S-Video interface. But there are no plans (for the driver) to support raw sensor/camera even though the daughter card might have camera interface.

    Hope this clarifies.

     

     

    I had a look at block diagram. Unfortunetly S-video and Composite are connected through V-DAC. There is no two way connection on it if document is right. So NTSC/PAL capture will not work through S-Video or composite. I feel USB is better bet.

     

  • As you have mentioned, S-Video and Composite inputs are connected to OMAP ISP through TVP5146 decoder. But only one input can be selected/active at a given instance. The application can select between these inputs using standard V4L2 IOCTLs. But both the inputs support NTSC and PAL standards. So what did you mean by

    DRIVERHACKER said:

    There is no two way connection on it if document is right. So NTSC/PAL capture will not work through S-Video or composite.

  • From omap3503evm_getting_started_080716.pdf page number 12. I could see that there is VDAC output connected to SVIDEO and CVBS. This shows one way arrow only. In my opinion, there should have been V-ADC also if this port is capable of capturing video from S-video port. In case of Audio its very clear that we have audio input and audio output. But incase of video its not clear from diagram.

  • Hi Sivaraj, I had a look at addendum document and I feel u vr talking about daughter card features. If yes, then can someone tell me whether this is available for people outside TI?

  • DRIVERHACKER said:

    From omap3503evm_getting_started_080716.pdf page number 12. I could see that there is VDAC output connected to SVIDEO and CVBS. This shows one way arrow only. In my opinion, there should have been V-ADC also if this port is capable of capturing video from S-video port. In case of Audio its very clear that we have audio input and audio output. But incase of video its not clear from diagram.

    The block diagram you are referring to is just the EVM itself, it is not capible of video capture, this requires a daughter card that is not publicly available yet, but is expected to be within the next few months.

    EDIT: It looks like you realized this already :), the daughtercard is not currently available outside of TI (I have not seen one yet myself) but it should be eventually.

  • Hello all,

    I find this subject intresting as we are trying to use the parralell camera interface (using ISP). We got the daughter card that you mentioned here and got the latest PSP fromTI that have a support for this card. So got the interface for TVP5146 up for V4L2 as a /de/video0 but I cannot read any video fram.

    The steps that I have done are pretty standard, open the /dev/video0 and check capability and set video input for composite one and allocate buffer using mmap and try to get the frame buffers, but unfortunately no video buffer is available and always I got timeout. The TVP5146 is working during running this sample program and I see all HS, VS signals, so kind of think that something wrong on setting CDC module in ISP driver to get the frame data.

    I appreciate any help.

  • Hi All,

    Check this Link --> http://www.mistralsolutions.com/assets/webstore/webstore.php . It talks about the Mistral Multimedia Daughter card which has a Camera Interface.

  • I started working with the daughter card today.  Still haven't seen schematics for it, but can see it uses the TVP5146 decoder.  I ran "make menuconfig" to pull in the TVP5146 decoder driver, but when I ran 'make', it wouldn't compile.  Are there patches needed to run with this?

  • edsut said:
    Still haven't seen schematics for it, but can see it uses the TVP5146 decoder. 

    For hardware information on the board including schematics please see http://tiexpressdsp.com/index.php?title=Multimedia_Daughterboard_for_OMAP3EVM

    The same page also includes information on what PSP version you should be using (1.0.2) and the actual patches to apply to enable capture support for TVP5146.

  • Bernie,

    I didn't know about this page.  There's no refrence to it at the Mistral page where I purchased the card.  I do see that there is at least a slight difference between the board I have and the picture of the board on the page.  I'm guessing this is because I have revB of the board, but hopefully the patches still apply (I'm already running with PSP1.0.2).

    Thanks!

    Ed

  • Just to be complete, I'll reply to my previous post... There are patches and kernel build changes that need to be done to run with this card.  The patches can be downloaded from here:

    http://tiexpressdsp.com/index.php?title=Multimedia_Daughterboard_for_OMAP3EVM

    and the settings needed in "make menuconfig" are found in the document titled "Addendum_Daughtercard_1_0_2.pdf" under the 'docs' directory of the PSP.  I've built and installed all that successfully, but now when I try to run the "capture" application (binary only, came from above website) it crashes with the following output:

    [root@OMAP3EVM /tmp]# ./capture

    Selected Application Parameters:
    --------------------------------
    Capture channel    : Composite
    Capture memory mode: MMAP
    Pixel format       : V4L2_PIX_FMT_UYVY
    Number of Buffers  : 1
    Loop count         : 1
    Output File        : frame_uyvy422_inter_packed_720_480.yuv

    Capture: Opened Channel
    VIDIOC_S_INPUT: Invalid argument
    [root@OMAP3EVM /tmp]#

    Anyone ever see this? 

    Actually, does anyone have any basic V4L2 application running with the composite video input of the MDC?

    Better yet, anyone working with a sensor directly?

     

  • Hi,

    Can you try with both the composite and S-Video input connected? Also can you please provide a dump of command - ls -latr /dev/video* .

    Thanks,

    Prathap.

  • At the moment I don't have any S-Video equipment; but may I ask why you would want both connected?

    Here's the dump...

    [root@OMAP3EVM /]# ls -latr /dev/video*
    crw-rw----    1 root     root      81,   2 Jan  1 00:00 /dev/video2
    crw-rw----    1 root     root      81,   1 Jan  1 00:00 /dev/video1
    crw-rw----    1 root     root      81,   0 Jan  1 00:00 /dev/video0
    [root@OMAP3EVM /]#

    Thanks!

  • Hi

    Actually the issue is with the sample application, application tries to switch the input. For example say the current active input is Composite, then application tries to switch over to the S-Video and there it is failing (Since you don't have S-Video input connected).

    You just need to edit the application, comment the S_INPUT ioctl altogether it should work with active detected input (Composite).

    Please let me know if you face any isssues further.

     

    Thanks,

    Vaibhav

  • Thanks for the reply!  Unfortunately, I don't know where the code is for this app.  At the MDC website it is included just in binary form.  Do you know where I can get the source for this?

    Ed

  • Do you have access to the TI-PSP release packages?

     

    Vaibhav

  • Yes I do, and I'm guessing that it must be somewhere in that tarball...  :-)

  • Great,

    Then you can locate the sample application under -

    $(Release Package)/examples/examples.tar.gz

    Untar this package and you will find the application "video/Sample_Applications/saMmapLoopback.c". This file should work straight away, since this file uses the detected input.

    Please note that this is loopback application which will capture the image and displays it onto the screen (/dev/video1)

    Please let me know if you face any issues further.

    Thanks,

    Vaibhav

  • Vaibhav,

    Unfortunately, that's where I started, prior to just trying the 'capture' application on that page.  It gave me the following error...

    [root@OMAP3EVM /opt]# ./saMmapLoopback

    Capture: Opened Channel
    VIDIOC_G_INPUT: Invalid argument
    Error in opening capture device for channel 0
    [root@OMAP3EVM /opt]#

    That's why I figured I would take a step back and just run the prebuilt capture application.

    Thanks for your help...

  • Vaibhav,

    Ok, I got it...

    I didn't have my camera set up properly...

    The "Invalid argument" message returned by perror misled me into thinking that I didn't have V4L2 set up properly.  But it turns out that the error was occurring because my camera wasn't feeding signal to the board...

    My next step will be to attempt to connect a micron headboard to the MDC.

  • Has anyone hooked up a sensor through the MDC on this?  I'm planning to plug in a Micron headboard (MT9D131L Demo Head) so I'd *love* to hear that someone else has played with this already...

  • Edsut,

    I'm facing the same problem as you and I would like to know what did you do to set up the camera properly to feed the board through the composite.

    Thanks in advance!

  • Right now I'm just using a camera with a composite output, fed directly into the MMC expansion card.

    My plan at the moment is to transition over to a parallel camera interface (using a micron headboard).

    Haven't started that yet though.

  • Thanks for your answer. I'am also plug-in the composite output of my camera directly into the MMC expansion card, but while running the example application saMmapLoopback I get the same error as you had:

    Capture: Opened Channel
    VIDIOC_G_INPUT: Invalid argument
    Error in opening capture device for channel 0

    How did you fix the problem? is there any camera setup necessary?

  • Hi sharad,

    As you have said you are using camera parallel interface . Which daughter  card you are using does it convert  ur parallel port o/p from camera to any svideo or composite signal.

     

    I am little bit confused about your interface.

    Can you explain abit more.

    I will appreciate if you can help me out.

     

    Chaps

     

  • Hey!  Sorry I didn't get back to you sooner, I was out all last week.  I mis-understood your original question; however, my answer probably isn't gonna help you much.  It turned out that my problem was in the camera itself (not the MDC or OMAPEVM).  Once I had a valid composite stream into the MDC card, things "just worked" for me.

  • The daughter card is from Mistral Solutions (http://www.mistralsolutions.com/products/mdc.php).

    Just realized that in a few places above, I refer to it as "MMC", should be "MDC".

  • Hi,

    Sorry for delayed response, actually I was on vacation.

    Just for my better understanding of the issue can you please explain me the setup and corrosponding interface starting from Sensor to OMAP3-ISP in detail. If possible please provide details on changes made to driver (if any) to support this sensor.

    Thanks,

    Vaibhav

  • hello,

    i'm user of EVMDM6467T evaluation board and i would like please:

    1- capture the video flux from the camera (IP or analogic)

    2- display the video in VLC or other.

    the demo work well with decode but not the encode or encode-decode.

    do you have an option for me to resolves this problems please.

    thanks.

    thierno

    NB: i installed the gstreamer but he not compile well with the DVSDK3.10 and arago arm2009q1 in the DM6467T.

     

  • Hi All,

    Is there anyone who has used the usb camera to capture image on the AM3517 board? I tried to use the usb camera to capture image ,but have some problem about tvp514x .The userguide.pdf said that the board only support s-video and composite . So , I want to know whether somebody successed in using usb camera to capture image. Thanks very much!

  • Hi Duke,

     

    I am bit confused with the information provided above, on one side you are referring to USB Camera and other side you are pointing to some TVP514x decoder driver issue. Can you please describe your issue with further details, being a Video guy I would be more interested in TVP514x related issues.

     

    Thanks,

    Vaibhav

  • Hi,

             Thank you very much for your response . Now, my issues have been done.  Few days ago, I am bit confused with the image capture , I still use the USB camera. But now ,I have another  problem.  I want to compress and code the image captured . I want to use the library libavcodec.h provided by ffmpeg. But I have no idea how to transplant the ffmpeg to the board AM3517 .Do you know some solution to solve the problem? Thank you again!

  • Duke,

    One of the options is to cross compile GStreamer with gst-ffmpeg plugin to use the libavcodec libraries.

    Regards, Punya