Recherche avancée

Médias (91)

Autres articles (24)

  • 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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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 (6907)

  • Problem importing whatsapp-web.js nodejs module in electron react app

    26 mai 2021, par Sunil Shah

    I am trying to build an electron react app. I need to integrate this node modules https://www.npmjs.com/package/whatsapp-web.js in my electron react app. My main.js of electron looks like this :

    


    

    

    // Modules to control application life and create native browser window
const { app, BrowserWindow } = require("electron");
const path = require("path");

function createWindow() {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      webSecurity: false,
    },
  });

  // and load the index.html of the app.
  mainWindow.loadURL("your ip address:3000");

  // Open the DevTools.
  // mainWindow.webContents.openDevTools()
}

app.whenReady().then(() => {
  createWindow();

  app.on("activate", function () {
    // On macOS it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (BrowserWindow.getAllWindows().length === 0) createWindow();
  });
});

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", function () {
  if (process.platform !== "darwin") app.quit();
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

    


    


    



    And the React code where i want to import whatsapp-web.js module looks like

    


    

    

    import React from "react";&#xA;import styled from "styled-components";&#xA;const qrcode = require(&#x27;qrcode-terminal&#x27;);&#xA;const Client = require(&#x27;whatsapp-web.js&#x27;);&#xA;function Error() {&#xA;  var client = new Client();&#xA;  client.initialize();&#xA;  console.log(client);&#xA;  console.log(qrcode);&#xA;  return (&#xA;    <container>&#xA;      <errorimage src="https://cdn4.iconfinder.com/data/icons/smiley-vol-3-2/48/134-512.png"></errorimage>&#xA;      <errormessage>Oops, you are not connected to any number.</errormessage>&#xA;    </container>&#xA;  );&#xA;}&#xA;&#xA;export default Error;&#xA;&#xA;const Container = styled.div`&#xA;  display: flex;&#xA;  height: 100vh;&#xA;  width: 100%;&#xA;  padding-top: 20vh;&#xA;  position: center;&#xA;  /* align-items: center; */&#xA;  justify-content: center;&#xA;`;&#xA;&#xA;const ErrorImage = styled.img`&#xA;  background-color: transparent;&#xA;  background-repeat: no-repeat;&#xA;  background-size: cover;&#xA;  object-fit: contain;&#xA;&#xA;  width: 25%;&#xA;  height: 25%;&#xA;&#xA;  /* border: 2px solid black; */&#xA;`;&#xA;&#xA;const ErrorMessage = styled.div`&#xA;  margin: 10px;&#xA;  width: 50%;&#xA;  height: 25%;&#xA;  /* top: 20px; */&#xA;  font-size: 30px;&#xA;  align-items: center;&#xA;  font-family: "Lucida Console", "Courier New", monospace;&#xA;  /* font-weight: bold; */&#xA;`;

    &#xD;&#xA;

    &#xD;&#xA;

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

    Now everytime I try to import const Client = require('whatsapp-web.js') It throws error like this :&#xA;**&#xA;[0] ./node_modules/fluent-ffmpeg/index.js&#xA;[0] Module not found : Can't resolve './lib-cov/fluent-ffmpeg' in 'D :\Sunil\Zarir_app-main\Zarir_app-main\node_modules\fluent-ffmpeg'&#xA;[0] Compiling...&#xA;[0] Failed to compile.

    &#xA;

    and I tried the solution&#xA;https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/573#issuecomment-305408048&#xA;and other resources but still nothing works and just loops in errors and errors.&#xA;Please help if you have any information related to it.&#xA;Thank you.

    &#xA;

  • node ffmpeg module stuck more than one file

    29 mai 2021, par Muhammad Hamza

    when I read more than one file it will be stuck and also hang my pc. I need to restart my pc

    &#xA;

    on one file or 5 files it will work perfectly but not more than 5 files

    &#xA;

    if anyone know this issue let me know

    &#xA;

    const ffmpegPath = require(&#x27;@ffmpeg-installer/ffmpeg&#x27;).path&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;)&#xA;ffmpeg.setFfmpegPath(ffmpegPath)&#xA;&#xA;&#xA;const testFolder = &#x27;./videos/&#x27;;&#xA;const fs = require(&#x27;fs&#x27;);&#xA;&#xA; &#xA;&#xA;&#xA;fs.readdir(testFolder, async(err, files) => {&#xA;  try {&#xA;    for(let i = 0; i &lt; 10; i&#x2B;&#x2B;){&#xA;      if(files[i] != &#x27;1 Surah Fatiha Dr Israr Ahmed Urdu - 81of81.mp4&#x27;){&#xA;        &#xA;        let converter = await ffmpeg(`./videos/${files[i]}`)&#xA;        await converter.setStartTime(&#x27;00:00:00&#x27;).setDuration(&#x27;30&#x27;).output(`./outputfolder/${files[i]}`).on(&#x27;end&#x27;, function(err) {&#xA;        if(err) { &#xA;          console.log(`err durinng conversation \n ${err}`) &#xA;        }&#xA;        else{&#xA;          console.log(`Done ${files[i]}`);&#xA;        }&#xA;        }).on(&#x27;error&#x27;, function(err){&#xA;          console.log(`error: ${files[i]}`, err)&#xA;        }).run()&#xA;      }&#xA;    }&#xA;  } catch (error) {&#xA;    console.log(error)&#xA;  }&#xA;});&#xA;&#xA;

    &#xA;

  • How to convert cctv footage to h265 for streaming and recording in nginx-rtmp module ?

    6 avril 2021, par Joram

    I am using the nginx-rtmp-module here to pull an rtsp stream from a camera on local network and convert it to rtmp. This rtmp stream is then converted to hls and made available for livestreaming. It is also being recorded in 5 min segments. (these things can all be seen in the nginx.conf below).

    &#xA;

    I want to change the video codec to h265 to save storage space, since each 5 min video is ~230mb, and using opencv and python, I was able to get &lt;100mb per 5 min video using h265, so I know there is a lot of space for storage saving.

    &#xA;

    How can I change the codec of the stream to h265 ?

    &#xA;

    I have tried installing libx265-dev and setting -vcodec libx265, however this tells me flv is an invalid container and I'm getting nowhere with finding a valid container for streaming + recording.

    &#xA;

    My nginx.conf :

    &#xA;

    rtmp {&#xA;    server {&#xA;        listen 1935; # Listen on standard RTMP port&#xA;&#xA;        application relay {&#xA;            &#xA;            live on;&#xA;&#xA;            hls on;&#xA;            hls_path /tmp/hls;&#xA;            hls_fragment 15s;&#xA;&#xA;&#xA;            exec_static /usr/bin/ffmpeg -i rtsp://test:test@192.168.100.10:8554/fhd -vcodec copy -f flv rtmp://localhost:1935/relay/fhd; &#xA;&#xA;            # record block  &#xA;            record video;&#xA;            record_path /tmp/hls;&#xA;            record_unique on;&#xA;            record_interval 5m;&#xA;        }&#xA;    }&#xA;}&#xA;

    &#xA;