Recherche avancée

Médias (1)

Mot : - Tags -/graphisme

Autres articles (47)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (13980)

  • 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 - how to merge multiple audio with time offset into a video

    8 septembre 2021, par Andrews Gilbert
    ffmpeg -y -i earth.mp4 -i 1.wav -i 2.wav -i 3.wav -filter_complex "[1]adelay=delays=5s:all=1[r1]; [2]adelay=delays=8000S:all=1[r2]; [3]adelay=delays=15s:all=1[r3]; [r1][r2][r3]amix=inputs=3[a]"  -map 0:v -map "[a]" -codec:v copy output.mp4


    


    I am using the above code but getting an error in ubuntu 20.04.1

    


    Error is => Error initializing filter 'adelay' with args 'delays=1s:all=1'

    


  • lavc/qsv : Use vendor id to create device

    26 juillet 2024, par Fei Wang
    lavc/qsv : Use vendor id to create device
    

    New kernel driver "xe" will be supported from Lunar Lake instead of
    "i915".

    "xe" kernel driver :
    https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe

    Signed-off-by : Fei Wang <fei.w.wang@intel.com>

    • [DH] libavcodec/qsv.c