Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (42)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (8013)

  • Revision f00d20495944825db80119d8c96927c96c32ce87 : offrir #INSERT_HEAD sur la page de login, plutot qu’un appel hors api a ...

    4 octobre 2010, par Cerdic — Log

    offrir #INSERT_HEAD sur la page de login, plutot qu’un appel hors api a f_jQuery git-svn-id : svn ://trac.rezo.net/spip/spip@16386 caf5f3e8-d4fe-0310-bb3e-c32d5e47d55d

  • Can't upload folder with large amount of files to google storage. I using "@ffmpeg-installer/ffmpeg" and @google-cloud/storage

    20 juillet 2022, par Dmytro

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

    


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

    


    This way is working fine only with small video.

    


    for example when I upload video with duration one hour it split on chunk and totally I get more three thousands files. But the problem occurs when there are more than 1500 files

    


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

    


    maybe someone had the similar problem and helps fix it.

    


    

    

    const uploadFolder = async (bucketName, directoryPath, socketInstance) => {
    try {
      let dirCtr = 1;
      let itemCtr = 0;
      const fileList = [];

      const onComplete = async () => {
        const folderName = nanoid(46);

        await Promise.all(
          fileList.map(filePath => {
            const fileName = path.relative(directoryPath, filePath);
            const destination = `${ folderName }/${ fileName }`;

            return storage
              .bucket(bucketName)
              .upload(filePath, { destination })
              .then(
                uploadResp => ({ fileName: destination, status: uploadResp[0] }),
                err => ({ fileName: destination, response: err })
              );
          })
        );

        if (socketInstance) socketInstance.emit('uploadProgress', {
          message: `Added files to Google bucket`,
          last: false,
          part: false
        });

        return folderName;
      };

      const getFiles = async directory => {
        const items = await fs.readdir(directory);
        dirCtr--;
        itemCtr += items.length;
        for(const item of items) {
          const fullPath = path.join(directory, item);
          const stat = await fs.stat(fullPath);
          itemCtr--;
          if (stat.isFile()) {
            fileList.push(fullPath);
          } else if (stat.isDirectory()) {
            dirCtr++;
            await getFiles(fullPath);
          }
        }
      }

      await getFiles(directoryPath);

      return onComplete();
    } catch (e) {
      log.error(e.message);
      throw new Error('Can\'t store folder.');
    }
  };

    


    


    



  • Running ffmpeg.exe through windows service fails to complete while dealing with large files

    28 avril 2013, par Harun

    I am using ffmpeg.exe to convert video files to flv format. For that purpose i use a windows service to run the conversion process in background. While trying to convert large files(i experienced it when the file size is >14MB) through windows service it gets stuck at the line which starts the process(ie, process.start();).

    But when i tried to execute ffmpeg.exe directly from command prompt it worked with out any problems.

    My code in windows service is as follows :

    private Thread WorkerThread;
    protected override void OnStart(string[] args)
    {

      WorkerThread = new Thread(new ThreadStart(StartHandlingVideo));
      WorkerThread.Start();
    }

    protected override void OnStop()
    {
      WorkerThread.Abort();
    }

    private void StartHandlingVideo()
    {  
      FilArgs = string.Format("-i {0} -ar 22050 -qscale 1 {1}", InputFile, OutputFile);
      Process proc;
      proc = new Process();

      try
      {

        proc.StartInfo.FileName = spath + "\\ffmpeg\\ffmpeg.exe";
        proc.StartInfo.Arguments = FilArgs;
        proc.StartInfo.UseShellExecute = false;
        proc.StartInfo.CreateNoWindow = false;
        proc.StartInfo.RedirectStandardOutput = true;
        proc.StartInfo.RedirectStandardError = true;

        eventLog1.WriteEntry("Going to start process of convertion");

        proc.Start();

        string StdOutVideo = proc.StandardOutput.ReadToEnd();
        string StdErrVideo = proc.StandardError.ReadToEnd();

        eventLog1.WriteEntry("Convertion Successful");
        eventLog1.WriteEntry(StdErrVideo);              
    }
    catch (Exception ex)
    {
        eventLog1.WriteEntry("Convertion Failed");
        eventLog1.WriteEntry(ex.ToString());            
    }
    finally
    {
        proc.WaitForExit();
        proc.Close();
    }

    How can I get rid of this situation.