Issues playing 16/44 1ch m4a AAC file from Ubuntu server to Airplay endpoint

Hi all, I recently switched from running Roon Server on Windows 11 to running it on a Ubuntu. It’s still on the same NUC device (nuc11atkc4).

Generally it seems to be more performant and I am happy with it. However, I am having issues playing a 16/44 1ch m4a file that is AAC. It’s a file from the mobile phone audio recorder.

I am trying to stream it to an Airplay endpoint (Sonos Roam). I tried other Airplay devices and it’s the same story (incl. a Denon AVR via Airplay).

The same file plays correctly via Roon ARC to my Android Phone. It was also playing when the server was Windows (however I am unsure if that was before or after Airplay 2 update), so I would guess it’s some issue between Roon on Linux and Airplay (2?) and the fact that it’s a 16/44 1ch AAC file?

I have installed ubuntu-restricted-extras and have ffmpeg installed on the system.

Here are the logs:

10/29 12:51:54 Info: =======================================================================
10/29 12:51:54 Trace: Track             Skućena kuća (trackid=Skućena kuća,albumid=50:1:e6980a19-d3d7-4586-9ecb-084135318468)
10/29 12:51:54 Trace:     Performance
10/29 12:51:54 Info: Track             Skućena kuća (trackid=Skućena kuća,albumid=50:1:e6980a19-d3d7-4586-9ecb-084135318468)
10/29 12:51:54 Info:     Performance
10/29 12:51:54 Trace: [zone Roam [AirPlay]] Playing 1 Items
10/29 12:51:54 Trace: [zone Roam [AirPlay]] Selecting Source state=Stopped
10/29 12:51:54 Info: [zone Roam [AirPlay]] Canceling Pending Sleep
10/29 12:51:54 Trace: [zone Roam [AirPlay]] Playing TransportItem
10/29 12:51:54 Info: [zone Roam [AirPlay]] Canceling Pending Sleep
10/29 12:51:54 Trace: [zone Roam [AirPlay]] Selecting Source state=Stopped
10/29 12:51:54 Trace: [Roam [AirPlay]] [LowQuality, 24/44 AAC => 16/44 1ch] [LOADING @ 0:00] Skućena kuća -
10/29 12:51:54 Info: [Roam [AirPlay]] [zoneplayer] Playing: /mnt/plex/Music/Pričalice/Dora - Skucena kuca/skucena kuca.m4a
10/29 12:51:54 Trace: [roonapi] [apiclient 192.168.1.79:60196] CONTINUE Changed {"zones_changed":[{"zone_id":"16014c631ad5d80884e10e178514e9e8628c","display_name":"Roam [AirPlay]","outputs":[{"output_id":"17014c631ad5d80884e10e178514e9e8628c","zone_id":"16014c631ad5d80884e10e178514e9e8628c","can_group_with_output_ids":["17015f0e4f77842cca09e21b5048222ebc17","17014c631ad5d80884e10e178514e9e8628c","1701ae5399ddc51f2a4fbe9078f40b70e937","1701894e5efd38e6027ecb2449b943c82484"],"display_name":"Roam [AirPlay]","volume":{"type":"number","min":1,"max":100,"value":40,"step":1,"is_muted":false,"hard_limit_min":1,"hard_limit_max":100,"soft_limit":100},"source_controls":[{"control_key":"1","display_name":"Roam (Roam)","supports_standby":false,"status":"indeterminate"}]}],"state":"loading","is_next_allowed":true,"is_previous_allowed":true,"is_pause_allowed":true,"is_play_allowed":false,"is_seek_allowed":false,"queue_items_remaining":1,"queue_time_remaining":425,"settings":{"loop":"disabled","shuffle":false,"auto_radio":true},"now_playing":{"seek_position":null,"length":425,"one_line":{"line1":"Sku\u0107ena ku\u0107a - "},"two_line":{"line1":"Sku\u0107ena ku\u0107a","line2":""},"three_line":{"line1":"Sku\u0107ena ku\u0107a","line2":"","line3":"Sku\u010dena ku\u0107a"},"image_key":"d572ed38034ef7b5534dff8f0e1cd5c6"}}],"zones_seek_changed":[{"zone_id":"16014c631ad5d80884e10e178514e9e8628c","queue_time_remaining":425,"seek_position":null}]}
10/29 12:51:54 Trace: [roonapi] [apiclient 192.168.1.79:60196] CONTINUE LyricsChanged {"zone_id":"16014c631ad5d80884e10e178514e9e8628c","key":null,"lrc":null}
10/29 12:51:54 Info: [Roam [AirPlay]] [zoneplayer]     Open Result (Playing):Result[Status=Success]
10/29 12:51:54 Info: [Roam [AirPlay]] [zoneplayer] Starting playback
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Connecting to airplay server
10/29 12:51:54 Info: [zone Roam [AirPlay]] OnPlayFeedback Playing
10/29 12:51:54 Trace: [Roam [AirPlay]] [LowQuality, 24/44 AAC => 16/44 1ch] [PLAYING @ 0:00] Skućena kuća -
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Requesting OPTIONS
10/29 12:51:54 Info: [airplay/clientV2] [192.168.1.231] REQUESTING OPTIONS *
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] OPTIONS Succeeded
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Got good OPTIONS: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, FLUSHBUFFERED, TEARDOWN, OPTIONS, POST, GET, PUT
10/29 12:51:54 Info: [airplay] AirPlay device connected: AirPlayDevice[DeviceId=F0F6C1D97EC4@Roam._raop._tcp.local, Name=Sonos-F0F6C1D97EC4.local, Model=Roam, IPEndPoint=192.168.1.231:7000]
10/29 12:51:54 Trace: [airplay] connected
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending SETUP #1 (session)
10/29 12:51:54 Warn: [airplay/clientV2] [192.168.1.231] SETUP failed: 403 Forbidden, attempting pairing
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending pair-verify
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] pair-verify Succeeded
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending pair-setup #1
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] pair-setup #1 Succeeded
10/29 12:51:54 Warn: [prebuffer] in buffer threadSystem.Exception: Read failure: ExternalProcFailed
   at Sooloos.Audio.MediaDecoderAudioSignal.Read(Byte[] buffer, Int32 offset, Int32 frames)
   at Sooloos.Audio.SeekableBufferedAudioSignal._Buffer(Int32 buffer_seq)
   at Sooloos.Audio.SeekableBufferedAudioSignal.<>c__DisplayClass31_0.<_StartBuffering>b__0()
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending pair-setup #2
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] pair-setup #2 Succeeded
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending SETUP #1 (session)
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending RECORD
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] RECORD Succeeded
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] sending SETUP #2 (stream)
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending FLUSH
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] FLUSH was successful
10/29 12:51:54 Trace: [airplay/clientV2] [192.168.1.231] Sending SET_PARAMETER volume -18db
10/29 12:51:54 Info: [Roam [AirPlay]] [zoneplayer] Track ended unexpectedly: Sooloos.Audio.BufferedReadException: error during buffered read
 ---> System.Exception: Read failure: ExternalProcFailed
   at Sooloos.Audio.MediaDecoderAudioSignal.Read(Byte[] buffer, Int32 offset, Int32 frames)
   at Sooloos.Audio.SeekableBufferedAudioSignal._Buffer(Int32 buffer_seq)
   at Sooloos.Audio.SeekableBufferedAudioSignal.<>c__DisplayClass31_0.<_StartBuffering>b__0()
   --- End of inner exception stack trace ---
   at Sooloos.Audio.SeekableBufferedAudioSignal.Read(Byte[] buffer, Int32 offset, Int32 frames)
   at Sooloos.Broker.Transport.ZonePlayerTrack._Stream.ReadImp(AudioBuffer buf, Int32 nsamples)
   at Sooloos.Audio.AudioStream.Read(AudioBuffer buf, Int32 nsamples)
   at Sooloos.Broker.Transport.ZonePlayerBase.ReadImp(AudioBuffer buf, Int32 nsamples)
10/29 12:51:54 Warn: [zone Roam [AirPlay]] Track Stopped Due to Error
10/29 12:51:54 Info: [zone Roam [AirPlay]] OnPlayFeedback StoppedEndOfMediaUnnatural
10/29 12:51:54 Info: [zone Roam [AirPlay]] OnPlayFeedback Stopped
10/29 12:51:54 Info: [zone Roam [AirPlay]] Canceling Pending Sleep

Hi @Filip_Voska ,

Can you please confirm if other tracks work properly via airplay for the affected zones? Are you able to play the file properly to a local non-Airplay output such as your System Output zone?

This is the screenshot of the chain from ARC, where it works:

I am unable to play the file on my MacBook using the Roon Desktop app. I am able to play it on my Android Phone through ARC and that seems to be the only audio chain that plays the file.

Other tracks play well in all Airplay and MacBook zones.

Have you tried a git master build of FFmpeg from here?

https://johnvansickle.com/ffmpeg/

Or…have you tried converting it to 2ch?

0 kbps doesn’t seem right.

I’d guess that the encoding is a bit wonky.

1 Like

Converting it from the original AAC recording to MP3 (still 44.1/16 mono) makes it play on all devices.


image

I guess that is good enough, as it’s just a couple of such files that I have and I am fine with converting them.

I am fine with closing this issue.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.