FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.53k stars 78 forks source link

gstreamer-gl needed but not installed. (the "bufferpool " message can be ignored) (was: CRITICAL : gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed ) #283

Closed fduraibi closed 5 months ago

fduraibi commented 5 months ago

I am trying to run uxplay on the latest Raspberry Pi OS (bookworm) on a Rasbperry Pi 3B, compiled from source 1.68.2, since it comes with an older version that also doesn't work.

All packages are updated to the latest and GStreamer is ver 1.22

when running it I get this error:

$ GST_DEBUG=3 uxplay

0:00:00.005449935  6925  0x1256280 WARN         GST_PERFORMANCE gstbuffer.c:501:_priv_gst_buffer_initialize: No 64-bit atomic int defined for this platform/toolchain!
0:00:01.454874897  6925  0x14bf290 FIXME                default gstutils.c:4031:gst_pad_create_stream_id_internal:<video_source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:01.542100154  6925  0x14bf258 WARN                    v4l2 gstv4l2object.c:3228:gst_v4l2_object_reset_compose_region:<v4l2h264dec0:sink> Failed to get default compose rectangle with VIDIOC_G_SELECTION: Invalid argument

** (uxplay:6925): CRITICAL **: 18:41:22.671: gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed
0:00:30.145268020  6925  0x14bf258 WARN                    v4l2 gstv4l2object.c:3228:gst_v4l2_object_reset_compose_region:<v4l2h264dec0:sink> Failed to get default compose rectangle with VIDIOC_G_SELECTION: Invalid argument
0:00:30.150400195  6925  0x14bf258 WARN                    v4l2 gstv4l2object.c:2255:gst_v4l2_object_get_streamparm:<v4l2h264dec0:src> VIDIOC_G_PARM failed
0:00:30.169979939  6925  0x14bf258 WARN            v4l2videodec gstv4l2videodec.c:1046:gst_v4l2_video_dec_decide_allocation:<v4l2h264dec0> Duration invalid, not setting latency
0:00:30.507833288  6925  0x14bf998 WARN                    v4l2 gstv4l2object.c:2255:gst_v4l2_object_get_streamparm:<v4l2h264dec0:src> VIDIOC_G_PARM failed
0:00:30.516479360  6925  0x14bf998 WARN            v4l2videodec gstv4l2videodec.c:1046:gst_v4l2_video_dec_decide_allocation:<v4l2h264dec0> Duration invalid, not setting latency
0:00:30.527707146  6925  0x14bf998 WARN            kmsallocator gstkmsallocator.c:526:gst_kms_allocator_dmabuf_import:<KMSMemory::allocator> Failed to close GEM handle: Invalid argument 22
0:00:30.528438238  6925  0x14bf998 WARN                 kmssink gstkmssink.c:2032:gst_kms_sink_show_frame:<video_sink-actual-sink-kms> error: drmModeSetPlane failed: Permission denied (13)
0:00:31.888520414  6925  0x14bf300 FIXME                default gstutils.c:4031:gst_pad_create_stream_id_internal:<video_source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:31.909328644  6925  0x14bf998 WARN                    v4l2 gstv4l2object.c:3228:gst_v4l2_object_reset_compose_region:<v4l2h264dec1:sink> Failed to get default compose rectangle with VIDIOC_G_SELECTION: Invalid argument
UxPlay 1.68: An Open-Source AirPlay mirroring and audio-streaming server.
using system MAC address b8:27:eb:2a:ae:8f
Initialized server socket(s)
Accepted IPv4 client on socket 33
Local: 10.1.1.4
Remote: 10.1.1.9
connection request from Fahad (iPhone15,3) with deviceID = 11:11:11:11:11:11

Client identified as User-Agent: AirPlay/760.20.1
Accepted IPv4 client on socket 35
Local: 10.1.1.4
Remote: 10.1.1.9
raop_rtp_mirror starting mirroring
Begin streaming to GStreamer video pipeline
GStreamer error: GStreamer encountered a general resource error.
Removing connection for socket 33
raop_rtp_mirror->running is no longer true
Removing connection for socket 35
Initialized server socket(s)
fduncanh commented 5 months ago

(uxplay:6925): CRITICAL : 18:41:22.671: gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed

This is noise ("spam") from gstreamer, I get it too. It can be ignored

Begin streaming to GStreamer video pipeline GStreamer error: GStreamer encountered a general resource error. Removing connection for socket 33 raop_rtp_mirror->running is no longer true Removing connection for socket 35 Initialized server socket(s)

This is a real error

You are using kmssink. I suppose this is bookworm "lite" in the Pi 3B. ? Please confirm.

We have a pi 3b+ for testing. I'll need to test with bookworm lite to see if your issue is replicated.

EDIT: Tested on Pi 3B+, with updated R PI OS bookworm, uxplay 1.68.2 worked fine here

fduncanh commented 5 months ago

@fduraibi Something on your system is not installed, or misconfigured. probably gstreamer. cant tell from what you posted. (its NOT the "bufferpool" thing)

Post a complete output of uxplay -d

fduraibi commented 5 months ago

You are using kmssink. I suppose this is bookworm "lite" in the Pi 3B. ? Please confirm

Not the lite version nor the full, rather the one with GUI "Raspberry Pi OS with desktop" (freshly installed and updated) (the download link)

Something on your system is not installed, or misconfigured.

I installed gstreamer1.0-gl and it solved the issue

XuluWarrior commented 1 week ago

This issue is marked as closed but as far as I can tell gstreamer-gl is still required (I got the same error after just installing) and it's not mentioned in the installation instructions. (Unless I'm mistaken)

fduncanh commented 1 week ago

will add to installation instructions if needed. Thanks for pointing this out!

fduncanh commented 1 week ago

The README does mention the gstreamer1.0-gl plugin. Does this need to be emphasized more? (or mentioned in troubleshooting section?)

Next install the GStreamer plugins that are needed with sudo apt install gstreamer1.0-\<plugin>. Values of required are:

"plugins-base"
"libav" (for sound),
"plugins-good" (for v4l2 hardware h264 decoding)
"plugins-bad" (for h264 decoding).

Plugins that may also be needed include "gl" for OpenGL support (this provides the "-vs glimagesink" videosink, which can be very useful in many systems, and should always be used when using h264 decoding by a NVIDIA GPU)

XuluWarrior commented 1 week ago

You are right, it is mentioned and I had missed it.

To be honest I'm pretty ignorant at Linux video configurations and am rather overwhelmed with the existing README. I did my best to apply the "these are required" and then got lost with all the "you might need these". Without this GitHub issue, I would never have guessed from the error messages that gl was missing.

From a very selfish perspective, it would be great if there was a simple, "if you have a stock Raspberry Pi installation, do this" instruction list somewhere.