FDH2 / UxPlay

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

Required gstreamer plugin 'libav' not found (Follow up to [FDH2/UxPlay] UxPlay 1.62 (Discussion #172)) #173

Closed IInatas closed 1 year ago

IInatas commented 1 year ago

Thanks for your reply and a big sorry for posting in the wrong channel.

I tried uxplay and got this error:

UxPlay 1.62: An Open-Source AirPlay mirroring and audio-streaming server. Required gstreamer plugin 'libav' not found Missing plugin is contained in '[GStreamer 1.x]-libav'

next I searched for libav which is installed under /usr/lib/gstreamer-1.0/libgstlibav.so by package gst-libav 1.20.5-1

I read that vaapi might be a problem - so I deleted it and recompiled uxplay, but no success eigther.

regards, Marcus

fduncanh commented 1 year ago

Its working for me on latest Manjaro. (are you on X86_64 or arm (R Pi?))

does gst-inspect-1.0 libav show it is available for gstreamer?

gst-inspect-1.0 libav | grep avdec                  
  avdec_4xm: libav 4X Movie decoder
  avdec_8bps: libav QuickTime 8BPS video decoder
  avdec_8svx_exp: libav 8SVX exponential decoder
  avdec_8svx_fib: libav 8SVX fibonacci decoder
  avdec_aac: libav AAC (Advanced Audio Coding) decoder
  avdec_aac_fixed: libav AAC (Advanced Audio Coding) decoder
  avdec_aac_latm: libav AAC LATM (Advanced Audio Coding LATM syntax) decoder
<snip>

The plugins you need are:

pacman -Qi gst-libav                  
Name            : gst-libav
Version         : 1.20.5-1
Description     : Multimedia graph framework - libav plugin
Architecture    : x86_64
URL             : https://gstreamer.freedesktop.org/
Licenses        : LGPL
Groups          : None
Provides        : gst-ffmpeg=1.20.5
Depends On      : gst-plugins-base-libs=1.20.5  bzip2  ffmpeg
Optional Deps   : None
Required By     : uxplay
Optional For    : phonon-qt5-gstreamer  qt5-multimedia  webkit2gtk  webkit2gtk-4.1
Conflicts With  : None
Replaces        : None
Installed Size  : 234.48 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 20 Dec 2022 02:35:47 AM EST
Install Date    : Mon 26 Dec 2022 05:28:57 PM EST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
IInatas commented 1 year ago

Thanks for the kind support - I got it up and running :-) I am using the latest Manjaro (X86_64) gst-inspect-1.0 libav showed it was unavailable for gstreamer, even though pacman -Qi gst-libav showed the identical version as yours.

A simple reinstall didn't worked. I had to remove almost all gst-XX plugins - reboot (sick nightmares return) - then reinstall all needed gst-xx plugins and finally gst-inspect-1.0 libav could find something. Then recompiled uxplay and it worked smoothly again.

regards, Marcus

IInatas commented 1 year ago

Sorry to bother you - I have a different problem now. While typing, the IPad went to sleep and the connection to uxplay was lost. When I run uxplay now, it connects to the IPad, but then I get the following error: uxplay -nc -vs ximagesink

UxPlay 1.62: An Open-Source AirPlay mirroring and audio-streaming server. using system MAC address .... Initialized server socket(s) Accepted IPv4 client on socket 32 Local: 192.168.178.37 Remote: 192.168.178.39 Client identified as User-Agent: AirPlay/670.6.2 Accepted IPv4 client on socket 34 Local: 192.168.178.37 Remote: 192.168.178.39 raop_rtp_mirror starting mirroring Begin streaming to GStreamer video pipeline X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 20 (X_GetProperty) Resource id in failed request: 0x8000002 Serial number of failed request: 2719 Current serial number in output stream: 2719

I am on KDE Plasma and X : update : using uxplay -vs vaapisink works.

regards, Marcus

p.s.: uxplay -d last lines are

raop_rtp_mirror accepting client raop_rtp_mirror: unidentified extra header data 183.000000, 0.000000 begin video stream wxh = 1554x1080; source 1554x1080 raop_rtp_mirror width_source = 1554.000000 height_source = 1080.000000 width = 1554.000000 height = 1080.000000 raop_rtp_mirror: sps/pps header size = 6 raop_rtp_mirror h264 sps/pps header: 01 64 00 28 ff e1

raop_rtp_mirror sps size = 18 raop_rtp_mirror h264 Sequence Parameter Set: 27 64 00 28 ac 13 14 50 18 80 89 e2 25 9b 80 80 80 81

raop_rtp_mirror pps size = 4 raop_rtp_mirror h264 Picture Parameter Set: 28 ee 3c b0

remainder size = 4 remainder of sps+pps packet: 02 00 00 00

raop_rtp video: now = 1674493954.664557, ntp = 1674493954.688393, latency = -0.023836 nalu_type = 5, nalu_size = 8112, processed bytes 8116, payloadsize = 8116 nalus_count = 1 Begin streaming to GStreamer video pipeline Looking for X11 UxPlay Window, attempt 1 raop_rtp video: now = 1674493954.679612, ntp = 1674493954.738389, latency = -0.058777 Looking for X11 UxPlay Window, attempt 2 raop_rtp video: now = 1674493954.692129, ntp = 1674493954.771720, latency = -0.079591 Looking for X11 UxPlay Window, attempt 3 raop_rtp video: now = 1674493954.708123, ntp = 1674493954.805051, latency = -0.096928 Looking for X11 UxPlay Window, attempt 4 raop_rtp video: now = 1674493954.735871, ntp = 1674493954.838382, latency = -0.102511 Looking for X11 UxPlay Window, attempt 5 X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 20 (X_GetProperty) Resource id in failed request: 0x8000002 Serial number of failed request: 2719 Current serial number in output stream: 2719

fduncanh commented 1 year ago

This below is something added in uxplay-1.62. It was supposed to stop needless searches for the X11 window if default (autovideosink) selected something non-X11

I will need to see if this new code has broken something. @IInatas

please test with -vs xvimagesink -vs glimagesink -vs ximagesink <-----this is what failed, I think -vs gtksink -vs autovideosink

and report which of these work and dont work for you Thanks

Begin streaming to GStreamer video pipeline
Looking for X11 UxPlay Window, attempt 1
Looking for X11 UxPlay Window, attempt 2
Looking for X11 UxPlay Window, attempt 3
Looking for X11 UxPlay Window, attempt 4
Looking for X11 UxPlay Window, attempt 5
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 20 (X_GetProperty)
Resource id in failed request: 0x8000002
Serial number of failed request: 2719
Current serial number in output stream: 2719
IInatas commented 1 year ago

My success with the various parameters:

I don't know what changed in the last two hours? I tried uxplay -vs ximagesink and uxplay several times last time and they always failed. This time I tried the other options first, maybe that changed something, because before the IPad went to sleep it worked fine with uxplay.

regards, Marcus

p.s.

fduncanh commented 1 year ago

sounds good.

Is this issue ready for closing?

IInatas commented 1 year ago

For me this issue is solved - thank you for your kind support.

IInatas commented 1 year ago

P.P.S: The problem that uxplay does not start has reappeared:

UxPlay 1.62: An Open-Source AirPlay mirroring and audio-streaming server. Required gstreamer plugin 'libav' not found Missing plugin is contained in '[GStreamer 1.x]-libav' stopping

It is clearly a problem with gstreamer in combination with uxplay, but I could not find the cause. ... but, a workaround on nvidia developer that works. rm -rf ~/.cache/gstreamer-1.0/ Maybe it's a problem with nvidia lib's, but I have no way to check.

HTH, Marcus