Quantcast

Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

pinkey
Hi, im trying to get the caspa camera working with yocto 1.4.2 (dylan) on 3.5.7 linux kernel but im failed so far.

I cant use gstreamer with the v4l2src ... i get always following error depending on which /dev/videoX device i try it:

root@overo:~# gst-launch -v v4l2src device=/dev/video0 ! fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' is not a capture device.
Additional debug info:
/home/chris/overo/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gst-plugins-good/0.10.31-r8/gst-plugins-good-0.10.31/sys/v4l2/v4l2_calls.c(515): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x4000002
Setting pipeline to NULL ...
Freeing pipeline ...

OR

root@overo:~# gst-launch -v v4l2src device=/dev/video2 ! fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to enumerate possible video formats device '/dev/video2' can work with
Additional debug info:
/home/chris/overo/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gst-plugins-good/0.10.31-r8/gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c(1122): gst_v4l2_object_fill_format_list (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Failed to get number 0 in pixelformat enumeration for /dev/video2. (25 - Inappropriate ioctl for device)
Setting pipeline to NULL ...
Freeing pipeline ...

what i have done and tried:
Instructions from here: [1] and here [2] but used the dylan branch and the 3.5.7 kernel instead.

i think the dsp modules are up and running:

root@overo:~# lsmod
Module                  Size  Used by
mt9v032                 7169  1
libertas_sdio          16484  0
libertas               99993  1 libertas_sdio
firmware_class          6920  2 libertas_sdio,libertas<nabble_a href="media-ctl-output.txt">media-ctl-output.txt</nabble_a>
cfg80211              172644  1 libertas
rfkill                 17524  1 cfg80211
lib80211                5138  1 libertas
omap3_isp             132270  0
v4l2_common             8681  2 omap3_isp,mt9v032
videodev               98880  3 omap3_isp,mt9v032,v4l2_common
ads7846                10528  0
media                  12853  3 omap3_isp,mt9v032,videodev
sdmak                   4128  0
lpm_omap3530            6833  0
ipv6                  252525  10
dsplinkk              132431  1 lpm_omap3530
cmemk                  22109  0

in my opinion media-ctl (media-ctl -p output [3] ) and yavta is working as intented
if i configure the media planes as posted at [4] (tried others that i find on the net aswell) i can take picture and convert the .bin to a viewable format.

i also tried to patch the omap3isp (videoisp.c) with the patch provided here [5] and the gstv4l2object.c [6] but it is still not working. Same error as above.

How can i get rid of the failed to enumerate error ... ?
Someone could give me advice what else i could try to get this whole stuff working except switching to an old kernel?

Thanks,

chris

[1] http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=81:gumstix-dsp-gstreamer&catid=35:gumstix&Itemid=67
[2] http://www.sleepyrobot.com/?p=210
[3] media-ctl-output.txt
[4] http://sourceforge.net/mailarchive/message.php?msg_id=31323307
[5] http://gumstix.8.x6.nabble.com/Overo-COM-Caspa-Camera-for-image-processing-td4965139.html
[6] http://gumstix.8.x6.nabble.com/Re-e-con-camera-modules-td2521910.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

Ash Charles
Hi,

I get a video on the screen using the 3.5.7 kernel and latest Yocto
with these commands:
$ media-ctl -r -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3
ISP resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer
output":0[1]'
$ media-ctl -V '"mt9v032 3-005c":0[SGRBG10 752x480], "OMAP3 ISP
CCDC":2[SGRBG10 752x480], "OMAP3 ISP preview":1[UYVY 752x480], "OMAP3
ISP resizer":1[UYVY 752x480]'
$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv
driver=v4l2:device=/dev/video6

--Ash

On Wed, Sep 11, 2013 at 12:57 PM, pinkey <[hidden email]> wrote:

> Hi, im trying to get the caspa camera working with yocto 1.4.2 (dylan) on
> 3.5.7 linux kernel but im failed so far.
>
> I cant use gstreamer with the v4l2src ... i get always following error
> depending on which /dev/videoX device i try it:
>
>
>
> OR
>
>
>
> what i have done and tried:
> Instructions from here: [1] and here [2] but used the dylan branch and the
> 3.5.7 kernel instead.
>
> i think the dsp modules are up and running:
>
>
>
> in my opinion media-ctl (media-ctl -p output [3] ) and yavta is working as
> intented
> if i configure the media planes as posted at [4] (tried others that i find
> on the net aswell) i can take picture and convert the .bin to a viewable
> format.
>
> i also tried to patch the omap3isp (videoisp.c) with the patch provided here
> [5] and the gstv4l2object.c [6] but it is still not working. Same error as
> above.
>
> How can i get rid of the failed to enumerate error ... ?
> Someone could give me advice what else i could try to get this whole stuff
> working except switching to an old kernel?
>
> Thanks,
>
> chris
>
> [1]
> http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=81:gumstix-dsp-gstreamer&catid=35:gumstix&Itemid=67
> [2] http://www.sleepyrobot.com/?p=210
> [3]  media-ctl-output.txt
> <http://gumstix.8.x6.nabble.com/file/n4967921/media-ctl-output.txt>
> [4] http://sourceforge.net/mailarchive/message.php?msg_id=31323307
> [5]
> http://gumstix.8.x6.nabble.com/Overo-COM-Caspa-Camera-for-image-processing-td4965139.html
> [6] http://gumstix.8.x6.nabble.com/Re-e-con-camera-modules-td2521910.html
>
>
>
> --
> View this message in context: http://gumstix.8.x6.nabble.com/Using-caspa-with-3-5-kernel-and-gstreamer-DSP-v4l2src-problem-tp4967921.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. Consolidate legacy IT systems to a single system of record for IT
> 2. Standardize and globalize service processes across IT
> 3. Implement zero-touch automation to replace manual, redundant tasks
> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

pinkey
This post was updated on .
thanks!!! preload the v4l2convert.so did the trick.

I can watch with mplayer and also stream the caspa video with dsp acceleration and h264.
For that i had to set the resizer to 640x480 otherwise depending on the gstreamer caps (752 or 640) i get

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
or
ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to create video encoder: h264enc

I used the following gstreamer pipes:

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so gst-launch -v v4l2src device=/dev/video6 !  \
'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' !  \
TIVidenc1 codecName=h264enc engineName=codecServer ! \
dmaiperf print-arm-load=true engine-name=codecServer !  \
mpegtsmux ! udpsink host=<IP> port=<PORT> 

With the pipe above i can open the stream with VLC on my PC with udp://@<ip>:<port>

Output @console is following:

Timestamp: 0:16:05.480133563; bps: 119724; fps: 17; CPU: 49; DSP: 48; mem_seg: DDR2; base: 0x87efcfa0;
 size: 0x20000; maxblocklen: 0x15798; used: 0xa868; mem_seg: DDRALGHEAP; base: 0x87400000; size: 0x900000; 
maxblocklen: 0x765940; used: 0x19a330; mem_seg: L1DSRAM; base: 0x10f04000; size: 0x10000; maxblocklen: 0x0; used: 0x10000;

As you can see the CPU Load is 49% and DSP Load 48% and only 17FPS ... :( which seems rather low for me.
Also why didnt it deliver more frames when enough CPU and DSP cycles and RAM (about 40MB) left?

When i run the above gstreamer command i get an ERROR and a warning, should i care about it when streaming is working?
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not get parameters on device '/dev/video6'
Additional debug info:
/home/chris/overo/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gst-plugins-good/0.10.31-r8/gst-plugins-good-0.10.31/sys/v4l2/v4l2src_calls.c(235):
 gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument

I have read that the ffmpegcolorspace is sometimes needed because TIVidenc1 supports only UYVY.
But i didnt used ffmpegcolorspace ...

Edit: played a little bit with the gstreamer parameter. Now i have achieved 25FPS with 15-20% CPU load and 80% DSP load. I think with some more gstreamer tuning 30 FPS or more with less or the same CPU load should be possible aswell.

Gstreamer pipe:
gst-launch -e -v v4l2srcevice=/dev/video6 always_copy=FALSE num-buffers=2000 ! \
 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! TIPrepEncBuf contiguousInputFrame=TRUE ! queue ! \
 TIVidenc1 codecName=h264enc engineName=codecServer encodingPreset=3 framerate=30 contiguousInputFrame=TRUE ! \
 dmaiperf print-arm-load=true engine-name=codecServer ! mpegtsmux ! udpsink host=192.168.2.107 port=5000
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

Eric97
Hello pinkey,

My overo fire is built with the 3.5.7 version. I followed your methods, pre-load the v4l2convert and then use gst-launch to start the video streaming. But still got the "Could not negotiate format" methods. Use the yavta to capture and can get the bin file as in this thread http://gumstix.8.x6.nabble.com/Caspa-on-Overo-FE-3-5-kernel-td4966351.html . Appreciate your suggestions. Thank you.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

pinkey
Hi Eric,

you also set the resizer to 640x480? with 752x480 it doenst work for me neither.

My yavta Settings are:

media-ctl -r -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]'
media-ctl -V '"mt9v032 3-005c":0[SGRBG10 752x480], "OMAP3 ISP CCDC":2[SGRBG10 752x480], "OMAP3 ISP preview":1[UYVY 752x480], "OMAP3 ISP resizer":1[UYVY 640x480]'

I still have some error messages when i try to start the stream, but at least it does work.

But i think i will switch from caspa cam to something else.
Trying to get the caspa working with all features cost to much time, maybe a USB wecam is the better choice.
I wouldnt recommend and use the caspa again if i know what i know now.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

Eric97
Hi pinkey,

Tried your settings. But with the same error... 
I just have the caspa camera by my side. Actually, I am also looking into the econ cameras http://www.e-consystems.com/5MP-Gumstix-Camera.asp. But would like to get a working prototype of video streaming with the caspa and see the quality.. I also noticed some complains about the caspa without any update with the new kernel on the website though.. But it is great if the caspa can work for me at the moment.



On Fri, Jan 3, 2014 at 4:55 AM, pinkey [via Gumstix] <[hidden email]> wrote:
Hi Eric,

you also set the resizer to 640x480? with 752x480 it doenst work for me neither.

My yavta Settings are:

media-ctl -r -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]'
media-ctl -V '"mt9v032 3-005c":0[SGRBG10 752x480], "OMAP3 ISP CCDC":2[SGRBG10 752x480], "OMAP3 ISP preview":1[UYVY 752x480], "OMAP3 ISP resizer":1[UYVY 640x480]'

I still have some error messages when i try to start the stream, but at least it does work.

But i think i will switch from caspa cam to something else.
Trying to get the caspa working with all features cost to much time, maybe a USB wecam is the better choice.
I wouldnt recommend and use the caspa again if i know what i know now.



If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Using-caspa-with-3-5-kernel-and-gstreamer-DSP-v4l2src-problem-tp4967921p4968490.html
To unsubscribe from Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using caspa with 3.5 kernel and gstreamer/DSP/v4l2src problem

zafrullahsyed
Hello Pinkey and Eric,

Did you follow the following steps mentioned here? --> http://gumstix.8.x6.nabble.com/Overo-COM-Caspa-Camera-for-image-processing-tp4965139p4965265.html

Fetch the DSP binary blob (baseimage.dof mainly) from the TI website,  as well  as the MPEG4 compression cocdecs  c64xplus_mpeg4enc_02_02_04_production.bin on the website if I remember). But the .dof and all the .dll64P files into /lib/dsp in your Overo rootfs.

If possible can you please give the links to download baseimage.dof and c64xplus_mpeg4enc_02_02_04_production.bin</> ?

In my defconfig CONFIG_OMAP_MBOX_FWK is not set and there's no CONFIG_TIDSPBRIDGE entry--> How did you changed these?

I guess gst-dsp(https://github.com/felipec/gst-dsp) compilation is not required, if  jumpnowtek and sleepyrobot tutorial is followed?

Do I need to apply ispvideo patch to "linux-gumstix_3.5.7.bb" file? or if you give me some info on this it would be great.

Thanks for your time and consideration,

Regards,
Zafrullah
Loading...