CC-2215: Add ability to enable metadata for ogg streams

-done
This commit is contained in:
mkonecny 2011-05-05 17:15:58 -04:00
parent 48af794cfa
commit 3eafdeef5d
2 changed files with 34 additions and 22 deletions

View File

@ -36,3 +36,11 @@ icecast_genre = "genre"
output_sound_device = false output_sound_device = false
output_icecast_vorbis = true output_icecast_vorbis = true
output_icecast_mp3 = false output_icecast_mp3 = false
#audio stream metadata for vorbis/ogg is disabled by default
#due to a large number of client media players that disconnect
#when the metadata changes to that of a new track. Some versions of
#mplayer and VLC have this problem. Enable this option at your
#own risk!
output_icecast_vorbis_metadata = false

View File

@ -52,34 +52,38 @@ s = map_metadata(append_title, s)
if output_sound_device then if output_sound_device then
out_device = out(s) out_device = out(s)
end end
if output_icecast_mp3 then if output_icecast_mp3 then
out_mp3 = output.icecast(%mp3, out_mp3 = output.icecast(%mp3,
host = icecast_host, port = icecast_port, host = icecast_host, port = icecast_port,
password = icecast_pass, mount = mount_point_mp3, password = icecast_pass, mount = mount_point_mp3,
fallible = true, fallible = true,
restart = true, restart = true,
restart_delay = 5, restart_delay = 5,
url = icecast_url, url = icecast_url,
description = icecast_description, description = icecast_description,
genre = icecast_genre, genre = icecast_genre,
s) s)
end end
if output_icecast_vorbis then if output_icecast_vorbis then
#remove metadata from ogg source and merge tracks to fix bug #remove metadata from ogg source and merge tracks to fix bug
#with vlc and mplayer disconnecting at the end of every track #with vlc and mplayer disconnecting at the end of every track
ogg_s = add(normalize=false, [amplify(0.00001, noise()),s]) if output_icecast_vorbis_metadata then
out_vorbis = output.icecast(%vorbis, s = add(normalize=false, [amplify(0.00001, noise()),s])
host = icecast_host, port = icecast_port, end
password = icecast_pass, mount = mount_point_vorbis,
fallible = true, out_vorbis = output.icecast(%vorbis,
restart = true, host = icecast_host, port = icecast_port,
restart_delay = 5, password = icecast_pass, mount = mount_point_vorbis,
url = icecast_url, fallible = true,
description = icecast_description, restart = true,
genre = icecast_genre, restart_delay = 5,
ogg_s) url = icecast_url,
description = icecast_description,
genre = icecast_genre,
s)
end end