Hi All,
I am interested to interface USB CAM with my IMX processor. Is it possible to interface Dome or Bullet Camera with USB interface with IMX 6Q processor and Linux OS.
Thanks
Hi vishvapathi,
I hope YuriMuhin_ng´s reply is enough. Please let us know :smileywink:
Hi,
I have a Logitech C270 web CAM which is UVC compatible. when i connect it to my Mars board i get the following
"usb 2-1.2: new high speed USB device number 3 using fsl-ehci
3:3:2: cannot set freq 24000 to ep 0x86"
and i didnt find video0 in my /dev.. there is only video16-19.
Hi Vishvapathi Karnan,
Inserting 'videodev.ko' and 'uvcvideodev.ko' modules may solve your problem. This will create an entry for video0 in /dev/. Can you please post the output of 'lsmod' on Mars board.
Thanks & Regards,
RBT
gst-launch v4l2src ! mfw_v4lsink | |
Division by zero in kernel. | |
[<800460b0>] (unwind_backtrace+0x0/0xfc) from [<80221b14>] (Ldiv0+0x8/0x10) |
[<80221b14>] (Ldiv0+0x8/0x10) from [<80254138>] (mxcfb_check_var+0x128/0x314)
[<80254138>] (mxcfb_check_var+0x128/0x314) from [<8023c2a8>] (fb_set_var+0x44/0)
[<8023c2a8>] (fb_set_var+0x44/0x2a4) from [<8035179c>] (release_disp_output+0xf)
[<8035179c>] (release_disp_output+0xfc/0x164) from [<80352f5c>] (mxc_vout_relea)
[<80352f5c>] (mxc_vout_release+0x64/0x70) from [<80344f70>] (v4l2_release+0x54/)
[<80344f70>] (v4l2_release+0x54/0x78) from [<800ed858>] (fput+0xb0/0x1e8) | |
[<800ed858>] (fput+0xb0/0x1e8) from [<800ea09c>] (filp_close+0x64/0x84) | |
[<800ea09c>] (filp_close+0x64/0x84) from [<800ea160>] (sys_close+0xa4/0xe0) |
[<800ea160>] (sys_close+0xa4/0xe0) from [<80040580>] (ret_fast_syscall+0x0/0x30)
Division by zero in kernel. | |
[<800460b0>] (unwind_backtrace+0x0/0xfc) from [<80221b14>] (Ldiv0+0x8/0x10) | |
[<80221b14>] (Ldiv0+0x8/0x10) from [<8024dbfc>] (ldb_disp_setup+0xd0/0x160) |
[<8024dbfc>] (ldb_disp_setup+0xd0/0x160) from [<80252940>] (mxcfb_set_par+0x34/)
[<80252940>] (mxcfb_set_par+0x34/0x4dc) from [<8023c3cc>] (fb_set_var+0x168/0x2)
[<8023c3cc>] (fb_set_var+0x168/0x2a4) from [<8035179c>] (release_disp_output+0x)
[<8035179c>] (release_disp_output+0xfc/0x164) from [<80352f5c>] (mxc_vout_relea)
[<80352f5c>] (mxc_vout_release+0x64/0x70) from [<80344f70>] (v4l2_release+0x54/)
[<80344f70>] (v4l2_release+0x54/0x78) from [<800ed858>] (fput+0xb0/0x1e8) | |
[<800ed858>] (fput+0xb0/0x1e8) from [<800ea09c>] (filp_close+0x64/0x84) | |
[<800ea09c>] (filp_close+0x64/0x84) from [<800ea160>] (sys_close+0xa4/0xe0) |
[<800ea160>] (sys_close+0xa4/0xe0) from [<80040580>] (ret_fast_syscall+0x0/0x30)
------------[ cut here ]------------ | |
WARNING: at mm/page_alloc.c:2106 __alloc_pages_nodemask+0x510/0x6f0() | |
Modules linked in: |
[<800460b0>] (unwind_backtrace+0x0/0xfc) from [<8006b3b0>] (warn_slowpath_commo)
[<8006b3b0>] (warn_slowpath_common+0x4c/0x64) from [<8006b3e4>] (warn_slowpath_)
[<8006b3e4>] (warn_slowpath_null+0x1c/0x24) from [<800bb20c>] (__alloc_pages_no)
[<800bb20c>] (__alloc_pages_nodemask+0x510/0x6f0) from [<80049380>] (__dma_allo)
[<80049380>] (__dma_alloc+0xa0/0x2fc) from [<8004962c>] (dma_alloc_writecombine)
[<8004962c>] (dma_alloc_writecombine+0x24/0x2c) from [<80252d08>] (mxcfb_set_pa)
[<80252d08>] (mxcfb_set_par+0x3fc/0x4dc) from [<8023c3cc>] (fb_set_var+0x168/0x)
[<8023c3cc>] (fb_set_var+0x168/0x2a4) from [<8035179c>] (release_disp_output+0x)
[<8035179c>] (release_disp_output+0xfc/0x164) from [<80352f5c>] (mxc_vout_relea)
[<80352f5c>] (mxc_vout_release+0x64/0x70) from [<80344f70>] (v4l2_release+0x54/)
[<80344f70>] (v4l2_release+0x54/0x78) from [<800ed858>] (fput+0xb0/0x1e8) | |
[<800ed858>] (fput+0xb0/0x1e8) from [<800ea09c>] (filp_close+0x64/0x84) | |
[<800ea09c>] (filp_close+0x64/0x84) from [<800ea160>] (sys_close+0xa4/0xe0) |
[<800ea160>] (sys_close+0xa4/0xe0) from [<80040580>] (ret_fast_syscall+0x0/0x30)
---[ end trace 1b75b31a2719ed1f ]--- | |
mxc_sdc_fb mxc_sdc_fb.0: Unable to allocate framebuffer memory | |
detected fb_set_par error, error code: -12 | |
mxc_v4l2_output mxc_v4l2_output.0: ERR: fb_set_var. | |
MFW_GST_V4LSINK_PLUGIN 3.0.7 build on Oct 15 2013 15:08:57. | |
Setting pipeline to PAUSED ... | |
ERROR: Pipeline doesn't want to pause. |
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot identify.
Additional debug info: |
v4l2_calls.c(493): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such file or directory | |
Setting pipeline to NULL ... | |
Total rendered:0 | |
Freeing pipeline ... | |
[--->FINALIZE v4l_sink | |
root@freescale ~$ lsmod | |
Module | Size Used by |
Hi Vishvapathi Karnan,
In the command
gst-launch v4l2src ! mfw_v4lsink |
v4l2src will look for the device file /dev/video0. If it is not there it will throw an error. Please insert the modules 'videodev.ko' and 'uvcvideodev.ko' and check for the device file in /dev directory. Now run the above command. If still this error persists post the output of 'lsmod'.
Thanks & Regards,
RBT
Hi,
insmod videodev.ko | |
insmod: can't insert 'videodev.ko': No such file or directory | |
root@freescale /$ insmod uvcvideodev.ko | |
insmod: can't insert 'uvcvideodev.ko': No such file or directory |
root@freescale /$ modprobe uvcvideodev.ko
Where can i find the files?? i tried to locate it, but didnt succeed
i found uvcvideo.ko in rootfs/lib/modules/3.0.35-2508-g54750ff/kernel/drivers/media/video/uvc
where should i look for videodev.ko???
Hi,
You can find videodev.ko in rootfs/lib/modules/3.0.35-2508-g54750ff/kernel/drivers/media/video/. If you cannot find videodev.ko there, try to run ./ltib -m config and enable "Configure the kernel" option in the menu list, exit and save the configuration. Then run ./ltib. Now enable following options in Kernel configuration:
Device Drivers--> Multimedia Support--> Video for Linux
Device Drivers--> USB Support --> USB Gadget Support-->USB Webcam Gadget
Build them as modules.
Now
insmod /lib/modules/3.0.35-2508-g54750ff/kernel/drivers/usb/gadget/g_webcam.ko
insmod /lib/modules/3.0.35-2508-g54750ff/kernel/drivers/media/video/videodev.ko
Thanks & Regards,
RBT
Hi,
I was able to insert g_webcam.ko. but for videodev.ko i am getting the following
insmod videodev.ko
videodev: exports duplicate symbol __video_register_device (owned by kernel)
insmod: can't insert 'videodev.ko': invalid module format
ls /dev/video*
/dev/video /dev/video0 /dev/video16 /dev/video17 /dev/video18 /dev/video19
but when i give gst-launch v4l2src ! mfw_v4lsink
MFW_GST_V4LSINK_PLUGIN 3.0.7 build on Oct 15 2013 15:08:57.
WARNING: erroneous pipeline: could not link v4l2src0 to mfw_gst_v4lsink_info_t0
i want to display the video in my display... am i missing anything?
Hi,
Please try this below command
gst-launch mfw_v4lsrc ! mfw_v4lsink
Thanks & Regards,
Raybiztech
Hi,
response for gst-launch mfw_v4lsrc ! mfw_v4lsink
MFW_GST_V4LSRC_PLUGIN 3.0.7 build on Oct 15 2013 15:09:04.
MFW_GST_V4LSINK_PLUGIN 3.0.7 build on Oct 15 2013 15:08:57.
WARNING: erroneous pipeline: could not link mfwgstv4lsrc0 to mfw_gst_v4lsink_info_t0
for gst-launch --gst-debug-level=9 v4l2src ! mfw_v4lsink
0:02:39.168769301 2656 | 0x17050 LOG | GST_CAPS gstutils.c:902:gst_element_get_compatible_pad_template: checking pad template src |
0:02:39.168979967 2656 | 0x17050 DEBUG | GST_CAPS gstutils.c:907:gst_element_get_compatible_pad_template: compatible direction: found src pad template "s" |
0:02:39.169188967 2656 | 0x17050 DEBUG | GST_CAPS gstutils.c:910:gst_element_get_compatible_pad_template: intersecting EMPTY |
0:02:39.169409301 2656 | 0x17050 DEBUG | GST_CAPS gstutils.c:912:gst_element_get_compatible_pad_template: ..and video/x-raw-rgb, bpp=(int)8, depth=(int)8] |
0:02:39.506240967 2656 | 0x17050 DEBUG | GST_CAPS gstutils.c:918:gst_element_get_compatible_pad_template: caps are not compatible |
0:02:39.506490967 2656 | 0x17050 DEBUG | GST_ELEMENT_PADS gstutils.c:932:gst_element_get_compatible_pad_template: No compatible pad template found |
0:02:39.506736967 2656 | 0x17050 TRACE | GST_REFCOUNTING gstobject.c:336:gst_object_unref:<sink> 0xbb0e8 unref 1->0 |
0:02:39.506963967 2656 | 0x17050 TRACE | GST_REFCOUNTING gstcaps.c:432:gst_caps_unref: 0x9ab60 1->0 |
0:02:39.507184301 2656 | 0x17050 LOG | GST_CAPS gstcaps.c:345:_gst_caps_free: freeing caps 0x9ab60 |
0:02:39.507403634 2656 | 0x17050 TRACE | GST_REFCOUNTING gstobject.c:457:gst_object_dispose:<sink> dispose |
0:02:39.507640634 2656 | 0x17050 TRACE | GST_REFCOUNTING gstobject.c:489:gst_object_finalize:<sink> finalize |
0:02:39.507883967 2656 | 0x17050 INFO | GST_ELEMENT_PADS gstutils.c:1213:gst_element_get_compatible_pad:<v4l2src0> Could not find a compatible pad to link to mfk |
0:02:39.508129967 2656 | 0x17050 TRACE | GST_REFCOUNTING gstobject.c:336:gst_object_unref:<mfw_gst_v4lsink_info_t0:sink> 0xbf0d0 unref 2->1 |
0:02:39.839372301 2656 | 0x17050 DEBUG | GST_ELEMENT_PADS gstutils.c:1881:gst_element_link_pads_full: we might have request pads on both sides, checking... |
0:02:39.839626967 2656 | 0x17050 DEBUG | GST_ELEMENT_PADS gstutils.c:1924:gst_element_link_pads_full: no link possible from v4l2src0 to mfw_gst_v4lsink_info_t0 |
0:02:39.839862634 2656 | 0x17050 INFO | default gstutils.c:2034:gst_element_link_pads_filtered: Could not link pads: v4l2src0:(null) - mfw_gst_v4lsink_) |
0:02:39.840111967 2656 | 0x17050 ERROR | GST_PIPELINE ./grammar.y:614:gst_parse_perform_link: could not link v4l2src0 to mfw_gst_v4lsink_info_t0 |
WARNING: erroneous pipeline: could not link v4l2src0 to mfw_gst_v4lsink_info_t0
Attached partial log in txt document.
Thanks Vishva
Hi,
for gst-launch v4l2src device=/dev/video1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 966582666 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
LED in my Logitech C270 blinks for this command.
Any Idea wats the prob?
HI,
Please check video device file in /dev/. you may have video0,or 1 ... device file created for the camera and make the particular device file of your camera and give as input to the gst-launch command
gst-launch v4l2src device=/dev/video0 ! mfw_v4lsink
Thanks & Regards,
Raybiztech
Hi,
I did try that...
ls /dev/video*
/dev/video /dev/video1 /dev/video17 /dev/video19
/dev/video0 /dev/video16 /dev/video18
for gst-launch v4l2src device=/dev/video1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 966582666 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
LED in my Logitech C270 blinks for this command. But no response after that..
HI,
Insert an other module uvcvideo.ko and then try with the gst-launch command.
Thanks & Regards,
Raybiztech.
Hi,
Response for the insertion
$insmod g_webcam.ko | |
g_webcam gadget: uvc_function_bind | |
g_webcam gadget: Webcam Video Gadget | |
g_webcam gadget: g_webcam ready | |
Suspend udc for OTG auto detect | |
fsl-usb2-udc: bind to driver g_webcam | |
root@freescale /$ insmod uvcvideo.ko | |
uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825) | |
input: UVC Camera (046d:0825) as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.2/2-1.2:1.0/input/input2 | |
usbcore: registered new interface driver uvcvideo | |
USB Video Class driver (v1.1.0) | |
root@freescale /$ gst-launch v4l2src device=/dev/video1 | |
Setting pipeline to PAUSED ... | |
Pipeline is live and does not need PREROLL ... | |
Setting pipeline to PLAYING ... | |
New clock: GstSystemClock | |
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error. | |
Additional debug info: | |
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: | |
streaming task paused, reason not-linked (-1) | |
Execution ended after 964873333 ns. | |
Setting pipeline to PAUSED ... | |
Setting pipeline to READY ... | |
Setting pipeline to NULL ... | |
Freeing pipeline ... |
LED in my Logitech C270 blinks for this command. But no response after that..
Thanks
Hi,
I am able to record videofrom webcam. but not to display in my LCD...
$gst-launch v4l2src device=/dev/video1 ! autovideosink | //CAM LED is ON, but no display on my screen |
$gst-launch v4l2src device="/dev/video1" ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! avimux ! filesink location=/root/Vishva/video.avi
//Records Video in avi format. but size is large.
kindly help to display livestream on LCD...
Hi,
After exporting $export VSALPHA=1
I am able to get live stream to my Display... :-)
Thanks to All
Hi,
The error you are getting is like "streaming task paused, reason not-linked(-1)" because you gave the input element "v4l2src" but the output element "mfw_v4lsink" is missing. Try using the entire command (you need to create pipeline as mentioned below)
gst-launch v4l2src device=/dev/<device file> ! mfw_v4lsink
Thanks & Regards,
Raybiztech.
Hi,
This is pushpa teja iam the replacement of vishvapathi karnan .Iam handling the project remainig parts please i need ur support regarding of to store live streaming in compressed format .i have tried by using VLC but it was not supporting for Mars board please can u give me any idia about it
Thanks ,
pushpa teja