support custom filter in playlist
This commit is contained in:
parent
fbd752a9ee
commit
176cd0a9ce
@ -1,6 +1,7 @@
|
||||
## Custom filter
|
||||
|
||||
ffplayout allows it to define a custom filter string. For that is the parameter **custom_filter** in the **ffplayout.yml** config file.
|
||||
ffplayout allows it to define a custom filter string. For that is the parameter **custom_filter** in the **ffplayout.yml** config file. The playlist can also contain a **custom_filter** paramter for every clip, with the same usage.
|
||||
|
||||
The filter outputs should end with `[c_v_out]` for video filter, and `[c_a_out]` for audio filter. The filters will be apply on every clip and after the filters which unify the clips.
|
||||
|
||||
It is possible to apply only video or audio filters, or both. For a better understanding here some examples:
|
||||
|
@ -382,6 +382,7 @@ pub fn filter_chains(
|
||||
realtime_filter(node, &mut filters, config, Audio);
|
||||
|
||||
custom(&config.processing.custom_filter, &mut filters);
|
||||
custom(&node.custom_filter, &mut filters);
|
||||
|
||||
let mut filter_cmd = vec![];
|
||||
let mut filter_str: String = String::new();
|
||||
|
@ -116,6 +116,7 @@ fn loop_playlist(
|
||||
last_ad: Some(false),
|
||||
next_ad: Some(false),
|
||||
filter: Some(vec![]),
|
||||
custom_filter: String::new(),
|
||||
};
|
||||
|
||||
if begin < start_sec + length {
|
||||
|
@ -69,6 +69,9 @@ pub struct Media {
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub filter: Option<Vec<String>>,
|
||||
|
||||
#[serde(default)]
|
||||
pub custom_filter: String,
|
||||
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub probe: Option<MediaProbe>,
|
||||
|
||||
@ -113,6 +116,7 @@ impl Media {
|
||||
audio: String::new(),
|
||||
cmd: Some(vec!["-i".to_string(), src]),
|
||||
filter: Some(vec![]),
|
||||
custom_filter: String::new(),
|
||||
probe,
|
||||
last_ad: Some(false),
|
||||
next_ad: Some(false),
|
||||
|
Loading…
x
Reference in New Issue
Block a user