ОсновноеRadiotalkПользовательское
Технологии вещания, софт, скрипты
3   •   Посмотреть все темы

liquidsoap

 

6245
Тарас @tarasian666
наверно что то лишнее в PACKAGES так как у меня этого не требует

# Edit this file by (un)commenting the libraries that you (don't) want to
# build in order to get the corresponding features in liquidsoap.

# The default file has every dependency enabled.
# It is certain that you don't need everything.
# If you don't know why you should have something, uncomment it,
# especially if it does not build for some reason.

# It is useless to add savonet packages that are not listed below,
# like ocaml-fetch, ocaml-smbclient, etc. These are not dependencies of
# liquidsoap.


# ============================================================================
# Input/output
# ============================================================================

# Cry is the lib for streaming to icecast and compatible servers.
ocaml-cry

# AO is portable and stable, but it does only output.
#ocaml-ao

# Portaudio is a portable audio library with both input and output.
#ocaml-portaudio

# ALSA is only for LINUX, and is sometimes not working.
#ocaml-alsa

# PulseAudio is a cross-plateform audio sound server. It is intended to
# be a single replacement for sound support under linux, windows or OSX.
#ocaml-pulseaudio

# JACK is an audio connection kit, designed for low latency
# and easy communication between audio applications.
ocaml-bjack

# Gstreamer is a library for constructing graphs of media-handling components.
# It is currently used to provide V4l inputs for liquidsoap
#ocaml-gstreamer

# ============================================================================
# Codecs
# ============================================================================

# MAD is for MP3 decoding.
ocaml-mad

# TAGLIB is for MP3 ID3 tag reading
ocaml-taglib

# LAME is for MP3 encoding.
ocaml-lame

# AACPLUS is for AAC+ encoding.
ocaml-aacplus

# OGG is for ogg/vorbis and ogg/theora encoding and decoding
ocaml-ogg

# VORBIS is for ogg/vorbis encoding and decoding.
# you need ocaml-ogg to enable ocaml-vorbis.
ocaml-vorbis

# SPEEX is for ogg/speex encoding and decoding
# you need ocaml-ogg to enable ocaml-speex
#ocaml-speex

# THEORA is for ogg/theora encoding and decoding
# you need ocaml-ogg to enable ocaml-theora
#ocaml-theora

# SCHROEDINGER is for ogg/dirac encoding and decoding
# you need ocaml-ogg to enable ocaml-schroedinger
#ocaml-schroedinger

# VOAACENC is for AAC encoding.
#ocaml-voaacenc

# FAAD for AAC decoding.
ocaml-faad

# FLAC is for flac, native and/or ogg (if using ocaml-ogg)
# format decoding and encoding.
ocaml-flac

# ============================================================================
# Sound processing
# ============================================================================

# LADSPA are audio plugins providing sound effects
#ocaml-ladspa

# SoundTouch is for changing pitch and tempo of sound
#ocaml-soundtouch

# Samplerate is for having better quality resampling
ocaml-samplerate

# ============================================================================
# Video processing
# ============================================================================

# GAVL converts from and to many formats,
# is very efficient and has a quality setting for
# tweaking load vs. quality of the conversion.
# It is the recommended module to use with video
#ocaml-gavl

# ============================================================================
# Sound synthesis
# ============================================================================

# DSSI is a standard for synthesizer plugins
#ocaml-dssi

# ============================================================================
# Various modules
# ============================================================================

# Xmlplaylist allow support for various xml format, such as rss, podcast, etc..
ocaml-xmlplaylist

# Lastfm allow support for lastfm radios and the audioscrobbler protocol
# It should be listed *after* ocaml-xmlplaylist in this file
ocaml-lastfm

# A library supporting the OSC protocol to have external controls
# such as faders
#ocaml-lo

# ============================================================================
# Finally, the mandatory lib dtools, duppy and liquidsoap...
# ============================================================================

ocaml-dtools
ocaml-duppy
ocaml-mm
liquidsoap

48
Amelion @Amelion
Народ последний патч супа, 2 недели не падает -полёт нормально.
хм тока терь диджея не подключить вот эта штука не работает:
# live radio
set("harbor.bind_addr","0.0.0.0")
set("harbor.port",xxxx)
set("harbor.password","xxxx")

