Closed vatsalkgor closed 5 years ago
saw issue #276 and updated to latest liquidsoap using opam. However the porblem is still not solved. in the log file I can see that the connection is successful but suddenly after i get error like 'source failed(no more tracks) stopping out...' Here is my .liq file for reference.
set('log.file.path','/tmp/harbor.log')
set("harbor.bind_addr","0.0.0.0")
set("harbor.verbose",true)
set("log.level",5)
radio = input.harbor("/mount",port=8080)
live = fallback(track_sensitive=false,[radio])
output.icecast(%mp3,fallible=true,host="localhost",port=8000,password="hackme",mount="harbor",live)
pl1 = mksafe(playlist("playlist1.txt"))
output.icecast(%mp3,host="localhost",port=8000,password="hackme",mount="pl1",pl1)
the playlist1 is successfully played on icecast2 but i can't see mount point "harbor" in the icecast.
Log File reads:
2019/03/31 16:41:18 >>> LOG START
2019/03/31 16:41:18 [main:3] Liquidsoap 1.3.6
2019/03/31 16:41:18 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.4.1 dtools=0.4.1 duppy=0.8.0 cry=0.6.2 mm=0.4.0 ogg=0.5.2 vorbis=0.7.1 mad=0.4.5 dynlink=[distributed with Ocaml] lame=0.3.3 alsa=0.2.3 ao=0.2.1 samplerate=0.1.4 taglib=0.3.3 camomile=1.0.1
2019/03/31 16:41:18 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2019/03/31 16:41:18 [lang.deprecated:2] WARNING: "harbor.bind_addr" is deprecated! Please use "harbor.bind_addrs"
2019/03/31 16:41:18 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2019/03/31 16:41:18 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2019/03/31 16:41:18 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2019/03/31 16:41:18 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2019/03/31 16:41:18 [video.converter:4] Couldn't find preferred video converter: gavl.
2019/03/31 16:41:18 [audio.converter:4] Using preferred samplerate converter: libsamplerate.
2019/03/31 16:41:18 [threads:3] Created thread "generic queue #1".
2019/03/31 16:41:18 [threads:3] Created thread "generic queue #2".
2019/03/31 16:41:18 [threads:3] Created thread "non-blocking queue #1".
2019/03/31 16:41:18 [threads:3] Created thread "non-blocking queue #2".
2019/03/31 16:41:18 [clock:4] Currently 1 clocks allocated.
2019/03/31 16:41:18 [clock.wallclock_main:4] Starting 2 sources...
2019/03/31 16:41:18 [source:4] Source output.icecast_6217 gets up.
2019/03/31 16:41:18 [source:4] Source mksafe gets up.
2019/03/31 16:41:18 [source:4] Source playlist_6213 gets up.
2019/03/31 16:41:18 [playlist1(dot)txt:3] Loading playlist...
2019/03/31 16:41:18 [playlist1(dot)txt:3] No mime type specified, trying autodetection.
2019/03/31 16:41:18 [playlist parser:4] Trying application/x-cue parser
2019/03/31 16:41:18 [playlist parser:4] Trying audio/x-scpls parser
2019/03/31 16:41:18 [playlist parser:4] Trying application/x-mpegURL parser
2019/03/31 16:41:18 [playlist1(dot)txt:3] Playlist treated as format application/x-mpegURL
2019/03/31 16:41:18 [playlist1(dot)txt:3] Successfully loaded a playlist of 19 tracks.
2019/03/31 16:41:18 [playlist1(dot)txt:4] Content kind is {audio=2;video=0;midi=0}.
2019/03/31 16:41:18 [playlist1(dot)txt:4] Activations changed: static=[], dynamic=[mksafe:pl1:pl1].
2019/03/31 16:41:18 [source:4] Source safe_blank gets up.
2019/03/31 16:41:18 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2019/03/31 16:41:18 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:pl1:pl1].
2019/03/31 16:41:18 [mksafe:4] Activations changed: static=[pl1:pl1], dynamic=[].
2019/03/31 16:41:18 [playlist1(dot)txt:5] Queue is empty!
2019/03/31 16:41:18 [playlist1(dot)txt:5] Failed to prepare track: no file.
2019/03/31 16:41:18 [pl1:4] Activations changed: static=[pl1], dynamic=[].
2019/03/31 16:41:18 [pl1:4] Enabling caching mode: active source.
2019/03/31 16:41:18 [source:4] Source output.icecast_6212 gets up.
2019/03/31 16:41:18 [source:4] Source fallback_6210 gets up.
2019/03/31 16:41:18 [source:4] Source input.harbor_6208 gets up.
2019/03/31 16:41:18 [input.harbor_6208:4] Content kind is {audio=2;video=0;midi=0}.
2019/03/31 16:41:18 [harbor:4] Opening port 8080 with icy = false
2019/03/31 16:41:18 [harbor:3] Adding mountpoint '/mount' on port 8080
2019/03/31 16:41:18 [input(dot)harbor_6208:4] Activations changed: static=[], dynamic=[fallback_6210:harbor:harbor].
2019/03/31 16:41:18 [fallback_6210:4] Activations changed: static=[harbor:harbor], dynamic=[].
2019/03/31 16:41:18 [harbor:4] Activations changed: static=[harbor], dynamic=[].
2019/03/31 16:41:18 [harbor:4] Enabling caching mode: active source.
2019/03/31 16:41:18 [pl1:3] Connecting mount pl1 for source@localhost...
2019/03/31 16:41:18 [decoder:4] Trying method "META" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder:4] Trying method "WAV" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder.wav/aiff:4] Invalid file extension for "./songs/Suit Suit_320(MyMp3Song).mp3"!
2019/03/31 16:41:18 [decoder:4] Trying method "AIFF" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder.wav/aiff:4] Invalid file extension for "./songs/Suit Suit_320(MyMp3Song).mp3"!
2019/03/31 16:41:18 [decoder:4] Trying method "MIDI" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder:4] Trying method "IMAGE" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder:4] Trying method "OGG" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder.ogg:4] Invalid file extension for "./songs/Suit Suit_320(MyMp3Song).mp3"!
2019/03/31 16:41:18 [decoder:4] Trying method "MAD" for "./songs/Suit Suit_320(MyMp3Song).mp3"...
2019/03/31 16:41:18 [decoder.mad:4] Libmad recognizes "./songs/Suit Suit_320(MyMp3Song).mp3" as mpeg audio (layer III, 320kbps, 44100Hz, 2 channels).
2019/03/31 16:41:18 [decoder:3] Method "MAD" accepted "./songs/Suit Suit_320(MyMp3Song).mp3".
2019/03/31 16:41:18 [decoder.ogg:4] Invalid file extension for "./songs/Suit Suit_320(MyMp3Song).mp3"!
2019/03/31 16:41:18 [pl1:3] Connection setup was successful.
2019/03/31 16:41:18 [harbor:3] Connecting mount harbor for source@localhost...
2019/03/31 16:41:18 [playlist1(dot)txt:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 1)
2019/03/31 16:41:18 [harbor:3] Connection setup was successful.
2019/03/31 16:41:18 [threads:3] Created thread "wallclock_main" (1 total).
2019/03/31 16:41:18 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2019/03/31 16:41:18 [clock:4] Main phase starts.
2019/03/31 16:41:19 [mksafe:3] Switch to safe_blank.
2019/03/31 16:41:19 [safe_blank:4] Activations changed: static=[mksafe:pl1:pl1], dynamic=[mksafe:pl1:pl1].
2019/03/31 16:41:19 [playlist1(dot)txt:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2019/03/31 16:41:19 [playlist1(dot)txt:3] Prepared "./songs/Suit Suit_320(MyMp3Song).mp3" (RID 1).
2019/03/31 16:41:19 [mksafe:3] Switch to playlist1(dot)txt with transition.
2019/03/31 16:41:19 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:pl1:pl1].
2019/03/31 16:41:19 [playlist1(dot)txt:4] Activations changed: static=[mksafe:pl1:pl1], dynamic=[mksafe:pl1:pl1].
2019/03/31 16:41:19 [harbor:3] Source failed (no more tracks) stopping output...
2019/03/31 16:41:19 [harbor:3] Closing connection...
Eagerly waiting for response.
Hi,
It looks like the webcaster client is not sending any data. Have you looked at the logs on the browser's side?
First of all thanks for reply.
Yes, you are right.
At first the browser was saying: SecurityError: The operation is insecure.
Then I followed the SO answer which fixed the above issue. It is now working in Firefox.
Then I tried to do the same with Chromium. But found that the song is not even playing in the browser. It says that the "AudioContext must be resumed or created after a user gesture on the page" followed by a more information link
So I guess that the way webcaster is written, does not support this change in google chrome / chromium.
P.S. This change in chrome/chromium is done after version 66 in May 2018. However, I have not tested this issue in versions before 66.
Hi,
Le ven. 12 avr. 2019 à 09:19, vatsalkgor notifications@github.com a écrit :
First of all thanks for reply.
Yes, you are right. At first the browser was saying: SecurityError: The operation is insecure.
Then I followed the SO answer which fixed the above issue. It is now working in Firefox.
Then I tried to do the same with Chromium. But found that the song is not even playing in the browser. It says that the "AudioContext must be resumed or created after a user gesture on the page" with a link for more information trailing. link
So I guess that the way webcaster is written, does not support this change in google chrome / chromium.
P.S. This change in chrome/chromium is done after version 66 in May 2018. However, I have not tested this issue in versions before 66.
Thanks for reporting this. I'll have to test the code. The web audio support is constantly improving and it's possible that the code is now outdated.
Romain
Great. As of now I am closing the issue. Please let me know if there is any update on webcaster client.
@vatsalkgor Should be fixed now! Try it at: https://webcast.github.io/webcaster/
Hi, Please forgive me if i post something that was previously answered as I am a noob in liquidsoap. I have researched extensively but was not able to find the solution that's why I am opening the new Issue.
First of all I would like to tell what I want to do. I want to make a radio station in my college that can broadcast live streams coming from different users. So I googled it and found that WebSocket is a protocol that provides full duplex client and server side communication. I found the implementation in Webcaster.js by @toots.
So I am using this link Webcaster to generate the stream. (I have not cloned the repo just using github.io link to generate the stream.)
My liquidsoap code is
If I run the script without mksafe then I get source fallible error. The logs in the logs file says
One point to be noted here is that I am using an old liquidsoap v1.1.1
Can anyone tell me what is the issue here??