Streaming MJPEG using UVC camera from USB camera from ARM using UDP to X86

1k Views Asked by At

I am using to use i.Mx6 Dual processor connected with USB Camera(UVC Camera) supporting 1080p 30FPS to Stream to X86 plaftform using UDP port.

  1. I want to achieve streaming using 1080p with minimum latency.
  2. I want to use MJPEG from i.MX6 to X86 without using any additional encodin/decoding, To verify that camera actually support 30FPS using 1080p.

Can any one help me using how I can achieve this.

For streaming 1080p I am using below pipeline

Sender: gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg, width=1920, height=1080, framerate=30/1 ! jpegdec ! videoscale ! videoconvert ! queue ! imxvpuenc_h264 bitrate=6000 gop-size=60 ! rtph264pay ! udpsink host=192.168.0.108 port=5000 sync=false

Receiver: gst-launch-1.0 -vc udpsrc port=5000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false async=false

**How to calculate the output frames for UVC camer to make it stream MJPEG from i.MX6 to X86 without using any additional encodin/decoding. **

1

There are 1 best solutions below

3
SeB On

If your camera is MJPG, you don't need to decode and encode into H264. H264 uses temporal redundancy using P and B frames, so this would increase latency as compared to MJPG where each frame can be encoded alone.

Sender:

gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg, width=1920, height=1080, framerate=30/1 ! rtpjpegpay ! queue ! udpsink host=192.168.0.108 port=5000 

Receiver:

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=JPEG,clock-rate=90000,payload=26 ! queue ! rtpjpegdepay ! decodebin ! fpsdisplaysink video-sink=fakesink text-overlay=0 -v