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:
parent
c0f0803f01
commit
99955df5c8
|
@ -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}.
|
||||
|
|
|
@ -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
|
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/knock.mp3
BIN
sounds/knock.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/ring.ogg
BIN
sounds/ring.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue