Skip to content
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

AirPlay broken with CACHE_BUFFER_MODE_REMOTE #19795

Closed
1 of 7 tasks
jszinger opened this issue May 24, 2021 · 10 comments · Fixed by #20103
Closed
1 of 7 tasks

AirPlay broken with CACHE_BUFFER_MODE_REMOTE #19795

jszinger opened this issue May 24, 2021 · 10 comments · Fixed by #20103
Labels
Resolution: Fixed issue was resolved by a code change Triage: Confirmed issue has been reproduced by a team member v19 Matrix v20 Nexus

Comments

@jszinger
Copy link

Bug report

Describe the bug

AirPlay no longer works on 19.1. It worked on 19.0.

Expected Behavior

  • Apple Music (on a Mac) can stream audio through Kodi
  • Kodi produces sound and visually indicates that it is playing

Actual Behavior

No audio or visual feedback from Kodi. Apple Music indicates that it is playing.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

<-- Put your text below this line -->
0. Install Kodi 19.1 and verify that audio work by playing some local music

  1. Enable Airplay in Kodi preferences
  2. Select Kodi as the audio destination in Apple Music
  3. Play music and enjoy the silence
  4. Downgrade to 19.0 and enjoy the music

Debuglog

The debuglog can be found here:

Log from Kodi 19.1

021-05-24 10:03:34.398 T:17467    INFO <general>: AIRTUNES: Accepted IPv4 client on socket 15
2021-05-24 10:03:34.399 T:17467    INFO <general>: AIRTUNES: Local: 192.168.1.171
2021-05-24 10:03:34.399 T:17467    INFO <general>: AIRTUNES: Remote: 192.168.1.153
2021-05-24 10:03:34.445 T:17467    INFO <general>: AIRTUNES: Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6001;timing_port=6002
2021-05-24 10:03:34.446 T:17467    INFO <general>: AIRTUNES: Responding with RTP/AVP/UDP;unicast;mode=record;timing_port=50126;events;control_port=44827;server_port=55350
2021-05-24 10:03:34.456 T:17467    INFO <general>: AIRTUNES: Got metadata of 1290 bytes
2021-05-24 10:03:34.463 T:17467    INFO <general>: AIRTUNES: Got image data of 260469 bytes
2021-05-24 10:03:34.574 T:17497   ERROR <general>: Init: Error creating demuxer
2021-05-24 10:03:34.575 T:17497   ERROR <general>: CAudioDecoder: Unable to Init Codec while loading file pipe://1/
2021-05-24 10:03:34.575 T:17497 WARNING <general>: PAPlayer::QueueNextFileEx - Failed to create the decoder
2021-05-24 10:03:34.582 T:17497   ERROR <general>: InputStream: Error opening, /home/jim/Videos/Penguins_of_Madagascar.m4v
2021-05-24 10:03:34.583 T:17497   ERROR <general>: InputStream: Error opening, /home/jim/Videos/Monster_High_Boo_York_Boo_York.m4v
2021-05-24 10:03:34.722 T:17496    INFO <general>: Skipped 1 duplicate messages..
2021-05-24 10:03:34.722 T:17496   ERROR <general>: InputStream: Error opening, /home/jim/Videos/Penguins_of_Madagascar.m4v
2021-05-24 10:03:34.836 T:17500   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/4a7c31a0.jpg
2021-05-24 10:03:34.836 T:17496   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/46e34668.jpg
2021-05-24 10:03:34.836 T:17497   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0026be5b.jpg
2021-05-24 10:03:34.837 T:17501   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0bcb57f1.jpg
2021-05-24 10:03:34.837 T:17501   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/2/26b34079.jpg
2021-05-24 10:03:34.837 T:17501   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/5/506a8b3b.jpg
2021-05-24 10:03:34.838 T:17501   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/1/1bcc5060.jpg
2021-05-24 10:03:47.521 T:17467    INFO <general>: AIRTUNES: Flush with RTP-Info: seq=3019;rtptime=1313862431
2021-05-24 10:03:59.043 T:17493    INFO <general>: AIRTUNES: Exiting UDP RAOP thread
2021-05-24 10:04:01.689 T:17467    INFO <general>: AIRTUNES: Connection closed for socket 15

Log from Kodi 19.0

