Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (11)

  • 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" ;

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (3408)

  • FFMPEG RTSP Stream timeout triggered after 30015.187000 ms

    24 février 2024, par BatCoder

    I am trying to read several RTSP streams using opencv cv2.VideoCapture(URL). It has FFMPEG backend. Sometimes for few streams it is throwing timeout warning after 30 seconds.

    


    [ WARN:0@123.394] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30015.187000 ms


    


    I tried setting up the timeout flag.

    


    import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "timeout;5000" # 5 seconds 
cv2.VideoCapture("rtsp://URL", cv2.CAP_FFMPEG)


    


    Ref : How to terminate cv2.VideoCapture(rtsp_url) call if execution stalls due to RTSP camera issues ?

    


    But still, it is waiting for 30 seconds before raising the warning.

    


    OpenCV version : 4.4.0.x
Python version : 3.9.x

    


    Can we decrease the wait time from 30 seconds to a lower number ?

    


  • Python OpenCV FFMPEG RTSP Stream timeout triggered after 30015.187000 ms

    24 février 2024, par BatCoder

    I am trying to read several RTSP streams using opencv cv2.VideoCapture(URL). It has FFMPEG backend. Sometimes for few streams it is throwing timeout warning after 30 seconds.

    


    [ WARN:0@123.394] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30015.187000 ms


    


    I tried setting up the timeout flag.

    


    import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "timeout;5000" # 5 seconds 
cv2.VideoCapture("rtsp://URL", cv2.CAP_FFMPEG)


    


    Ref : How to terminate cv2.VideoCapture(rtsp_url) call if execution stalls due to RTSP camera issues ?

    


    But still, it is waiting for 30 seconds before raising the warning.

    


    OpenCV version : 4.4.0.x
Python version : 3.9.x

    


    Can we decrease the wait time from 30 seconds to a lower number ?

    


  • FFmpeg Wasm, error while creating video from canvas

    12 octobre 2023, par NineCattoRules

    I'm using ffmpeg.wasm in my Next.JS app.

    


    Here my specs :

    


    "@ffmpeg/ffmpeg": "^0.12.5",
"@ffmpeg/util": "^0.12.0",
"next": "^13.0.6",
"react": "^18.2.0",


    


    I want to simply record a 5s video from a canvas, so I tried :

    


    &#x27;use client&#x27;&#xA;&#xA;import React, { useEffect, useRef, useState } from &#x27;react&#x27;;&#xA;import { FFmpeg } from &#x27;@ffmpeg/ffmpeg&#x27;;&#xA;import { fetchFile } from &#x27;@ffmpeg/util&#x27;;&#xA;&#xA;const CanvasVideoRecorder = () => {&#xA;    const canvasRef = useRef(null);&#xA;    const videoChunksRef = useRef([]);&#xA;    const ffmpegRef = useRef(new FFmpeg({ log: true }));&#xA;    const [loaded, setLoaded] = useState(false);&#xA;    const [videoUrl, setVideoUrl] = useState(null);&#xA;&#xA;    const load = async () => {&#xA;        await ffmpegRef.current.load({&#xA;            coreURL: &#x27;/js/ffmpeg-core.js&#x27;,&#xA;            wasmURL: &#x27;/js/ffmpeg-core.wasm&#x27;,&#xA;        });&#xA;        setLoaded(true);&#xA;    };&#xA;&#xA;    useEffect(() => {&#xA;        const ctx = canvasRef.current.getContext(&#x27;2d&#x27;);&#xA;        function drawFrame(timestamp) {&#xA;            ctx.fillStyle = `rgb(${(Math.sin(timestamp / 500) * 128) &#x2B; 128}, 0, 0)`;&#xA;            ctx.fillRect(0, 0, canvasRef.current.width, canvasRef.current.height);&#xA;            requestAnimationFrame(drawFrame);&#xA;        }&#xA;        requestAnimationFrame(drawFrame);&#xA;    }, []);&#xA;&#xA;    const startRecording = async () => {&#xA;        const videoStream = canvasRef.current.captureStream(30);&#xA;        const videoRecorder = new MediaRecorder(videoStream, { mimeType: &#x27;video/webm&#x27; });&#xA;&#xA;        videoRecorder.ondataavailable = (event) => {&#xA;            if (event.data.size > 0) {&#xA;                videoChunksRef.current.push(event.data);&#xA;            }&#xA;        };&#xA;&#xA;        videoRecorder.start();&#xA;        setTimeout(() => videoRecorder.stop(), 5000);&#xA;&#xA;        videoRecorder.onstop = async () => {&#xA;            try {&#xA;                await ffmpegRef.current.writeFile(&#x27;recorded.webm&#x27;, await fetchFile(new Blob(videoChunksRef.current, { type: &#x27;video/webm&#x27; })));&#xA;&#xA;                await ffmpegRef.current.exec(&#x27;-y&#x27;, &#x27;-i&#x27;, &#x27;recorded.webm&#x27;, &#x27;-an&#x27;, &#x27;-c:v&#x27;, &#x27;copy&#x27;, &#x27;output_copy.webm&#x27;);&#xA;&#xA;                const data = await ffmpegRef.current.readFile(&#x27;output_copy.webm&#x27;);&#xA;                const url = URL.createObjectURL(new Blob([data.buffer], { type: &#x27;video/webm&#x27; }));&#xA;&#xA;                setVideoUrl(url);&#xA;            } catch (error) {&#xA;                console.error("Error during processing:", error);&#xA;            }&#xA;        };&#xA;    };&#xA;&#xA;    return (&#xA;        <div>&#xA;            <canvas ref="{canvasRef}" width="640" height="480"></canvas>&#xA;&#xA;            {loaded ? (&#xA;                &lt;>&#xA;&#xA;                    <button>Start Recording</button>&#xA;                    {videoUrl &amp;&amp; <video controls="controls" src="{videoUrl}"></video>}&#xA;                >&#xA;            ) : (&#xA;                <button>Load FFmpeg</button>&#xA;            )}&#xA;        </div>&#xA;    );&#xA;};&#xA;&#xA;export default CanvasVideoRecorder;&#xA;

    &#xA;

    I don't know why but it catch an error :

    &#xA;

    ErrnoError: FS error&#xA;

    &#xA;

    This error occurs when I do this :

    &#xA;

    await ffmpegRef.current.exec(&#x27;-y&#x27;, &#x27;-i&#x27;, &#x27;recorded.webm&#x27;, &#x27;-an&#x27;, &#x27;-c:v&#x27;, &#x27;copy&#x27;, &#x27;output_copy.webm&#x27;);&#xA;const data = await ffmpegRef.current.readFile(&#x27;output_copy.webm&#x27;);&#xA;

    &#xA;

    The recorded.webm file is written correctly and I can read it, ffmpegRef.current is well defined, so what's wrong with my logic, why the exec command doesn't work ?

    &#xA;