diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-26 11:31:54 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-08-26 11:31:54 -0400 |
commit | e51268ed0cbe69fb67f63d5834652077d616691e (patch) | |
tree | 9b07cb8c684a9bc86bf253f948b61356091bc024 /livestream | |
parent | ec796e23e33714d7efc4f352a92eba9e06a3f5bf (diff) |
Add article on self-hosted livestreaming
Diffstat (limited to 'livestream')
-rwxr-xr-x | livestream | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/livestream b/livestream new file mode 100755 index 0000000..5330af9 --- /dev/null +++ b/livestream @@ -0,0 +1,40 @@ +#!/bin/sh +rm -f /tmp/playlist +mkdir -p /tmp/dash +for file in ~/recording/2018-03-* ~/recording/2018-04-* +do + echo "file '$file'" >> /tmp/playlist +done + +ffmpeg \ + -re \ + -loglevel error \ + -stream_loop -1 \ + -f concat \ + -safe 0 \ + -i /tmp/playlist \ + -vf "drawtext=\ + fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:\ + text='%{gmtime\:%Y-%m-%d %T} UTC':\ + fontcolor=white:\ + x=(w-text_w)/2:y=128:\ + box=1:boxcolor=black:\ + fontsize=72, + drawtext=\ + fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:\ + text='REBROADCAST':\ + fontcolor=white:\ + x=(w-text_w)/2:y=16:\ + box=1:boxcolor=black:\ + fontsize=48" \ + -codec:v libx264 \ + -profile:v baseline \ + -pix_fmt yuv420p \ + -level 4 \ + -preset veryfast \ + -codec:a aac \ + -tune zerolatency \ + -f dash \ + -window_size 5 \ + -remove_at_exit 1 \ + /tmp/dash/live.mpd |