Skip to content

Commit

Permalink
bw/bundles/loudness-rendering: use FreeSans with emojis instead of De…
Browse files Browse the repository at this point in the history
…jaVuSansMono
  • Loading branch information
kunsi committed Sep 22, 2024
1 parent c4b94ed commit 3caedcb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bundlewrap/bundles/loudness-rendering/files/loudness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ ffmpeg \
[a1] aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=stereo [audio];
[base][v1] overlay=shortest=1 [tmp1];
[tmp1][scaled] overlay=shortest=1:y=360 [ov];
[ov] drawtext='fontcolor=white:x=45:y=36:fontsize=50:fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line1.txt:reload=30' [ov1];
[ov1] drawtext='fontcolor=white:x=45:y=86:fontsize=20:fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line2.txt:reload=30' [ov2];
[ov2] drawtext='fontcolor=white:x=45:y=111:fontsize=20:fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:text=${NAME}' [ov3];
[ov3] drawtext='fontcolor=white:x=45:y=303:fontsize=50:fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line3.txt:reload=30' [out]" \
[ov] drawtext='fontcolor=white:x=45:y=36:fontsize=50:fontfile=/usr/share/fonts/freesans.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line1.txt:reload=30' [ov1];
[ov1] drawtext='fontcolor=white:x=45:y=86:fontsize=20:fontfile=/usr/share/fonts/freesans.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line2.txt:reload=30' [ov2];
[ov2] drawtext='fontcolor=white:x=45:y=111:fontsize=20:fontfile=/usr/share/fonts/freesans.ttf:text=${NAME}' [ov3];
[ov3] drawtext='fontcolor=white:x=45:y=303:fontsize=50:fontfile=/usr/share/fonts/freesans.ttf:textfile=/opt/loudness-rendering/data/${NAME}/line3.txt:reload=30' [out]" \
-map "[out]" -c:v libx264 -threads 2 -preset veryfast -x264-params keyint=30 -tune zerolatency -crf:0 26 -profile:0 high -level:0 4.1 -strict -2 -pix_fmt yuv420p \
-map "[audio]" -c:a aac -b:a 128k \
-f flv \
Expand Down
6 changes: 6 additions & 0 deletions bundlewrap/bundles/loudness-rendering/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
'mode': '0755',
}

files['/usr/share/fonts/freesans.ttf'] = {
# FreeSans, enriched with emojis from Noto Emoji. Encrypted to avoid
# having to deal with licenses in this repository.
'content': repo.vault.decrypt_file_as_base64('fonts/freesans.ttf.vault'),
'content_type': 'base64',
}

for stream, config in node.metadata.get('loudness-rendering/streams').items():
files[f'/usr/local/lib/systemd/system/{stream}_loudness.service'] = {
Expand Down
1 change: 1 addition & 0 deletions bundlewrap/data/fonts/freesans.ttf.vault

Large diffs are not rendered by default.

0 comments on commit 3caedcb

Please sign in to comment.