Streaming 1080p 30FPS using MJPEG over UVC camera from i.MX6 to Laptop

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Streaming 1080p 30FPS using MJPEG over UVC camera from i.MX6 to Laptop

665 Views
kailas_kharse
Contributor IV

UVC Camera is used supporting MJPG: 1080p@30 / 720p@30 or YUV:1080p@6 / 720p@6.

  • HW Setup-i.MX6 Board [HS-O]:
  1. Video Source (VS-O): UVC Camera connected with i.MX6 Board, USB 2.0 port.
  2. Video Receive (VR): X86 Laptop

Scenario-MJPG:

  1. VS-O:
    • Capture MJPG stream from UVC for 1080@30
    • Send MJPG stream to VR over WiFi (RTP)
  2. Video Receiver:
    • Receive MJPG video stream over WiFi (RTP)
    • Decode MJPG (1080@30)
    • Display video with 1080p@30.

Current status:

  1. HS-O:
  • Pipeline - 1 : 1080p30 MJPEG Capture, and file dump is working.
  • Pipeline - 2 : capture from UVC and stream to X86. Instead of 1080p30, stream is of 1080p6 . 720p30 is working fine though.

Pipeline - 1:

  • Transmitter: $ gst-launch-1.0 -e v4l2src device=/dev/video0 num-buffers=1 ! image/jpeg,width=1920,height=1080,framerate=30/1 ! avimux ! filesink location=newtest.avi
  • Receiver:  used VLC to play newtest.avi on X86. Found it of 1080p30.

Pipeline - 2:

  • Transmitter: $ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw ! jpegenc ! jpegparse ! rtpjpegpay ! udpsink host=192.168.0.103 port=5000
  • Receiver: $ gst-launch-1.0 udpsrc port=5000 buffer-size=90000 ! application/x-rtp, encoding-name=JPEG, payload=26, clock-rate=90000 !  rtpjpegdepay ! jpegparse ! queue ! jpegdec ! videoconvert ! fpsdisplaysink sync=false async=false --verbose
     

Challenge:

  1. At i.MX6 Board, able to dump MJPG file having 1080@30.
  2. But while streaming, it always displays at 6FPS or less, so it seems that it is streaming YUV instead of MJPEG.
  3. While streaming 720p, same pipeline works at 30FPS.

We need your help in review Pipeline – 2 which we are hoping to get us 1080p30 on HS-O setup.

Labels (4)
0 Kudos
1 Reply

602 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @kailas_kharse 

I hope you are doing well.
 
One can refer to commands in 7.3.10 Web camera in i.MX Linux User's Guide for video streaming.
 
Please use imxv4l2src plug-in for i.MX6 SoCs.
 
Please refer to 7.3.3 Video encoding in  i.MX Linux User's Guide to improve CPU performance by offloading operations using vpu.
 
Thanks & Regards,
Sanket Parekh
0 Kudos