Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Cleanup sounds (switch to mp3, encode at lower bitrate).' (#12507)

bgrozev99955df5c8df
diff --git a/react/features/base/participants/sounds.ts b/react/features/base/participants/sounds.ts
index 9e71942ee1..e0c571a9b4 100644
--- a/react/features/base/participants/sounds.ts
+++ b/react/features/base/participants/sounds.ts
@@ -2,10 +2,10 @@
* The name of the bundled sound file which will be played when new participant
* joins the conference.
*/
-export const PARTICIPANT_JOINED_FILE = 'joined.wav';
+export const PARTICIPANT_JOINED_FILE = 'joined.mp3';
/**
* The name of the bundled sound file which will be played when any participant
* leaves the conference.
*/
-export const PARTICIPANT_LEFT_FILE = 'left.wav';
+export const PARTICIPANT_LEFT_FILE = 'left.mp3';
diff --git a/react/features/chat/sounds.ts b/react/features/chat/sounds.ts
index 1b113cb50b..e46e180daa 100644
--- a/react/features/chat/sounds.ts
+++ b/react/features/chat/sounds.ts
@@ -4,4 +4,4 @@
*
* @type {string}
*/
-export const INCOMING_MSG_SOUND_FILE = 'incomingMessage.wav';
+export const INCOMING_MSG_SOUND_FILE = 'incomingMessage.mp3';
diff --git a/react/features/device-selection/components/AudioOutputPreview.js b/react/features/device-selection/components/AudioOutputPreview.js
index dbc6f47b87..73633d6016 100644
--- a/react/features/device-selection/components/AudioOutputPreview.js
+++ b/react/features/device-selection/components/AudioOutputPreview.js
@@ -5,7 +5,7 @@ import React, { Component } from 'react';
import { translate } from '../../base/i18n/functions';
import Audio from '../../base/media/components/Audio';
-const TEST_SOUND_PATH = 'sounds/ring.wav';
+const TEST_SOUND_PATH = 'sounds/ring.mp3';
/**
* The type of the React {@code Component} props of {@link AudioOutputPreview}.
diff --git a/react/features/invite/sounds.js b/react/features/invite/sounds.js
index b75e292bb7..5cb71ab7ec 100644
--- a/react/features/invite/sounds.js
+++ b/react/features/invite/sounds.js
@@ -16,13 +16,13 @@ export const sounds = new Map([
* The name of the sound file which will be played when outgoing call is
* expired.
*/
- [ OUTGOING_CALL_EXPIRED_SOUND_ID, { file: 'rejected.wav' } ],
+ [ OUTGOING_CALL_EXPIRED_SOUND_ID, { file: 'rejected.mp3' } ],
/**
* The name of the sound file which will be played when outgoing call is
* rejected.
*/
- [ OUTGOING_CALL_REJECTED_SOUND_ID, { file: 'rejected.wav' } ],
+ [ OUTGOING_CALL_REJECTED_SOUND_ID, { file: 'rejected.mp3' } ],
/**
* The name of the sound file which will be played when the status of an
@@ -31,7 +31,7 @@ export const sounds = new Map([
[
OUTGOING_CALL_RINGING_SOUND_ID,
{
- file: 'outgoingRinging.wav',
+ file: 'outgoingRinging.mp3',
options: { loop: true }
}
],
@@ -40,5 +40,5 @@ export const sounds = new Map([
* The name of the sound file which will be played when outgoing call is
* started.
*/
- [ OUTGOING_CALL_START_SOUND_ID, { file: 'outgoingStart.wav' } ]
+ [ OUTGOING_CALL_START_SOUND_ID, { file: 'outgoingStart.mp3' } ]
]);
diff --git a/react/features/settings/components/web/audio/SpeakerEntry.js b/react/features/settings/components/web/audio/SpeakerEntry.js
index bc5bbb596c..ae9878cee7 100644
--- a/react/features/settings/components/web/audio/SpeakerEntry.js
+++ b/react/features/settings/components/web/audio/SpeakerEntry.js
@@ -7,7 +7,7 @@ import logger from '../../../logger';
import AudioSettingsEntry from './AudioSettingsEntry';
import TestButton from './TestButton';
-const TEST_SOUND_PATH = 'sounds/ring.wav';
+const TEST_SOUND_PATH = 'sounds/ring.mp3';
/**
* The type of the React {@code Component} props of {@link SpeakerEntry}.
diff --git a/resources/encode-sound.sh b/resources/encode-sound.sh
new file mode 100755
index 0000000000..a3de494ece
--- /dev/null
+++ b/resources/encode-sound.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+usage() {
+ echo "Usage: $0 [--mp3] [--opus] [--stereo] <input file ...>"
+ exit 1
+}
+
+for arg in "$@"; do
+ case "$arg" in
+ --stereo)
+ STEREO=true
+ shift
+ ;;
+ --mp3)
+ MP3=true
+ shift
+ ;;
+ --opus)
+ OPUS=true
+ shift
+ ;;
+ esac
+done
+
+if [ $# -lt 1 ] ;then
+ usage
+fi
+
+if [ "$MP3" != "true" ] ;then
+ if [ "$OPUS" != "true" ] ;then
+ echo "At least one of --mp3 or --opus is required"
+ usage
+ fi
+fi
+
+echo "STEREO=$STEREO MP3=$MP3 OPUS=$OPUS"
+
+AC1="-ac 1"
+if [ "$STEREO" = "true" ] ;then
+ AC1=""
+fi
+
+for i in "$@" ;do
+ if [ "$MP3" = "true" ] ;then
+ ffmpeg -i "$i" -codec:a libmp3lame -qscale:a 9 -map_metadata -1 $AC1 "${i%.*}.mp3"
+ fi
+ if [ "$OPUS" = "true" ] ;then
+ ffmpeg -i "$i" -c:a libopus -b:a 30k -vbr on -compression_level 10 -map_metadata -1 $AC1 "${i%.*}.opus"
+ fi
+done
diff --git a/sounds/README.md b/sounds/README.md
new file mode 100644
index 0000000000..49e414e62b
--- /dev/null
+++ b/sounds/README.md
@@ -0,0 +1,2 @@
+We are trying to keep these files relatively small. Use `resources/encode-sound.sh` to
+encode a file in the same way (use --stereo if stereo is needed).
diff --git a/sounds/asked-unmute.mp3 b/sounds/asked-unmute.mp3
index af79c9035e..2dc91dc223 100644
Binary files a/sounds/asked-unmute.mp3 and b/sounds/asked-unmute.mp3 differ
diff --git a/sounds/asked-unmute.opus b/sounds/asked-unmute.opus
new file mode 100644
index 0000000000..ff91fc16e5
Binary files /dev/null and b/sounds/asked-unmute.opus differ
diff --git a/sounds/e2eeOff.mp3 b/sounds/e2eeOff.mp3
index 8c22f38f91..be320d0038 100644
Binary files a/sounds/e2eeOff.mp3 and b/sounds/e2eeOff.mp3 differ
diff --git a/sounds/e2eeOff.opus b/sounds/e2eeOff.opus
new file mode 100644
index 0000000000..e12772b08e
Binary files /dev/null and b/sounds/e2eeOff.opus differ
diff --git a/sounds/e2eeOn.mp3 b/sounds/e2eeOn.mp3
index 48b810e34f..1ceed00c64 100644
Binary files a/sounds/e2eeOn.mp3 and b/sounds/e2eeOn.mp3 differ
diff --git a/sounds/e2eeOn.opus b/sounds/e2eeOn.opus
new file mode 100644
index 0000000000..d4ea680085
Binary files /dev/null and b/sounds/e2eeOn.opus differ
diff --git a/sounds/incomingMessage.mp3 b/sounds/incomingMessage.mp3
new file mode 100644
index 0000000000..0029d2c80b
Binary files /dev/null and b/sounds/incomingMessage.mp3 differ
diff --git a/sounds/incomingMessage.opus b/sounds/incomingMessage.opus
new file mode 100644
index 0000000000..5e0e27e4a0
Binary files /dev/null and b/sounds/incomingMessage.opus differ
diff --git a/sounds/joined.mp3 b/sounds/joined.mp3
new file mode 100644
index 0000000000..975e3a77ae
Binary files /dev/null and b/sounds/joined.mp3 differ
diff --git a/sounds/joined.opus b/sounds/joined.opus
new file mode 100644
index 0000000000..4379b91d2a
Binary files /dev/null and b/sounds/joined.opus differ
diff --git a/sounds/knock.mp3 b/sounds/knock.mp3
index 116fd32bd2..6b68ec601e 100644
Binary files a/sounds/knock.mp3 and b/sounds/knock.mp3 differ
diff --git a/sounds/knock.opus b/sounds/knock.opus
new file mode 100644
index 0000000000..a24da2204a
Binary files /dev/null and b/sounds/knock.opus differ
diff --git a/sounds/left.mp3 b/sounds/left.mp3
new file mode 100644
index 0000000000..d0780a9498
Binary files /dev/null and b/sounds/left.mp3 differ
diff --git a/sounds/left.opus b/sounds/left.opus
new file mode 100644
index 0000000000..7a2c25f348
Binary files /dev/null and b/sounds/left.opus differ
diff --git a/sounds/liveStreamingOff.mp3 b/sounds/liveStreamingOff.mp3
index 186129b2b1..db7e1b8fc2 100644
Binary files a/sounds/liveStreamingOff.mp3 and b/sounds/liveStreamingOff.mp3 differ
diff --git a/sounds/liveStreamingOff.opus b/sounds/liveStreamingOff.opus
new file mode 100644
index 0000000000..2835863c7a
Binary files /dev/null and b/sounds/liveStreamingOff.opus differ
diff --git a/sounds/liveStreamingOn.mp3 b/sounds/liveStreamingOn.mp3
index 5bc3193014..0a1ec4982d 100644
Binary files a/sounds/liveStreamingOn.mp3 and b/sounds/liveStreamingOn.mp3 differ
diff --git a/sounds/liveStreamingOn.opus b/sounds/liveStreamingOn.opus
new file mode 100644
index 0000000000..a7febdad32
Binary files /dev/null and b/sounds/liveStreamingOn.opus differ
diff --git a/sounds/noAudioSignal.mp3 b/sounds/noAudioSignal.mp3
index cf07fb704c..d80cc726c6 100644
Binary files a/sounds/noAudioSignal.mp3 and b/sounds/noAudioSignal.mp3 differ
diff --git a/sounds/noAudioSignal.opus b/sounds/noAudioSignal.opus
new file mode 100644
index 0000000000..e9eb636aca
Binary files /dev/null and b/sounds/noAudioSignal.opus differ
diff --git a/sounds/noisyAudioInput.mp3 b/sounds/noisyAudioInput.mp3
index cf07fb704c..d80cc726c6 100644
Binary files a/sounds/noisyAudioInput.mp3 and b/sounds/noisyAudioInput.mp3 differ
diff --git a/sounds/noisyAudioInput.opus b/sounds/noisyAudioInput.opus
new file mode 100644
index 0000000000..2282eca920
Binary files /dev/null and b/sounds/noisyAudioInput.opus differ
diff --git a/sounds/outgoingRinging.mp3 b/sounds/outgoingRinging.mp3
new file mode 100644
index 0000000000..f1103a0a73
Binary files /dev/null and b/sounds/outgoingRinging.mp3 differ
diff --git a/sounds/outgoingRinging.opus b/sounds/outgoingRinging.opus
new file mode 100644
index 0000000000..e8f7fcaeea
Binary files /dev/null and b/sounds/outgoingRinging.opus differ
diff --git a/sounds/outgoingStart.mp3 b/sounds/outgoingStart.mp3
new file mode 100644
index 0000000000..398ebed05d
Binary files /dev/null and b/sounds/outgoingStart.mp3 differ
diff --git a/sounds/outgoingStart.opus b/sounds/outgoingStart.opus
new file mode 100644
index 0000000000..1dfe03163c
Binary files /dev/null and b/sounds/outgoingStart.opus differ
diff --git a/sounds/reactions-applause.mp3 b/sounds/reactions-applause.mp3
index 39c7642c30..2254bd2fda 100644
Binary files a/sounds/reactions-applause.mp3 and b/sounds/reactions-applause.mp3 differ
diff --git a/sounds/reactions-applause.opus b/sounds/reactions-applause.opus
new file mode 100644
index 0000000000..9e560b459c
Binary files /dev/null and b/sounds/reactions-applause.opus differ
diff --git a/sounds/reactions-boo.mp3 b/sounds/reactions-boo.mp3
index 40e7d4f147..6ed9114116 100644
Binary files a/sounds/reactions-boo.mp3 and b/sounds/reactions-boo.mp3 differ
diff --git a/sounds/reactions-boo.opus b/sounds/reactions-boo.opus
new file mode 100644
index 0000000000..80dc0e99a2
Binary files /dev/null and b/sounds/reactions-boo.opus differ
diff --git a/sounds/reactions-crickets.mp3 b/sounds/reactions-crickets.mp3
index 135a747997..7e3a6c3764 100644
Binary files a/sounds/reactions-crickets.mp3 and b/sounds/reactions-crickets.mp3 differ
diff --git a/sounds/reactions-crickets.opus b/sounds/reactions-crickets.opus
new file mode 100644
index 0000000000..f92f058a5d
Binary files /dev/null and b/sounds/reactions-crickets.opus differ
diff --git a/sounds/reactions-laughter.mp3 b/sounds/reactions-laughter.mp3
index a84ff6ca47..772c38115b 100644
Binary files a/sounds/reactions-laughter.mp3 and b/sounds/reactions-laughter.mp3 differ
diff --git a/sounds/reactions-laughter.opus b/sounds/reactions-laughter.opus
new file mode 100644
index 0000000000..2375b647ae
Binary files /dev/null and b/sounds/reactions-laughter.opus differ
diff --git a/sounds/reactions-raised-hand.mp3 b/sounds/reactions-raised-hand.mp3
index e06a2d7e2a..2fd2f1e380 100644
Binary files a/sounds/reactions-raised-hand.mp3 and b/sounds/reactions-raised-hand.mp3 differ
diff --git a/sounds/reactions-raised-hand.opus b/sounds/reactions-raised-hand.opus
new file mode 100644
index 0000000000..2c431daaa1
Binary files /dev/null and b/sounds/reactions-raised-hand.opus differ
diff --git a/sounds/reactions-surprise.mp3 b/sounds/reactions-surprise.mp3
index 07ea6cdf03..63d48fa964 100644
Binary files a/sounds/reactions-surprise.mp3 and b/sounds/reactions-surprise.mp3 differ
diff --git a/sounds/reactions-surprise.opus b/sounds/reactions-surprise.opus
new file mode 100644
index 0000000000..ad358a8ddd
Binary files /dev/null and b/sounds/reactions-surprise.opus differ
diff --git a/sounds/reactions-thumbs-up.mp3 b/sounds/reactions-thumbs-up.mp3
index 9ac1460986..92491a1229 100644
Binary files a/sounds/reactions-thumbs-up.mp3 and b/sounds/reactions-thumbs-up.mp3 differ
diff --git a/sounds/reactions-thumbs-up.opus b/sounds/reactions-thumbs-up.opus
new file mode 100644
index 0000000000..989a301072
Binary files /dev/null and b/sounds/reactions-thumbs-up.opus differ
diff --git a/sounds/recordingOff.mp3 b/sounds/recordingOff.mp3
index 7ac24a278b..3c89861824 100644
Binary files a/sounds/recordingOff.mp3 and b/sounds/recordingOff.mp3 differ
diff --git a/sounds/recordingOff.opus b/sounds/recordingOff.opus
new file mode 100644
index 0000000000..1dad098d72
Binary files /dev/null and b/sounds/recordingOff.opus differ
diff --git a/sounds/recordingOn.mp3 b/sounds/recordingOn.mp3
index c3f60d2015..e8b9e85995 100644
Binary files a/sounds/recordingOn.mp3 and b/sounds/recordingOn.mp3 differ
diff --git a/sounds/recordingOn.opus b/sounds/recordingOn.opus
new file mode 100644
index 0000000000..f02bde895b
Binary files /dev/null and b/sounds/recordingOn.opus differ
diff --git a/sounds/rejected.mp3 b/sounds/rejected.mp3
new file mode 100644
index 0000000000..857acda524
Binary files /dev/null and b/sounds/rejected.mp3 differ
diff --git a/sounds/rejected.opus b/sounds/rejected.opus
new file mode 100644
index 0000000000..46a52311fa
Binary files /dev/null and b/sounds/rejected.opus differ
diff --git a/sounds/ring.mp3 b/sounds/ring.mp3
new file mode 100644
index 0000000000..937ef63865
Binary files /dev/null and b/sounds/ring.mp3 differ
diff --git a/sounds/ring.ogg b/sounds/ring.ogg
deleted file mode 100644
index ea3d614b9f..0000000000
Binary files a/sounds/ring.ogg and /dev/null differ
diff --git a/sounds/ring.opus b/sounds/ring.opus
new file mode 100644
index 0000000000..8592011fe0
Binary files /dev/null and b/sounds/ring.opus differ
diff --git a/sounds/talkWhileMuted.mp3 b/sounds/talkWhileMuted.mp3
index cf07fb704c..d80cc726c6 100644
Binary files a/sounds/talkWhileMuted.mp3 and b/sounds/talkWhileMuted.mp3 differ
diff --git a/sounds/talkWhileMuted.opus b/sounds/talkWhileMuted.opus
new file mode 100644
index 0000000000..46caa7fd0b
Binary files /dev/null and b/sounds/talkWhileMuted.opus differ