Raspbian + libgstreamer + stvideo and non-1080p src
Raspbian + libgstreamer + stvideo and non-1080p src
Hi 4kopen community,
I've been working with GStreamer on the 4kopen board for a while now and am struggling to get the stvideo element to work with being fed an rtspsrc stream that isn't 1080p. I've discovered that the decoder seems to prefer the src side to be 1080p (or 1088).
I've managed to get some life out of using a gst-launch string with the individual elements as well as using playbin3. Both from the command line and in test code.
When it works, it doesn't appear to be using hw acceleration as the cpu usage is near 50% as opposed to < 5% when the src resolution is 1080p.
We are working with several cameras of various resolutions and frame rates, so only being limited to 1080p is a show stopper for us. Example: some of the cameras only go up to 720p x 15fps.
Any tips on getting stvideo to work with non-1080p rtsp cameras?
Thanks,
- Doug
"Nothing is impossible if ImPossible"
I've been working with GStreamer on the 4kopen board for a while now and am struggling to get the stvideo element to work with being fed an rtspsrc stream that isn't 1080p. I've discovered that the decoder seems to prefer the src side to be 1080p (or 1088).
I've managed to get some life out of using a gst-launch string with the individual elements as well as using playbin3. Both from the command line and in test code.
When it works, it doesn't appear to be using hw acceleration as the cpu usage is near 50% as opposed to < 5% when the src resolution is 1080p.
We are working with several cameras of various resolutions and frame rates, so only being limited to 1080p is a show stopper for us. Example: some of the cameras only go up to 720p x 15fps.
Any tips on getting stvideo to work with non-1080p rtsp cameras?
Thanks,
- Doug
"Nothing is impossible if ImPossible"
Re: Raspbian + libgstreamer + stvideo and non-1080p src
I have uploaded the updated GStreamer and attached it to this message.
To install you need to remove existing gstreamer and plugins
sudo apt-get remove gstreamer1.0
sudo apt-get remove gstreamer-1.0
Then install the tar file:
sudo tar -C / -axf gstreamer-1.14.2.tar.gz
The check all ok:
gst-launch-1.0 --version
Cheers
Re: Raspbian + libgstreamer + stvideo and non-1080p src
Thanks Matt!
I'll give it a try.
I forgot to mention that I'm using a compiled GStreamer 1.17 off the master branch. apt-get remove won't take care of it, but I know to remove the /usr/lib/libgst* /usr/lib/gstreamer-1.0/* and corresponding /usr/local/lib files. And ~/.cache/gstreamer-1.0
Take care,
- Doug
"Nothing is impossible if ImPossible"
I'll give it a try.
I forgot to mention that I'm using a compiled GStreamer 1.17 off the master branch. apt-get remove won't take care of it, but I know to remove the /usr/lib/libgst* /usr/lib/gstreamer-1.0/* and corresponding /usr/local/lib files. And ~/.cache/gstreamer-1.0
Take care,
- Doug
"Nothing is impossible if ImPossible"
Re: Raspbian + libgstreamer + stvideo and non-1080p src
The 1.14.2 libs work. CPU usage is ~ 7% with software base mjpeg transcoding added to the pipeline.
Just FYI, there isn't a /usr/lib/gstreamer-1.0/libgstudp.so shared lib, so can't use udp in the rtspsrc element.
Here's the launch command I used streaming from a TP-Link NC-230 720p wifi cam:
gst-launch-1.0 rtspsrc location='rtsp://admin:admin@192.168.1.238:554/h264_hd.sdp' user-id=admin user-pw=admin protocols=tcp ! rtph264depay ! h264parse ! stvideo ! videoconvert ! video/x-raw,format=I420 ! avenc_mjpeg ! filesink location=/mnt/dvr/4kopen/nc230.decoded
A good way to wrap up the week ; )
- Doug
Just FYI, there isn't a /usr/lib/gstreamer-1.0/libgstudp.so shared lib, so can't use udp in the rtspsrc element.
Here's the launch command I used streaming from a TP-Link NC-230 720p wifi cam:
gst-launch-1.0 rtspsrc location='rtsp://admin:admin@192.168.1.238:554/h264_hd.sdp' user-id=admin user-pw=admin protocols=tcp ! rtph264depay ! h264parse ! stvideo ! videoconvert ! video/x-raw,format=I420 ! avenc_mjpeg ! filesink location=/mnt/dvr/4kopen/nc230.decoded
A good way to wrap up the week ; )
- Doug