Skip to content

Instantly share code, notes, and snippets.

@j-chimienti
Forked from shivasiddharth/ffmpeg-rtmp-streaming
Created February 4, 2023 20:04
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 j-chimienti/4749cdb7804436a06c9abfb323acb340 to your computer and use it in GitHub Desktop.
Save j-chimienti/4749cdb7804436a06c9abfb323acb340 to your computer and use it in GitHub Desktop.
Sample commands to stream Pi webcam video to RTMP sink
# Command for streaming USB Webcam to RTMP sink without audio
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -f flv rtmp://localhost/show/stream
# Command for streaming USB Webcam to RTMP sink with audio
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -c:a aac -b:a 160k -ar 44100 -f flv rtmp://localhost/show/stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment