Recherche avancée

Médias (91)

Autres articles (43)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (5215)

  • Convert audio blob to mp3 on expressjs server

    27 septembre 2020, par islalobo

    I have a little app that captures sound and stores the audio as an audio blob encoded as base64 on an expressjs server. I would like to convert these audio files into .mp3 or .wav - any binary usable format. My understanding of audio files is very basic and I'm looking to gain a better understanding. Any guidance is appreciated. I've read through several posts and issues, but I'm just a bit lost right now.

    


    Here is my client-side capture of the audio, encoding and then posting to expressjs server.

    


    const saveMessage = async function(base64AudioMessage) {
    await fetch('/messages', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ message: base64AudioMessage })
      }).then(res => {
        if (res.status === 201) {
          const response = res.json()
          .then(response => {
            console.log(response);
            populateAudioMessages(response.id); // shows the recording that was just saved
          });
        }
        console.log('Invalid status saving audio message: ' + res.status);
      });
      return true;
  }

  sendButton.addEventListener('click', () => {
    const reader = new FileReader();
    reader.readAsDataURL(audio.audioBlob);
    reader.onload = async () => {
      const base64AudioMessage = reader.result.split(',')[1];
      
      await saveMessage(base64AudioMessage);
    };
  });


    


    Here is the post method on my expressjs server. It's very messy as I have been trying to use ffmpeg to convert the posted files to .mp3 format.

    


    app.post('/messages', (req, res) => {
  if (!req.body.message) {
    return res.status(400).json({ error: 'No req.body.message' });
  }
  const messageId = v4();
  writeFile(messageFolder + messageId, req.body.message, 'base64')
  .then(() => {
      console.log('messages was saved!');
      try {
        console.log('attempting to make an mp3 ', audioFolder + messageId);
        const process = new ffmpeg(`${messageFolder}${messageId}`);
        process.then((audio) => {
          console.log('audio is ready to be processed ', audio);
          audio.fnExtractSoundToMP3(`${audioFolder}${messageId}.mp3`, (error, file) => {
            console.log('There is an error ', error);
            console.log('There is a file ', file);
            if (!error) {
              console.log('Audio File ', file);
              const file = file;
              console.log('what a success! ', messageId && messageId, file && file);
              res.status(201).json({
                message: 'Saved message',
              });
            }
          })
        }, (err) => {
          console.log('An error occurred, ', err);
        });
      } catch(e) {
        console.log('error code ', e.code);
        console.log('error message ', e.msg);
      }
  })
  .catch(err => {
    console.log('Error writing message to file', err);
    res.sendStatus(500);
  });
});


    


  • ffmpeg error : "at least one output file must be specified" only live server

    3 avril 2017, par Tarun Bhardwaj
    ffmpeg -i background.jpg -i with-logo.mp4 -filter_complex [1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out] -map [out] with-bg1.mp4

    I am using ffmpeg command for create video, when i am using it on my local sever its working fine, but when goes live server it shows error

    At least one output file must be specified

    sh : [0:v][ckout]overlay[out] : command not found

    Please help me whats problem with this code.

  • Is there any way in ffmpeg to cut a video with embedded subtitles and multiple audio tracks accordingly ? [closed]

    21 février 2024, par Harsh

    I have a video which had multiple audio tracks and embedded subtitles. I tried using ffmpeg to cut it, but I could not get the subtitles with it, nor the audio tracks. Here's the command I tried :

    


    ffmpeg -i input.mkv -ss 00:01:16 -to 00:02:46 -map "[0:0]:v" -map "[0:3]:a" -map "[0:4]:s" -c copy output.mkv 


    


    I tried using this command -

    


    ffprobe -v info input.mkv


    


    to collect information about the streams and substituted the streams, but for some reason it gave an error which read something along the lines of - Output with label 0:0 does not exist. Is there an alternative to achieve the result I wish ?

    


    Edit - I tried this command :

    


    ffmpeg -i input.mkv -ss 00:01:16 -to 00:02:46 -map 0 -c:a copy -c:s copy output.mkv


    


    It does the task BUT I have trouble seeing the video on my pc, it just shows a black screen (VLC) but on my mobile when I watch it using PLAYit, it works fine but I can't see the first 8 seconds for some reason. Anyways fix for this ?