mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
Cleanup sounds (switch to mp3, encode at lower bitrate).' (#12507)
* Reencode mp3 sounds at lower bitrate, mono. * Encode wav sounds as mp3. * Remove unused sound file. * Add opus encoded sounds. * Add a script to encode sounds.
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
export const INCOMING_MSG_SOUND_FILE = 'incomingMessage.wav';
|
||||
export const INCOMING_MSG_SOUND_FILE = 'incomingMessage.mp3';
|
||||
|
||||
@@ -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}.
|
||||
|
||||
@@ -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' } ]
|
||||
]);
|
||||
|
||||
@@ -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}.
|
||||
|
||||
50
resources/encode-sound.sh
Executable file
50
resources/encode-sound.sh
Executable file
@@ -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
|
||||
2
sounds/README.md
Normal file
2
sounds/README.md
Normal file
@@ -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).
|
||||
Binary file not shown.
BIN
sounds/asked-unmute.opus
Normal file
BIN
sounds/asked-unmute.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/e2eeOff.opus
Normal file
BIN
sounds/e2eeOff.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/e2eeOn.opus
Normal file
BIN
sounds/e2eeOn.opus
Normal file
Binary file not shown.
BIN
sounds/incomingMessage.mp3
Normal file
BIN
sounds/incomingMessage.mp3
Normal file
Binary file not shown.
BIN
sounds/incomingMessage.opus
Normal file
BIN
sounds/incomingMessage.opus
Normal file
Binary file not shown.
BIN
sounds/joined.mp3
Normal file
BIN
sounds/joined.mp3
Normal file
Binary file not shown.
BIN
sounds/joined.opus
Normal file
BIN
sounds/joined.opus
Normal file
Binary file not shown.
BIN
sounds/knock.mp3
BIN
sounds/knock.mp3
Binary file not shown.
BIN
sounds/knock.opus
Normal file
BIN
sounds/knock.opus
Normal file
Binary file not shown.
BIN
sounds/left.mp3
Normal file
BIN
sounds/left.mp3
Normal file
Binary file not shown.
BIN
sounds/left.opus
Normal file
BIN
sounds/left.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/liveStreamingOff.opus
Normal file
BIN
sounds/liveStreamingOff.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/liveStreamingOn.opus
Normal file
BIN
sounds/liveStreamingOn.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/noAudioSignal.opus
Normal file
BIN
sounds/noAudioSignal.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/noisyAudioInput.opus
Normal file
BIN
sounds/noisyAudioInput.opus
Normal file
Binary file not shown.
BIN
sounds/outgoingRinging.mp3
Normal file
BIN
sounds/outgoingRinging.mp3
Normal file
Binary file not shown.
BIN
sounds/outgoingRinging.opus
Normal file
BIN
sounds/outgoingRinging.opus
Normal file
Binary file not shown.
BIN
sounds/outgoingStart.mp3
Normal file
BIN
sounds/outgoingStart.mp3
Normal file
Binary file not shown.
BIN
sounds/outgoingStart.opus
Normal file
BIN
sounds/outgoingStart.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-applause.opus
Normal file
BIN
sounds/reactions-applause.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-boo.opus
Normal file
BIN
sounds/reactions-boo.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-crickets.opus
Normal file
BIN
sounds/reactions-crickets.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-laughter.opus
Normal file
BIN
sounds/reactions-laughter.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-raised-hand.opus
Normal file
BIN
sounds/reactions-raised-hand.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-surprise.opus
Normal file
BIN
sounds/reactions-surprise.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/reactions-thumbs-up.opus
Normal file
BIN
sounds/reactions-thumbs-up.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/recordingOff.opus
Normal file
BIN
sounds/recordingOff.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/recordingOn.opus
Normal file
BIN
sounds/recordingOn.opus
Normal file
Binary file not shown.
BIN
sounds/rejected.mp3
Normal file
BIN
sounds/rejected.mp3
Normal file
Binary file not shown.
BIN
sounds/rejected.opus
Normal file
BIN
sounds/rejected.opus
Normal file
Binary file not shown.
BIN
sounds/ring.mp3
Normal file
BIN
sounds/ring.mp3
Normal file
Binary file not shown.
BIN
sounds/ring.ogg
BIN
sounds/ring.ogg
Binary file not shown.
BIN
sounds/ring.opus
Normal file
BIN
sounds/ring.opus
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/talkWhileMuted.opus
Normal file
BIN
sounds/talkWhileMuted.opus
Normal file
Binary file not shown.
Reference in New Issue
Block a user