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

NDI multi stream stuttering #617

Open
andiempettJISC opened this issue May 17, 2019 · 6 comments
Open

NDI multi stream stuttering #617

andiempettJISC opened this issue May 17, 2019 · 6 comments
Labels

Comments

@andiempettJISC
Copy link
Collaborator

andiempettJISC commented May 17, 2019

when trying to use multiple NDI sources in galicaster. the ndivideosrc and ndiaudiosrc will stutter.
stuttering will happen in both preview and when recording to filesink

if you play the ndi sources from gst-launch command line at the same time, they work fine with no stuttering (also recording to filesink works OK as well)

its hard to pin down the cause of the stuttering, but i dont think its compute resource as the machine running this is very powerful.

gst-launch-1.0 --verbose ndivideosrc stream-name="BIRDDOG-xxxxx (HDMI)" ! queue ! videoconvert ! videobox  top=0 bottom=0 ! videorate ! xvimagesink async=true qos=true sync=true force-aspect-ratio=true

gst-launch-1.0 --verbose ndiaudiosrc stream-name="BIRDDOG-xxxxx (comms)" ! queue ! autoaudiosink

example profile:

[data]
name = NDI

[track1]
name = NDI
device = ndi
location = BIRDDOG-xxxxx (HDMI)
file = presentation.avi
flavor = presentation
audio = False

[track3]
name = NDI_Audio
device = ndi_audio
location = BIRDDOG-xxxxx (comms)
file = presenter.mp3
flavor = presenter
player = True
vumeter = True
@smarquard
Copy link

The difference in the Galicaster gstreamer pipelines is that they include a tee for both preview and filesink recording, so it's worth reproducing that pipeline with gst-launch.

We had a datapath problem once that only showed up with a tee pipeline but not a simpler pipeline.

@andiempettJISC
Copy link
Collaborator Author

@smarquard raises a good point, but sadly with more complex pipelines on the command line i still cant replicate the issue.

gst-launch-1.0 --verbose ndiaudiosrc stream-name="BIRDDOG-xxxxx (comms)" do-timestamp=true ! queue ! audiorate ! decodebin async-handling=true ! tee name=tee-aud \
tee-aud. ! queue ! audioconvert ! wavenc ! filesink location=testndi.wav async=false \
tee-aud. ! queue ! autoaudiosink

gst-launch-1.0 --verbose ndivideosrc stream-name="BIRDDOG-xxxxx (HDMI)" ! queue ! videoconvert ! videobox  top=0 bottom=0 ! videorate ! tee name=gc-ndi-tee ! queue ! xvimagesink async=false \
gc-ndi-tee. ! queue ! valve drop=false ! videoconvert ! queue ! \
x264enc pass=5 quantizer=22 speed-preset=4 ! queue ! avimux ! \
queue ! filesink location=testndi.avi async=false

@Alfro
Copy link
Contributor

Alfro commented May 23, 2019

Hi @androidwiltron

A more accurate way to test it would be to record both sources through the same pipeline. That may reproduce the issue better, since I believe Galicaster has all sources on the same process, as opposed to launching two different gst-launch-1.0 commands.

@andiempettJISC
Copy link
Collaborator Author

@Alfro
good suggestion
really i need to make a minimal python script to do this

do you think using videomixer gstreamer element with gst-launch would be sufficient?

@Alfro Alfro added the bug label Jun 7, 2019
@Alfro
Copy link
Contributor

Alfro commented Jun 7, 2019

I meant something like this:

gst-launch-1.0 --verbose ndiaudiosrc stream-name="BIRDDOG-xxxxx (comms)" do-timestamp=true ! queue ! audiorate ! decodebin async-handling=true ! tee name=tee-aud
tee-aud. ! queue ! audioconvert ! wavenc ! filesink location=testndi.wav async=false
tee-aud. ! queue ! autoaudiosink ndivideosrc stream-name="BIRDDOG-xxxxx (HDMI)" ! queue ! videoconvert ! videobox top=0 bottom=0 ! videorate ! tee name=gc-ndi-tee ! queue ! xvimagesink async=false \
gc-ndi-tee. ! queue ! valve drop=false ! videoconvert ! queue !
x264enc pass=5 quantizer=22 speed-preset=4 ! queue ! avimux !
queue ! filesink location=testndi.avi async=false

Let me know if it reproduces like this!

@andiempettJISC
Copy link
Collaborator Author

OK @Alfro your launch command replicates the problem. the audio stutters, the video is OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants