mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-19 15:04:23 +01:00
Compress notification sound more (#1625)
* Compress `notification.webm` to save some file size
This commit is contained in:
17
CTFd/themes/core/static/sounds/README.md
Normal file
17
CTFd/themes/core/static/sounds/README.md
Normal file
@@ -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 not shown.
Reference in New Issue
Block a user