Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions macos_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ echo "${GREEN}Configuring MediaMTX...${NC}"
mkdir -p ~/ots/mediamtx/recordings
ln -s /opt/homebrew/etc/mediamtx/mediamtx.yml ~/ots/mediamtx/mediamtx.yml

# Youtube Streaming support
pip3.12 install yt-dlp

cd ~/ots/mediamtx
curl -sL https://github.com/brian7704/OpenTAKServer-Installer/raw/master/mediamtx.yml -o /opt/homebrew/etc/mediamtx/mediamtx.yml
sed -i '' "s~SERVER_CERT_FILE~${HOME}/ots/ca/certs/opentakserver/opentakserver.pem~g" /opt/homebrew/etc/mediamtx/mediamtx.yml
Expand Down
8 changes: 8 additions & 0 deletions mediamtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,14 @@ paths:
# my_camera:
# source: rtsp://my_camera

~^youtube_(.+)$:
source: publisher
runOnDemand: >
sh -c 'ffmpeg -re -i "$(yt-dlp -g https://youtu.be/$(echo $RTSP_PATH | sed "s/youtube_//"))" -c:v copy -f rtsp rtsp://127.0.0.1:8554/$RTSP_PATH'
runOnDemandCloseAfter: 10s
# routes starting with a "youtube_" prefix will
# pull the stream from YouTube and publish it to the RTSP server.

# Settings under path "all_others" are applied to all paths that
# do not match another entry.
all_others:
2 changes: 2 additions & 0 deletions mediamtx_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ paths:
# my_camera:
# source: rtsp://my_camera

# TODO - Add handling of Youtube Streams

# Settings under path "all_others" are applied to all paths that
# do not match another entry.
all_others:
3 changes: 3 additions & 0 deletions rocky_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ mkdir -p ~/ots/mediamtx/recordings

cd ~/ots/mediamtx

# Install yt-dlp for YouTube streaming support
pip3 install yt-dlp

ARCH=$(uname -m)
KERNEL_BITS=$(getconf LONG_BIT)
if [ "$ARCH" == "x86_64" ]; then
Expand Down
3 changes: 3 additions & 0 deletions ubuntu_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ mkdir -p ~/ots/mediamtx/recordings

cd ~/ots/mediamtx

# Install youtube streaming support
pip3 install yt-dlp

ARCH=$(uname -m)
KERNEL_BITS=$(getconf LONG_BIT)
if [ "$ARCH" == "x86_64" ]; then
Expand Down