RSPI 4 and Cam streaming

DejanCotra dejancotra at gmail.com
Fri Aug 28 10:39:51 UTC 2020


hi Nicolas,

Thanks for response I will check out things that you mentioned.

I have one more question if you maybe have some hint it would be great.

Im using RSPi 4 and Gstremer 1.16.2 to stream mic and camera over webrtc.

Other peer is Windows 10 java application with Gstremer 1.16.2 bindings.

So when I use pipeline with x264enc :
v4l2src device=/dev/video0 ! video/x-raw, format=(string)YUY2,
width=(int)640, height=(int)480 ! videoconvert ! queue ! x264enc bitrate=600
speed-preset=ultrafast tune=zerolatency key-int-max=15 !
video/x-h264,profile=constrained-baseline ! h264parse ! rtph264pay
config-interval=-1 name=payloader ! queue ! " RTP_CAPS_H264 "96

appsrc name=audiosrc format=3 is-live=1 do-timestamp=1
caps=audio/x-raw,channels=1,rate=16000,format=S16LE,layout=interleaved !
audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! queue ! "
RTP_CAPS_OPUS "97

In my Windows app I can see video and hear sound just fine.

however when I change video part of pipeline to use HW encoder:
v4l2src device=/dev/video0 ! video/x-raw, format=(string)YUY2,
width=(int)640, height=(int)480 ! queue ! v4l2convert ! queue ! v4l2h264enc
! video/x-h264,profile=constrained-baseline ! h264parse ! rtph264pay
config-interval=-1 name=payloader ! queue ! " RTP_CAPS_H264 "96

So basically I change videoconvert to v4l2convert and x264enc to
v4l2h264enc. In my Windows app I never receive incoming stream for video,
audio works just fine.
I even try to play around with extra-controls for v4l2h264enc
(extra-controls=s,video_bitrate=600,h264_i_frame_period=15,h264_profile=1,h264_level=10)
but nothing seems to help.

Dejan





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list