def live_start(header) =
log("got live source, starting relays..")
ignore(execute("stream_relay.start"))
ignore(execute("archives.start"))
end

def live_stop() =
log("live source has gone, stoping relays..")
ignore(execute("stream_relay.stop"))
ignore(execute("archives.stop"))
end

live = input.harbor(id="live",on_connect=live_start,on_disconnect=live_stop,"dj")

плиз кто сталкивался?

6245
Тарас @tarasian666
а если так

set("harbor.bind_addr","0.0.0.0")

# Some code...

# This defines a source waiting on mount point
# /test-harbor
live = input.harbor("test-harbor",port=8080,password="xxx")

# This is the final stream.
# Uses the live source as soon as available,
# and don't wait for an end of track, since
# we don't want to cut the beginning of the live
# stream.
#
# You may insert a jingle transition here...
radio = fallback(track_sensitive=false,
[live,files])

48
Amelion @Amelion
tarasian666

Да так-то оно подключается, но опять приходим к тому что каждые 4-ре секунды врывается музыка из основного расписания.

6245
Тарас @tarasian666
а насколько "далеко" liquidsoap от подключаемого клиента к harbor ?

у меня все локально (кроме сервера) и такого нет

48
Amelion @Amelion
330 км))) лано тоже попробую с локалки на праздниках буду поближе)) отпишусь, спасибо!

6245
Тарас @tarasian666
ну это еще не много )
знаю люди подключались за тысячи километров и ниче, но только у кого инет страдал то там бывало такое

67
nivs @nivs
Нашёл время и опять добрался до liquidsoap'a... Собрал из исходников, заимел проблемы, но о них потом как-нибудь. Пока такой вопрос: как вы подготавливаете контект для эфира? Какие критерии? Формат, битрейт, кодировка, на чём и какая версия крутится и так далее...

6245
Тарас @tarasian666
критерии - битрейт не меньше битрейта вещания,

формат любой что поддерживает liquidsoap,

кодировка - какая попадется, вещает в любом случае но может не показывать в плеере, в последнее время перекодирую все в utf-8

debian squeeze, Liquidsoap 1.0.0+scm (default@cf69a68fb866:20120414:203005)

67
nivs @nivs
Wav, видимо, не поддерживает. Ура, всё запустилось, спасибо за помощь! Допилю конфиг и выложу для всеобщего употребления, но позже.

Некоторые треки очень тихо играют. Можно ли как-то увеличить громкость воспроизведение этих треков (консольным звуковым редактором или напрямую из liquidsooap)?

И ещё один нелепый вопрос)) Можно ли как-то вот это убожество сократить?)

radio = switch(track_sensitive = true,
[
({0h0m0s-0h0m5s}, clock_0),
({0h0m5s-1h0m0s}, ev),
({1h0m0s-1h0m5s}, clock_1),
({1h0m5s-2h0m0s}, ev),
({2h0m0s-2h0m5s}, clock_2),
({2h0m5s-3h0m0s}, ni),
({3h0m0s-3h0m5s}, clock_3),
({3h0m5s-4h0m0s}, ni),
({4h0m0s-4h0m5s}, clock_4),
({4h0m5s-5h0m0s}, ni),
({5h0m0s-5h0m5s}, clock_5),
({5h0m5s-6h0m0s}, ni),
({6h0m0s-6h0m5s}, clock_6),
({6h0m5s-7h0m0s}, mo),
({7h0m0s-7h0m5s}, clock_7),
({7h0m5s-8h0m0s}, mo),
({8h0m0s-8h0m5s}, clock_8),
({8h0m5s-9h0m0s}, mo),
({9h0m0s-9h0m5s}, clock_9),
({9h0m5s-10h0m0s}, da),
({10h0m0s-10h0m5s}, clock_10),
({10h0m5s-11h0m0s}, da),
({11h0m0s-11h0m5s}, clock_11),
({11h0m5s-12h0m0s}, da),
({12h0m0s-12h0m5s}, clock_12),
({12h0m5s-13h0m0s}, da),
({13h0m0s-13h0m5s}, clock_13),
({13h0m5s-14h0m0s}, da),
({14h0m0s-14h0m5s}, clock_14),
({14h0m5s-15h0m0s}, da),
({15h0m0s-15h0m5s}, clock_15),
({15h0m5s-16h0m0s}, da),
({16h0m0s-16h0m5s}, clock_16),
({16h0m5s-17h0m0s}, da),
({17h0m0s-17h0m5s}, clock_17),
({17h0m5s-18h0m0s}, da),
({18h0m0s-18h0m5s}, clock_18),
({18h0m5s-19h0m0s}, da),
({19h0m0s-19h0m5s}, clock_19),
({19h0m5s-20h0m0s}, ev),
({20h0m0s-20h0m5s}, clock_20),
({20h0m5s-21h0m0s}, ev),
({21h0m0s-21h0m5s}, clock_21),
({21h0m5s-22h0m0s}, ev),
({22h0m0s-22h0m5s}, clock_22),
({22h0m5s-23h0m0s}, ev),
({23h0m0s-23h0m5s}, clock_23),
({23h0m5s-0h0m0s}, ev)

cloc_* - вставочки каждый час... Для каждого часа своя вставка. Длительность около 7 секунд.

Отредактировано nivs - 27.04.2012
6245
Тарас @tarasian666
можно включить компрессор но если очень тихий звук сильно он не поможет или будет искажать те треки что погромче

такое сократить врядли удастсья

67
nivs @nivs
Лучше выиискивать треки поодиночке и увеличивать звук в них

67
nivs @nivs
Часто бывает так, что поток есть, но он пуст... Он чего это может быть? Причём довольно сложно уловить причину, как-то оно рандомно немного происходит. Папки все заполнены...
Выплёвывает иногда такое, но вне зависимости от этих строк треки не проигрываются и, напротив, могут эти строки присутствовать, а песенки играть. :$ ./start_radio
TagLib: ID3v2.4 no longer supports the frame type TDAT. It will be discarded from the tag.
TagLib: MPEG::Header::parse() -- Invalid sample rate.

В логах добавление песен происходит успешно, окончание такое: (log.level = 4)2012/04/30 00:03:37 [metadata.ogg:4] Invalid file extension for "/home/nivs/radio/collection/efir/daytime/jingles/Jingle_2.mp3"!
2012/04/30 00:03:37 [jingles(dot)3:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 43)
2012/04/30 00:03:37 [Radio_320:3] Connection setup was successful.
2012/04/30 00:03:37 [Radio_256:3] Connecting mount Radio_256 for source@radio.spbstu.ru...
2012/04/30 00:03:37 [Radio_256:3] Connection setup was successful.
2012/04/30 00:03:37 [Radio_192:3] Connecting mount Radio_192 for source@radio.spbstu.ru...
2012/04/30 00:03:37 [Radio_192:3] Connection setup was successful.
2012/04/30 00:03:37 [Radio_128:3] Connecting mount Radio_128 for source@radio.spbstu.ru...
2012/04/30 00:03:37 [Radio_128:3] Connection setup was successful.
2012/04/30 00:03:37 [Radio_64:3] Connecting mount Radio_64 for source@radio.spbstu.ru...
2012/04/30 00:03:37 [Radio_64:3] Connection setup was successful.
2012/04/30 00:03:37 [threads:3] Created thread "wallclock_main" (1 total).
2012/04/30 00:03:37 [clock:4] Main phase starts.
2012/04/30 00:03:37 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2012/04/30 00:03:37 [mksafe:3] Switch to safe_blank.
2012/04/30 00:03:37 [safe_blank:4] Activations changed: static=[mksafe:Radio_320:Radio_320], dynamic=[mksafe:Radio_320:Radio_320].
2012/04/30 00:03:37 [mksafe:3] Switch to safe_blank.
2012/04/30 00:03:37 [safe_blank:4] Activations changed: static=[mksafe:Radio_256:Radio_256], dynamic=[mksafe:Radio_256:Radio_256].
2012/04/30 00:03:37 [mksafe:3] Switch to safe_blank.
2012/04/30 00:03:37 [safe_blank:4] Activations changed: static=[mksafe:Radio_192:Radio_192], dynamic=[mksafe:Radio_192:Radio_192].
2012/04/30 00:03:37 [mksafe:3] Switch to safe_blank.
2012/04/30 00:03:37 [safe_blank:4] Activations changed: static=[mksafe:Radio_128:Radio_128], dynamic=[mksafe:Radio_128:Radio_128].
2012/04/30 00:03:37 [mksafe:3] Switch to safe_blank.
2012/04/30 00:03:37 [safe_blank:4] Activations changed: static=[mksafe:Radio_64:Radio_64], dynamic=[mksafe:Radio_64:Radio_64].


в конфиге mksafe применяется в самом конце, при выходе. Ещё раз подчеркну, что с одинаковым конфигом может и запуститься и не запуститься одинаково.

___

Скорее всего это какие-то баги со звуковой подсистемой. Я под виртуалкой сидел, поставил основной системой - всё отлично.

Отредактировано nivs - 30.04.2012
67
nivs @nivs
В общем, если у кого вышеописанная проблема - тишина в эфире при запуске - то лично у меня была беда с кодировкой тегов, python-mutagen помог.

Отредактировано nivs - 04.05.2012
67
nivs @nivs
Вроде как последняя проблема - иногда вылезаетTagLib: MPEG::Header::parse() -- Invalid sample rate.Гугл сазал, что это опасно но не сказал, что же с этим делать. У кого-нибудь попадалось такое?

223
Игорь @devilben
nivs пишет:

Вроде как последняя проблема - иногда вылезаетTagLib: MPEG::Header::parse() -- Invalid sample rate.Гугл сазал, что это опасно но не сказал, что же с этим делать. У кого-нибудь попадалось такое?


Это не критично и является багой самой TagLib а не жидкого мыла, по крайней мере сами разработчики так говорят. У меня частенько оно в логах фигурирует.

Отредактировано devilben - 04.05.2012
67
nivs @nivs
Ну и ладушки тогда... Можно и отдохнуть...

67
nivs @nivs
И снова здравствуйте... Чёрта с два вышло решить проблему с отсутствием звука в потоке, так же не понятно, почему иногда всё же работает хорошо. Мысль о том, что виноваты теги, таки абсурдна. Зато удалось найти конфигурацию, при которой 100% нет музыки в потоке:#!/usr/local/bin/liquidsoap

set("log.file.path","/home/nivs/projects/radio/technical/liquidsoap.log")
set("log.level", 8)

clock = single("/home/nivs/projects/radio/collection/clock/jingleT_17.mp3")
mus_da = playlist("/home/nivs/projects/radio/collection/efir/test")

radio = switch(track_sensitive = false, [
({13h0m0s - 19h57m8s}, mus_da),
({19h57m0s - 19h57m8s}, clock),
({19h57m8s - 13h0m0s}, mus_da)])

radio = crossfade(start_next = 3., fade_out = 2., fade_in = 1., radio)

output.icecast(
%mp3(bitrate = 192),
mount = "Radio_192",
user = "source",
password = "hackme",
mksafe(radio)
)


Есои убрать switch и заменить на обычный поток - всё хорошо. Если убрать crossfade - тоже всё хорошо. Но мне нужно и то и то...
Манипуляции с атрибутами crossfade ни к чему не привели, замена на smart_crossfade тоже.

20 последних строк лога без crossfade (музыка есть):
2012/05/08 20:01:24 [Radio_192:4] Enabling caching mode: active source.
2012/05/08 20:01:24 [Radio_192:3] Connecting mount Radio_192 for source@localhost...
2012/05/08 20:01:24 [decoder.mp3:4] Libmad recognizes "/home/nivs/projects/radio/collection/efir/test/Finger Eleven - Paralyzer.mp3" as MP3 (layer III, 224kbps, 44100Hz, 2 channels).
2012/05/08 20:01:24 [decoder:3] Method "MP3" accepted "/home/nivs/projects/radio/collection/efir/test/Finger Eleven - Paralyzer.mp3".
2012/05/08 20:01:24 [metadata.flac:4] Invalid file extension for "/home/nivs/projects/radio/collection/efir/test/Finger Eleven - Paralyzer.mp3"!
2012/05/08 20:01:24 [metadata.ogg:4] Invalid file extension for "/home/nivs/projects/radio/collection/efir/test/Finger Eleven - Paralyzer.mp3"!
2012/05/08 20:01:24 [test:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 2)
2012/05/08 20:01:25 [Radio_192:3] Connection setup was successful.
2012/05/08 20:01:25 [threads:3] Created thread "wallclock_main" (1 total).
2012/05/08 20:01:25 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2012/05/08 20:01:25 [clock:4] Main phase starts.
2012/05/08 20:01:25 [mksafe:3] Switch to safe_blank.
2012/05/08 20:01:25 [safe_blank:4] Activations changed: static=[mksafe:Radio_192:Radio_192], dynamic=[mksafe:Radio_192:Radio_192].
2012/05/08 20:01:25 [test:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2012/05/08 20:01:25 [test:3] Prepared "/home/nivs/projects/radio/collection/efir/test/Finger Eleven - Paralyzer.mp3" (RID 2).
2012/05/08 20:01:25 [mksafe:3] Switch to switch_4604 with transition.
2012/05/08 20:01:25 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:Radio_192:Radio_192].
2012/05/08 20:01:25 [switch_4604:4] Activations changed: static=[mksafe:Radio_192:Radio_192], dynamic=[mksafe:Radio_192:Radio_192].
2012/05/08 20:01:25 [switch_4604:3] Switch to test.
2012/05/08 20:01:25 [test:4] Activations changed: static=[switch_4604:mksafe:Radio_192:Radio_192], dynamic=[switch_4604:mksafe:Radio_192:Radio_192, switch_4604:mksafe:Radio_192:Radio_192].


20 последних строк лога с crossfade (музыки нет):
2012/05/08 20:01:53 [decoder:4] Trying method "MP3" for "/home/nivs/projects/radio/collection/efir/test/Keane - Somewhere Only We Know.mp3"...
2012/05/08 20:01:53 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2012/05/08 20:01:53 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:Radio_192:Radio_192].
2012/05/08 20:01:53 [mksafe:4] Activations changed: static=[Radio_192:Radio_192], dynamic=[].
2012/05/08 20:01:53 [test:5] Queue is empty!
2012/05/08 20:01:53 [test:5] Failed to prepare track: no file.
2012/05/08 20:01:53 [Radio_192:4] Activations changed: static=[Radio_192], dynamic=[].
2012/05/08 20:01:53 [decoder.mp3:4] Libmad recognizes "/home/nivs/projects/radio/collection/efir/test/Keane - Somewhere Only We Know.mp3" as MP3 (layer III, 192kbps, 44100Hz, 2 channels).
2012/05/08 20:01:53 [Radio_192:4] Enabling caching mode: active source.
2012/05/08 20:01:53 [decoder:3] Method "MP3" accepted "/home/nivs/projects/radio/collection/efir/test/Keane - Somewhere Only We Know.mp3".
2012/05/08 20:01:53 [metadata.flac:4] Invalid file extension for "/home/nivs/projects/radio/collection/efir/test/Keane - Somewhere Only We Know.mp3"!
2012/05/08 20:01:53 [metadata.ogg:4] Invalid file extension for "/home/nivs/projects/radio/collection/efir/test/Keane - Somewhere Only We Know.mp3"!
2012/05/08 20:01:53 [Radio_192:3] Connecting mount Radio_192 for source@localhost...
2012/05/08 20:01:53 [test:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 2)
2012/05/08 20:01:53 [Radio_192:3] Connection setup was successful.
2012/05/08 20:01:53 [threads:3] Created thread "wallclock_main" (1 total).
2012/05/08 20:01:53 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2012/05/08 20:01:53 [clock:4] Main phase starts.
2012/05/08 20:01:53 [mksafe:3] Switch to safe_blank.
2012/05/08 20:01:53 [safe_blank:4] Activations changed: static=[mksafe:Radio_192:Radio_192], dynamic=[mksafe:Radio_192:Radio_192].


Что я делаю не так?

И ещё маленький вопрос - где можно прочитать о том, как надо читать документацию с сайта? В смысле, как расшифровать всякие " (['a],['a])->['a] " , " (([(string*string)])->source('a))->source('a)" и проч. ? С английским беда, офсайт исследовал - не заметил.

6245
Тарас @tarasian666
switch както криво используется и он скорей не понимает что от него хотят
осавить только {19h57m0s - 19h57m8s}, clock и добавить дефолтный плейлист

всякие " (['a],['a])->['a] " , " (([(string*string)])->source('a))->source('a)" и проч. я тоже не читаю )

67
nivs @nivs
Но switch-то без crossfade нормально работает