Capture encode usecase for CSI camera ?

ssshukla26 ssshukla26 at gmail.com
Mon Nov 21 10:04:54 UTC 2016


Hi, I am accessing a OV5640 camera sensor with my custom hardware using CSI
interface. I am not able to run a capture encode usecase. This camera is
v4l2 compliant and has v4l2 compliant driver also. The camera sensor outputs
frames in *UYVY* format and I am doing things as follows.

*#Verify the sensors availability*
media-ctl -d /dev/media1 -p

*#Setting up camera*
media-ctl -d /dev/media1 -l
'"msm_csiphy1":1->"msm_csid1":0[1],"msm_csid1":1->"msm_ispif":0[1]'

media-ctl -d /dev/media1 -V '"ov5640_sec
1-003c":0[fmt:UYVY2X8/1920x1080],"msm_csiphy1":0[fmt:UYVY2X8/1920x1080],"msm_csid1":0[fmt:UYVY2X8/1920x1080]'

*#Image capture*
gst-launch-1.0 *v4l2src* device=*/dev/video0* num-buffers=1 !
'video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1' ! jpegenc !
filesink location=image.jpg

*#Raw video capture*
gst-launch-1.0 -e *v4l2src* device=*/dev/video0* !
video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1 ! filesink
location=*final.yuv*

*#Encode video (using yuv file of uyvy format)*
gst-launch-1.0 -v *filesrc* location=*final.yuv* blocksize=3110400 !
videoparse format=uyvy width=1920 height=1080 framerate=30/1 ! videoconvert
! video/x-raw,format=I420,width=1920,height=1080,framerate=30/1 ! x264enc !
mp4mux ! filesink location=final.mp4

*#Convert YUV to I420*
gst-launch-1.0 -v *filesrc* location=*final.yuv* blocksize=3110400 !
videoparse format=uyvy width=1920 height=1080 framerate=30/1 ! videoconvert
! video/x-raw,format=I420,width=1920,height=1080,framerate=30/1 ! filesink
location=*final_i420.yuv*

*#Encode video (using yuv file of i420 format)*
gst-launch-1.0 -v *filesrc* location=*final_i420.yuv* blocksize=3110400 !
videoparse width=1920 height=1080 framerate=30/1 ! x264enc ! mp4mux !
filesink location=final.mp4

*#Capture - Encode Usecase*
gst-launch-1.0 -e *v4l2src* device=*/dev/video0* !
video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1 ! videoparse
format=uyvy width=1920 height=1080 framerate=30/1 ! videoconvert !
video/x-raw,format=I420,width=1920,height=1080,framerate=30/1 ! x264enc !
mp4mux ! filesink location=final.mp4

I am not getting any result in the last "/*Capture - Encode Usecase*/"
command line. What am doing wrong ? Please help.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Capture-encode-usecase-for-CSI-camera-tp4680807.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list