Tx1 Dummy i2c CSI Camera GStreamer Streaming

burak476 hburaksaruhan at gmail.com
Wed Apr 17 17:30:23 UTC 2019


I'm in dire need of help. Can you please bear with me while we debug this
problem? Thank you.

What I try to do is, we have a camera that outputs LVDS, and we convert it
to CSI-2 MIPI with an FPGA-Bridge. And we also configure the camera with
this FPGA. 

So we have such a block diagram. CAMERA --(LVDS)--> FPGA
---(CSI)(YUYV=YUY2)---> Jetson TX1

https://i.ibb.co/Pzb2TLf/Screenshot-from-2019-04-15-14-59-18.png

I used the command;

[code]v4l2-ctl -d /dev/video0
--set-fmt-video=width=1280,height=720,pixelformat=YUYV --set-ctrl
bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw[/code]


I wrote a shell script that executed this command for 10 different times,
and saving the file as 

test1.raw
test2.raw
test3.raw
...
test10.raw

And I can see the video is playing, since the square of our pattern
generator moves and changes position with each frame.

Then I've proceeded with the video;

[code]v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=YUYV
--set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0
--stream-to=ov491.raw

scp ov491.raw  burak at 192.168.1.100:/home/burak/Desktop

[code]mplayer /home/burak/Desktop/ov491.raw -demuxer rawvideo -rawvideo
w=1280:h=720:fps=30:format=yuy2[/code]

I can play the recorded raw video just fine with these commands.


But I need to stream the video with these commands,

[code]// usb camera
gst-launch-1.0 v4l2src device=/dev/video0 ! videorate max-rate=25 !
videoconvert ! omxh265enc qp-range=30,50:30,50:30,50 control-rate=4
bitrate=3000000 ! "video/x-h265, stream-format=(string)byte-stream" !
rtph265pay mtu=1400 ! udpsink host=192.168.1.100 port=5600 sync=false
async=false


// watch stream on PC
gst-launch-1.0 udpsrc port=5600 ! application/x-rtp, encoding-name=H265,
payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! xvimagesink
sync = false[/code]



However the first command outputs;
[code]nvidia at tegra-ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video0 !
videorate max-rate=25 ! videoconvert ! omxh265enc qp-range=30,50:30,50:30,50
control-rate=4 bitrate=3000000 ! "video/x-h265,
stream-format=(string)byte-stream" ! rtph265pay mtu=1400 ! udpsink
host=192.168.1.100 port=5600 sync=false async=false
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: Device
'/dev/video0' cannot capture in the specified format
Additional debug info:
gstv4l2object.c(3481): gst_v4l2_object_set_format_full ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture in YU12, but device returned format YUYV
Execution ended after 0:00:00.001618073
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[/code]



Some information;

[code]nvidia at tegra-ubuntu:~$ v4l2-ctl --list-devices
VIDIOC_QUERYCAP: failed: Inappropriate ioctl for device
VIDIOC_QUERYCAP: failed: Inappropriate ioctl for device
vi-output, ov5693 6-0036 (platform:54080000.vi:0):
	/dev/video0
	/dev/v4l-subdev1
	/dev/v4l-subdev0
[/code]

[code]nvidia at tegra-ubuntu:~$ gst-launch-1.0 -v v4l2src device=/dev/video0 !
fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
'/dev/video0' cannot capture in the specified format
Additional debug info:
gstv4l2object.c(3482): gst_v4l2_object_set_format_full ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture in YU12, but device returned format YUYV
Execution ended after 0:00:00.000117343
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[/code]

[code]nvidia at tegra-ubuntu:~$ gst-launch-1.0 -v v4l2src device="/dev/video0"
! "video/x-raw,width=1280,height=720, format=(string)YUYV" ! nvvidconv !
"video/x-raw(memory:NVMM)" ! nvoverlaysink
WARNING: erroneous pipeline: could not link v4l2src0 to nvvconv0[/code]

[code]nvidia at tegra-ubuntu:~$ v4l2-ctl
--set-fmt-video=width=1280,height=720,pixelformat=YUYV --set-ctrl
bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0
--stream-to=ov491.raw
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 61.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
nvidia at tegra-ubuntu:~$ 


nvidia at tegra-ubuntu:~$ scp ov491.raw 
burak at 192.168.1.100:/home/burak/Desktop
burak at 192.168.1.100 's password: 
ov491.raw                                                                                           
100%  176MB  11.0MB/s   00:16    


burak at burak-lenovo-v330-15ikb:~/Desktop$ mplayer
/home/burak/Desktop/ov491.raw -demuxer rawvideo -rawvideo
w=1280:h=720:fps=30:format=yuy2
MPlayer 1.3.0 (Debian), built with gcc-7 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing /home/burak/Desktop/ov491.raw.
rawvideo file format detected.
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object
file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x5647792b6ce0] bicubic scaler, from yuyv422 to yuv420p using
MMXEXT
[swscaler @ 0x5647792b6ce0] using unscaled yuyv422 -> yuv420p special
converter
VO: [xv] 1280x720 => 1280x720 Planar YV12 
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Load subtitles in /home/burak/Desktop/
Audio: no sound
Starting playback...
V:   3.3 101/101  0%  4%  0.0% 0 0 


Exiting... (End of file)
burak at burak-lenovo-v330-15ikb:~/Desktop$ 
[/code]


Any idea on how I can set the YUV12 to YUYV? Or do I need anything else?
Thank you!








--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list