
23-03-2016, 11:40
|
 |
My pants are louder than yours.
 FRC #0900 (The Zebracorns)
Team Role: Mentor
|
|
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,256
|
|
|
Re: NVIDIA Jetson TK1
Quote:
Originally Posted by sparkytwd
For video streaming this year, we're using gstreamer with NVidia's optimized h264 codecs. On the jetson we run this:
gst-launch -v -e v4l2src device=/dev/video0 -v ! 'video/x-raw-yuv,width=320,height=240,framerate=30/1' ! ffmpegcolorspace ! nv_omx_h264enc bitrate=300000 low-latency=true framerate=30 ! 'video/x-h264,width=424,height=240,framerate=30/1' ! rtph264pay pt=96 ! udpsink host=drivestation.local port=5805 -v
That spits out a UdpSrc caps = ... line
Something like this: /GstPipeline ipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0JAKJWgbH+XQA\\=\\=\\,aM48gA\\=\\= \", payload=(int)96, ssrc=(uint)2314783494, clock-base=(uint)4227592485, seqnum-base=(uint)43060
You need the part after 'caps =', but it seems to not need the sprop-parameter-sets part of it, which gives escaping problems on Windows.
And on the drive station this:
gst-launch-1.0 -vvv udpsrc port=5805 ! $CAPS ! rtph264depay ! avdec_h264 ! d3dvideosink sync=false
Make sure to disable automatic exposure on the camera to keep it a steady 30fps.
It's robust, streaming will come back up even if the tegra reboots, or the stream is closed on the drivestation. Latency is the lowest we've seen on any solution. Quality is good while 300kBps keeps network overhead low
|
Nicely done!
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
|