-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sending RTMP from GStreamer not working #39
Comments
I can't analyze the reason according to your logs..and I cannot reproduce the problem in my environment using the latest xiu version and the gstreamer version:
You'd better provide more information and necessary steps to reproduce the problem.. |
GStreamer |
Try the fix branch. |
Same problem:
|
Check the xiu project file: Cargo.toml : did you comment out the rtmp network path and use the local path instead?
and the httpflv/hls' Cargo.toml also needs to be updated. |
I did not. Just tried but it doesn't build then. $ git diff
diff --git a/application/xiu/Cargo.toml b/application/xiu/Cargo.toml
index e5a06c1..78d1497 100644
--- a/application/xiu/Cargo.toml
+++ b/application/xiu/Cargo.toml
@@ -27,14 +27,10 @@ axum = "0.6.10"
tokio-metrics = { version = "0.2.0", default-features = false }
uuid = { version = "0.6.5", features = ["v4"] }
-rtmp = "0.3.0"
-httpflv = "0.2.0"
-hls = "0.2.0"
-env_logger_extend = "0.1.1"
-# rtmp = { path = "../../protocol/rtmp/" }
-# httpflv = { path = "../../protocol/httpflv/" }
-# hls = { path = "../../protocol/hls/" }
-# env_logger_extend = { path = "../../library/logger/" }
+rtmp = { path = "../../protocol/rtmp/" }
+httpflv = { path = "../../protocol/httpflv/" }
+hls = { path = "../../protocol/hls/" }
+env_logger_extend = { path = "../../library/logger/" }
[features]
diff --git a/protocol/httpflv/Cargo.toml b/protocol/httpflv/Cargo.toml
index 0e1f831..aefc32c 100644
--- a/protocol/httpflv/Cargo.toml
+++ b/protocol/httpflv/Cargo.toml
@@ -19,10 +19,8 @@ uuid = { version = "0.6.5", features = ["v4"] }
hyper = { version = "0.14", features = ["full"] }
futures = "0.3"
-xflv = "0.2.0"
-rtmp = "0.3.0"
-# xflv = { path = "../../library/container/flv/" }
-# rtmp = { path = "../rtmp/" } #"0.0.4"
+xflv = { path = "../../library/container/flv/" }
+rtmp = { path = "../rtmp/" } #"0.0.4"
[dependencies.tokio]
version = "1.4.0"
diff --git a/protocol/rtmp/Cargo.toml b/protocol/rtmp/Cargo.toml
index 1065e19..8000ec4 100644
--- a/protocol/rtmp/Cargo.toml
+++ b/protocol/rtmp/Cargo.toml
@@ -31,13 +31,9 @@ serde_json = { version = "1", default-features = false, features = [
serde = { version = "1.0", features = ["derive", "rc"] }
serde_with = "2.2.0"
-bytesio = "0.2.0"
-xflv = "0.2.0"
-h264-decoder = "0.1.0"
-
-# bytesio = { path = "../../library/bytesio/" }
-# xflv = { path = "../../library/container/flv/" }
-# h264-decoder = { path = "../../library/codec/h264/" }
+bytesio = { path = "../../library/bytesio/" }
+xflv = { path = "../../library/container/flv/" }
+h264-decoder = { path = "../../library/codec/h264/" }
$ cargo run --bin xiu
Updating crates.io index
Compiling xiu v0.6.0 (/var/home/cassidy/dev/rust/xiu/application/xiu)
error[E0308]: arguments to this function are incorrect
--> application/xiu/src/service.rs:186:17
|
186 | RtmpEventProcessor::new(cient_event_consumer, event_producer);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: expected `rtmp::channels::define::ClientEvent`, found `ClientEvent`
--> application/xiu/src/service.rs:186:41
|
186 | RtmpEventProcessor::new(cient_event_consumer, event_producer);
| ^^^^^^^^^^^^^^^^^^^^
= note: `ClientEvent` and `rtmp::channels::define::ClientEvent` have similar names, but are actually distinct types
note: `ClientEvent` is defined in crate `rtmp`
--> /var/home/cassidy/dev/rust/xiu/protocol/rtmp/src/channels/define.rs:94:1
|
94 | pub enum ClientEvent {
| ^^^^^^^^^^^^^^^^^^^^
note: `rtmp::channels::define::ClientEvent` is defined in crate `rtmp`
--> /var/home/cassidy/.cargo/registry/src/github.com-1ecc6299db9ec823/rtmp-0.3.0/src/channels/define.rs:94:1
|
94 | pub enum ClientEvent {
| ^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `rtmp` are being used?
note: expected `rtmp::channels::define::ChannelEvent`, found `ChannelEvent`
--> application/xiu/src/service.rs:186:63
|
186 | RtmpEventProcessor::new(cient_event_consumer, event_producer);
| ^^^^^^^^^^^^^^
= note: `ChannelEvent` and `rtmp::channels::define::ChannelEvent` have similar names, but are actually distinct types
note: `ChannelEvent` is defined in crate `rtmp`
--> /var/home/cassidy/dev/rust/xiu/protocol/rtmp/src/channels/define.rs:37:1
|
37 | pub enum ChannelEvent {
| ^^^^^^^^^^^^^^^^^^^^^
note: `rtmp::channels::define::ChannelEvent` is defined in crate `rtmp`
--> /var/home/cassidy/.cargo/registry/src/github.com-1ecc6299db9ec823/rtmp-0.3.0/src/channels/define.rs:37:1
|
37 | pub enum ChannelEvent {
| ^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `rtmp` are being used?
note: associated function defined here
--> /var/home/cassidy/dev/rust/xiu/protocol/hls/src/rtmp_event_processor.rs:12:12
|
12 | pub fn new(consumer: ClientEventConsumer, event_producer: ChannelEventProducer) -> Self {
| ^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `xiu` due to previous error The usual good practice here is to always use the local crates and change it only when releasing. |
pull the latest code and try again |
That works! 👍 |
You closed the ticket but the fix is not merged into |
Thanks for your reminder, will merge this weekend.. |
I'm trying to send a RTMP stream from GStreamer using this pipeline:
$ gst-launch-1.0 videotestsrc ! x264enc tune=zerolatency ! flvmux name=mux ! rtmp2sink location=rtmp://localhost:1935/live/test audiotestsrc ! avenc_aac ! mux.
It got stuck as it seems
xiu
is blocked somehow:The text was updated successfully, but these errors were encountered: