Raspberry - gst-rtsp-server

Dayle Hogg dayle at cygnusconnect.com
Mon Dec 11 02:19:13 UTC 2017


Hi,

I'm anything but an expert on GStreamer, but I've managed to make something work similar to what you are doing and might be able to help.  

Is the problem that it works fine with x264enc on a Pi, but fails when you try to use omxh264enc?  If that is the case, the issue might have to do more with how you have installed the libraries responsible for implementing the GPU on the Pi.

A simple test to isolate the problem.  On a Raspberry Pi3, running Stretch and Gstreamer 1.12.3 the first line with x264enc uses about 24% of the CPU (an entire core), while with omxh264enc it uses about 4% of the cpu.  Do you get similar results?

gst-launch-1.0 videotestsrc is-live=true ! x264enc ! mpegtsmux ! hlssink
gst-launch-1.0 videotestsrc is-live=true ! omxh264enc ! mpegtsmux ! hlssink

Cheers,

Dayle

-----Original Message-----
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of horai
Sent: Saturday, December 9, 2017 3:41 PM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: Raspberry - gst-rtsp-server

Just to note:

Actually, what I am trying to do is to implement this pattern of a server/client pipelines into gst-rtsp-server. Both pipelines are running on the same Raspberry Pi Zero just for testing purposes. The server is done very simply since I am using the enclosed examples written by the gods of gstreamer. Maybe the problem is that I am not following the right way of implementing the pipelines but on Ubuntu 14.04 and different hardware it works properly! BUT if I change omx encoding codec omxh264enc to x264enc, the entire server and client start to cooperate and I see window with video opened! I really really really don't understand what is going on here, why changing encoding codec at that point helps. it's just a different (this case not hardware encoding way) way of encoding, right?
If anyone could help me, I would be very grateful since I cannot use x264enc, it's just way too much slow, i really need omxh264enc and I am going slighly mad


Server:
gst-launch-1.0 v4l2src device=/dev/video0 !
video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! 
omxh264enc ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=8554


Gst-rtsp-server side:
./test-launch  "( v4l2src device=/dev/video0 !
video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! x264enc !
h264parse ! rtph264pay name=pay0 pt=96 )"

Client:
gst-launch-1.0 -v udpsrc port=8554 caps="application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" !
rtph264depay ! h264parse ! oxmh264dec ! videoconvert ! autovideosink

Gst-rts-client side:
gst-launch-1.0 rtspsrc location="rtsp://localhost:8554/test" latency=0 !
rtph264depay ! h264parse ! omxh264dec ! videoconvert ! autovideosink




--
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



More information about the gstreamer-devel mailing list