Skip to content

Instantly share code, notes, and snippets.

Last active March 16, 2023 06:55
What would you like to do?
FFMPEG commandline tool for video streaming and format conversion
// To start ffserver
ffserver -f /etc/ffserver.conf
// re stream incoming to ffsever
ffmpeg -rtsp_transport tcp -i "rtsp://admin:admin@" http://localhost:8090/camera.ffm
// configuration file
HTTPPort 8090
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 20M
ACL allow
ACL allow localhost
#<Stream camera.mjpeg>
#Feed camera.ffm
#Format mpjpeg
#VideoFrameRate 15
#VideoBitRate 4096
#VideoBufferSize 4096
#VideoSize 640x480
#VideoQMin 5
#VideoQMax 51
#Strict -1
<Stream live.mp4>
Feed camera.ffm
Format mp4
VideoCodec libx264
VideoFrameRate 25
VideoBitRate 900
VideoSize 480x272
AVPresetVideo default
AVPresetVideo baseline
AVOptionVideo flags +global_header
<Stream live.webm>
Format webm
Feed camera.ffm
VideoCodec libvpx
VideoSize 320x240
VideoFrameRate 15
VideoBitRate 512
VideoBufferSize 512
AVOptionVideo flags +global_header
<Stream stat.html>
Format status
ACL allow localhost
ffmpeg -re -i elon.mp4 -rtsp_transport tcp -c:v copy -an -f rtsp rtsp://localhost:5554/test
ffmpeg -rtsp_transport tcp -i "rtsp://" -rtsp_transport tcp -c:v copy -an -f rtsp rtsp://localhost:8554/test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment