Hi Romain, I updated to Liquidsoap 1.3.3 using opam and now it won't compile my script. FIrst I had to change the way I call "imeta()" to: imeta([("title",#{new_title}), ("artist",#{new_artist})])
But now it's still accusing a "parse error" at the end of the definition of function "update_meta". Line 37, char 4 before "end": Parse error! Did it change the way functions should be defined in this version? Im using: def update_meta() = ... ... 5.0 end ________________________________ De: Bruno Lima <bruno_nl...@hotmail.com> Enviado: segunda-feira, 10 de setembro de 2018 14:58 Para: savonet-users@lists.sourceforge.net Assunto: Re: [Savonet-users] Metadata update function stops Hello Romain, Ok, send me the instructions to update to 1.3.3 then! Thanks! ________________________________ De: Romain Beauxis <romain.beau...@gmail.com> Enviado: quinta-feira, 6 de setembro de 2018 15:03 Para: savonet-users Assunto: Re: [Savonet-users] Metadata update function stops Hi Bruno, Your script looks good and the logs seem to indicate a clear bug in the software. However, 1.1.1 is a rather old version. Would you be able to test it with version 1.3.3? I'm happy to provide instructions on how to update liquidsoap. Romain Le jeu. 6 sept. 2018 à 11:50, Bruno Lima <bruno_nl...@hotmail.com<mailto:bruno_nl...@hotmail.com>> a écrit : Hello, I need to get title and artist metadata from MySQL table and update it on stream every 5 seconds. I wrote a script that did this based on earlier responses here but for some reason the "update_meta()" function that should be executed every 5 seconds is only being execute twice and then stops. Seems to be a problem somewhere.. Any help is apreciated. The script is as follows: #!/usr/local/bin/liquidsoap set("log.stdout",true) set("log.file.append",true) set("log.level", 4) set("log.file.path","/home/radiola/liquidsoap.log") set("frame.audio.samplerate",48000) s = input.jack() # Create a function to insert metadata ms = insert_metadata(s) # The function to insert metadata imeta = fst(ms) # The source with inserted metadata s = snd(ms) # Function that updates metadata def update_meta() = # Gets title from MySQL table and stores in variable new_title = list.hd( get_process_lines( "mysql my_db -u root -phackme -se \"SELECT CAST(CONVERT(Title USING utf8) AS binary) FROM song WHERE id='1'\"" ) ) # Gets artist from MySQL table and stores in variable new_artist = list.hd( get_process_lines( "mysql my_db -u root -phackme -se \"SELECT CAST(CONVERT(Artist USING utf8) AS binary) FROM song WHERE id='1'\"" ) ) #A debug message print("Insert metadata title = #{new_title}") print("Insert metadata artist = #{new_artist}") # Insert the metadata imeta([("title",new_title),("artist",new_artist)]) 5.0 end # Schedule the insert metadata process every 5.0 seconds add_timeout(fast=false,5.0,update_meta) # MountPoint = st1.opus\group=transmitter output.icecast....... # MountPoint = aovivo.opus output.icecast....... # MountPoint = aovivo.mp3 output.icecast....... # MountPoint = stream output.icecast....... # MountPoint = transmitter.mp3 output.icecast....... As you can see I put a debug message to be printed when the update_meta function is executed and the message appears only twice when executing the script.. The log is as follows: 2018/09/06 13:44:44 >>> LOG START 2018/09/06 13:44:44 [protocols.external:3] Found "/usr/local/lib/liquidsoap/scm/liquidget". 2018/09/06 13:44:44 [main:3] Liquidsoap 1.1.1+scm (git://github.com/savonet/liquidsoap.git@ed3e4bc781397c1fee76e4aa3a97dc5e36e237df:20140225:181935<http://github.com/savonet/liquidsoap.git@ed3e4bc781397c1fee76e4aa3a97dc5e36e237df:20140225:181935>) 2018/09/06 13:44:44 [main:3] Using: pcre=6.2.3 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.3.0 mm=0.3.0 xmlplaylist=0.1.3 ogg=0.5.0 opus=0.1.1 speex=0.2.1 mad=0.4.4 flac=0.1.2 flac.ogg=0.1.2 dynlink=[distributed with Ocaml] lame=0.3.2 aacplus=0.2.1 voaacenc=0.1.0 fdkaac=0.2.0 theora=0.3.1 schroedinger=0.1.1 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.3 faad=0.3.3 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 lo=0.1.0 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [main:2] DISCLAIMER: This version of Liquidsoap has been 2018/09/06 13:44:44 [main:2] compiled from a snapshot of the development code. 2018/09/06 13:44:44 [main:2] As such, it should not be used in production 2018/09/06 13:44:44 [main:2] unless you know what you are doing! 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [main:2] We are, however, very interested in any feedback 2018/09/06 13:44:44 [main:2] about our development code and committed to fix 2018/09/06 13:44:44 [main:2] issues as soon as possible. 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [main:2] If you are interested in collaborating to 2018/09/06 13:44:44 [main:2] the development of Liquidsoap, feel free to 2018/09/06 13:44:44 [main:2] drop us a mail at <savonet-d...@lists.sf.net<mailto:savonet-d...@lists.sf.net>> 2018/09/06 13:44:44 [main:2] or to join the #savonet IRC channel on Freenode. 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [main:2] Please send any bug report or feature request 2018/09/06 13:44:44 [main:2] at <https://github.com/savonet/liquidsoap/issues>. 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [main:2] We hope you enjoy this snapshot build of Liquidsoap! 2018/09/06 13:44:44 [main:2] 2018/09/06 13:44:44 [frame:3] Using 48000Hz audio, 25Hz video, 48000Hz master. 2018/09/06 13:44:44 [frame:3] Frame size must be a multiple of 1920 ticks = 1920 audio samples = 1 video samples. 2018/09/06 13:44:44 [frame:3] Targetting 'frame.duration': 0.04s = 1920 audio samples = 1920 ticks. 2018/09/06 13:44:44 [frame:3] Frames last 0.04s = 1920 audio samples = 1 video samples = 1920 ticks. 2018/09/06 13:44:44 [video.converter:4] Couldn't find preferred video converter: gavl. 2018/09/06 13:44:44 [audio.converter:4] Using preferred samplerate converter: libsamplerate. 2018/09/06 13:44:44 [threads:3] Created thread "generic queue #1". 2018/09/06 13:44:44 [threads:3] Thread "generic queue #1" terminated. 2018/09/06 13:44:44 [threads:3] Created thread "generic queue #2". 2018/09/06 13:44:44 [threads:3] Thread "generic queue #2" terminated. 2018/09/06 13:44:44 [clock:4] Currently 1 clocks allocated. 2018/09/06 13:44:44 [clock.wallclock_bjack:4] Starting 3 sources... 2018/09/06 13:44:44 [source:4] Source input.jack_5617 gets up. 2018/09/06 13:44:44 [input.jack_5617:4] Content kind is {audio=2;video=0;midi=0}. 2018/09/06 13:44:44 [clock.wallclock_bjack:4] Delegating clock to active sources. 2018/09/06 13:44:44 [input.jack_5617:4] Activations changed: static=[input.jack_5617], dynamic=[]. 2018/09/06 13:44:44 [input.jack_5617:4] Enabling caching mode: active source. 2018/09/06 13:44:44 [source:4] Source output.icecast_5630 gets up. 2018/09/06 13:44:44 [source:4] Source insert_metadata_5622 gets up. 2018/09/06 13:44:44 [insert_metadata_5622:4] Content kind is {audio=2;video=0;midi=0}. 2018/09/06 13:44:44 [input.jack_5617:4] Activations changed: static=[insert_metadata_5622:aovivo(dot)opus:aovivo(dot)opus, input.jack_5617], dynamic=[]. 2018/09/06 13:44:44 [insert_metadata_5622:4] Activations changed: static=[aovivo(dot)opus:aovivo(dot)opus], dynamic=[]. 2018/09/06 13:44:44 [aovivo(dot)opus:4] Activations changed: static=[aovivo(dot)opus], dynamic=[]. 2018/09/06 13:44:44 [aovivo(dot)opus:4] Enabling caching mode: active source. 2018/09/06 13:44:44 [source:4] Source output.icecast_5631 gets up. 2018/09/06 13:44:44 [insert_metadata_5622:4] Activations changed: static=[aovivo(dot)mp3:aovivo(dot)mp3, aovivo(dot)opus:aovivo(dot)opus], dynamic=[]. 2018/09/06 13:44:44 [insert_metadata_5622:4] Enabling caching mode: two static activations. 2018/09/06 13:44:44 [aovivo(dot)mp3:4] Activations changed: static=[aovivo(dot)mp3], dynamic=[]. 2018/09/06 13:44:44 [aovivo(dot)mp3:4] Enabling caching mode: active source. 2018/09/06 13:44:44 [threads:3] Created thread "input.jack_5617" (1 total). 2018/09/06 13:44:44 [aovivo(dot)opus:3] Connecting mount aovivo.opus for source@localhost... 2018/09/06 13:44:44 [aovivo(dot)opus:3] Connection setup was successful. 2018/09/06 13:44:44 [aovivo(dot)mp3:3] Connecting mount aovivo.mp3 for source@localhost... 2018/09/06 13:44:44 [aovivo(dot)mp3:3] Connection setup was successful. 2018/09/06 13:44:44 [threads:3] Created thread "wallclock_bjack" (2 total). 2018/09/06 13:44:44 [clock:4] Main phase starts. 2018/09/06 13:44:44 [clock.wallclock_bjack:3] Streaming loop starts, synchronized by active sources. 2018/09/06 13:44:44 [ogg.muxer:4] aovivo(dot)opus: Starting all streams Insert metadata title = xxxxxx Insert metadata artist = yyyyyy Thread 1 killed on uncaught exception Invalid_argument("equal: abstract value") Called from file "list.ml<http://list.ml>", line 175, characters 17-20 Called from file "thread.ml<http://thread.ml>", line 39, characters 8-14 2018/09/06 13:44:49 [ogg.muxer:4] aovivo(dot)opus: Setting end of track 3108b46f. 2018/09/06 13:44:49 [ogg.muxer:4] aovivo(dot)opus: Every ogg logical tracks have ended: setting end of stream. 2018/09/06 13:44:49 [ogg.muxer:4] aovivo(dot)opus: Starting new sequentialized ogg stream. 2018/09/06 13:44:49 [ogg.muxer:4] aovivo(dot)opus: Starting all streams Insert metadata title = xxxxxx Insert metadata artist = yyyyyy 2018/09/06 13:44:54 [ogg.muxer:4] aovivo(dot)opus: Setting end of track 36375d58. 2018/09/06 13:44:54 [ogg.muxer:4] aovivo(dot)opus: Every ogg logical tracks have ended: setting end of stream. 2018/09/06 13:44:54 [ogg.muxer:4] aovivo(dot)opus: Starting new sequentialized ogg stream. 2018/09/06 13:44:54 [ogg.muxer:4] aovivo(dot)opus: Starting all streams Then nothing else is printed to log and stream continues to play normally but the update_meta function never gets executed again ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net<mailto:Savonet-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/savonet-users
_______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users