imx6ul ov5640 capture

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6ul ov5640 capture

Jump to solution
11,260 Views
小辉哥
Contributor III

hi,

I'm testing the camera of i.mx6ul,Test steps are as follows:

insmod /lib/modules/3.14.38-6UL_ga+ge4d0573/kernel/drivers/media/platform/mxc/subdev/mx6s_capture.ko

insmod /lib/modules/3.14.38-6UL_ga+ge4d0573/kernel/drivers/media/platform/mxc/subdev/ov5640_camera.ko

A serial port output:

1-003c supply DOVDD not found, using dummy regulator

1-003c supply DVDD not found, using dummy regulator

1-003c supply AVDD not found, using dummy regulator

CSI: Registered sensor subdevice: ov5640 1-003c

camera ov5640, is found

then,use this command:/unit_tests/mx6s_v4l2_capture.out -d /dev/video1 -m 1

the lcd output is deranged,

Please advise.

Thank you

Labels (1)
Tags (1)
0 Kudos
1 Solution
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

1)

Have you checked the caps of imxv4l2src?

gst-inspect-1.0 imxv4l2src

You have to use available configurations:

    Capabilities:

      video/x-raw

                 format: YUY2

                  width: 640

                 height: 480

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 320

                 height: 240

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 720

                 height: { 576, 480 }

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1280

                 height: 720

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1920

                 height: 1080

              framerate: 15/1

      video/x-raw

                 format: YUY2

                  width: 2592

                 height: 1944

              framerate: 15/1

      video/x-raw

                 format: YUY2

                  width: 176

                 height: 144

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1024

                 height: 768

              framerate: { 15/1, 30/1 }

2) For example:

gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! "video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)15/1" ! videoconvert ! x264enc ! avimux ! filesink location=webcam.avi

Check the Linux user Guide, multimedia section.

Luis

View solution in original post

0 Kudos
19 Replies
6,724 Views
小辉哥
Contributor III

thanks!

i try this command

root@imx6ulevk:~# gst-launch-1.0 imxv4l2src device=/dev/video1 ! imxv4l2sink

====== IMXV4L2SRC: 4.0.7 build on Jan 18 2016 16:19:53. ======

set color key:00010203

====== IMXV4L2SINK: 4.0.7 build on Jan 18 2016 16:19:53. ======

Setting pipeline to PAUSED ...

display(/dev/fb0) resolution is (800x600).

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

v4l2sink need allocate 3 buffers.

but,Phenomenon is the same, in a moving picture can faintly see a little bit image

0 Kudos
6,724 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

It looks a hardware problem as the module I tested works fine.

https://community.freescale.com/thread/379349

Luis

0 Kudos
6,724 Views
小辉哥
Contributor III

hi,

I added a capacitance in CSI_VSYNC feet Can display now, but there's the red noise, I want to look at the effect of the photo?Have a test photos and video of the order?

0 Kudos
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

What do you need exactly?

Luis

0 Kudos
6,725 Views
小辉哥
Contributor III

hi,

I want the Take photos or video test order, I want to see if there are any more noise out photos。I want to take a photo。

0 Kudos
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

You can use this pipeline:

gst-launch-1.0 imxv4l2src num-buffers=1 device=/dev/video1 ! jpegenc ! filesink location=picture.jpg

Attached a picture captured with 6UL.

Luis

0 Kudos
6,725 Views
小辉哥
Contributor III

luis,

thank you!

I also took a picture, I found is not very clear Whether to focus, I also want to know how to take pictures of the different resolutions

What is the orders of the video?

There is a problem I'm using the command“ gplay-1.0 test. mp4” LCD without picture, only the sound。

0 Kudos
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

You can introduce caps in the pipeline for different resolutions. "video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)15/1"

Like :

gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! "video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)15/1" ! imxv4l2sink

How did you create the test.mp4?

Luis

0 Kudos
6,725 Views
小辉哥
Contributor III

Hi,luis,

1,2592 x1944 resolution is not successful,the other is ok.

gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! "video/x-raw, format=(string)YUY2, width=(int)2592, height=(int)1944, framerate=(fraction)15/1" ! imxv4l2sink

pastedImage_0.png

and taking pictures is the same:

gst-launch-1.0 imxv4l2src num-buffers=1 device=/dev/video1 ! "video/x-raw, format=(string)YUY2, width=(int)2592, height=(int)1944, framerate=15/1" ! jpegenc ! filesink location=test.jpg

2,Test. Mp4 is downloading video file,Is there any requirement for broadcast file? Can you give a reference test command?

0 Kudos
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

1. Is that resolution supported by your sensor?

2. I am sorry, I don't understand what you need. Do you want to play a mp4 file? Create your own file with camera?

Luis

0 Kudos
6,724 Views
小辉哥
Contributor III

hello,

1,my sensor is ov5640,it support 2592x1944 resolution

2,I want to play a mp4 file or other Video file,also want to use camera to record video。

0 Kudos
6,726 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

1)

Have you checked the caps of imxv4l2src?

gst-inspect-1.0 imxv4l2src

You have to use available configurations:

    Capabilities:

      video/x-raw

                 format: YUY2

                  width: 640

                 height: 480

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 320

                 height: 240

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 720

                 height: { 576, 480 }

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1280

                 height: 720

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1920

                 height: 1080

              framerate: 15/1

      video/x-raw

                 format: YUY2

                  width: 2592

                 height: 1944

              framerate: 15/1

      video/x-raw

                 format: YUY2

                  width: 176

                 height: 144

              framerate: { 15/1, 30/1 }

      video/x-raw

                 format: YUY2

                  width: 1024

                 height: 768

              framerate: { 15/1, 30/1 }

2) For example:

gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! "video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)15/1" ! videoconvert ! x264enc ! avimux ! filesink location=webcam.avi

Check the Linux user Guide, multimedia section.

Luis

0 Kudos
6,724 Views
fresxc
Contributor I

Hi Luis

How did you add the "x264enc" in Yocto?  I bitbake fsl-image-qt5 for imx6ul, and i found it haven't x264enc element. could you help me ? 

Thanks

0 Kudos
6,724 Views
小辉哥
Contributor III

yes,i use this device tree

the ov5640 PWDN pin is pull down with 10k resistance,is This have any effect?

0 Kudos
6,724 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

You can try:

insmod /lib/modules/3.14.38-6UL_ga+ge4944a5/kernel/drivers/media/platform/mxc/subdev/ov5640_camera.ko

insmod /lib/modules/3.14.38-6UL_ga+ge4944a5/kernel/drivers/media/platform/mxc/subdev/mx6s_capture.ko

gst-launch-1.0 imxv4l2src device=/dev/video1 ! imxv4l2sink

Luis

6,725 Views
小辉哥
Contributor III

hi, luis,

I found a strange problem, I use the oscilloscope probe to quantity CSI_VSYNC feet, image is clear,But the image will move up

0 Kudos
6,725 Views
igorpadykov
NXP Employee
NXP Employee

Hi 小辉哥 в

also it may be useful to look at i.MX6SL camera driver, as it also uses CSI-PXP path:

About preview function in i.MX6SL.

Best regards

igor

0 Kudos
6,725 Views
小辉哥
Contributor III

hi,igir,

thanks

Before I read this article discussion, still want to thank you for your answers.

i

0 Kudos
6,725 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Are you ising this device tree?

imx6ul-14x14-evk-csi.dtb

Luis

0 Kudos