Recherche avancée

Médias (91)

Autres articles (95)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (6719)

  • aarch64 : Add Apple runtime detection of dotprod and i8mm using sysctl

    26 mai 2023, par Martin Storsjö
    aarch64 : Add Apple runtime detection of dotprod and i8mm using sysctl
    

    For now, there's not much value in this since Clang don't support
    enabling the dotprod or i8mm features with either .arch_extension
    or .arch (it has to be enabled by the base arch flags passed to
    the compiler). But it may be supported in the future.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] configure
    • [DH] libavutil/aarch64/cpu.c
  • Are there any libraries on adding effect to audio, like phone, inner monologue, or sounds like a man/woman ? [closed]

    6 mars, par Mathew

    I'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.

    &#xA;

    Since I need to implement many sound effects/filters, are there any ready-to-use libraries that could help ?

    &#xA;

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

    &#xA;

    public static void applySceneEffect(String inputPath, String outputPath, int sceneType) {&#xA;    LOGGER.info("apply scene effect {} to {}", sceneType, inputPath);&#xA;&#xA;    try (FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputPath);&#xA;         FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputPath, grabber.getAudioChannels())) {&#xA;&#xA;        grabber.setOption("vn", ""); &#xA;        grabber.start();&#xA;&#xA;       &#xA;        recorder.setAudioCodec(avcodec.AV_CODEC_ID_PCM_S16LE); &#xA;        recorder.setSampleRate(grabber.getSampleRate());&#xA;        recorder.setAudioChannels(grabber.getAudioChannels());&#xA;        recorder.setAudioBitrate(grabber.getAudioBitrate());&#xA;        recorder.setFormat("wav"); &#xA;&#xA;&#xA;        String audioFilter = String.join(",",&#xA;                "aresample=8000",      &#xA;                "highpass=f=300, lowpass=f=3400",       &#xA;                "acompressor=threshold=-15dB:ratio=4:attack=10:release=100", &#xA;                "volume=1.5",          &#xA;                "aecho=0.9:0.4:10:0.6"&#xA;        );&#xA;&#xA;        FFmpegFrameFilter f1 = new FFmpegFrameFilter(audioFilter, grabber.getAudioChannels());&#xA;        f1.setSampleRate(grabber.getSampleRate());&#xA;        f1.start();&#xA;&#xA;        recorder.start();&#xA;&#xA;        Random random = new Random();&#xA;        double noiseLevel = 0.02; &#xA;&#xA;   &#xA;        while (true) {&#xA;            var frame = grabber.grabFrame(true, false, true, true);&#xA;            if (frame == null) {&#xA;                break;&#xA;            }&#xA;&#xA;            ShortBuffer audioBuffer = (ShortBuffer) frame.samples[0];&#xA;            short[] audioData = new short[audioBuffer.remaining()];&#xA;            audioBuffer.get(audioData);&#xA;&#xA;            applyElectricNoise(audioData, grabber.getSampleRate());&#xA;&#xA;            audioData = applyDistortion(audioData, 1.5, 30000);&#xA;&#xA;            audioBuffer.rewind();&#xA;            audioBuffer.put(audioData);&#xA;            audioBuffer.flip();&#xA;&#xA;&#xA;            f1.push(frame); &#xA;            Frame filteredFrame;&#xA;            while ((filteredFrame = f1.pull()) != null) {&#xA;                recorder.record(filteredFrame); &#xA;            }&#xA;        }&#xA;&#xA;        recorder.stop();&#xA;        recorder.release();&#xA;        grabber.stop();&#xA;        grabber.release();&#xA;    } catch (FrameGrabber.Exception | FrameRecorder.Exception | FFmpegFrameFilter.Exception e) {&#xA;        throw new RuntimeException(e);&#xA;    }&#xA;}&#xA;&#xA;&#xA;private static final double NOISE_LEVEL = 0.005; &#xA;private static final int NOISE_FREQUENCY = 60;  &#xA;&#xA;public static void applyElectricNoise(short[] audioData, int sampleRate) {&#xA;    Random random = new Random();&#xA;&#xA;    &#xA;    for (int i = 0; i &lt; audioData.length; i&#x2B;&#x2B;) {&#xA;        double noise = Math.sin(2 * Math.PI * NOISE_FREQUENCY * i / sampleRate);&#xA;&#xA;        double electricNoise = random.nextGaussian() * NOISE_LEVEL * Short.MAX_VALUE &#x2B; noise;&#xA;&#xA;        audioData[i] = (short) Math.max(Math.min(audioData[i] &#x2B; electricNoise, Short.MAX_VALUE), Short.MIN_VALUE); &#xA;    }&#xA;}&#xA;&#xA;public static short[] applyTremolo(short[] audioData, int sampleRate, double frequency, double depth) {&#xA;    double phase = 0.0;&#xA;    double phaseIncrement = 2 * Math.PI * frequency / sampleRate;&#xA;&#xA;    for (int i = 0; i &lt; audioData.length; i&#x2B;&#x2B;) {&#xA;        double modulator = 1.0 - depth &#x2B; depth * Math.sin(phase); &#xA;        audioData[i] = (short) (audioData[i] * modulator);&#xA;&#xA;        phase &#x2B;= phaseIncrement;&#xA;        if (phase > 2 * Math.PI) {&#xA;            phase -= 2 * Math.PI;&#xA;        }&#xA;    }&#xA;    return audioData;&#xA;}&#xA;&#xA;public static short[] applyDistortion(short[] audioData, double gain, double threshold) {&#xA;    for (int i = 0; i &lt; audioData.length; i&#x2B;&#x2B;) {&#xA;        double sample = audioData[i] * gain;&#xA;&#xA;        if (sample > threshold) {&#xA;            sample = threshold;&#xA;        } else if (sample &lt; -threshold) {&#xA;            sample = -threshold;&#xA;        }&#xA;&#xA;        audioData[i] = (short) sample;&#xA;    }&#xA;    return audioData;&#xA;}&#xA;

    &#xA;

  • Get current frame size in surfaceview using FFmpeg

    14 octobre 2019, par Priya M

    I want to create an app that uses a link to play a video and while onclick the button needs to get the current frame and its height and width using FFmpeg.