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

liquidsoap

 

32
Danila @Danila
вот что говорит
Показать текст


решил проблему так: в icecast.xml подправил строку <sources>2</sources> на нужное количество

Отредактировано Danila - 24.03.2011
32
Danila @Danila
а liquidsoap может потовое видео транслировать?
и как сделать несколько input.harbor?

6245
Тарас @tarasian666
может

по разному назвать плейлисты и маунты

32
Danila @Danila
вот конфиг для видео-потока:
#!/usr/bin/liquidsoap -d

# где будут логи
set("log.file.path","/tmp/video.log")

set("frame.video.channels",1)
set("frame.video.width",320)
set("frame.video.height",240)
set("frame.video.fps",25)
video = mksafe(playlist(reload=600, mode="normal","/home/radio/radio/video"))

output.icecast.theora(
quality=100,vorbis_quality=2.,
skeleton=true,restart=true,restart_delay=3,
mount="Video.ogg",name="Video",protocol="http",
host="localhost",port=8000,password="xxx",
genre="xx",url="http://xx.x",description="xx",
video)

в какой формат нужно конвертить исходное видео для потока?
или какие декодеры поставить и как применить?
вот логи:
2011/03/25 12:25:54 [main:3] Liquidsoap 0.9.2
2011/03/25 12:25:54 [lang:3] flac binary not found: flac decoder disabled.
2011/03/25 12:25:54 [lang:3] metaflac binary not found: flac metadata resolver disabled.
2011/03/25 12:25:54 [threads:3] Created thread "non-blocking queue #1".
2011/03/25 12:25:54 [threads:3] Created thread "generic queue #1".
2011/03/25 12:25:54 [threads:3] Created thread "root" (1 total).
2011/03/25 12:25:54 [root:3] Waking up active nodes...
2011/03/25 12:25:54 [video:3] Loading playlist...
2011/03/25 12:25:54 [video:3] Playlist is a directory
2011/03/25 12:25:54 [video:3] Successfully loaded a playlist of 2 tracks.
2011/03/25 12:25:54 [Video(dot)ogg:3] Connecting mount Video.ogg for source@localhost...
2011/03/25 12:25:54 [Video(dot)ogg:3] Connection setup was successful.
2011/03/25 12:25:54 [root:3] Broadcast starts up!
2011/03/25 12:25:54 [format.mp3:2] Mime type for /home/radio/radio/video/Wildlife.avi is not valid: video/x-msvideo
2011/03/25 12:25:54 [decoder:3] Unable to decode "/home/radio/radio/video/Wildlife.avi"!
2011/03/25 12:25:54 [mksafe:3] Switch to safe_blank.

6245
Тарас @tarasian666
ocaml-gavl
подключен?

833
metra52 @metra52
2011/03/26 03:59:15 >>> LOG START
2011/03/26 03:59:14 [protocols.external:3] Didn't find "ufetch".
2011/03/26 03:59:14 [protocols.external:3] Found "/usr/bin/wget".
2011/03/26 03:59:15 [main:3] Liquidsoap 1.0.0-beta+svn (trunk/liquidsoap@rev8237)
2011/03/26 03:59:15 [main:3] Using: pcre=5.13.0 dtools=0.2.2 duppy=0.4.0
0.4.0 duppy.syntax=0.4.0
0.4.0 cry=0.1.6 mm=0.1.0 mad=0.4.0 lame=0.2.4 samplerate=0.1.1 taglib=0.1.4 camomile=0.7.1 faad=0.2.0
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [main:2] DISCLAIMER: This version of Liquidsoap has been
2011/03/26 03:59:15 [main:2] compiled from a snapshot of the development code.
2011/03/26 03:59:15 [main:2] As such, it should not be used in production
2011/03/26 03:59:15 [main:2] unless you know what you are doing!
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [main:2] We are, however, very interested in any feedback
2011/03/26 03:59:15 [main:2] about our development code and committed to fix
2011/03/26 03:59:15 [main:2] issues as soon as possible.
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [main:2] If you are interested in collaborating to
2011/03/26 03:59:15 [main:2] the development of Liquidsoap, feel free to
2011/03/26 03:59:15 [main:2] drop us a mail at <savonet-devl@lists.sf.net>
2011/03/26 03:59:15 [main:2] or to join the #savonet IRC channel on Freenode.
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [main:2] Please send any bug report or feature request
2011/03/26 03:59:15 [main:2] using our trac <**********>.
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [main:2] We hope you enjoy this snapshot build of Liquidsoap!
2011/03/26 03:59:15 [main:2]
2011/03/26 03:59:15 [lang:3] Did not find flac binary: flac decoder disabled.
2011/03/26 03:59:15 [lang:3] Did not find metaflac binary: flac metadata resolver disabled.
2011/03/26 03:59:15 [lang:3] Did not find faad binary: faad decoder disabled.
2011/03/26 03:59:15 [lang:3] Lastfm/audioscrobbler support was not compiled.
2011/03/26 03:59:15 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2011/03/26 03:59:15 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2011/03/26 03:59:15 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2011/03/26 03:59:15 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2011/03/26 03:59:15 [threads:3] Created thread "generic queue #1".
2011/03/26 03:59:15 [threads:3] Created thread "non-blocking queue #1".
2011/03/26 03:59:15 [jingls(dot)txt:3] Loading playlist...
2011/03/26 03:59:15 [request:3] Nonexistent file or ill-formed URI "/var/www/metra52/data/www/onlydc.ru/music/jingls.txt"!
2011/03/26 03:59:15 [jingls(dot)txt:2] Failed when resolving playlist URI "/var/www/metra52/data/www/onlydc.ru/music/jingls.txt"!
2011/03/26 03:59:15 [jingls(dot)txt:3] Got an empty list: keeping the old one.
2011/03/26 03:59:15 [Hard House:3] Loading playlist...
2011/03/26 03:59:15 [Hard House:3] Playlist is a directory.
2011/03/26 03:59:15 [Hard House:3] Successfully loaded a playlist of 88 tracks.
2011/03/26 03:59:15 [House:3] Loading playlist...
2011/03/26 03:59:15 [House:3] Playlist is a directory.
2011/03/26 03:59:15 [House:3] Successfully loaded a playlist of 620 tracks.
2011/03/26 03:59:15 [stderr:3] init: exception encountered during main phase:
2011/03/26 03:59:15 [stderr:3] Unix.Unix_error(1, "open", "/dev/dsp")
2011/03/26 03:59:15 [stderr:3] exception: Unix.Unix_error(1, "open", "/dev/dsp")
2011/03/26 03:59:15 [main:3] Shutdown started!
2011/03/26 03:59:15 [main:3] Waiting for threads to terminate...
2011/03/26 03:59:15 [main:3] Cleaning downloaded files...
2011/03/26 03:59:15 >>> LOG END

6245
Тарас @tarasian666
ты что input alsa подключил?

833
metra52 @metra52
да вроде нет. залезь ко мне погляди

48
Amelion @Amelion
live=rewrite_metadata([("artist","SV Radio"),
("title","LIVE Stream"),
("comment","http://xx.x")],live)

# к каждому кусочку метаданных прибаляем слово
def append_title(m) =
# берём настоящее название
title = m["title"]
# вставляем новое значение
[("title","#{title} - (((=xx=)))")]
---------------------------
Dannila
Мета-даннные точно заменяются при работе микрофона?

223
Игорь @devilben
Сделал на два маунта - mp3 128kbps и aac+ 64kbps. Смущает то что в aac+ битрейт плавает 64-70kbps. В плеере показывает Codec profile : AAC SBR. В mp3 битрейт постоянный. Подскажите, это нормально?
В скрипте так:


output.icecast(%mp3,
mount="/listen",
host="127.0.0.1", port=8000,
password="passwd",
genre="Various",
url="http://www.domain.com",
description="My radio MP3",
name="My radio",
radio
)

output.icecast(%aacplus(channels=2, samplerate=44100, bitrate=64),
mount="/listenAACplus",
host="127.0.0.1", port=8000,
password="passwd",
genre="Various",
url="http://www.domain.com",
description="My radio AAC+",
name="My radio",
radio
)

97
aPhone @aPhone
суп, последняя версия. проблемы с импут.харбор. Скажите плиз какие признаки того что эта функция работает? я так понимаю если обратиться на адрес localhost:9000 там должна появиться страница супа?
дело в том что у меня никак не запускается эта функция. Вот конфиг:

set("server.telnet", true)
#localhost - цифрами - например 192.168.0.1
set("harbor.bind_addr","127.0.0.1")
set("harbor.port",9000)
set("harbor.password","pass")
live = input.harbor("live")
radiolive = fallback(track_sensitive=false,[live,radio])

6245
Тарас @tarasian666
aPhone пишет:

я так понимаю если обратиться на адрес localhost:9000 там должна появиться страница супа?

нет, максимум что напишет "This page isn't available."
вот какой конфиг должен быть
live = input.harbor("live",port=9000,password="***")
radio = fallback(track_sensitive=false,[live,myplaylist])

ps не суп а мыло

97
aPhone @aPhone
Спасибо большое. такая схема заработала!!!))
а как организовать теперь кросфейд при подключении и выключении диджея?

set("harbor.bind_addr","0.0.0.0")
live = input.harbor("live",port=9000,password="111")
radio = fallback(track_sensitive=false,[live,radio])

п.с. суп просто звучит как то лучше, ведь читается как ликваСУП :)

Отредактировано aPhone - 05.04.2011
6245
Тарас @tarasian666
просто кроссфейд добавить например, так же как и на плейлист

ps читаеться скорее как лыквыдсооп

97
aPhone @aPhone
я сделал вот так:

jingles = playlist("/home/and/jingles")
music = playlist(reload=600, "/home/and/music")
music = mksafe(music)
music = crossfade( fade_out = 7.0, fade_in = 7.0, start_next = 7.0, music )
radio = smooth_add(normal=music,special=switch([({ 00m0s or 30m0s }, jingles)]))

##########################################################
set("server.telnet", true)
#localhost - цифрами - например 192.168.0.1
set("harbor.bind_addr","0.0.0.0")
live = input.harbor("live",port=9000,password="111")
live = crossfade(start_next=1.,fade_out=7.,fade_in=5., live)
radio = fallback(track_sensitive=false,[live,music])

Но вот основные косяки которые есть при такой схеме:
1) когда подключается диджей то играющая песня не затухает кросфейдом, а просто обрывается и диджей кросфейдом входит в эфир
2) когда он отключается, то выходит он кросфейдом, но вот играющая песня резко так же без кросфейда врывается в эфир и + еще она играет не сначала, а с середины или как попадет
Как сделать кросфейд нормальный? и как сделать чтобы песня проигрывалась сначало после выхода диджея?

Отредактировано aPhone - 05.04.2011
6245
Тарас @tarasian666
не туда наложил кросфейд, fallback получаеться весь кроссфейд "ламает", вообще сделать в данном случае "двухсторонний" кроссфейд сложно

чтоб сначала играл трек можно сделать track_sensitive=true но тогда и диджей включиться после того как трек доиграет

97
aPhone @aPhone
т.е. он вообще подключиться не сможет? или будет подключен но его не будет в эфире?
хм... а как же сделать то двухсторонний кросфейд, а то сейчас можно сказать как то не очень :(
crossfade (live,music) - может есть что-то типа такой схемы? :)

и еще.. а как тогда сделать чтобы когда диджей подключался, нонстоп который играет останавливался.. Т.е. потом когда диджей отключится, там уже не будет с середины играть, а будет сначало :)

Отредактировано aPhone - 05.04.2011
6245
Тарас @tarasian666
будет подключен но его не будет в эфире пока не закончиться трек

мне пока так и не удалось, но сильно не вникал так как оно мне не оч нужно

97
aPhone @aPhone
и еще.. а как тогда сделать чтобы когда диджей подключался, нонстоп который играет останавливался.. Т.е. потом когда диджей отключится, там уже не будет с середины играть, а будет сначало :)

вот еще сообщение :)

97
aPhone @aPhone
я вот кое что нашел... скажите может через это можно организовать кросфейд с инпут.харбор?

# Mixes two streams, with faded transitions between the state when only the
# normal stream is available and when the special stream gets added on top of
# it.
# @category Source / Track Processing
# @param ~delay Delay before starting the special source.
# @param ~p Portion of amplitude of the normal source in the mix.
# @param ~normal The normal source, which could be called the carrier too.
# @param ~special The special source.
def smooth_add(~delay=0.5,~p=0.2,~normal,~special)
d = delay
fade.final = fade.final(duration=d*2.)
fade.initial = fade.initial(duration=d*2.)
q = 1. - p
c = amplify
fallback(track_sensitive=false,
[special,normal],
transitions=[
fun(normal,special)->
add(normalize=false,
[c(p,normal),
c(q,fade.final(type="sin",normal)),
sequence([blank(duration=d),c(q,special)])]),
fun(special,normal)->
add(normalize=false,
[c(p,normal),
c(q,fade.initial(type="sin",normal))])
])
end