-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help users configure GStreamer #3964
Comments
To follow up on the referenced ticket, I confirm that Gstreamer VAAPI is failing on AMDGPU (using 5825U with Renoir/Barcelo Graphics) on any distribution I tested (Ubuntu 22.04, 22.04, 23.10 and Fedora 38). Issue occurs with both open source and "pro" version of the driver, on kernel 6.2, 6.4 and 6.5 version. FFMPEG is working fine to convert video with VAAPI using command line so it is unfortunate it is not available for XPRA (anyway even with previous version it did not work with xpra because it was detected as "h264+mp4" rather than just "h264" so it was not being used by XPRA). |
No, I am aware that codecs are not included in Fedora anymore, I enabled all codecs by installing from rpmfusion (and even tried compiling mesa/gstreamer manually). Codecs are properly detected by vainfo, and can be used for video encoding using ffmpeg VAAPi hardware acceleration successfully (5 times quicker than CPU encoding, so it definitely works). Running "xpra video" causes a ring vcn_enc0 timeout and reset the GPU same as #3843. It seems that xpra is using some gstreamer parameters that amdgpu vaapi does not like. |
@ehfd / @belotv One of the key things that we do different in xpra is that we try to tune the video encoders dynamically to adapt to the content, client performance and to the bandwidth available. |
Yes not very practical to reset the GPU when an encoding fails, however I guess they had no other option as they cannot guarantee the operations after the ring has failed. I may try to debug that over the next 2 months if I have time (but it is unlikely I will). Unrelated but you added amf encoding for Gstreamer for Linux only, which does not make sense 😊. The gstreamer implementation of AMF is Windows only as it relies on d3d11 (https://github.com/GStreamer/gstreamer/blob/57bfbf51b2ca8a82d04070a1445ece3ee14077e0/subprojects/gst-plugins-bad/sys/amfcodec/meson.build#L10) |
|
|
Ah, I meant
|
No one is making you run this tool. |
No, ofc not 😅 Should we then ... disable gstreamer when connecting? 2023-11-11 22:15:40,676 Error setting up the pipeline:
2023-11-11 22:15:40,676 gst_parse_error: could not link decoder to sink (3)
2023-11-11 22:15:40,676 GStreamer pipeline for:
2023-11-11 22:15:40,676 appsrc name=src emit-signals=1 block=0 is-live=1 do-timestamp=1 stream-type=0 format=2 caps=video/x-h264,width=128,height=128,profile=(string)main,stream-format=(string)byte-stream,alignment=(string)au ! \
2023-11-11 22:15:40,677 d3d11h264dec name=decoder ! \
2023-11-11 22:15:40,677 appsink name=sink emit-signals=1 max-buffers=10 drop=false sync=false async=true qos=false caps=video/x-raw,width=128,height=128,format=(string)I420
2023-11-11 22:15:40,677 Error creating context h264 128x128 YUV420P
2023-11-11 22:15:40,677 gstreamer: h264 decoding failed: failed to setup gstreamer pipeline that interface with each other 😕 |
Not yet! |
gstreamer produces frames at a constant rate, damage is only used for constructing the frames. Since we're using this for streaming mode, we expect many changes to the pixel data and using gstreamer's damage mode to re-construct the frame from the previous one would be more costly than just getting a fresh copy
(not done yet for x11 server since we currently require encoding=stream
ie: both openh264enc and x264enc can encode h264
we need python3-gstreamer to make the gi bindings work
Worth remembering that not having
Sent to stderr... And missing encoder information in |
As of the latest commit, here's how I test desktop or monitor mode with gstreamer hardware accel (Intel only):
Then attach:
|
@totaam Do you have VA-API accelerated jpeg encode in your non-GStreamer backend? |
@ehfd no |
It could be possible to use libva to do it outside of GStreamer just like how you do it with |
|
if that's the only type of GPU accelerated encoder available and the window is one of the 'STREAM_CONTENT_TYPES', which defaults to 'desktop and 'video'
v6 will have this GUI disabled for now and we automatically enabled |
I am disabling GStreamer again following server crashes I have seen at random, and other reports - ie from IRC:
This was solved by |
One more crasher bug: #4330 (comment) Is there any configuration where even probing GStreamer is safe? |
As per #3750 (comment), #3872, #3706 and #3843.
We need a tool to help users.
This tool can test various pipelines and the user should be able to save the ones that work and offer good performance.
One major difficulty is going to be runtime management of these pipelines.
Xpra normally adjusts framerate, quality and speed to the bandwidth conditions but this is much harder to do when we don't really know what the pipeline is made of without introspecting it..
The text was updated successfully, but these errors were encountered: