Recherche avancée

Médias (91)

Autres articles (81)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (8315)

  • What does "Error in the pull function" mean while executing ffmpeg command ?

    8 avril 2022, par Alex Rypun

    I'm trying to generate a video from multiple video sources (https urls).

    &#xA;

    If I use say 8 video sources it works as expected. But if I need say 30 sources, it starts to work as expected, but at some moment a lot of errors appear.

    &#xA;

    enter image description here

    &#xA;

    I believe the main one is Error in the pull function..

    &#xA;

    Such a video-source appears in the output file but not a full requested part (e.g., I set trim=0:5, but ffmpeg generates only 3 seconds).

    &#xA;

    I tried different videos, different cropped parts, loaded sources to aws s3, but can't identify a "bad case", it's reproduced with different options.

    &#xA;

    My command looks like this :

    &#xA;

    ffmpeg -y&#xA;-i "https://player.vimeo.com/external/399541658.hd.mp4?s=5432956383527af00bb74b41c120bbb84ff3ac5e&amp;profile_id=175&amp;oauth2_token_id=57447761"&#xA;...&#xA;-i "https://player.vimeo.com/external/464966383.hd.mp4?s=648aa8277259c499f1d05d6330f9922932c080a6&amp;profile_id=175&amp;oauth2_token_id=57447761"&#xA;-i "https://test.com/development/videos/dc3c32cf9a194db1bb52/sources/5q5e3j2h57.mp3"&#xA;-filter_complex "[0:v]trim=0:5.64,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9[v0];[1:v]trim=0:8,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9,loop=0:32767[v1]; ... [10:v]trim=0:13,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9[v10];[v0] ... [v10] concat=n=11:v=1 [video];[11:a] atrim=0:99.29 [audio]"&#xA;-vsync 2 -map [video] -map [audio] output.mp4&#xA;

    &#xA;

    When I downloaded all sources to my local machine and tried to use them in the ffmpeg command it worked fine without errors.

    &#xA;

    Also, I figured out that it depends on the CPU. When I restricted my CPU the errors appeared earlier. And some commands might produce errors with a restricted CPU but finished successfully with no CPU restriction.

    &#xA;

    As I understand, for some reason, ffmpeg fails to receive a particular part of a file data, but I believe it should retry to receive lost packages (it's https).

    &#xA;

    And I don't understand, how it could be related to CPU or sources quantity.

    &#xA;

    By not understanding the core of evil, I can think about 2 ways (both ugly) :

    &#xA;

      &#xA;
    1. to download all sources and generate the final video from local files ;
    2. &#xA;

    3. to chunk sources, generate intermediate outputs for each chunk (and save locally), and concatenate them into the final one.
    4. &#xA;

    &#xA;

    Any better suggestions or at least where to seek ?

    &#xA;

  • FFMPEG creating mp3 with "Junk" at the end

    13 juillet 2022, par Johnaras

    I have a web application which converts WebM files to mp3 using FFMPEG.js in the Client-Side. Once the mp3 conversion finishes, users are prompted to download their file.

    &#xA;

    Lately, I realized that a lot of mp3 files which I tried to converted have a different duration value than the original WebM file. The duration is usually longer. For instance, a WebM file with duration of 2:16 gets converted to an mp3 file with a duration of 2:29. Once the player reaches at 2:16 it just goes back to the start.

    &#xA;

    I have tried to open the file in Audacity but it keeps saying that this MP3 file seems to be "Malformed".

    &#xA;

    I also tried to use MP3val and it says the file has junk at the end.

    &#xA;

    Code Snippets :

    &#xA;

    const worker = new Worker("/ffmpeg-worker-mp4.js");&#xA;import { fetchFile } from "@ffmpeg/ffmpeg"; // https://www.npmjs.com/package/@ffmpeg/ffmpeg&#xA;&#xA;const convertSong = async (title, id, bitrate) => {&#xA;    setProgress("Initializing...")&#xA;    ffmpegVars = [title]&#xA;    &#xA;    worker.postMessage({&#xA;      type: "run",&#xA;      arguments: ["-i", `input.webm`, "-c:a", "libmp3lame",  "-vn", "-ab", `${bitrate ? bitrate : 256}k`, "-ar", "44100", "-f", "mp3", `output.mp3`],&#xA;      MEMFS: [{ name: "input.webm", data: await fetchFile(`/api/download/stream?video=${id}`) }]&#xA;    });&#xA;}&#xA;&#xA;convertSong(data.title, data.id, data.bitrate)&#xA;

    &#xA;

    I'm literally willing to pay anyone who helps me fix this.

    &#xA;

  • Can't upload huge video to google storage. I using "@ffmpeg-installer/ffmpeg" and @google-cloud/storage

    20 juillet 2022, par Dmytro Petskovych

    I upload file to google storage using "@ffmpeg-installer/ffmpeg" and @google-cloud/storage in my node.js App.&#xA;Step 1. file uploading to fs is in child processes - one process for each type of resolution (totaly six).&#xA;step 2. encription (converting to stream)&#xA;step 3. upload to google storage

    &#xA;

    I use "Upload a directory to a bucket" in order to send the video from the client to the Google Cloud Storage bucket.

    &#xA;

    This way is working fine only with small file.

    &#xA;

    when I upload video, actually I upload six videos, one for each type resolution

    &#xA;

    for example when I upload video with duration one hour it split on chunk and totally I get more three thousands files.

    &#xA;

    So actually i upload folder with large amount of files, but not all of this files are uploaded to cloud.

    &#xA;

    maybe someone had the similar problem and helps fix it.

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    const uploadFolder = async (bucketName, directoryPath, socketInstance) => {&#xA;    try {&#xA;      let dirCtr = 1;&#xA;      let itemCtr = 0;&#xA;      const fileList = [];&#xA;&#xA;      const onComplete = async () => {&#xA;        const folderName = nanoid(46);&#xA;&#xA;        await Promise.all(&#xA;          fileList.map(filePath => {&#xA;            const fileName = path.relative(directoryPath, filePath);&#xA;            const destination = `${ folderName }/${ fileName }`;&#xA;&#xA;            return storage&#xA;              .bucket(bucketName)&#xA;              .upload(filePath, { destination })&#xA;              .then(&#xA;                uploadResp => ({ fileName: destination, status: uploadResp[0] }),&#xA;                err => ({ fileName: destination, response: err })&#xA;              );&#xA;          })&#xA;        );&#xA;&#xA;        if (socketInstance) socketInstance.emit(&#x27;uploadProgress&#x27;, {&#xA;          message: `Added files to Google bucket`,&#xA;          last: false,&#xA;          part: false&#xA;        });&#xA;&#xA;        return folderName;&#xA;      };&#xA;&#xA;      const getFiles = async directory => {&#xA;        const items = await fs.readdir(directory);&#xA;        dirCtr--;&#xA;        itemCtr &#x2B;= items.length;&#xA;        for(const item of items) {&#xA;          const fullPath = path.join(directory, item);&#xA;          const stat = await fs.stat(fullPath);&#xA;          itemCtr--;&#xA;          if (stat.isFile()) {&#xA;            fileList.push(fullPath);&#xA;          } else if (stat.isDirectory()) {&#xA;            dirCtr&#x2B;&#x2B;;&#xA;            await getFiles(fullPath);&#xA;          }&#xA;        }&#xA;      }&#xA;&#xA;      await getFiles(directoryPath);&#xA;&#xA;      return onComplete();&#xA;    } catch (e) {&#xA;      log.error(e.message);&#xA;      throw new Error(&#x27;Can\&#x27;t store folder.&#x27;);&#xA;    }&#xA;  };

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;