Last active
July 13, 2024 13:24
-
-
Save garethfoote/529604372203ff6f9c6942e27b797222 to your computer and use it in GitHub Desktop.
Convert RTSP stream into 60 second mp4 segments with local machine time as filename: Ymd-HM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ]; then | |
IP_ADDRESS=10.164.208.102 | |
else | |
IP_ADDRESS=$1 | |
fi | |
# FFMPEG command for creating segments from RTSP stream | |
ffmpeg -i rtsp://@${IP_ADDRESS}:5554/playlist.m3u -c copy -map 0 -f segment -strftime 1 -segment_time 60 -segment_format mp4 "%Y%m%d-%H%M.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment