I have an Xavier NX developper kit. I grab the image from an USB camera and I do some images enhancement on cuda. I would like to encode and stream in H264 the video flow.
here you can find my code :
cv:: String GStream = "appsrc ! video/x-raw, format=BGR ! queue ! videoconvert ! video/x-raw, format=BGRx ! nvvidconv ! omxh264enc ! video/x-h264, stream-format=byte-stream ! h264parse ! rtph264pay pt=96 config-interval=1 ! udpsink host=192.168.1.1 port=5200 ";
oStream.open(GStream, cv::CAP_GSTREAMER, 0, 25, oResultImg.size(), true);
…My image enhancement code …
oStream << oResultImg;
Here, oResultImg.size() = 1224x1024.
Then I visualize the result in VLC on my windows computer with this sdp file :
m=video 5200 RTP/AVP 96
c=IN IP4 127.0.0.1
My Xavier NX and my computer are linked via ethernet.
The problems are :
1. How can I change my pipeline in order the optimize the stream to reach a low latency streaming ? (MAX 100ms) I already have 800ms.
2. How can I visualize the stream without VLC (windows PC)? because I think VLC add latency.
Thank you very much for your answers. Fell free to ask me more details if I’m not clear about some points.