Stereo Tool
https://forums.stereotool.com/

Streaming input starts to fall behind after a few days
https://forums.stereotool.com/viewtopic.php?f=15&t=33640
Page 1 of 1

Author:  Anthony96922 [ Sat Aug 12, 2023 4:22 am ]
Post subject:  Streaming input starts to fall behind after a few days

When using the streaming input, the audio becomes delayed by more than 10 seconds after only 2 days of running. I'm sure the delay will increase too much to be acceptable for realtime streaming. When the next song comes up the waveforms still reflect the previous song until 10 seconds later. This problem occurs on both the normal output and streaming output.

Here's my setup:
Code:
[pi running mpd]----FLAC stream (HTTP)---->[NUC running ST]--
--FLAC stream (HTTP)---->[ffmpeg transcoders on same pi]--
--icecast source streams---->[icecast on different pi]
I think it might be ST slowing down the input stream and not speeding it up. Turning off sound card sync doesn't seem to help. Any solution for this?

Author:  Anthony96922 [ Wed Aug 30, 2023 11:30 pm ]
Post subject:  Re: Streaming input starts to fall behind after a few days

Seems no one has a solution... :(

I switched to using a plain UDP transport. This is how I did it:

On the pi running mpd:
Code:
ffmpeg -nostdin -loglevel quiet -i http://ip6-localhost:8001 -c:a libfdk_aac -b:a 448k -profile:a aac_low -f adts udp://nuc:4002?pkt_size=1452
And on the NUC running ST:
Set
Code:
udp://@:4002
as the stream URL

Then made sure syncing was turned on for the inputs and both the normal and FM outputs.

So far so good. Will report back if it lags badly.

Author:  Anthony96922 [ Tue Sep 12, 2023 7:51 am ]
Post subject:  Re: Streaming input starts to fall behind after a few days

I might have solved the issue... no more increasingly delayed audio after over a week of running

Author:  hvz [ Fri Sep 29, 2023 4:15 pm ]
Post subject:  Re: Streaming input starts to fall behind after a few days

If you're doing the streaming outside of Stereo Tool, then the synchronization inside Stereo Tool can't do anything anymore. So ffmpeg would need to compensate in this case.

Author:  Anthony96922 [ Sat Sep 30, 2023 8:04 pm ]
Post subject:  Re: Streaming input starts to fall behind after a few days

Ffmpeg sends the audio as fast as it can. I have the output buffers for both HD and FM set to 1 second. That way Stereo Tool can adjust for any frequency drifts on both sound cards. The ST GUI has brief pauses but there are no dropouts on the outputs at all. Total delay from MPD to the listener tops out at 4 seconds.

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/