1.28.2 tx2 platform
2.Real-time video streaming to specific udp port
1.28.2 tx2 platform
You post is on TX1 section … ;)
You can used Gstreamer :
gst-launch-1.0 nvcamerasrc contrast=1 fpsRange="30.0 30.0" ! "video/x-raw(memory:NVMM), format=(string)I420, width=(int)1948, height=(int)1096,framerate=(fraction)30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420, width=(int)1920, height=(int)1080" ! omxh264enc ! rtph264pay mtu=60000 ! udpsink clients=<ip address>:<port no.> sync=false
most important was ip and port client :
... ! omxh264enc ! rtph264pay mtu=60000 ! udpsink clients=<ip address>:<port no.> sync=false
that’s works with v4l2src plugins.
or , you can install a RTSP server and and develop a software with MMAPI for transfer h264 buffers.
You may also check this post about bitrate for omxh264enc.
gst-launch-1.0 nvcamerasrc contrast=1 fpsRange=“30.0 30.0” ! “video/x-raw(memory:NVMM), format=(string)I420, width=(int)1948, height=(int)1096,framerate=(fraction)30/1” ! nvvidconv ! “video/x-raw(memory:NVMM),format=(string)I420, width=(int)1920, height=(int)1080” ! omxh264enc ! rtph264pay mtu=60000 ! udpsink clients=192.168.20.118:2500 sync=false
when i use this command and i can not see video by vlc
You may try to add config-interval=1 into rtph264pay options.
thanks you for your help,i can see video by vlc
i still have to questions
1.how could i choose which camera to capture video by this command
2.could i use the command to save video scream to a local file and send video scream at the same time
For CSI cameras, you may try option sensor-id of plugin nvcamerasrc, for example if your CSI camera is /dev/video1:
gst-launch-1.0 nvcamerasrc sensor-id=1 ! ...
For a USB cam, you would use plugin v4l2src instead of nvcamerasrc:
gst-launch-1.0 v4l2src device=/dev/video2 ! ...
Yes, you may use plugin tee. For example with devkit onboard cam OV5693 (you would adapt for your case):
gst-launch-1.0 -e nvcamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480' ! omxh264enc bitrate=20000000 ! h264parse ! tee name=t ! queue ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=5000 t. ! queue ! matroskamux ! filesink location=output.mkv
I strongly advise to record on external disk. Filling the eMMC would not be simple to fix.
use this command,it can transfer video scream and save a local file,thanks for your help
last question,could i modify the command to add live rtc time on the corner of the video
You may use plugin timeoverlay:
gst-launch-1.0 nvcamerasrc ! nvvidconv ! <s>timeoverlay</s> ! omxh264enc ...
[EDIT: sorry for misleading information, I’ve just realized it should be clockoverlay, not timeoverlay! ]