2021-05-24 09:57:20.203 T:14494    INFO <general>: AIRTUNES: Accepted IPv4 client on socket 30
2021-05-24 09:57:20.203 T:14494    INFO <general>: AIRTUNES: Local: 192.168.1.171
2021-05-24 09:57:20.203 T:14494    INFO <general>: AIRTUNES: Remote: 192.168.1.153
2021-05-24 09:57:20.252 T:14494    INFO <general>: AIRTUNES: Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6001;timing_port=6002
2021-05-24 09:57:20.252 T:14494    INFO <general>: AIRTUNES: Responding with RTP/AVP/UDP;unicast;mode=record;timing_port=42793;events;control_port=33673;server_port=38791
2021-05-24 09:57:20.262 T:14494    INFO <general>: AIRTUNES: Got metadata of 1290 bytes
2021-05-24 09:57:20.267 T:14494    INFO <general>: AIRTUNES: Got image data of 260469 bytes
2021-05-24 09:57:20.330 T:14520    INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder pcm_s16le
2021-05-24 09:57:20.330 T:14520    INFO <general>: CDVDAudioCodecFFmpeg::GetChannelMap - FFmpeg reported 2 channels, but the layout contains 0 ignoring
2021-05-24 09:57:20.530 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/4a7c31a0.jpg
2021-05-24 09:57:20.531 T:14519   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/46e34668.jpg
2021-05-24 09:57:20.547 T:14522   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0026be5b.jpg
2021-05-24 09:57:20.581 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0bcb57f1.jpg
2021-05-24 09:57:20.582 T:14519   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/2/26b34079.jpg
2021-05-24 09:57:20.582 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/5/506a8b3b.jpg
2021-05-24 09:57:20.582 T:14519   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/1/1bcc5060.jpg
2021-05-24 09:57:20.582 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/7/7d129cb3.jpg
2021-05-24 09:57:20.583 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/f/fcf99199.jpg
2021-05-24 09:57:20.583 T:14523   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/3/38986531.jpg
2021-05-24 09:57:22.051 T:14520    INFO <general>: AudioDecoder: File is queued
2021-05-24 09:57:22.108 T:14520    INFO <general>: PAPlayer::PrepareStream - Ready
2021-05-24 09:57:22.459 T:14412    INFO <general>: Loading skin file: MusicVisualisation.xml, load type: KEEP_IN_MEMORY
2021-05-24 09:57:39.167 T:14494    INFO <general>: AIRTUNES: Flush with RTP-Info: seq=23764;rtptime=1207690070
2021-05-24 09:57:50.689 T:14516    INFO <general>: AIRTUNES: Exiting UDP RAOP thread
2021-05-24 09:57:50.810 T:14526   ERROR <general>: CUPnPDirectory::GetResource - unable to find object folder.jpg
2021-05-24 09:57:50.991 T:14520   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/4a7c31a0.jpg
2021-05-24 09:57:50.991 T:14527   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/4/46e34668.jpg
2021-05-24 09:57:50.992 T:14529   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0026be5b.jpg
2021-05-24 09:57:50.994 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/0/0bcb57f1.jpg
2021-05-24 09:57:50.994 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/2/26b34079.jpg
2021-05-24 09:57:50.995 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/5/506a8b3b.jpg
2021-05-24 09:57:50.995 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/3/38986531.jpg
2021-05-24 09:57:50.995 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/7/7d129cb3.jpg
2021-05-24 09:57:50.995 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/e/e7d19ce1.jpg
2021-05-24 09:57:50.996 T:14526   ERROR <general>: DoWork - Direct texture file loading failed for special://masterprofile/Thumbnails/1/1bcc5060.jpg
2021-05-24 09:57:53.300 T:14494    INFO <general>: AIRTUNES: Connection closed for socket 30

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Others seem to have the same problem:
https://forum.kodi.tv/showthread.php?tid=362685
https://archlinuxarm.org/forum/viewtopic.php?t=15349&p=66614

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: Fedora 34

  • Kodi version: 19.1 kodi-19.1-1.fc34.x86_64 from RPM Fusion

    • works with kodi-19.0-3.fc34.x86_64, same settings

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label May 24, 2021
@basilgello
Copy link
Collaborator

The shairplay library used by Kodi hasn't been updated for long time. Does plain downgrade of Kodi to 19.0 resolve the issue?

