!Braking change in config!, fix little issues with advanced settings
This commit is contained in:
parent
1924392ce2
commit
4dee46857c
@ -62,10 +62,10 @@ processing:
|
|||||||
is needed, format is 'width:height', 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. 'audio_channels'
|
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'
|
can be use, if audio has more channels then only stereo. With 'logo_position' in format
|
||||||
'overlay=W-w-12:12' you can modify the logo position. With 'custom_filter'
|
'x:y' you set the logo position. With 'custom_filter' it is possible, to apply further
|
||||||
it is possible, to apply further filters. The filter outputs should end with
|
filters. The filter outputs should end with [c_v_out] for video filter, and
|
||||||
[c_v_out] for video filter, and [c_a_out] for audio filter.
|
[c_a_out] for audio filter.
|
||||||
mode: playlist
|
mode: playlist
|
||||||
audio_only: false
|
audio_only: false
|
||||||
copy_audio: false
|
copy_audio: false
|
||||||
@ -78,7 +78,7 @@ processing:
|
|||||||
logo: /usr/share/ffplayout/logo.png
|
logo: /usr/share/ffplayout/logo.png
|
||||||
logo_scale:
|
logo_scale:
|
||||||
logo_opacity: 0.7
|
logo_opacity: 0.7
|
||||||
logo_filter: overlay=W-w-12:12
|
logo_position: W-w-12:12
|
||||||
audio_tracks: 1
|
audio_tracks: 1
|
||||||
audio_track_index: -1
|
audio_track_index: -1
|
||||||
audio_channels: 2
|
audio_channels: 2
|
||||||
|
@ -314,7 +314,7 @@ fn fade(node: &mut Media, chain: &mut Filters, nr: i32, filter_type: FilterType)
|
|||||||
|
|
||||||
if node.seek > 0.0 || node.unit == Ingest {
|
if node.seek > 0.0 || node.unit == Ingest {
|
||||||
let fade_in = match &ADVANCED_CONFIG.decoder.filters.fade_in {
|
let fade_in = match &ADVANCED_CONFIG.decoder.filters.fade_in {
|
||||||
Some(fade) => custom_format(fade, &[t]),
|
Some(fade) => custom_format(&format!("{t}{fade}"), &[t]),
|
||||||
None => format!("{t}fade=in:st=0:d=0.5"),
|
None => format!("{t}fade=in:st=0:d=0.5"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -323,7 +323,10 @@ fn fade(node: &mut Media, chain: &mut Filters, nr: i32, filter_type: FilterType)
|
|||||||
|
|
||||||
if (node.out != node.duration && node.out - node.seek > 1.0) || fade_audio {
|
if (node.out != node.duration && node.out - node.seek > 1.0) || fade_audio {
|
||||||
let fade_out = match &ADVANCED_CONFIG.decoder.filters.fade_out {
|
let fade_out = match &ADVANCED_CONFIG.decoder.filters.fade_out {
|
||||||
Some(fade) => custom_format(fade, &[t, &(node.out - node.seek - 1.0).to_string()]),
|
Some(fade) => custom_format(
|
||||||
|
&format!("{t}{fade}"),
|
||||||
|
&[t, &(node.out - node.seek - 1.0).to_string()],
|
||||||
|
),
|
||||||
None => format!("{t}fade=out:st={}:d=1.0", (node.out - node.seek - 1.0)),
|
None => format!("{t}fade=out:st={}:d=1.0", (node.out - node.seek - 1.0)),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -350,11 +353,11 @@ fn overlay(node: &mut Media, chain: &mut Filters, config: &PlayoutConfig) {
|
|||||||
&config.processing.logo.replace('\\', "/").replace(':', "\\\\:"),
|
&config.processing.logo.replace('\\', "/").replace(':', "\\\\:"),
|
||||||
&config.processing.logo_opacity.to_string(),
|
&config.processing.logo_opacity.to_string(),
|
||||||
&scale.to_string(),
|
&scale.to_string(),
|
||||||
&config.processing.logo_filter,
|
&config.processing.logo_position,
|
||||||
]),
|
]),
|
||||||
None => format!(
|
None => format!(
|
||||||
"null[v];movie={}:loop=0,setpts=N/(FRAME_RATE*TB),format=rgba,colorchannelmixer=aa={}{scale}[l];[v][l]{}:shortest=1",
|
"null[v];movie={}:loop=0,setpts=N/(FRAME_RATE*TB),format=rgba,colorchannelmixer=aa={}{scale}[l];[v][l]overlay={}:shortest=1",
|
||||||
config.processing.logo.replace('\\', "/").replace(':', "\\\\:"), config.processing.logo_opacity, config.processing.logo_filter
|
config.processing.logo.replace('\\', "/").replace(':', "\\\\:"), config.processing.logo_opacity, config.processing.logo_position
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ pub struct Processing {
|
|||||||
pub logo: String,
|
pub logo: String,
|
||||||
pub logo_scale: String,
|
pub logo_scale: String,
|
||||||
pub logo_opacity: f32,
|
pub logo_opacity: f32,
|
||||||
pub logo_filter: String,
|
pub logo_position: String,
|
||||||
#[serde(default = "default_tracks")]
|
#[serde(default = "default_tracks")]
|
||||||
pub audio_tracks: i32,
|
pub audio_tracks: i32,
|
||||||
#[serde(default = "default_channels")]
|
#[serde(default = "default_channels")]
|
||||||
@ -435,10 +435,6 @@ impl PlayoutConfig {
|
|||||||
} else if config.processing.copy_video {
|
} else if config.processing.copy_video {
|
||||||
process_cmd.append(&mut vec_strings!["-c:v", "copy"]);
|
process_cmd.append(&mut vec_strings!["-c:v", "copy"]);
|
||||||
} else if let Some(decoder_cmd) = &ADVANCED_CONFIG.decoder.output_cmd {
|
} else if let Some(decoder_cmd) = &ADVANCED_CONFIG.decoder.output_cmd {
|
||||||
if !decoder_cmd.contains(&"-r".to_string()) {
|
|
||||||
process_cmd.append(&mut vec_strings!["-r", &config.processing.fps]);
|
|
||||||
}
|
|
||||||
|
|
||||||
process_cmd.append(&mut decoder_cmd.clone());
|
process_cmd.append(&mut decoder_cmd.clone());
|
||||||
} else {
|
} else {
|
||||||
let bitrate = format!(
|
let bitrate = format!(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user