gstreamer rtsp blink problem for tk1

Hi,everyone:
I have integrated an ov5640 to tk1 develoop kit. I have tested image capture successfully by command "gst-launch-0.10 -v v4l2src queue-size=1 ! ‘video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080’ ! xvimagesink “;I also has tested rtsp from gstreamer successfully by test_video.c which incorporate command parameter " videotestsrc ! ‘video/x-raw-yuv,width=1920,height=1080,format=(fourcc)UYVY’ ! nvvidconv ! video/x-nv-yuv ! nv_omx_h264enc ! rtph264pay pt=96”
so I replace the ‘videotestsrc’ with ‘v4l2src’. The rtsp system also works,but the vlc player(as rtsp play ) begin to blink;one half image is good and another half image is totally green.
Have anyone met the problem? and what happened?

Thank you for your help.

I have test link by command :
“gst-launch-0.10 -vvv v4l2src ! ‘video/x-raw-yuv,width=1920,height=1080,format=(fourcc)UYVY’ ! nvvidconv ! video/x-nv-yuv,framerate=30/1 ! nv_omx_h264enc ! rtph264pay name=pay0 pt=96 !fakesink”
The output is as following:

Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingSetting pipeline to PAUSED …
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
Pipeline is live and does not need PREROLL …
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not get parameters on device ‘/dev/video0’
Additional debug info:
v4l2src_calls.c(235): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Inappropriate ioctl for device
Setting pipeline to PLAYING …
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstNvVConv:nvvconv0.GstPad:src: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstNvVConv:nvvconv0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
Framerate set to : 30 at NvxVideoEncoderSetParameter/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:sink: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:sink: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
NvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
===== MSENC blits (mode: 1) into tiled surfaces =====
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, stream-format=(string)avc, alignment=(string)au
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)014240150301000b6742402995a01e0089f95001000468ce3c80
/GstPipeline:pipeline0/GstRtpH264Pay:pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)“Z0JAKZWgHgCJ+VA\=\,aM48gA\=\=”, payload=(int)96, ssrc=(uint)193973490, clock-base=(uint)1469143821, seqnum-base=(uint)6870
/GstPipeline:pipeline0/GstRtpH264Pay:pay0.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)014240150301000b6742402995a01e0089f95001000468ce3c80
/GstPipeline:pipeline0/GstRtpH264Pay:pay0: timestamp = 1469378952
/GstPipeline:pipeline0/GstRtpH264Pay:pay0: seqnum = 6870
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 5220200727 ns.
Setting pipeline to PAUSED …
Setting pipeline to READY …
/GstPipeline:pipeline0/GstRtpH264Pay:pay0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpH264Pay:pay0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstNvVConv:nvvconv0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstNvVConv:nvvconv0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
Setting pipeline to NULL …
Freeing pipeline …

So It’s hard to judge where the green image come from. nvvidconv or nv_omx_h264enc?

Hello, billtang:
Since I have no device in hand, and can only provide some suggestions.

  1. Use simple GST pipeline camera --> display to check whether the issue comes from camera source plugin.
  2. Use ‘tee/filesink’ to dump data between plug-ins to check where data corrupts.

br
ChenJian

thank you , ChenJian.

   I have tested the command 
gst-launch-0.10 -v v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080' ! xvimagesink

which is good. then I test the command

gst-launch-0.10 -v v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080' ! filesink location=raw.yuv

;the raw file is good;
At last ,I tested

gst-launch-0.10 -vvv v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080' ! nvvidconv ! 'video/x-nv-yuv' !  filesink location=raw.yuv

the savefile have a size about 1M ,which must be wrong size. so I think the bug exist in nvvidconv. Do you think so ? will you check this plugin ‘nvvidconv’?

I also tested

gst-launch-0.10 -v v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080' ! nv_omx_videosink

which failed again. I think that may all nv series plugins has problem with UYVY at this resolution?

gst-launch-0.10 -v v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080' ! nv_omx_hdmi_videosink

this command is good.it display right video.

problem solved by install package by ‘apt-get install’ mode I have download the gstream source package then comile and install. This way is wrong for some reason I don’t know.