savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.4k stars 130 forks source link

strange error flushing buffer ... while trying to transcode an http stream ? #524

Closed JohnyBeGood closed 6 years ago

JohnyBeGood commented 6 years ago

Hi,

I have liquidsoap and icecast2 installed on Ubuntu 16.04.3 and while it works fine with this http input http://www.ndr.de/resources/metadaten/audio/m3u/n-joy.m3u it creates errors with this url http://live7.okradio.net/listen.pls?sid=1

2018/01/23 14:03:22 >>> LOG START
2018/01/23 14:03:22 [protocols.external:3] Found "/usr/bin/wget".
2018/01/23 14:03:22 [main:3] Liquidsoap 1.1.1
2018/01/23 14:03:22 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.0.4 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.2.3 gd=1.0a5
2018/01/23 14:03:22 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2018/01/23 14:03:22 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
2018/01/23 14:03:22 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
2018/01/23 14:03:22 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2018/01/23 14:03:22 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2018/01/23 14:03:22 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2018/01/23 14:03:22 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2018/01/23 14:03:22 [threads:3] Created thread "generic queue #1".
2018/01/23 14:03:22 [threads:3] Created thread "generic queue #2".
2018/01/23 14:03:22 [threads:3] Created thread "non-blocking queue #1".
2018/01/23 14:03:22 [threads:3] Created thread "non-blocking queue #2".
2018/01/23 14:03:22 [threads:3] Created thread "http polling" (1 total).
2018/01/23 14:03:22 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:22 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:22 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:22 [threads:3] Created thread "wallclock_main" (2 total).
2018/01/23 14:03:22 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2018/01/23 14:03:22 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:22 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:22 [mksafe:3] Switch to safe_blank.
2018/01/23 14:03:23 [http_4961:3] New metadata chunk: ? -- ?.
2018/01/23 14:03:23 [decoder:3] Method "MAD" accepted "audio/mpeg".
2018/01/23 14:03:23 [http_4961:3] Decoding...
2018/01/23 14:03:23 [http_4961:3] New metadata chunk: ? -- N-JOY vom NDR - www.n-joy.de.
2018/01/23 14:03:23 [mksafe:3] Switch to http_4961 with transition.
2018/01/23 14:03:26 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:26 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:26 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:26 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:26 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:30 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:30 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:30 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:30 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:30 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:34 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:34 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:34 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:34 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:34 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:38 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:38 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:38 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:38 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:38 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:42 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:42 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:42 [/okradio(dot)mp3:3] Will try again in 3.00 sec.
2018/01/23 14:03:42 [stderr:3] strange error flushing buffer ... 
2018/01/23 14:03:42 [stderr:3] strange error flushing buffer ... 

Here's my config file:

set("log.file.path","/etc/liquidsoap/okradio.log")

url = "http://live7.okradio.net/listen.pls?sid=1"
input = mksafe(input.http(url,buffer=2.,max=120.))

output.icecast(
  %mp3(bitrate=64), 
  mount="/okradio.mp3",
  host="localhost", port=8000, password="xxxxxxxxxxxxx",
  input)

Any ideas?

Thanks

Johny

JohnyBeGood commented 6 years ago

Found the solution!

2018/01/23 14:03:42 [/okradio(dot)mp3:3] Connecting mount /okradio.mp3 for source@localhost...
2018/01/23 14:03:42 [/okradio(dot)mp3:2] Connection failed: 403, Forbidden (HTTP/1.0)
2018/01/23 14:03:42 [/okradio(dot)mp3:3] Will try again in 3.00 sec.

Here's what it was in case someone runs into same issue. Icecast server had default limit of 2 how many sources can connect so it was so confusing, sometime it would work sometimes not because other .liq would connect and work but others would not. Changing

<limits>
        <sources>22</sources>

inside /etc/icecast2/icecast.xml solved the issue. This error 2018/01/23 14:03:42 [stderr:3] strange error flushing buffer ... never came up again after above change Hope it helps!

kemecs commented 3 years ago

this is my problem since yesterday

what format could you submit to the system?

2021/07/20 11:09:31 [musor(dot)pls:3] Prepared "/var/azuracast/stations/folktest.folkradio.hu/media/galgamacsa_dudas_juli_dalai01.mp3" (RID 2).
2021/07/20 11:09:31 [folktest(dot)folkradio(dot)hu_schedule_switch:3] Switch to audio_to_stereo_38756 with transition.
2021/07/20 11:09:31 [decoder:3] Method "FFMPEG" accepted "/var/azuracast/stations/folktest.folkradio.hu/media/tanchaz-nepzene-2012_06.mp3".
2021/07/20 11:09:31 [ffmpeg:3] [mp3 @ 0x7fd664024d40] Estimating duration from bitrate, this may be inaccurate
2021/07/20 11:09:35 [local_1:3] Connecting mount /folkradio.mp3 for source@127.0.0.1...
2021/07/20 11:09:35 [local_1:2] Connection failed: 403, Mountpoint in use (HTTP/1.0)
strange error flushing buffer ...
2021/07/20 11:09:35 [local_1:3] Will try again in 3.00 sec.
2021/07/20 11:09:39 [local_1:3] Connecting mount /folkradio.mp3 for source@127.0.0.1...
strange error flushing buffer ...
2021/07/20 11:09:39 [local_1:2] Connection failed: 403, Mountpoint in use (HTTP/1.0)
2021/07/20 11:09:39 [local_1:3] Will try again in 3.00 sec.

Powered by AzuraCast • Rolling Release #26fd358 (2021-07-19 18:38) • Docker • PHP 8.0 Like our software? Donate to support AzuraCast!

toots commented 3 years ago

Hi! Unless you are hearing audio glitches, this log message can usually be ignored.