Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Airport stream (from pipewire raop discover) extreme stutter
#1
Hello,

As currently under Linux the sound system seems to transition to pipewire, and my (audio) experience with pulseaudio was actually getting worse on the computer itself, I am transitioning to pipewire. However as of yet, pipewire does not support dlna. So this means I had to try something else: airplay. As moode also supports airplay, I did not expect this to be a big deal. The pc and moode are actually seeing each other on the network (pc can be either wired or wireless, the experience is the same; moode is wired).
I can stream to the moode device. However that is unfortunately where the fun ends. The stutter is extreme. I seem to be able to improve on it slightly by setting a larger buffer on either side, but even then, not even the full time period of the buffer plays without stutter (so in case of a 5 sec. buffer I get maybe 2-3 secs. without stutter).

Moode is updated to 8.3.9
The device is running on a raspberry 3B with an Audiophonics ES9028
Streaming DLNA or internet radio pose no issues.

Shairport log attached

Any ideas please?

Code:
         0.055882500 "shairport.c:2252" Startup in AirPlay 2 mode, with features 0x405fca00,0x1c340 on device "b8:27:eb:e5:81:20".
         0.000339583 "shairport.c:2291" Version String: "4.3.2-AirPlay2-smi10-libdaemon-OpenSSL-Avahi-ALSA-jack-pa-dummy-stdout-pipe-soxr-convolution-metadata-mqtt-dbus-mpris-sysconfdir:/etc"
         0.000039688 "shairport.c:2310" Command Line: "/usr/bin/shairport-sync -v -a Moode AirPlay -- -d _audioout".
         0.000589271 "shairport.c:2346" Log Verbosity is 1.
         0.000161458 "audio_alsa.c:1021" alsa: alsa_maximum_stall_time of 0.200000 sec.
         0.000099323 "audio_alsa.c:1175" alsa output rate is 44100 frames per second
         0.000072448 "audio_alsa.c:1310" alsa: disable_standby_mode is "auto".
         0.000026718 "audio_alsa.c:1314" alsa: disable_standby_mode_silence_threshold is 0.040000 seconds.
         0.000024375 "audio_alsa.c:1316" alsa: disable_standby_mode_silence_scan_interval is 0.004000 seconds.
         0.000029428 "audio_alsa.c:1356" alsa: output device name is "_audioout".
         0.000381145 "shairport.c:2394" disable_resend_requests is off.
         0.000057552 "shairport.c:2395" diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
         0.000026928 "shairport.c:2399" statistics_requester status is 0.
         0.000024010 "shairport.c:2401" daemon status is 0.
         0.000027083 "shairport.c:1567" PID file: "/run/shairport-sync/shairport-sync.pid".
         0.000022709 "shairport.c:2402" daemon pid file path is "/run/shairport-sync/shairport-sync.pid".
         0.000023177 "shairport.c:2404" rtsp listening port is 7000.
         0.000023125 "shairport.c:2405" udp base port is 6001.
         0.000024010 "shairport.c:2406" udp port range is 10.
         0.000022552 "shairport.c:2407" player name is "Moode AirPlay".
         0.000022292 "shairport.c:2408" backend is "alsa".
         0.000022239 "shairport.c:2409" run_this_before_play_begins action is "(null)".
         0.000022657 "shairport.c:2410" run_this_after_play_ends action is "(null)".
         0.000022864 "shairport.c:2411" wait-cmd status is 1.
         0.000022136 "shairport.c:2412" run_this_before_play_begins may return output is 0.
         0.000022500 "shairport.c:2413" run_this_if_an_unfixable_error_is_detected action is "(null)".
         0.000025781 "shairport.c:2415" run_this_before_entering_active_state action is  "/var/local/www/commandw/spspre.sh".
         0.000023906 "shairport.c:2417" run_this_after_exiting_active_state action is  "/var/local/www/commandw/spspost.sh".
         0.000031875 "shairport.c:2419" active_state_timeout is  10.000000 seconds.
         0.000027031 "shairport.c:2420" mdns backend "(null)".
         0.000022605 "shairport.c:2422" interpolation setting is "soxr".
         0.000025208 "shairport.c:2426" interpolation soxr_delay_threshold is 30000000.
         0.000022292 "shairport.c:2427" resync time is 0.050000 seconds.
         0.000023489 "shairport.c:2428" resync recovery time is 0.100000 seconds.
         0.000028021 "shairport.c:2429" allow a session to be interrupted: 0.
         0.000024271 "shairport.c:2430" busy timeout time is 120.
         0.000027083 "shairport.c:2431" drift tolerance is 0.002000 seconds.
         0.000023802 "shairport.c:2432" password is "(null)".
         0.000022344 "shairport.c:2433" default airplay volume is: -24.000000.
         0.000028750 "shairport.c:2434" high threshold airplay volume is: -16.000000.
         0.000026875 "shairport.c:2436" check for higher-than-threshold volume for new play session is disabled.
         0.000022083 "shairport.c:2442" ignore_volume_control is 0.
         0.000022292 "shairport.c:2446" volume_max_db is not set
         0.000022240 "shairport.c:2447" volume range in dB (zero means use the range specified by the mixer): 0.
         0.000022864 "shairport.c:2449" volume_range_combined_hardware_priority (1 means hardware mixer attenuation is used first) is 0.
         0.000023334 "shairport.c:2453" playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
         0.000083854 "shairport.c:2455" disable_synchronization is 0.
         0.000024843 "shairport.c:2456" use_mmap_if_available is 1.
         0.000022240 "shairport.c:2457" output_format automatic selection is disabled.
         0.000022865 "shairport.c:2460" output_format is "S16".
         0.000022656 "shairport.c:2461" output_rate automatic selection is disabled.
         0.000022604 "shairport.c:2464" output_rate is 44100.
         0.000022188 "shairport.c:2465" audio backend desired buffer length is 0.200000 seconds.
         0.000023489 "shairport.c:2467" audio_backend_buffer_interpolation_threshold_in_seconds is 0.120000 seconds.
         0.000023594 "shairport.c:2469" audio backend latency offset is 0.000000 seconds.
         0.000023489 "shairport.c:2471" audio backend silence lead-in time is "auto".
         0.000022396 "shairport.c:2475" zeroconf regtype is "_raop._tcp".
         0.000022448 "shairport.c:2476" decoders_supported field is 1.
         0.000022500 "shairport.c:2477" use_apple_decoder is 0.
         0.000022344 "shairport.c:2478" alsa_use_hardware_mute is 0.
         0.000022812 "shairport.c:2482" no special mdns service interface was requested.
         0.000054115 "shairport.c:2485" configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
         0.000027917 "shairport.c:2492" metadata enabled is 1.
         0.000023698 "shairport.c:2493" metadata pipename is "/tmp/shairport-sync-metadata".
         0.000022395 "shairport.c:2494" metadata socket address is "(null)" port 0.
         0.000023021 "shairport.c:2496" metadata socket packet size is "500".
         0.000031250 "shairport.c:2497" get-coverart is 1.
         0.000022657 "shairport.c:2500" mqtt is disabled.
         0.000022187 "shairport.c:2501" mqtt hostname is (null), port is 1883.
         0.000022656 "shairport.c:2502" mqtt topic is /Moode AirPlay.
         0.000022292 "shairport.c:2503" mqtt will not publish raw metadata.
         0.000022552 "shairport.c:2504" mqtt will not publish parsed metadata.
         0.000022188 "shairport.c:2505" mqtt will not publish cover Art.
         0.000022239 "shairport.c:2506" mqtt remote control is disabled.
         0.000022240 "shairport.c:2510" convolution is 0.
         0.000022396 "shairport.c:2511" convolution IR file is "(null)"
         0.000022395 "shairport.c:2512" convolution max length 8192
         0.000022865 "shairport.c:2513" convolution gain is 0.000000
         0.000023229 "shairport.c:2515" loudness is 0.
         0.000022917 "shairport.c:2516" loudness reference level is -20.000000
         0.000588021 "rtsp.c:4193" metadata pipe name is "/tmp/shairport-sync-metadata".
         0.006141198 "shairport.c:2643" NQPTP is online.
         0.013554114 "mpris-service.c:342" MPRIS service started at "org.mpris.MediaPlayer2.ShairportSync" on the system bus.
         0.003555417 "dbus-service.c:610" >> setting loudness threshold to -20.000000.
         0.000240052 "dbus-service.c:623" >> setting drift tolerance to 0.002000 seconds.
         0.000977812 "dbus-service.c:1025" >> ALACDecoder set to "hammerton"
         0.000194792 "dbus-service.c:1030" >> Active set to "false"
         0.000080990 "dbus-service.c:1043" >> disable standby mode set to "auto"
         0.000048698 "dbus-service.c:1059" >> interpolation set to "soxr"
         0.000054531 "dbus-service.c:518" >> deactivating disable standby
         0.000043854 "dbus-service.c:600" >> deactivating loudness
         0.000037812 "dbus-service.c:534" >> deactivating convolution
         0.000149167 "dbus-service.c:503" >> log verbosity set to 1.
         0.000040938 "dbus-service.c:488" >> stop logging statistics
         0.000038177 "dbus-service.c:448" >> stop including elapsed time in logs
         0.000039531 "dbus-service.c:458" >> start including delta time in logs
         0.000046667 "dbus-service.c:471" >> start including file and line in logs
         0.000094323 "dbus-service.c:1175" Shairport Sync native D-Bus service started at "org.gnome.ShairportSync" on the system bus.
        19.676521242 "rtsp.c:4543" Connection 1: Classic AirPlay connection from 2a02:8071:6141:e2e0::295:53748 to self at 2a02:8071:6141:e2e0:5529:8f24:814:3988:7000.