@jszinger
Copy link
Author

Yes, a downgrade to kodi-19.0-3.fc34.x86_64 solves the issue.

@basilgello
Copy link
Collaborator

I wonder why Kodi fails to create a demuxer. Can you please post full debug log with all ffmpeg debug info etc (with redacted IP info, passwords etc)?

@enen92 enen92 added Triage: Confirmed issue has been reproduced by a team member and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Jul 4, 2021
@enen92
Copy link
Member

enen92 commented Jul 4, 2021

I can confirm this issue. The offending commit is: 493c045

@arnova any ideas?

@DaVukovic
Copy link
Member

Well, if this commit is causing the crash, isn't one simply able to change the default at the advancedsettings.xml to get the old behavior back again?

@jszinger
Copy link
Author

jszinger commented Aug 24, 2021

Thanks. I created the following advancedsettings.xml and I now get sound again with 19.1. It seems that AirPlay is losing the audio somehow with CACHE_BUFFER_MODE_REMOTE. Probably a long-dormant bug.

<advancedsettings>
  <cache>
    <!-- disable cache for AirPlay: 0=internet, default=4=all remote -->
    <buffermode>0</buffermode>
  </cache>
</advancedsettings> 

@jszinger jszinger changed the title AirPlay broken on 19.1 AirPlay broken with CACHE_BUFFER_MODE_REMOTE Aug 24, 2021
@kapusticka
Copy link

Hi. Where is located file advancedsettings.xml ?

@arnova
Copy link
Member

arnova commented Sep 3, 2021

Some

I can confirm this issue. The offending commit is: 493c045

@arnova any ideas?

Can someone please provide a full(!) debug log? It would be nice to actually find the root cause and the commit mentioned is not the actual root cause.

@arnova
Copy link
Member

arnova commented Sep 3, 2021

#20103 probably fixes this. Would be great if someone could test it.

arnova added a commit to arnova/xbmc that referenced this issue Sep 4, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 4, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 5, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 5, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 20, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 20, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Sep 20, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Oct 2, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit that referenced this issue Oct 2, 2021
fixed: Instead of determining if something is remote, we should determine if it's a network filesystem (should fix AirPlay issue #19795)
arnova added a commit to arnova/xbmc that referenced this issue Oct 5, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
arnova added a commit to arnova/xbmc that referenced this issue Oct 5, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
graysky2 pushed a commit to graysky2/xbmc that referenced this issue Oct 23, 2021
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
@DaveTBlake DaveTBlake added the Resolution: Fixed issue was resolved by a code change label Oct 24, 2021
srg70 added a commit to srg70/xbmc that referenced this issue Nov 2, 2021
* upstream-Matrix:
  [docs] add build dependency libunistring-dev to README.Linux.md
  Update gh-action-weblate-upload.yml for Matrix
  allow override of default player by inputstream add-ons
  Add RISC-V support to system info
  [addons] fix sorting and avoid crash due to non-deterministic comparison
  Bump to 19.3 final
  [Xbox] Changed 'expandedResources' to 'hevcPlayback'
  update SSL CA trust store
  [Fix] Reworked TrueHD MAT packer to support high bitrate Atmos streams (fix audio dropouts)
  [Playlist] dont use istream directly to a tinyxml structure
  Fix episode thumbs still showing Spoiler Overlay after being watched xbmc#15296
  fixed: Instead of determining if something is remote, we should determine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
@avephill
Copy link

avephill commented Mar 1, 2022

Hi. Where is located file advancedsettings.xml ?

In my LibreElec 10 OS it was in /usr/share/kodi/system/advancedsettings.xml but this was read only. So I copied it to /storage/.kodi/userdata/advancedsettings.xml, made the changes detailed by jszinger, and it worked!

joseluismarti pushed a commit to joseluismarti/xbmc that referenced this issue Apr 15, 2022
…mine if it's a network filesystem (should fix AirPlay issue xbmc#19795)
ksooo added a commit to ksooo/xbmc that referenced this issue Nov 4, 2023
…ld determine if it's a network filesystem (should fix AirPlay issue xbmc#19795)"

This reverts commit 546d67e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Fixed issue was resolved by a code change Triage: Confirmed issue has been reproduced by a team member v19 Matrix v20 Nexus
Projects
None yet
9 participants