Thanks, DaneLLL.
I can launch the camera on the pi using ximagesink instead of xvimagesink. But it does launch.
As for streaming, the closest I’ve gotten is this:
Using this pipeline, looks like the camera launches but it shows redistribute latency. I do see the camera blinking, which means its on and capturing, I know this from when I launch the the camera on the pi (when connected to monitor)
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY ! videoscale ! videoconvert ! video/x-raw,format=I420,width=640, height=480,framerate=9/1 ! x264enc ! h264parse ! rtph264pay ! rndbuffersize max=65000 ! udpsink host=192.168.0.187 port=5000
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Redistribute latency…
And the closest I’ve come to capturing the stream on the nano is that it opens in BLOCKING MODE. I mean thats what the console displays, the stream never actually displays. I think we are close, but I can’t figure this out.
Using this pipeline:(I modified a bit from the pipeline I have for streaming from the raspberry pi camera.)
camSet=‘udpsrc port=5000 ! gdpdepay ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw,format=UYVY ! videoconvert ! video/x-raw, width=‘+str(dispW)+’, height=‘+str(dispH)+’,format=I420 ! appsink drop=true sync=false’
Full code on the nano is this (simple video capture)
#############################################################
import cv2
import numpy as np
#Dimensions for raspberry pi camera version 2 is 1280 x 720
dispW=640
dispH=480
flip=4 # flip method 4 to flip image horizontally, otherwise ths camera gives a mirror image
#Open the raspberry pi camera attached to jetson nano
#camSet=‘nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1 ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw, width=‘+str(dispW)+’, height=‘+str(dispH)+’, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink’
#To use the raspberry pi camera instead of USB camera connected to raspberry pi for wireless streaming use the line below
#camSet=‘tcpclientsrc host=192.168.0.43 port=8554 ! gdpdepay ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw, width=‘+str(dispW)+’, height=‘+str(dispH)+’,format=BGR ! appsink drop=true sync=false’
#For USB camera connected to raspberry pi. Don’t change line below! ITS WORKING FINALLY!
#camSet= ‘udpsrc port=5000 ! clock-rate=90000,payload=96 ! rtph263pdepay queue-delay=0 ! ffdec_h263 ! xvimagesink ! appsink sync=false’
#Testing For USB purethermal camera connected to raspberry pi.
#camSet= ‘udpsrc port=5000 ! clock-rate=90000, payload=96 ! rtph264depay ! h264parse ! nvv4l2decoder enable-max-performance=1 ! appsink sync=false’
camSet=‘udpsrc port=5000 ! gdpdepay ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw,format=UYVY ! videoconvert ! video/x-raw, width=‘+str(dispW)+’, height=‘+str(dispH)+’,format=I420 ! appsink drop=true sync=false’
cam=cv2.VideoCapture(camSet)
#Display the camera in a window named “Thermal Video”
while True:
ret,frame=cam.read()
#flipped=cv2.flip(frame, flipCode=1) #have to have this otherwise get horizontal mirror image
cv2.imshow(‘Thermal Video’, frame)
if cv2.waitKey(1)==ord(‘q’):
break
cam.release()
cv2.destroyAllWindows()
##########################################################################
Any other things I can try? I know I’m almost there, any help is appreciated!
Thank you,
Micky