Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (74)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (3961)

  • Add additional, dutch-specific methods : phone, mobile, postal, bank and giro account

    27 février 2013, par digitalica

    m additional-methods.js m localization/messages_nl.js m test/methods.js Add additional, dutch-specific methods : phone, mobile, postal, bank and giro account add dutch phone number validation

  • how to add effect to audio, sound like a phone call phone, inner monologue, or sounds like a man/woman ? [closed]

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

    


    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;
}


    


  • FFmpeg process killed when press poweroff button

    11 avril 2018, par dastan

    I am using the WritingMinds/ffmpeg-android-java library for ffmpeg. When I press the Power button of Asus T00J (4.4), the ffmpeg process is canceled. How can I prevent process to being killed ?

    process = shellCommand.run(cmd);

    The only solution I have in my mind is to recompile ffmpeg with all supported libraries in the shared library format (.so) instead of the executable binary and write JNI to access the ffmpeg main method. But it will take so much time. So, I am looking for alternative solutions.