expose audio channel layout to the config. #222
This commit is contained in:
parent
0e3b9e3f80
commit
960280f142
@ -46,15 +46,15 @@ processing:
|
|||||||
help_text: Default processing for all clips, to have them unique. Mode can be playlist
|
help_text: Default processing for all clips, to have them unique. Mode can be playlist
|
||||||
or folder. 'aspect' must be a float number. 'logo' is only used if the path exist.
|
or folder. 'aspect' must be a float number. 'logo' is only used if the path exist.
|
||||||
'logo_scale' scale the logo to target size, leave it blank when no scaling
|
'logo_scale' scale the logo to target size, leave it blank when no scaling
|
||||||
is needed, format is 'number:number', for example '100:-1' for proportional
|
is needed, format is 'width:height', for example '100:-1' for proportional
|
||||||
scaling. With 'logo_opacity' logo can become transparent. With 'audio_tracks' it
|
scaling. With 'logo_opacity' logo can become transparent. With 'audio_tracks' it
|
||||||
is possible to configure how many audio tracks should be processed. With 'logo_filter'
|
is possible to configure how many audio tracks should be processed. 'audio_channels'
|
||||||
|
can be use, if audio has more channels then only stereo. With 'logo_filter'
|
||||||
'overlay=W-w-12:12' you can modify the logo position. With 'use_loudnorm'
|
'overlay=W-w-12:12' you can modify the logo position. With 'use_loudnorm'
|
||||||
you can activate single pass EBU R128 loudness normalization, 'loudnorm_ingest'
|
you can activate single pass EBU R128 loudness normalization, 'loudnorm_ingest'
|
||||||
allows normalization only on ingest stream. 'loud_*' can adjust the loudnorm
|
allows normalization only on ingest stream. 'loud_*' can adjust the loudnorm filter.
|
||||||
filter. With 'custom_filter' it is possible, to apply further filters.
|
With 'custom_filter' it is possible, to apply further filters. The filter outputs
|
||||||
The filter outputs should end with [c_v_out] for video filter, and [c_a_out]
|
should end with [c_v_out] for video filter, and [c_a_out] for audio filter.
|
||||||
for audio filter.
|
|
||||||
mode: playlist
|
mode: playlist
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 576
|
height: 576
|
||||||
@ -66,6 +66,7 @@ processing:
|
|||||||
logo_opacity: 0.7
|
logo_opacity: 0.7
|
||||||
logo_filter: overlay=W-w-12:12
|
logo_filter: overlay=W-w-12:12
|
||||||
audio_tracks: 1
|
audio_tracks: 1
|
||||||
|
audio_channels: 2
|
||||||
add_loudnorm: false
|
add_loudnorm: false
|
||||||
loudnorm_ingest: false
|
loudnorm_ingest: false
|
||||||
loud_i: -18
|
loud_i: -18
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0994fd00d16354b3d3059e8e3fae2ed256264460
|
Subproject commit 6c7aec2b7f9aa71e040bfa6bd500de72074b9937
|
@ -157,8 +157,10 @@ pub struct Processing {
|
|||||||
pub logo_scale: String,
|
pub logo_scale: String,
|
||||||
pub logo_opacity: f32,
|
pub logo_opacity: f32,
|
||||||
pub logo_filter: String,
|
pub logo_filter: String,
|
||||||
#[serde(default)]
|
#[serde(default = "default_tracks")]
|
||||||
pub audio_tracks: i32,
|
pub audio_tracks: i32,
|
||||||
|
#[serde(default = "default_channels")]
|
||||||
|
pub audio_channels: i32,
|
||||||
pub add_loudnorm: bool,
|
pub add_loudnorm: bool,
|
||||||
pub loudnorm_ingest: bool,
|
pub loudnorm_ingest: bool,
|
||||||
pub loud_i: f32,
|
pub loud_i: f32,
|
||||||
@ -242,6 +244,14 @@ pub struct Out {
|
|||||||
pub output_cmd: Option<Vec<String>>,
|
pub output_cmd: Option<Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_tracks() -> i32 {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_channels() -> i32 {
|
||||||
|
2
|
||||||
|
}
|
||||||
|
|
||||||
impl PlayoutConfig {
|
impl PlayoutConfig {
|
||||||
/// Read config from YAML file, and set some extra config values.
|
/// Read config from YAML file, and set some extra config values.
|
||||||
pub fn new(cfg_path: Option<String>) -> Self {
|
pub fn new(cfg_path: Option<String>) -> Self {
|
||||||
@ -328,7 +338,13 @@ impl PlayoutConfig {
|
|||||||
config.processing.loudnorm_ingest,
|
config.processing.loudnorm_ingest,
|
||||||
));
|
));
|
||||||
process_cmd.append(&mut vec_strings![
|
process_cmd.append(&mut vec_strings![
|
||||||
"-ar", "48000", "-ac", "2", "-f", "mpegts", "-"
|
"-ar",
|
||||||
|
"48000",
|
||||||
|
"-ac",
|
||||||
|
config.processing.audio_channels,
|
||||||
|
"-f",
|
||||||
|
"mpegts",
|
||||||
|
"-"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
config.processing.cmd = Some(process_cmd);
|
config.processing.cmd = Some(process_cmd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user