Skip to content

Instantly share code, notes, and snippets.

@gebv
Created March 25, 2020 01:30
Show Gist options
  • Save gebv/639bfc5253d344a947e257c8e8852d04 to your computer and use it in GitHub Desktop.
Save gebv/639bfc5253d344a947e257c8e8852d04 to your computer and use it in GitHub Desktop.
gstreamer live streaming camera with audio to rtmp server
gst-launch-1.0 autovideosrc device=/dev/video0 \
! video/x-raw,width=1280,height=720 \
! queue \
! x264enc bitrate=2000 byte-stream=false key-int-max=60 bframes=0 aud=true tune=zerolatency pass=17 ! "video/x-h264,profile=main" \
! flvmux streamable=true name=mux \
! rtmpsink location="rtmp://127.0.0.1:1935/stream/test3 live=1" \
autoaudiosrc ! queue ! audioresample ! "audio/x-raw,rate=44100" ! queue ! mux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment