Skip to content

Commit

Permalink
Compress notification sound more (CTFd#1625)
Browse files Browse the repository at this point in the history
* Compress `notification.webm` to save some file size
  • Loading branch information
ColdHeat authored Sep 20, 2020
1 parent 72f9fa7 commit 722d45c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CTFd/themes/core/static/sounds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Build uncompressed webm

```
ffmpeg -i notification.mp3 -c:a libopus notification.webm
```

## Build compressed webm

```
ffmpeg -i notification.mp3 -c:a libopus -vn -b:a 48K notification.webm
```

## To create a base64 blob of the sound file

```
echo "data:audio/webm;base64,`base64 -b 80 notification.webm`"
```
Binary file modified CTFd/themes/core/static/sounds/notification.webm
Binary file not shown.

0 comments on commit 722d45c

Please sign in to comment.