From 918b00cd2ebd6336a2d8fa171b81c0e11deed4d7 Mon Sep 17 00:00:00 2001 From: ikifar2012 Date: Wed, 13 Jul 2022 01:35:00 +0000 Subject: [PATCH] Convert X and Y to env vars --- .env.example | 3 +++ rootfs/ffmpeg.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index d99c548..c7f3134 100644 --- a/.env.example +++ b/.env.example @@ -12,3 +12,6 @@ AUDIO_SOURCE= NP_SOURCE=/data/song.txt FONT=/data/BebasNeue-Regular.ttf + +POSITION_X=50 +POSITION_Y=th \ No newline at end of file diff --git a/rootfs/ffmpeg.sh b/rootfs/ffmpeg.sh index 9977b89..ee244ba 100755 --- a/rootfs/ffmpeg.sh +++ b/rootfs/ffmpeg.sh @@ -8,7 +8,7 @@ ldconfig && ffmpeg \ -filter:v fps=$FPS \ -vf drawtext="fontsize=50: fontfile=$FONT: \ box=0: boxcolor=black@0.5: boxborderw=20: \ - textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=50: y=th" \ + textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=$POSITION_X: y=$POSITION_Y" \ -c:v h264_nvenc -g $(($FPS * 2)) \ -b:v $VBR \ -f flv "$YOUTUBE_URL/$KEY" \ No newline at end of file