Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (46)

  • 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

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

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

Sur d’autres sites (9357)

  • Use ffmpeg to show a webcam live stream in a browser

    20 juillet 2020, par Toast

    I have a webcam that is connected to a server and I'd like to view a live stream of it in a web browser.

    


    I'd like to include a video tag like this :

    


    <video></video>&#xA;

    &#xA;

    What is an ffmpeg command that will send a video stream to browser clients ?&#xA;I managed to record a video to disk with this command :

    &#xA;

    ffmpeg -f v4l2 -i /dev/video0 output.mkv&#xA;

    &#xA;

    I'm not sure if rtsp and ffmpeg are a good choice and I'm open for alternative suggestions.&#xA;I'm looking for a solution that is simple to setup and demo. Scalability and support for older browsers don't matter and audio isn't needed. I'd prefer a solution that sends compressed video instead of individual images (MJPG).

    &#xA;

  • I have use the ffmpeg in my react konva project but it not import correclty ?

    5 septembre 2024, par Humayoun Saeed

    I use ffmpeg in my react konva project to record video and download it, but when i import it give me error, when i give to to gpt or google it giveme another way of export when i do this one it same give me error of import from ffpmg

    &#xA;

    Error :

    &#xA;

    ERROR in ./src/components/Preview.jsx 29:25-37&#xA;export 'createFFmpeg' (imported as 'createFFmpeg') was not found in '@ffmpeg/ffmpeg' (possible exports : FFmpeg)&#xA;ERROR in ./src/components/Preview.jsx 123:34-43&#xA;export 'fetchFile' (imported as 'fetchFile') was not found in '@ffmpeg/ffmpeg' (possible exports : FFmpeg)

    &#xA;

    Preview.jsx :

    &#xA;

    import React, { useEffect, useState, useRef } from "react";&#xA;// import { createFFmpeg } from "@ffmpeg/ffmpeg";&#xA;// import { createFFmpeg, fetchFile } from "@ffmpeg/ffmpeg/dist/ffmpeg.min.js";&#xA;// import { FFmpeg } from "@ffmpeg/ffmpeg";&#xA;// import { fetchFile } from "@ffmpeg/util";&#xA;import { createFFmpeg, fetchFile } from "@ffmpeg/ffmpeg";&#xA;&#xA;&#xA;&#xA;const Preview = ({ layout, onClose }) => {&#xA;  const [currentContent, setCurrentContent] = useState([]);&#xA;  const [progress, setProgress] = useState(0);&#xA;  const totalDuration = useRef(0);&#xA;  const elapsedDuration = useRef(0); // Track total elapsed duration&#xA;  const progressInterval = useRef(null);&#xA;  const ffmpeg = useRef(null); // Use useRef to store ffmpeg instance&#xA;  const [ffmpegReady, setFfmpegReady] = useState(false);&#xA;&#xA;  // Initialize FFmpeg instance&#xA;  useEffect(() => {&#xA;    const loadFFmpeg = async () => {&#xA;      if (!ffmpeg.current) {&#xA;        ffmpeg.current = createFFmpeg({ log: true });&#xA;        await ffmpeg.current.load();&#xA;        setFfmpegReady(true);&#xA;      }&#xA;    };&#xA;    loadFFmpeg();&#xA;  }, []);&#xA;&#xA;&#xA;&#xA;&#xA;const handleDownload = async () => {&#xA;    try {&#xA;      if (!ffmpegReady) {&#xA;        alert("FFmpeg is still loading, please wait...");&#xA;        return;&#xA;      }&#xA;&#xA;      // Fetch all media files from the layout&#xA;      const inputFiles = [];&#xA;&#xA;      // Process each division of the layout&#xA;      for (const division of layout.divisions) {&#xA;        for (let i = 0; i &lt; division.imageSrcs.length; i&#x2B;&#x2B;) {&#xA;          const src = division.imageSrcs[i];&#xA;&#xA;          // Fetch and store media data&#xA;          const mediaData = await fetchFile(src);&#xA;          const fileName = `input${inputFiles.length &#x2B; 1}${&#xA;            src.endsWith(".mp4") ? ".mp4" : ".png"&#xA;          }`;&#xA;&#xA;          // Write file to ffmpeg virtual filesystem&#xA;          ffmpeg.current.FS("writeFile", fileName, mediaData);&#xA;          inputFiles.push(fileName);&#xA;        }&#xA;      }&#xA;&#xA;      // Create a list of inputs for ffmpeg&#xA;      let concatList = "";&#xA;      inputFiles.forEach((fileName) => {&#xA;        concatList &#x2B;= `file &#x27;${fileName}&#x27;\n`;&#xA;      });&#xA;&#xA;      // Write the concat list file to FFmpeg FS&#xA;      ffmpeg.current.FS(&#xA;        "writeFile",&#xA;        "concatList.txt",&#xA;        new TextEncoder().encode(concatList)&#xA;      );&#xA;&#xA;      // Run the ffmpeg command to concatenate all files into one video&#xA;      await ffmpeg.current.run(&#xA;        "-f",&#xA;        "concat",&#xA;        "-safe",&#xA;        "0",&#xA;        "-i",&#xA;        "concatList.txt",&#xA;        "-c",&#xA;        "copy",&#xA;        "output.mp4"&#xA;      );&#xA;&#xA;      // Read the result video&#xA;      const data = ffmpeg.current.FS("readFile", "output.mp4");&#xA;&#xA;      // Create a Blob from the data and download it&#xA;      const videoBlob = new Blob([data.buffer], { type: "video/mp4" });&#xA;      const url = URL.createObjectURL(videoBlob);&#xA;      const link = document.createElement("a");&#xA;      link.href = url;&#xA;      link.download = `${layout.name || "layout_video"}.mp4`;&#xA;      document.body.appendChild(link);&#xA;      link.click();&#xA;      document.body.removeChild(link);&#xA;&#xA;      alert("Video download completed.");&#xA;    } catch (error) {&#xA;      console.error("Error during video creation:", error);&#xA;    }&#xA;  };&#xA;&#xA;&#xA; &#xA;&#xA;&#xA;&#xA;return (&#xA;    &#xA;      &#xA;        &#xA;          Close&#xA;        &#xA; &#xA;  {/* Download button */}&#xA;        > (e.target.style.backgroundColor = "#218838")}&#xA;          onMouseOut={(e) => (e.target.style.backgroundColor = "#28a745")}&#xA;        >&#xA;          Download Video&#xA;        &#xA;      &#xA;    &#xA;  );&#xA;};&#xA;&#xA;export default Preview;&#xA;&#xA;

    &#xA;

    Ignore all other main issue in just ffmpeg , import, declaration and in it usage in download function, if anyone solution or ability to resolve it, then check it.

    &#xA;

    I try to use ffmpeg in my project for video downloading but it not importing and not use , i want to download video i made using ffmpeg.

    &#xA;

  • Need to reduce video size for my symfony project since it's taking too much time to upload 300MB+ videos

    18 juin 2020, par manu

    I have tried FFmpeg its showing error "Your FFProbe version is too old and does not support -help option, please upgrade". I have tried few fixes already available in stackoverflow and other sites but it won't work for me. If u know any alternative packages please share. The symfony version am using is 4.4. Now am planning to use symfony/process. This is an API where users can upload their recorded video from mobile app. please share better option

    &#xA;