Skip to content

Instantly share code, notes, and snippets.

@omair18
Last active October 13, 2020 14:57
Show Gist options
  • Save omair18/d11a361594428dd681583a1eee5f6529 to your computer and use it in GitHub Desktop.
Save omair18/d11a361594428dd681583a1eee5f6529 to your computer and use it in GitHub Desktop.
useful ffmpeg & gstreamer commands
#restream rtsp to udp link
ffmpeg -i "rtsp://admin:admin123@192.168.100.2:554/" -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -b:v 1024k -bufsize 0 -maxrate 1280k -preset medium -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vbsf h264_mp4toannexb -f mpegts udp://0.0.0.0:10000
# create a test stream and create rtmp stream
# start nginx server before running this
ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f flv rtmp://localhost/mylive/test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment