<div dir="auto"><div>Hi,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 16 avr. 2021 16 h 15, marininpa <<a href="mailto:marininpa@mail.ru" target="_blank" rel="noreferrer">marininpa@mail.ru</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I have a task to transmit a video stream from a USB WEB camera (Logitech<br>
C270) over the RTP protocol. The WEB camera is connected to the Raspberry<br>
pi. I'm using pipeline " gst-launch-1.0 v4l2src device=/dev/video0 !<br>
'image/jpeg,width=1280,height=720, framerate=30/1' ! rtpjpegpay ! udpsink<br>
host=127.0.0.1 port=5602 sync=false", but in this case I get too high<br>
bitrate, 12-13 Mbit. How to transform the pipeline to reduce the bitrate to<br>
1.5-2 Mbit and not to load the Raspberry pi processor too much?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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):</div><div dir="auto"><br></div><div dir="auto">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 ...</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a> hi<br>
</blockquote></div></div></div>