Recherche avancée

Médias (91)

Autres articles (55)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (5936)

  • How to apply different audio filters in multiple audio tracks using ffmpeg ? [closed]

    13 novembre 2020, par H3rdell

    Folks.

    


    I'm trying to apply different audio filters in multiple audio tracks using ffmpeg but with no luck so far. Here's my command (Windows) :

    


    ffmpeg.exe -y -i "movie_in.mkv" -map_metadata -1 -map 0:v:0 -c:v copy -map 0:a:5 -c:a ac3 -b:a 384k -map 0:a:1 -c:a ac3 -ac 2 -b:a 192k -af:a:0 acompressor=attack=15:release=300:threshold=-25dB:ratio=15:knee=1dB:makeup=10dB -af:a:1 "volume=-10dB" "movie_out.mkv"

    


    The output file is with both audios with 192k and with only the last filter applied (volume=-10dB).

    


    So, with my command, ffmpeg are ignoring the bitrate and channels set for audio 0 and also ignoring the filter compressor for audio 0.

    


    Log :
https://pastebin.com/4BgcSfhi

    


    Any clues ?

    


  • After downloading the file i got 0 byte file size, I dont know how to solve this error ? [closed]

    7 octobre 2024, par Saurabh Chauhan

    This is the handler function which converts a given format to another format but when i provide additional options(like trim audio,bitrate,codec,sample rate etc) to audio and video then it gives me 0 byte file after converting and if i do not include additional options then it gave me correct file.

    


    Please look into this and provide me solution.

    


    const handleConvert = async () => {

  if (!ffmpeg) return;

  setConverting(true);

  for (let uploadedFile of uploadedFiles) {
    const { file } = uploadedFile;
    const fileNameWithoutExtension = getFileNameWithoutExtension(file.name);
    const inputFile = file.name;
    let outputFile;
    let outputFormat;
    const { bitrate, channels, codec, sampleRate, trimStart, trimEnd, volume } = optionsdata;

    try {
      await ffmpeg.writeFile(inputFile, await fetchFile(file));
      let command = ['-i', inputFile];
      // Handle audio conversion with advanced options
> if (supportedAudioFormats.some(ext => file.name.endsWith(ext)) || supportedVideoFormats.some(ext => file.name.endsWith(ext))) {
        outputFile = `${fileNameWithoutExtension}.${audioFormat}`;
        outputFormat = audioFormat;

        // Add trim options if they exist
        if (trimStart && trimEnd) {
          command.push('-ss', trimStart, '-to', trimEnd);
        } else if (trimStart) {
          command.push('-ss', trimStart);
        }

        // Adjust volume if specified
        if (volume && volume !== 'no change') {
          command.push('-filter:a', `volume=${volume}`);
        }
        
        // Apply advanced audio settings like codec, bitrate, and channels
        if (codec) {
          command.push('-c:a', codec);
        }
        if (bitrate) {
          command.push('-b:a', `${bitrate}k`);
        }
> if (channels && channels !== 'no change') {
          command.push('-ac', channels === 'mono' ? '1' : '2');
        }
        if (sampleRate && sampleRate !== 'no change') {
          command.push('-ar', sampleRate);
        }

        // Add output file to the command
        command.push(outputFile);
        console.log('Command Array:', command);
        // Execute FFmpeg command
        await ffmpeg.exec(command);

      } else if (supportedImageFormats.some(ext => file.name.endsWith(ext))) {
        // Image conversion logic
        outputFile = `${fileNameWithoutExtension}.${imageFormat}`;
        outputFormat = imageFormat;
        command.push(outputFile);
        await ffmpeg.exec(command);

      } else if (supportedSubtitleFormats.some(ext => file.name.endsWith(ext))) {
        // Subtitle conversion logic
        outputFile = `${fileNameWithoutExtension}.${subtitleFormat}`;
        outputFormat = subtitleFormat;
        command.push(outputFile);
        await ffmpeg.exec(command);

      } else {
        console.error('Unsupported file type: ', file.name);
        continue; // Skip unsupported files
      }
      // Create Blob and URL for the converted file
      const data = await ffmpeg.readFile(outputFile);
      const convertedBlob = new Blob([data.buffer], {
        type: outputFormat === 'png' ? 'image/png' : `audio/${outputFormat}` || `text/vtt`,
      });
      const convertedUrl = URL.createObjectURL(convertedBlob);

      setConvertedFiles((prevFiles) => [
        ...prevFiles,
        { name: outputFile, url: convertedUrl, format: outputFormat },
      ]);
    } catch (error) {
      console.error('Conversion error:', error);
    }
  }

  setConversionFinished(true);
  setConverting(false);
  setoptionsdata({
    'codec':'',
    'bitrate':'',
    'channels':'',
    'volume':'',
    'sampleRate':'',
    'trimStart':'',
    'trimEnd':''
  });
};



    


  • ffmpeg to muffle audio in .mp4 files (lowpass freq + amplify)

    4 juillet 2018, par martins

    I have different 40second mp4 files recording people speaking (1 speaker=1 mp4 file). I am interested in muffling the words of the speech so that the content is unintelligible. I run some tests with Audacity and it seems I found the right combination of effects, that is :

    • Low Pass Filter at about 200Hz (frequency) and a Rolloff (dB per octave) of 36dB : the default in Audacity is 1000Hz and 6dB, respectively
    • Amplify the audio 40 times (allow clipping)

    My question is whether ffmpeg can reproduce the same steps. I will finally need to loop over 250 speeches, so ffmpeg would be highly valuable. At the moment, I could only code this middle solution, which is very far (I suspect) from what I want :

    ffmpeg -i input.mp4 -vcodec copy -af "lowpass=200,volume=40" output.mp4

    I don’t know how to deal with the 36dB per octave I need and whether the "volume" filter is really doing the amplifying job...

    Since I am a beginner to ffmpeg and audio edition, I would greatly appreciate any help. Thank you in advance.