Merge pull request #285 from jb-alvarado/master
fix skip clip, when is to short
This commit is contained in:
commit
37653553d6
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1003,7 +1003,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout"
|
name = "ffplayout"
|
||||||
version = "0.17.0-beta5"
|
version = "0.17.0-beta6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
@ -1023,7 +1023,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout-api"
|
name = "ffplayout-api"
|
||||||
version = "0.17.0-beta5"
|
version = "0.17.0-beta6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-multipart",
|
"actix-multipart",
|
||||||
@ -1056,7 +1056,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout-lib"
|
name = "ffplayout-lib"
|
||||||
version = "0.17.0-beta5"
|
version = "0.17.0-beta6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
@ -2909,7 +2909,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tests"
|
name = "tests"
|
||||||
version = "0.17.0-beta5"
|
version = "0.17.0-beta6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
|
@ -3,7 +3,7 @@ members = ["ffplayout-api", "ffplayout-engine", "lib", "tests"]
|
|||||||
default-members = ["ffplayout-api", "ffplayout-engine", "tests"]
|
default-members = ["ffplayout-api", "ffplayout-engine", "tests"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.17.0-beta5"
|
version = "0.17.0-beta6"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
repository = "https://github.com/ffplayout/ffplayout"
|
repository = "https://github.com/ffplayout/ffplayout"
|
||||||
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
||||||
|
@ -442,8 +442,8 @@ fn timed_source(
|
|||||||
|| !config.playlist.length.contains(':')
|
|| !config.playlist.length.contains(':')
|
||||||
{
|
{
|
||||||
// when we are in the 24 hour range, get the clip
|
// when we are in the 24 hour range, get the clip
|
||||||
new_node = gen_source(config, node, &playout_stat.chain);
|
|
||||||
new_node.process = Some(true);
|
new_node.process = Some(true);
|
||||||
|
new_node = gen_source(config, node, &playout_stat.chain);
|
||||||
} else if total_delta <= 0.0 {
|
} else if total_delta <= 0.0 {
|
||||||
info!("Begin is over play time, skip: {}", node.source);
|
info!("Begin is over play time, skip: {}", node.source);
|
||||||
} else if total_delta < node.duration - node.seek || last {
|
} else if total_delta < node.duration - node.seek || last {
|
||||||
@ -476,13 +476,10 @@ pub fn gen_source(
|
|||||||
node.cmd = Some(seek_and_length(&node));
|
node.cmd = Some(seek_and_length(&node));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let probe = MediaProbe::new(&config.storage.filler_clip);
|
error!("Source not found: <b><magenta>\"{}\"</></b>", node.source);
|
||||||
|
warn!("Generate filler with <yellow>{duration:.2}</> seconds length!");
|
||||||
|
|
||||||
if node.source.is_empty() {
|
let probe = MediaProbe::new(&config.storage.filler_clip);
|
||||||
warn!("Generate filler with <yellow>{duration:.2}</> seconds length!");
|
|
||||||
} else {
|
|
||||||
error!("Source not found: <b><magenta>{}</></b>", node.source);
|
|
||||||
}
|
|
||||||
|
|
||||||
if config
|
if config
|
||||||
.storage
|
.storage
|
||||||
|
@ -24,13 +24,24 @@ pub fn output(config: &PlayoutConfig, log_format: &str) -> process::Child {
|
|||||||
];
|
];
|
||||||
|
|
||||||
if let Some(mut cmd) = config.out.output_cmd.clone() {
|
if let Some(mut cmd) = config.out.output_cmd.clone() {
|
||||||
if !cmd
|
if !cmd.iter().any(|i| {
|
||||||
.iter()
|
[
|
||||||
.any(|i| ["-c:v", "-vcodec", "-c:a", "-acodec"].contains(&i.as_str()))
|
"-c:v",
|
||||||
{
|
"-c:v:0",
|
||||||
|
"-b:v",
|
||||||
|
"-b:v:0",
|
||||||
|
"-vcodec",
|
||||||
|
"-c:a",
|
||||||
|
"-acodec",
|
||||||
|
"-crf",
|
||||||
|
"-map",
|
||||||
|
"-filter_complex",
|
||||||
|
]
|
||||||
|
.contains(&i.as_str())
|
||||||
|
}) {
|
||||||
enc_cmd.append(&mut cmd);
|
enc_cmd.append(&mut cmd);
|
||||||
} else {
|
} else {
|
||||||
warn!("Desktop output supports custom parameters, but given ones a not supported by ffplay!");
|
warn!("Given output parameter a skipped, they are not supported by ffplay!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ pub fn player(
|
|||||||
|
|
||||||
for rx in ingest_receiver.as_ref().unwrap().try_iter() {
|
for rx in ingest_receiver.as_ref().unwrap().try_iter() {
|
||||||
if let Err(e) = enc_writer.write(&rx.1[..rx.0]) {
|
if let Err(e) = enc_writer.write(&rx.1[..rx.0]) {
|
||||||
error!("Encoder write error: {:?}", e);
|
error!("Error from Ingest: {:?}", e);
|
||||||
|
|
||||||
break 'source_iter;
|
break 'source_iter;
|
||||||
};
|
};
|
||||||
@ -187,7 +187,7 @@ pub fn player(
|
|||||||
|
|
||||||
if dec_bytes_len > 0 {
|
if dec_bytes_len > 0 {
|
||||||
if let Err(e) = enc_writer.write(&buffer[..dec_bytes_len]) {
|
if let Err(e) = enc_writer.write(&buffer[..dec_bytes_len]) {
|
||||||
error!("Encoder write error: {e:?}");
|
error!("Encoder write error: {}", e.kind());
|
||||||
|
|
||||||
break 'source_iter;
|
break 'source_iter;
|
||||||
};
|
};
|
||||||
|
@ -14,8 +14,9 @@ use simplelog::*;
|
|||||||
use crate::utils::Media;
|
use crate::utils::Media;
|
||||||
|
|
||||||
/// Defined process units.
|
/// Defined process units.
|
||||||
#[derive(Clone, Debug, Copy, Eq, Serialize, Deserialize, PartialEq)]
|
#[derive(Clone, Debug, Default, Copy, Eq, Serialize, Deserialize, PartialEq)]
|
||||||
pub enum ProcessUnit {
|
pub enum ProcessUnit {
|
||||||
|
#[default]
|
||||||
Decoder,
|
Decoder,
|
||||||
Encoder,
|
Encoder,
|
||||||
Ingest,
|
Ingest,
|
||||||
@ -31,12 +32,6 @@ impl fmt::Display for ProcessUnit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ProcessUnit {
|
|
||||||
fn default() -> Self {
|
|
||||||
ProcessUnit::Decoder
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
use ProcessUnit::*;
|
use ProcessUnit::*;
|
||||||
|
|
||||||
/// Process Controller
|
/// Process Controller
|
||||||
|
Loading…
x
Reference in New Issue
Block a user