CC-430: Audio normalization (Replaygain Support)
-Added support on Liquidsoap side
This commit is contained in:
parent
ce698d4123
commit
5c1af49252
|
@ -447,19 +447,22 @@ class Application_Model_Schedule {
|
|||
$con = Propel::getConnection();
|
||||
|
||||
$baseQuery = "SELECT st.file_id AS file_id,"
|
||||
." st.id as id,"
|
||||
." st.instance_id as instance_id,"
|
||||
." st.id AS id,"
|
||||
." st.instance_id AS instance_id,"
|
||||
." st.starts AS start,"
|
||||
." st.ends AS end,"
|
||||
." st.cue_in AS cue_in,"
|
||||
." st.cue_out AS cue_out,"
|
||||
." st.fade_in AS fade_in,"
|
||||
." st.fade_out AS fade_out,"
|
||||
." si.starts as show_start,"
|
||||
." si.ends as show_end"
|
||||
." FROM $CC_CONFIG[scheduleTable] as st"
|
||||
." LEFT JOIN $CC_CONFIG[showInstances] as si"
|
||||
." ON st.instance_id = si.id";
|
||||
." si.starts AS show_start,"
|
||||
." si.ends AS show_end,"
|
||||
." f.replay_gain AS replay_gain"
|
||||
." FROM $CC_CONFIG[scheduleTable] AS st"
|
||||
." LEFT JOIN $CC_CONFIG[showInstances] AS si"
|
||||
." ON st.instance_id = si.id"
|
||||
." LEFT JOIN $CC_CONFIG[filesTable] AS f"
|
||||
." ON st.file_id = f.id";
|
||||
|
||||
|
||||
$predicates = " WHERE st.ends > '$p_startTime'"
|
||||
|
@ -597,7 +600,8 @@ class Application_Model_Schedule {
|
|||
'cue_out' => Application_Common_DateHelper::CalculateLengthInSeconds($item["cue_out"]),
|
||||
'start' => $start,
|
||||
'end' => Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"]),
|
||||
'show_name' => $showName
|
||||
'show_name' => $showName,
|
||||
'replay_gain' => $item["replay_gain"]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
need to install the following packages:
|
||||
|
||||
mp3gain
|
||||
vorbisgain
|
||||
flac
|
||||
vorbis-tools
|
|
@ -10,6 +10,7 @@ time = ref string_of(gettimeofday())
|
|||
|
||||
queue = audio_to_stereo(id="queue_src", request.equeue(id="queue", length=0.5))
|
||||
queue = cue_cut(queue)
|
||||
queue = amplify(1., override="replay_gain", queue)
|
||||
|
||||
pypo_data = ref '0'
|
||||
web_stream_enabled = ref false
|
||||
|
|
|
@ -474,9 +474,9 @@ class PypoPush(Thread):
|
|||
self.telnet_lock.release()
|
||||
|
||||
def create_liquidsoap_annotation(self, media):
|
||||
# we need lia_start_next value in the annotate. That is the value that controlls overlap duration of crossfade.
|
||||
return 'annotate:media_id="%s",liq_start_next="0",liq_fade_in="%s",liq_fade_out="%s",liq_cue_in="%s",liq_cue_out="%s",schedule_table_id="%s":%s' \
|
||||
% (media['id'], float(media['fade_in']) / 1000, float(media['fade_out']) / 1000, float(media['cue_in']), float(media['cue_out']), media['row_id'], media['dst'])
|
||||
# We need liq_start_next value in the annotate. That is the value that controls overlap duration of crossfade.
|
||||
return 'annotate:media_id="%s",liq_start_next="0",liq_fade_in="%s",liq_fade_out="%s",liq_cue_in="%s",liq_cue_out="%s",schedule_table_id="%s",replay_gain="%s dB":%s' \
|
||||
% (media['id'], float(media['fade_in']) / 1000, float(media['fade_out']) / 1000, float(media['cue_in']), float(media['cue_out']), media['row_id'], media['replay_gain'], media['dst'])
|
||||
|
||||
def run(self):
|
||||
try: self.main()
|
||||
|
|
Loading…
Reference in New Issue