V4l2CameraSrc === Example Pipelines to be converted to code ! ```bash gst-launch-0.10 v4l2src device=/dev/video0 queue-size=10 always-copy=false ! 'image/jpeg, width=(int)4096, height=(int)2160, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1' ! jpegdec ! ffmpegcolorspace ! videocrop top=0 left=0 right=1920 bottom=1080 ! fpsdisplaysink sync=false -v ``` ```bash= gst-launch-0.10 v4l2src device=/dev/video0 alwaus-copy=false queue-size=5 ! "image/jpeg, width=(int)640, height=(int)480, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1" ! nvjpegdec ! fpsdisplaysink sync=false ``` ## Video Pipelines ```bash= gst-launch-0.10 v4l2src device=/dev/video0 queue-size=10 always-copy=false ! "video/x-raw-yuv, format=(fourcc)UYVY, width=(int)4208, height=(int)3120, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)9/2" ! ffmpegcolorspace ! videocrop top=0 left=0 right=1920 bottom=1080 ! fpsdisplaysink sync=false -v ``` ```bash= gst-launch-0.10 v4l2src device=/dev/video0 queue-size=10 always-copy=false ! 'image/jpeg, width=(int)4096, height=(int)2160, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1' ! jpegdec ! ffmpegcolorspace ! videocrop top=0 left=0 right=1920 bottom=1080 ! fpsdisplaysink sync=false -v ``` ## File Sink Sample Working ```bash= gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY,width=(int)3840,height=(int)2160" ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)3840,height=(int)2160" ! omxh264enc ! matroskamux ! queue ! filesink location = sample.mkv ``` ## Try RTSP Working ```bash gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY,width=(int)3840,height=(int)2160" ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)3840,height=(int)2160" ! nvv4l2h264enc ! h264parse ! rtspclientsink location=rtsp://localhost:8554/4k_stream ``` ## New working RTSP pipeline ```bash= gst-launch-1.0 v4l2src device=/dev/video0 io-mode=2 ! "video/x-raw,format=(string)UYVY,width=(int)3840,height=(int)2160" ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)3840,height=(int)2160" ! nvv4l2h264enc ! h264parse ! rtspclientsink location=rtsp://10.223.240.0:8554/mystream ``` ### DW Camera Pipeline ## Sender ```bash! gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=2 ! video/x-h264, width=1920,height=1080 ! h264parse ! queue ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.29.14 port=5600 sync=false ``` ## Receiver ```bash! gst-launch-1.0 udpsrc port=5600 ! application/x-rtp ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink gst-launch-1.0 udpsrc port=5600 ! application/x-rtp ! rtpjitterbuffer ! rtph264depay ! h264parse ! nvh264dec ! glimagesink ``` ## MJPEG Pipelines ```bash gst-launch-1.0 v4l2src device=/dev/video1 io-mode=2 ! image/jpeg, width=1920, height=1080, framerate=30/1, format=MJPG ! nvjpegdec ! video/x-raw,format=I420,width=1920,height=1080,framerate=30/1 ! videoconvert ! xvimagesink # Or using NVMM memory. (May not be a good idea. I'd discourage from trying nvoverlaysink) gst-launch-1.0 v4l2src device=/dev/video1 io-mode=2 ! image/jpeg, width=1920, height=1080, framerate=30/1, format=MJPG ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420,width=1920,height=1080,framerate=30/1' ! nvegltransform ! nveglglessink ```