Powershell Script
$env:FB_STREAM_KEY = 'FB-99999999999999999-9-XXXXXXXXXXXXXXXX'
$env:FB_STREAM_URL = 'rtmps://live-api-s.facebook.com:443/rtmp/'
$env:CCTV_YARD = 'rtsp://admin:mypassword@cctv_ip:554/stream1'
gst-launch-1.0 flvmux name=mux streamable=true `
! rtmpsink `
async=true `
location="${ENV:FB_STREAM_URL}${ENV:FB_STREAM_KEY}" `
rtspsrc location=$ENV:CCTV_YARD `
debug=TRUE `
is-live=TRUE `
onvif-mode=TRUE `
onvif-rate-control=TRUE `
short-header=FALSE `
latency=8000 `
! rtph265depay `
! h265parse `
! d3d11h265dec `
! videoscale `
! "video/x-raw,width=1920,height=1080,framerate=30/1" `
! x264enc bitrate=4096 key-int-max=60 `
! h264parse `
! queue ! mux. `
audiotestsrc wave=ticks apply-tick-ramp=true tick-interval=100000000 `
freq=10000 volume=0.0 marker-tick-period=10 sine-periods-per-tick=20 is-live=true `
! audio/x-raw,rate=44100,channels=2 `
! identity sync=true `
! voaacenc bitrate=128000 `
! queue ! mux.