My solution was to add a delay to autoaudiosink. Great feature, critically called ts-offset:
$ gst-launch-1.0 souphttpsrc location=http://server:10000/ ! queue \ max-size-bytes=1000000000 max-size-buffers=0 max-size-time=0 ! \ decodebin ! autoaudiosink ts-offset=500000000
min-threshold- * didn't work for me.
The delay works. Sync disabled:
$ gst-launch-1.0 souphttpsrc location=http://server:10000/ ! \ decodebin ! autoaudiosink sync=false
For music, for example, for what I use for it, synchronization does not really matter, except that a nice next song arrives sooner rather than later when you change tracks. Therefore, I still prefer half the delay.
When you turn off synchronization, as a rule, the stream slowly crashes. For a stream in real time, the data of which is generated in real time, the synchronization of the stream can be supported by requesting a queue for downloading additional data:
gst-launch-1.0 souphttpsrc location=http://server:10000/ ! \ queue max-size-bytes=65536 max-size-buffers=0 max-size-time=0 \ leaky=downstream ! decodebin ! autoaudiosink sync=false
This allows you to synchronize the stream within 64KiB when the data was first provided on the server. This turned out to be my preferred solution, because I broadcast data that was generated in real time using a computer sound card on the same Wi-Fi network. This is for live streaming only. This will not work if the stream data was predetermined, in which case the entire stream will be loaded as quickly as possible, as a result of which everything will run more or less quickly.
source share