Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
choses:radio_fluflu [2020/04/25 16:14] emoc |
choses:radio_fluflu [2020/06/10 14:27] (Version actuelle) emoc |
||
---|---|---|---|
Ligne 106: | Ligne 106: | ||
Le serveur utilise **icecast** pour streamer les flux audio et **liquidsoap** pour gérer la planification des diffusions, et les points de montages live. | Le serveur utilise **icecast** pour streamer les flux audio et **liquidsoap** pour gérer la planification des diffusions, et les points de montages live. | ||
- | Le script liquidsoap permet de faire tourner plusieurs playlist selon l'heure de la journée et de donner la priorité aux entrées live quand elles sont utilisées | + | Le script liquidsoap permet de faire tourner plusieurs playlist selon l'heure de la journée et de donner la priorité aux entrées live quand elles sont utilisées. Les deux entrées live peuvent être utilisées simultanément, elles sont alors mixées... |
- | radiolive.liq \\ | + | <accordion> |
- | <code> | + | <panel title="radiolive.liq (cliquer pour afficher le code)"> |
+ | <code bash radiolive.liq> | ||
#!/usr/bin/liquidsoap | #!/usr/bin/liquidsoap | ||
+ | |||
+ | # version du 10 juin 2020 | ||
set("log.file.path","/tmp/radiolive.log") | set("log.file.path","/tmp/radiolive.log") | ||
Ligne 121: | Ligne 124: | ||
# Les playlist | # Les playlist | ||
- | emoc = mksafe(normalize(playlist(mode='random', "/home/radio/pierre"))) | + | emoc = mksafe(normalize(playlist(mode='random', "/home/radio/emoc"))) |
ortie = mksafe(normalize(playlist(mode='random', "/home/radio/ortie"))) | ortie = mksafe(normalize(playlist(mode='random', "/home/radio/ortie"))) | ||
+ | ortjer = mksafe(normalize(playlist(mode='random', "/home/radio/ort-jer"))) | ||
+ | antoine = mksafe(normalize(playlist(mode='random', "/home/radio/antoine"))) | ||
# Playlist tournante | # Playlist tournante | ||
+ | # le serveur est en temps UTC donc 10h serveur = 12h heure d'été FR... | ||
playlist = switch(track_sensitive=true, [ # track_sensitive true par défaut, cad attend la fin de la piste! | playlist = switch(track_sensitive=true, [ # track_sensitive true par défaut, cad attend la fin de la piste! | ||
- | ({0h-8h}, emoc), | + | ({0h-8h}, emoc), |
- | ({8h-10h}, ortie), | + | ({8h-10h}, ortjer), |
- | ({10h-15h}, emoc), | + | ({10h-11h}, antoine), |
- | ({15h-17h}, ortie), | + | ({11h-12h}, emoc), |
- | ({17h-20h}, emoc), | + | ({12h-13h}, ortie), |
- | ({20h-22h}, ortie), | + | ({13h-14h}, ortjer), |
- | ({22h-24h}, emoc) | + | ({14h-15h}, emoc), |
- | ]) | + | ({15h-18h}, ortjer), |
+ | ({18h-20h}, antoine), | ||
+ | ({20h-22h}, ortie), | ||
+ | ({22h-24h}, emoc) | ||
+ | ]) | ||
# live source | # live source | ||
Ligne 158: | Ligne 168: | ||
radio) | radio) | ||
- | </code> | ||
- | |||
- | ===== A tester ===== | ||
- | |||
- | Plusieurs à envoyer des choses en même temps, ping-pong. (= plusieurs points de montage) / mixer les deux \\ | ||
- | --> testé, ça fonctionne | ||
- | |||
- | <accordion> | ||
- | <panel title="liquidsoap_mix_stream.liq (cliquer pour afficher le code)"> | ||
- | <code bash liquidsoap_mix_stream.liq> | ||
- | #!/usr/bin/liquidsoap | ||
- | |||
- | set("log.file.path","/tmp/radiolive.log") | ||
- | |||
- | # Serveur settings | ||
- | set("harbor.bind_addr","0.0.0.0") | ||
- | |||
- | # An emergency file | ||
- | emergency = single("/home/radio/test/test.mp3") | ||
- | |||
- | # Les playlist | ||
- | emoc = mksafe(normalize(playlist(mode='random', "/home/radio/pierre"))) | ||
- | ortie = mksafe(normalize(playlist(mode='random', "/home/radio/ortie"))) | ||
- | |||
- | # Playlist tournante | ||
- | playlist = switch(track_sensitive=true, [ # track_sensitive true par défaut, cad attend la fin de la piste! | ||
- | ({0h-8h}, emoc), | ||
- | ({8h-10h}, ortie), | ||
- | ({10h-15h}, emoc), | ||
- | ({15h-17h}, ortie), | ||
- | ({17h-20h}, emoc), | ||
- | ({20h-22h}, ortie), | ||
- | ({22h-24h}, emoc) | ||
- | ]) | ||
- | |||
- | # live source | ||
- | live = input.harbor("live",port=8080,password="****") | ||
- | |||
- | #live source bis | ||
- | livebis = input.harbor("livebis",port=8081,password="****") | ||
- | |||
- | livemix = add([live,livebis]) | ||
- | |||
- | # fallback | ||
- | radio = fallback(track_sensitive=false, | ||
- | [livemix,playlist,emergency]) | ||
- | |||
- | output.icecast(%vorbis, | ||
- | host = "localhost", port = 8000, | ||
- | password = "****", mount = "radio", | ||
- | url="http://5.196.66.118:8000/radio", | ||
- | name="La Baleine Radio Test", | ||
- | genre="Music", | ||
- | description="La Baleine Radio Test", | ||
- | public=true, | ||
- | fallible=true, | ||
- | radio) | ||
</code> | </code> | ||
</panel> | </panel> | ||
</accordion> | </accordion> |