Jetson Nano Elgato Camlink Rtmp stream from SLR

Been working on this project the last few days I got an nvidia jetson nano and a camlink and I’m able to stream video to twitch with this command:

gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! ‘video/x-raw,format=YUY2’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! omxh264enc ! mux. alsasrc device=‘plughw:2’ ! audio/x-raw,width=16,depth=16,rate=44100,channels=2 ! queue ! mux. flvmux name=mux ! rtmpsink location=“rtmp://live-sea.twitch.tv/app/$KEY”

the only problem is I cant seem to get audio from my usb microphone or the capture card itself. it will attempt to stream but just be a black screen. if i use the usb mic it will say:

gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:

streaming stopped, reason not-negotiated (-4)

or it will act like its streaming again with a black screen. any help would be apreciated.

I just cant seem to get audio and video at the same time to an rtmp server I also had no success while using pulsesrc but individually pulsesrc would record audio.

Hi,
Please check if the pipeline in the post helps your usecase.

$ gst-launch-1.0 v4l2src ! video/x-raw,width=1920,height=1080,framerate=30/1 ! queue max-size-time=0 ! videoconvert ! omxh264enc bitrate=5000000 ! video/x-h264 ! h264parse ! video/x-h264 ! queue ! flvmux name=mux streamable=true ! rtmpsink location="rtmp://a.rtmp.youtube.com/live2/$key" alsasrc device="hw:CARD=Capture,DEV=0" ! queue ! audioconvert ! audioresample ! audio/x-raw,rate=44100 ! voaacenc bitrate=128000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.

Also you may check if audio pipeline is OK by using audiotestsrc.
https://devtalk.nvidia.com/default/topic/1065398/jetson-nano/omxh264enc-and-nvvidconv-not-working-unless-/post/5396372/#5396372

this command connected to a logitech brio gets the expected result of Video + audio

gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=720,framerate=30/1 ! queue max-size-time=0 ! videoconvert ! omxh264enc bitrate=5000000 ! video/x-h264 ! h264parse ! video/x-h264 ! queue ! flvmux name=mux streamable=true ! rtmpsink location=rtmp://live-sea.twitch.tv/app/$KEY alsasrc device="hw:CARD=3" ! queue ! audioconvert ! audioresample ! audio/x-raw,rate=44100 ! voaacenc bitrate=128000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.

where as this command attempts to stream but a black screen with spinnning wheel shows up on twitch

gst-launch-1.0 -v v4l2src ! 'video/x-raw,format=YUY2' ! nvvidconv ! videoscale ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720' ! queue max-size-time=0 ! omxh264enc bitrate=5000000 ! queue ! flvmux name=mux streamable=true ! rtmpsink location=rtmp://live-sea.twitch.tv/app/$KEY alsasrc device="hw:CARD=2" ! queue ! audioconvert ! audioresample ! audio/x-raw,rate=44100 ! voaacenc bitrate=128000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.

initially i though it might be a video scaling issue but this command will work and stream the DSLR without audio to twitch.

gst-launch-1.0 v4l2src ! 'video/x-raw,format=YUY2' ! nvvidconv ! videoscale ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720' ! queue max-size-time=0 ! omxh264enc bitrate=5000000 ! queue ! flvmux name=mux streamable=true ! rtmpsink location=rtmp://live-sea.twitch.tv/app/$KEY

here are the logs for the black screen output

Hi,
It is more liek an issue in constructing audio pipeline to rtmpsink. Please go to http://gstreamer-devel.966125.n4.nabble.com/
Audio pipelines are constructed with native gstreamer plugins. Gstreamer forum users can be more experienced in this usecase. You may ask with software encoder:

gst-launch-1.0 -v v4l2src ! 'video/x-raw,format=YUY2' ! videoconvert ! video/x-raw,format=NV12 ! videoscale ! video/x-raw,format=NV12,width=1280,height=720 ! queue max-size-time=0 ! x264enc bitrate=5000000 ! queue ! flvmux name=mux streamable=true ! rtmpsink location=rtmp://live-sea.twitch.tv/app/$KEY alsasrc device="hw:CARD=2" ! queue ! audioconvert ! audioresample ! audio/x-raw,rate=44100 ! voaacenc bitrate=128000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.

Once you get a working pipeline, it shall work fine by replacing it with hardware encoder.

how can I write the Gstreming command in a lan network … using the udpsink host = 192.168.0.106 port = 5000 sync = false command

Hi carlosgambato19,

Please help to open a new topic. Thanks