Event: Run spspre.sh
amixer: Invalid command!
         1.565109114 "rtp.c:962" Time ping turnaround time: 62087175705 ns -- it looks like a timing ping was lost.
         2.595080364 "player.c:2906" Large negative (i.e. early) sync error of -5445 frames (-0.123469 seconds), at frame: 326879932.
         0.184184947 "player.c:2906" Large negative (i.e. early) sync error of -2812 frames (-0.063764 seconds), at frame: 326888471.
         0.214504792 "player.c:2906" Large negative (i.e. early) sync error of -2953 frames (-0.066961 seconds), at frame: 326897664.
         0.201371354 "player.c:2906" Large negative (i.e. early) sync error of -2453 frames (-0.055624 seconds), at frame: 326906455.
         0.156876875 "player.c:2906" Large negative (i.e. early) sync error of -2333 frames (-0.052902 seconds), at frame: 326913362.
         0.183561563 "player.c:2906" Large negative (i.e. early) sync error of -2494 frames (-0.056553 seconds), at frame: 326921491.
         0.156054166 "player.c:2906" Large negative (i.e. early) sync error of -2297 frames (-0.052086 seconds), at frame: 326928366.
         0.183177969 "player.c:2906" Large negative (i.e. early) sync error of -2443 frames (-0.055397 seconds), at frame: 326936439.
         0.177051771 "player.c:2906" Large negative (i.e. early) sync error of -2281 frames (-0.051723 seconds), at frame: 326944394.
         0.216110989 "player.c:2906" Large negative (i.e. early) sync error of -2693 frames (-0.061066 seconds), at frame: 326954129.
         0.208294010 "player.c:2906" Large negative (i.e. early) sync error of -2521 frames (-0.057166 seconds), at frame: 326962939.
         0.156974219 "player.c:2906" Large negative (i.e. early) sync error of -2300 frames (-0.052154 seconds), at frame: 326969808.
         0.182343594 "player.c:2906" Large negative (i.e. early) sync error of -2454 frames (-0.055646 seconds), at frame: 326977904.
         0.163075937 "player.c:2906" Large negative (i.e. early) sync error of -2348 frames (-0.053243 seconds), at frame: 326984830.
         0.176287604 "player.c:2906" Large negative (i.e. early) sync error of -2429 frames (-0.055079 seconds), at frame: 326992891.
         0.184511771 "player.c:2906" Large negative (i.e. early) sync error of -2819 frames (-0.063923 seconds), at frame: 327001386.
         0.208841719 "player.c:2906" Large negative (i.e. early) sync error of -2898 frames (-0.065714 seconds), at frame: 327010612.
         0.207943125 "player.c:2906" Large negative (i.e. early) sync error of -2474 frames (-0.056100 seconds), at frame: 327019384.
         0.155750677 "player.c:2906" Large negative (i.e. early) sync error of -2308 frames (-0.052336 seconds), at frame: 327026271.
         0.183088333 "player.c:2906" Large negative (i.e. early) sync error of -2457 frames (-0.055714 seconds), at frame: 327034355.
         0.156165104 "player.c:2906" Large negative (i.e. early) sync error of -2320 frames (-0.052608 seconds), at frame: 327041251.
         0.183214688 "player.c:2906" Large negative (i.e. early) sync error of -2436 frames (-0.055238 seconds), at frame: 327049318.
         0.190484687 "player.c:2906" Large negative (i.e. early) sync error of -2896 frames (-0.065669 seconds), at frame: 327057900.
         0.204554114 "player.c:2906" Large negative (i.e. early) sync error of -2865 frames (-0.064966 seconds), at frame: 327067105.
         0.212941250 "player.c:2906" Large negative (i.e. early) sync error of -2413 frames (-0.054717 seconds), at frame: 327075813.
         0.154334115 "player.c:2906" Large negative (i.e. early) sync error of -2345 frames (-0.053175 seconds), at frame: 327082741.
         0.171302864 "player.c:2906" Large negative (i.e. early) sync error of -2411 frames (-0.054671 seconds), at frame: 327090789.
         0.181334011 "player.c:2906" Large negative (i.e. early) sync error of -2389 frames (-0.054172 seconds), at frame: 327097755.
         0.170988333 "player.c:2906" Large negative (i.e. early) sync error of -2376 frames (-0.053878 seconds), at frame: 327105774.
         0.198167083 "player.c:2906" Large negative (i.e. early) sync error of -2908 frames (-0.065941 seconds), at frame: 327114319.
         0.209530209 "player.c:2906" Large negative (i.e. early) sync error of -2909 frames (-0.065964 seconds), at frame: 327123569.
Event: Run spspost.sh
Reply
#2
The sysptoms suggest the source is sending bad timing information
https://github.com/mikebrady/shairport-sync/issues/1768
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hi Tim,
thanks a lot, that seems to be the same issue.
Now to find a way to solve this...
Do you have any idea where I should look/which type of setting I should change? I'm a bit out of my depth here. :-(
https://docs.pipewire.org/page_module_ra...cover.html
https://docs.pipewire.org/page_module_raop_sink.html
Reply
#4
Not really. I don't have any experience with pipewire.

What is your usage scenario? Maybe there is an alternative to AirPlay that could meet your needs.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
The scenario is that i sometimes have music just on my laptop; usually as stream (like youtube), which is not on the NAS.
In that case, it would be nice to play it directly from the laptop to moode.
up till now I used pulseaudio-dlna for this, but that doesn't play nice with pipewire.
pa-dlna seems promising but as soon as I try to send anything to moode over the connection, it completely resets (https://gitlab.com/xdegaye/pa-dlna/-/issues/29)
Reply
#6
I use Youtube Music all the time from my Mac to moode over AirPlay and it works perfectly.

           

Maybe there is some sort of network issue?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
My network is 1Gb with switches and 1 router/AP. Behind the router is the modem of the internet provider, so internal and external networks are strictly separated.

If this was a network issue, I would expect this also to be an issue with other streams.
I run all my music from a NAS. The moode player is connected to the network over ethernet, as is the NAS. I never had any (audible) issues.
Also, internet radio works well. if it cuts out temporarily, it's after many hours of playing (and a bear to debug becaus of all the potential issues)

I tested airplay also from a pc with a wired connection, and from my laptop (wireless), and in all cases, i had the same issue.
Looks like an issue with pipewire/pipewire-module-raop-discover or pipewire/pipewire-module-raop-sink in this case. (But honestly: for me pipewire is still some dark art. I already had issues with pulse as it was too complicated for me. Alsa is the last architecture I sort of understood).
|Documentation and forum posts are far and few between at the moment. It seems that for the people who use this solution. it either works or it doesnt. But I also noticed that seemingly all of them also used it with at least an apple device on one of the 2 sides, so maybe it also has to do something with that?
Reply
#8
Are u running Linux on your PC and Laptop?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
yes; since 2001

Different distros though: PC: Debian Sid, Laptop: Arch Linux
Reply
#10
@hjheins

Long time Linux (and, before that, Unix) user here too. I've never tried the pipewire -> Airplay scenario, though. I'm thinking you'll have better luck getting help if you try a forum where lots of pipewire-using audiophiles hang out. DIYAudio.com comes to mind.

Also, have you read the github issue Tim linked to? In it, Mike Brady mentions an open-source project called OwnTone server,

Quote:About

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.

Good hunting.

Regards,
Kent
Reply


Forum Jump: