
Recherche avancée
Autres articles (60)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (3645)
-
how to add effect to audio, sound like a phone call phone, inner monologue, or sounds like a man/woman ? [closed]
7 mars, par MathewI'm trying to apply different audio effects, such as making audio sound like a phone call. Below is my current approach. As you can see, I'm using multiple filters and simple algorithms to achieve this effect, but the output quality isn't ideal.


I've looked into FFmpeg filters and noticed mentions of LADSPA/LV2 plugins. Are these viable solutions ? Any other suggestions would be greatly appreciated.


public static void applySceneEffect(String inputPath, String outputPath, int sceneType) {
 LOGGER.info("apply scene effect {} to {}", sceneType, inputPath);

 try (FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputPath);
 FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputPath, grabber.getAudioChannels())) {

 grabber.setOption("vn", ""); 
 grabber.start();

 
 recorder.setAudioCodec(avcodec.AV_CODEC_ID_PCM_S16LE); 
 recorder.setSampleRate(grabber.getSampleRate());
 recorder.setAudioChannels(grabber.getAudioChannels());
 recorder.setAudioBitrate(grabber.getAudioBitrate());
 recorder.setFormat("wav"); 


 String audioFilter = String.join(",",
 "aresample=8000", 
 "highpass=f=300, lowpass=f=3400", 
 "acompressor=threshold=-15dB:ratio=4:attack=10:release=100", 
 "volume=1.5", 
 "aecho=0.9:0.4:10:0.6"
 );

 FFmpegFrameFilter f1 = new FFmpegFrameFilter(audioFilter, grabber.getAudioChannels());
 f1.setSampleRate(grabber.getSampleRate());
 f1.start();

 recorder.start();

 Random random = new Random();
 double noiseLevel = 0.02; 

 
 while (true) {
 var frame = grabber.grabFrame(true, false, true, true);
 if (frame == null) {
 break;
 }

 ShortBuffer audioBuffer = (ShortBuffer) frame.samples[0];
 short[] audioData = new short[audioBuffer.remaining()];
 audioBuffer.get(audioData);

 applyElectricNoise(audioData, grabber.getSampleRate());

 audioData = applyDistortion(audioData, 1.5, 30000);

 audioBuffer.rewind();
 audioBuffer.put(audioData);
 audioBuffer.flip();


 f1.push(frame); 
 Frame filteredFrame;
 while ((filteredFrame = f1.pull()) != null) {
 recorder.record(filteredFrame); 
 }
 }

 recorder.stop();
 recorder.release();
 grabber.stop();
 grabber.release();
 } catch (FrameGrabber.Exception | FrameRecorder.Exception | FFmpegFrameFilter.Exception e) {
 throw new RuntimeException(e);
 }
}


private static final double NOISE_LEVEL = 0.005; 
private static final int NOISE_FREQUENCY = 60; 

public static void applyElectricNoise(short[] audioData, int sampleRate) {
 Random random = new Random();

 
 for (int i = 0; i < audioData.length; i++) {
 double noise = Math.sin(2 * Math.PI * NOISE_FREQUENCY * i / sampleRate);

 double electricNoise = random.nextGaussian() * NOISE_LEVEL * Short.MAX_VALUE + noise;

 audioData[i] = (short) Math.max(Math.min(audioData[i] + electricNoise, Short.MAX_VALUE), Short.MIN_VALUE); 
 }
}

public static short[] applyTremolo(short[] audioData, int sampleRate, double frequency, double depth) {
 double phase = 0.0;
 double phaseIncrement = 2 * Math.PI * frequency / sampleRate;

 for (int i = 0; i < audioData.length; i++) {
 double modulator = 1.0 - depth + depth * Math.sin(phase); 
 audioData[i] = (short) (audioData[i] * modulator);

 phase += phaseIncrement;
 if (phase > 2 * Math.PI) {
 phase -= 2 * Math.PI;
 }
 }
 return audioData;
}

public static short[] applyDistortion(short[] audioData, double gain, double threshold) {
 for (int i = 0; i < audioData.length; i++) {
 double sample = audioData[i] * gain;

 if (sample > threshold) {
 sample = threshold;
 } else if (sample < -threshold) {
 sample = -threshold;
 }

 audioData[i] = (short) sample;
 }
 return audioData;
}



-
Anomalie #2533 (Nouveau) : spip 3 > extension texwheel > Yaml
13 février 2012, par Philippe ALes installations de spip 3 beta 2 se terminent toutes en erreur sur mon serveur lors de l’arrivée à la phase 4 de l’installation. Fatal error : Cannot access protected property sfYamlParser: :$offset in /home/monsite/ww/extensions/textwheel/lib/yaml/sfYamlParser.php on line 40 Le site n’est pas (...)
-
Anomalie #2327 : Voir le logo du site dans l’espace privé
25 octobre 2011, par cedric -Il y a une convention pour les pages de configuration qui ré-affichent tout le menu de configuration en colonne latérale (sur le postulat qu’en phase de configuration on passe souvent d’une page à une autre, et c’est plus pratique). Du coup si on laisse la page de l’identité dans les (...)