Logitech C270 to RTP

Nicolas Dufresne nicolas at ndufresne.ca
Sat Apr 17 12:52:50 UTC 2021


Hi,

Le ven. 16 avr. 2021 16 h 15, marininpa <marininpa at mail.ru> a écrit :

> Hi, I have a task to transmit a video stream from a USB WEB camera
> (Logitech
> C270) over the RTP protocol. The WEB camera is connected to the Raspberry
> pi. I'm using pipeline " gst-launch-1.0 v4l2src device=/dev/video0 !
> 'image/jpeg,width=1280,height=720, framerate=30/1' ! rtpjpegpay ! udpsink
> host=127.0.0.1 port=5602 sync=false", but in this case I get too high
> bitrate, 12-13 Mbit. How to transform the pipeline to reduce the bitrate to
> 1.5-2 Mbit and not to load the Raspberry pi processor too much?
>

The RPi has an h264 encoder capable of that. On very old RPi, you can use
omxh264enc, on newest PI and distribution, the encoder is v4l2h264enc. An
example pipeline would be (untested):

gst-launch-1.0 v4l2src ! jpegparse ! v4l2jpegdec ! queue ! v4l2h264enc
output-io-mode=dmabuf-import extra-controls=s,bitrate=1500000 !
video/x-h264,profile=constrained-baseline,level=4 ! rtph264pay ...

I'm not sure if RPi jpeg decoder actually works, and if dmabuf-import works
on this platform, je replace with software decoder and no import if it
fails. The h264 level probably need to be constrained to the
rate/resolution, I know this driver does not take care and will happily
fail instead.


>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel hi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210417/fbe80387/attachment.htm>


More information about the gstreamer-devel mailing list