Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Created January 27, 2024 16:26
Show Gist options
  • Save thewh1teagle/cb762b23eaee294e49964f89830471e2 to your computer and use it in GitHub Desktop.
Save thewh1teagle/cb762b23eaee294e49964f89830471e2 to your computer and use it in GitHub Desktop.
stream ffmpeg to web

Stream rtsp to web using ffmpeg and mediamtx

#!/bin/bash

name=mediamtx_v1.5.0_darwin_arm64
version=v1.5.0

vid_name=big_buck_bunny_720p_10mb.mp4

# Install system packages
brew install ffmpeg wget

# Get mediamtx
wget -nc -q --show-progress https://github.com/bluenviron/mediamtx/releases/download/$version/$name.tar.gz
tar xf $name.tar.gz
rm LICENSE

# Get sample video
wget -nc -q --show-progress https://sample-videos.com/video321/mp4/720/$vid_name


# ffmpeg -re -stream_loop -1 -i big_buck_bunny_720p_10mb.mp4 -c copy -f rtsp rtsp://localhost:8554/mystream
# ./mediamtx
# http://localhost:8889/mystream/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment