#!/bin/bash BASE_D="/srv/recordings" DAY=$(date '+%Y-%m-%d') TIME=$(date '+%H-%M-%S') umask 022 mkdir -p "$BASE_D/$DAY" exec /usr/bin/ffmpeg -f live_flv -rtmp_live live -i "rtmp://127.0.0.1/{{ rtmp_streamer_app_name }}/{{ rtmp_streamer_recording_level }}" -c:a copy -c:v copy -f matroska "$BASE_D/$DAY/$DAY""_$TIME.mkv"