summaryrefslogtreecommitdiff
path: root/roles/streaming/rtmp/streamer/templates/record.sh.j2
blob: 159bf5e2c653da2269dd0ed9f02bf748c12248a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/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"