Skip to content

Instantly share code, notes, and snippets.

@ariscop
Created May 22, 2014 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariscop/43e80c4bb79e5f90b0e6 to your computer and use it in GitHub Desktop.
Save ariscop/43e80c4bb79e5f90b0e6 to your computer and use it in GitHub Desktop.
#!/bin/bash
url="[url]"
stream="[key]"
vb=200
ab=128
width=640
height=480
threads=4
endbit="$url/$stream tcUrl=$url swfUrl=$url flashver=FME/2.5\\20(compatible;\\20FMSc\\201.0)"
gst-launch-1.0 \
ximagesrc show-pointer=0 use-damage=0 \
! videoscale method=lanczos \
! videoconvert \
! videorate \
! video/x-raw, framerate="25/1", width=$width, height=$height, pixel-aspect-ratio="1/1" \
! x264enc bitrate=$vb bframes=0 threads=$threads \
! queue \
! flvmux streamable=true name=mux \
! rtmpsink location="$endbit" \
pulsesrc \
! "audio/x-raw,channels=2" \
! audioconvert \
! lamemp3enc bitrate=$ab \
! queue \
! mpegaudioparse \
! mux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment