USB Camera Livestreaming Issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

USB Camera Livestreaming Issue

790 次查看
Hasan_01
Contributor I

I am using Karo Eval Kit QS8M-MQ00 QBase2. I build Karo-Weston-Image with distro wayland. I am able to perform livestreaming via USB Camera but I takes some delay in few seconds. I ma unable to get continuous smooth streaming with frameloss/delay. I am providing you the pipeline, I used for streaming. Please have a look and help me to get continous stream without delay.


1.
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! videoconvert ! videorate ! video/x-raw,framerate=5/1 ! theoraenc bitrate=1000 keyframe-force=30 drop-frames=true ! oggmux ! udpsink host=192.168.1.114 port=4000 sync=false

2.

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! videoconvert ! theoraenc bitrate=1000 keyframe-force=30 drop-frames=true ! oggmux ! udpsink host=192.168.1.114 port=4000 sync=false

3.

gst-launch-1.0 v4l2src device=/dev/video1 ! image/jpeg,width=640,height=480,framerate=30/1 ! jpegparse ! jpegdec ! videoconvert ! theoraenc bitrate=1000 keyframe-force=64 drop-frames=true ! oggmux ! udpsink host=192.168.1.114 port=4000 sync=false

 

These are the above gstreamer pipeline, I used for streaming.


0 项奖励
回复
6 回复数

742 次查看
Hasan_01
Contributor I

Hi.. I am able to stream without any delay or frame loss by decreasing the framerate & resolution but it degrade quality. Is their any way to get hd resolution. I am using Karo QS8M-MQ00 Qbase2 i.MX 8M


This is the pipeline which works but it failed to give hd video without delay/frame loss




gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480 ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 ! theoraenc bitrate=1000 keyframe-force=30 drop-frames=true ! oggmux ! udpsink host=192.168.1.114 port=4000 sync=false



When, I try using 640*480 resolution without video scale it through delay/frameloss. Is their any solution to overcome this issue..

Thanks
Hasan

0 项奖励
回复

727 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @Hasan_01

Thank you for your reply.

Based on your hardware, it seems you can't achieve a better performance I recommend you to use a MIPI CSI camera. With this interface you can increase the resolution due to the bandwidth.

Have a great day!

0 项奖励
回复

706 次查看
Hasan_01
Contributor I

How do i enbale MIPI CSI Cam IMX219 on Karo QS8M-MQOO Qbase2.

Can you please guide me where to start for enabling MIPI CSI camera..

 

This is what I found while checking list-devices:

v4l2-ctl --list-devices
i.MX6S_CSI (platform:32e20000.csi1_bridge):
/dev/video0

USB Camera: USB Camera (usb-ci_hdrc.1-1.1):
/dev/video1
/dev/video2
/dev/media0

0 项奖励
回复

695 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @Hasan_01

For MIPI CSI enablement you can based on the following community article:
How to set up camera Dart BCON Basler for iMX8MPlus on Embedded Linux - NXP Community

However, for further information you may need to contact with Karo Electronics support.

Have a great day!

0 项奖励
回复

745 次查看
Hasan_01
Contributor I

As you mention for using HW acceleration, this is what i found in the provided i.MX 8 gstreamer user guide

1. The i.MX 8M Quad EVK and i.MX 8M Nano EVK do not have HW Accelerated encode support.
2.This pipeline does not work with the i.MX 8M Nano EVK because it does not have the
imxcompositor_g2d plugin support.

This is my gst pipeline where, I used Theoraenc .


gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! videoconvert ! videorate ! video/x-raw,framerate=5/1 ! theoraenc bitrate=1000 keyframe-force=30 drop-frames=true ! oggmux ! udpsink host=192.168.1.114 port=4000 sync=false



Can you provide me the updated pipeline in such a way that, I will able to get livestream without delay.

0 项奖励
回复

759 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @Hasan_01

Thank you for contacting NXP Support.

Usually, a low performance with a USB camera is expected due to limited bandwidth, but you can start decreasing the framerate and resolution to acquire best performance.
If this doesn't work, please have a look to the following documentation, you can try using a HW acceleration plugin to improve the performance:
i.MX 8 GStreamer User Guide - NXP Community

Have a great day!

0 项奖励
回复