Skip to content
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

Unable to build gst-meet #1

Closed
daimoc opened this issue Sep 26, 2021 · 13 comments
Closed

Unable to build gst-meet #1

daimoc opened this issue Sep 26, 2021 · 13 comments

Comments

@daimoc
Copy link

daimoc commented Sep 26, 2021

Hi you made a great job with gst-meet,
I made same tests few weeks ago but since you add dependency to xmpp-rs/xmpp-parsers and switch to gstreamer 1.19 it is more difficult to build gst-meet.

Could you update the readme to explain a little more all the build process to have a working gst-meet ?

Regards,
Damien.

@jbg
Copy link
Contributor

jbg commented Sep 27, 2021

Hey @daimoc, thanks for checking it out. Right now it's using a patched xmpp-parsers which is on crates.io as xmpp-parsers-gst-meet. It should work, if you get a dependency error can you paste the full error?

The new gstreamer is needed for RTP header extensions, for transport-cc. Unfortunately most distributions don't carry the 1.19.x branch since it's unstable. If you have nix, you can run nix-shell --pure in the root of the repo to get a shell with all dependencies resolved. I plan to update the Dockerfile this week to work with the recent changes, and I'll write some build instructions at the same time as doing that.

@teowoz
Copy link

teowoz commented Sep 27, 2021

I'm having the same issue. I have cloned https://gitlab.com/xmpp-rs/xmpp-rs to parent directory and:

~/Projects/gst-meet$ cargo build
    Updating crates.io index
error: no matching package named `xmpp-parsers-gst-meet` found
location searched: /home/teowoz/Projects/xmpp-rs/xmpp-parsers
required by package `lib-gst-meet v0.3.1 (/home/teowoz/Projects/gst-meet/lib-gst-meet)`

Where is the source code of xmpp-parsers-gst-meet?

@jbg
Copy link
Contributor

jbg commented Sep 27, 2021

Ah, right. The released version of gst-meet (cargo install gst-meet) will use the crate from crates.io, but if you build from source it will try to use the path dependency. For now, you can try removing the path = '...' attribute from Cargo.toml for the xmpp-parsers dependency, so it always uses the crate from crates.io.

Where is the source code of xmpp-parsers-gst-meet?

It's on crates.io (all Rust crates are distributed as source code) but it looks like we need to add it to this repository for now, to make building from source easier. I'll take care of that soon.

@daimoc
Copy link
Author

daimoc commented Sep 27, 2021

Hi @jbg ,
Thanks for your responses, my issue with xmpp-parsers is when I try to build it from source.
For the Nix env I still have some issues, it seems the hgr/twcc-fixes branch has been removed for gst-plugins-good and I'm getting some meson build error if I try to use the gstreamer master branch.
It is the first time I use Nix I may do it wrong.
If you have a some recommendation on the best distribution to test gst-met it could be nice to add it on the project README.

Regards,
Damien

@jbg
Copy link
Contributor

jbg commented Sep 27, 2021

For development we're using the nix env, but it looks like there has been a GStreamer release since I last worked on this, and that branch was merged and deleted as part of the release. I will update the nix env for the GStreamer changes and update this issue once done.

Cheers

@jbg
Copy link
Contributor

jbg commented Sep 27, 2021

I've updated shell.nix for the gstreamer 1.19.2 release, and can successfully build gst-meet inside nix-shell. Tomorrow I'll work to vendor the xmpp-parsers dependency into this repository.

@jbg
Copy link
Contributor

jbg commented Sep 27, 2021

BTW, building should get significantly easier after the gstreamer 1.20 stable release (in the next few weeks, apparently) since distro packages for these newer gstreamer versions will become available.

@teowoz
Copy link

teowoz commented Oct 6, 2021

I didn't have luck with nix-shell (log here), but building GStreamer 1.19.2 and installing it system-wide did the job. Here's my script for this, found somewhere online and modified, can't find the original one anymore.

Thanks for explaining how to use the xmpp-parsers-gst-meet dependency, I'm new to Rust.

@daimoc
Copy link
Author

daimoc commented Oct 16, 2021

Hi @teowoz thank you for the Gstreamer 1.19.2 build script it helps me to run gst-meet on my Ubuntu server (I was unable to a have a working gstreamer with nix-shell ).
Now I am able to send video stream with gst-meet to my Jitsi-Meet servers.
And it really helps to simulate users in conference with a reasonable CPU usage.

But I still have issue with the audio stream.
Every time I want to send audio with gst-meet I get a streaming stopped, reason not-negotiated (-4) error.
@jbg, have you already see this kind of error ?

A more detailed error log with GST_DEBUG=4,webrtc:7 :

0:00:01.235794920 2435 0x7f22f0009e30 WARN GST_CAPS gstpad.c:5758:pre_eventfunc_check:capsfilter0:sink caps application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)multiopus, num_streams=(string)4, coupled_streams=(string)2, channel_mapping=(string)"0,4,1,2,3,5", encoding-params=(string)6, sprop-maxcapturerate=(string)48000, payload=(int)111, extmap-1=(string)< "", urn:ietf:params:rtp-hdrext:ssrc-audio-level, "vad=on" >, extmap-5=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, ssrc=(uint)1417847294, timestamp-offset=(uint)1466924858, seqnum-offset=(uint)23684 not accepted
0:00:01.235858656 2435 0x7f22f0009e30 INFO task gsttask.c:368:gst_task_func:queue2:src Task going to paused
0:00:01.236133163 2435 0x7f22e800c000 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop: error: Internal data stream error.
0:00:01.236155913 2435 0x7f22e800c000 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4)
0:00:01.236182714 2435 0x7f22e800c000 INFO GST_ERROR_SYSTEM gstelement.c:2266:gst_element_message_full_with_details: posting message: Internal data stream error.
0:00:01.236225169 2435 0x7f22e800c000 INFO GST_ERROR_SYSTEM gstelement.c:2293:gst_element_message_full_with_details: posted error message: Internal data stream error.
0:00:01.236243478 2435 0x7f22e800c000 WARN queue gstqueue.c:992:gst_queue_handle_sink_event: error: Internal data stream error.
0:00:01.236254153 2435 0x7f22e800c000 WARN queue gstqueue.c:992:gst_queue_handle_sink_event: error: streaming stopped, reason not-negotiated (-4)
0:00:01.236268384 2435 0x7f22e800c000 INFO GST_ERROR_SYSTEM gstelement.c:2266:gst_element_message_full_with_details: posting message: Internal data stream error.
0:00:01.236283949 2435 0x7f22e800c000 INFO GST_ERROR_SYSTEM gstelement.c:2293:gst_element_message_full_with_details: posted error message: Internal data stream error.
0:00:01.236299820 2435 0x7f22e800c000 INFO task gsttask.c:368:gst_task_func:filesrc0:src Task going to paused
Oct 16 22:06:28.403 ERROR ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:bin0/GstFileSrc:filesrc0:
streaming stopped, reason not-negotiated (-4)
0:00:01.236314013 2435 0x7f22f0009f70 INFO task gsttask.c:368:gst_task_func:queue0:src Task going to paused
Oct 16 22:06:28.403 ERROR ../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstBin:bin0/GstQueue:queue0:
streaming stopped, reason not-negotiated (-4)

@jbg
Copy link
Contributor

jbg commented Oct 16, 2021

Hi @daimoc! Can you provide the full gst-meet command you're using? This is likely the issue here:

encoding-name=(string)multiopus, num_streams=(string)4, coupled_streams=(string)2, channel_mapping=(string)"0,4,1,2,3,5"

It should be 2-channel Opus, this looks like 6-channel (2x2 + 2, like front stereo, rear stereo, centre and sub).

You can solve it by adding another gstreamer element to your send pipeline, like audioconvert

@daimoc
Copy link
Author

daimoc commented Oct 18, 2021

Hi, you're right I didn' see that the audio of my BigBuckBunny video test file is in 5.1.
I've added an audioconvert to mix it to stereo.
This is my new gst-meet command :

gst-meet --room-name=$ROOM_NAME \
   --web-socket-url=wss://$SERVER_NAME/xmpp-websocket?room=$ROOM_NAME \
   --verbose \
   --xmpp-domain=$SERVER_NAME  \
   --focus-jid=focus.$SERVER_NAME \
   --send-pipeline="filesrc location=/vagrant/bbb.webm ! queue ! matroskademux name=demuxer
                      demuxer.video_0 ! queue name=video
                      demuxer.audio_0 ! queue ! vorbisdec ! audioconvert ! audio/x-raw,channels=2 ! opusenc name=audio"`

But now I getting this error :

0:00:00.922767420 11945 0x7fc6c4007ed0 WARN GST_CAPS gstpad.c:5758:pre_eventfunc_check:capsfilter1:sink caps application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)OPUS, sprop-stereo=(string)1, encoding-params=(string)2, sprop-maxcapturerate=(string)48000, payload=(int)111, extmap-1=(string)< "", urn:ietf:params:rtp-hdrext:ssrc-audio-level, "vad=on" >, extmap-5=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, ssrc=(uint)3111025154, timestamp-offset=(uint)3583645051, seqnum-offset=(uint)20999 not accepted
0:00:00.923026454 11945 0x7fc6b800bc00 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop: error: Internal data stream error.
0:00:00.923084737 11945 0x7fc6b800bc00 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4)
Oct 18 11:13:01.080 ERROR ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:bin0/GstFileSrc:filesrc0:
streaming stopped, reason not-negotiated (-4)
0:00:00.923305060 11945 0x7fc6b800bc00 WARN queue gstqueue.c:992:gst_queue_handle_sink_event: error: Internal data stream error.
0:00:00.923319910 11945 0x7fc6b800bc00 WARN queue gstqueue.c:992:gst_queue_handle_sink_event: error: streaming stopped, reason not-negotiated (-4)
Oct 18 11:13:01.080 ERROR ../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstBin:bin0/GstQueue:queue0:
streaming stopped, reason not-negotiated (-4)
Oct 18 11:13:01.084 DEBUG ICE candidate-gathering-done 1
Oct 18 11:13:01.369 DEBUG rtpbin request-pt-map [(GstElement) (GstRtpBin) rtpbin, (guint) 0, (guint) 100]

@jbg
Copy link
Contributor

jbg commented Oct 18, 2021

Can you provide the full GST_DEBUG=3 output? (Maybe best in a gist or other pastebin.)

Also, if it's not too much trouble, can you set GST_DEBUG_DUMP_DOT_DIR to the path to an (existing) directory, and upload the newest .dot file in that directory after running gst-meet? You can convert it to a PNG with dot filename.dot -Tpng > filename.png if you have graphviz installed, but feel free to just upload the .dot if you don't have graphviz.

@daimoc
Copy link
Author

daimoc commented Oct 18, 2021

Thanks for you reply,
After looking at my error logs the extmap-1 argument looks strange :

WARN GST_CAPS gstpad.c:5758:pre_eventfunc_check:capsfilter1:sink caps application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)OPUS, sprop-stereo=(string)1, encoding-params=(string)2, sprop-maxcapturerate=(string)48000, payload=(int)111, extmap-1=(string)< "", urn:ietf:params:rtp-hdrext:ssrc-audio-level, "vad=on" >, extmap-5=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, ssrc=(uint)3111025154, timestamp-offset=(uint)3583645051, seqnum-offset=(uint)20999 not accepted

I don't know if extmap-1=(string)< "", urn:ietf:params:rtp-hdrext:ssrc-audio-level, "vad=on" > is valid in caps.

If I comment this audio_caps
in jingle.rs it works :

      debug!("video payloader: no rtp header extension support");
    }
    pipeline.add(&video_sink_element)?;

    let mut audio_caps = gstreamer::Caps::builder("application/x-rtp");
    //if let Some(hdrext) = audio_hdrext_ssrc_audio_level {
     // audio_caps = audio_caps.field(&format!("extmap-{}", hdrext), RTP_HDREXT_SSRC_AUDIO_LEVEL);
    //}
    if let Some(hdrext) = audio_hdrext_transport_cc {
      audio_caps = audio_caps.field(&format!("extmap-{}", hdrext), RTP_HDREXT_TRANSPORT_CC);
    }

Now I get audio and video on my conference.
But I don't know why.

@daimoc daimoc closed this as completed Oct 21, 2021
@zsinba zsinba mentioned this issue Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants