Skip to content

Commit

Permalink
Merge pull request #97 from pipeless-ai/rtmp_fix
Browse files Browse the repository at this point in the history
fix: Fix RTMP output
  • Loading branch information
miguelaeh committed Dec 5, 2023
2 parents 3bc4b75 + f7f0631 commit d97d214
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pipeless/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pipeless/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pipeless-ai"
version = "1.2.0"
version = "1.2.1"
edition = "2021"
authors = ["Miguel A. Cabrera Minagorri"]
description = "An open-source computer vision framework to build and deploy applications in minutes"
Expand Down
28 changes: 14 additions & 14 deletions pipeless/src/output/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,28 +125,28 @@ fn create_processing_bin(stream: &StreamDef) -> Result<gst::Bin, OutputPipelineE
} else if stream.video.get_protocol() == "rtmp" {
let videoconvert = pipeless::gst::utils::create_generic_component(
"videoconvert", "videoconvert")?;
let encoder = pipeless::gst::utils::create_generic_component(
"openh264enc", "encoder")?;
let parser = pipeless::gst::utils::create_generic_component(
"h264parse", "parser")?;
let queue = pipeless::gst::utils::create_generic_component(
"queue", "queue")?;
let encoder = pipeless::gst::utils::create_generic_component(
"x264enc", "encoder")?;
let taginject = pipeless::gst::utils::create_generic_component(
"taginject", "taginject")?;
let muxer = pipeless::gst::utils::create_generic_component(
"flvmux", "muxer")?;
bin.add_many([
&videoconvert, &queue, &encoder, &taginject, &muxer
&videoconvert, &encoder, &parser, &queue, &muxer
]).map_err(|_| { OutputPipelineError::new("Unable to add elements to processing bin") })?;

muxer.set_property("streamable", true);

videoconvert.link(&queue)
.map_err(|_| { OutputPipelineError::new("Unable to link videoconvert to queue") })?;
queue.link(&encoder)
.map_err(|_| { OutputPipelineError::new("Unable to link queue to encoder") })?;
encoder.link(&taginject)
.map_err(|_| { OutputPipelineError::new("Unable to link encoder to taginject") })?;
taginject.link(&muxer)
.map_err(|_| { OutputPipelineError::new("Unable to link taginject to muxer") })?;
videoconvert.link(&encoder)
.map_err(|_| { OutputPipelineError::new("Unable to link videoconvert to encoder") })?;
encoder.link(&parser)
.map_err(|_| { OutputPipelineError::new("Unable to link encoder to parser") })?;
parser.link(&queue)
.map_err(|_| { OutputPipelineError::new("Unable to link parser to queue") })?;
queue.link(&muxer)
.map_err(|_| { OutputPipelineError::new("Unable to link queue to muxer") })?;

// Ghost pads to be able to plug other components to the bin
let videoconvert_sink_pad = videoconvert.static_pad("sink")
Expand Down Expand Up @@ -477,4 +477,4 @@ impl Pipeline {
};
set_pipeline_tags(&self.gst_pipeline, &merged_tags);
}
}
}

0 comments on commit d97d214

Please sign in to comment.