Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (11190)

  • How to use Docker FFMPEG and HLS on my website [closed]

    13 septembre 2023, par NormalUser

    I want to use a Docker container to convert an mkv video to an HLS "video". This is my command for it :

    


    docker run --rm \
  -v /mnt:/config \
  linuxserver/ffmpeg \
  -i "/config/test.mkv" \
  -c:v copy \
  -c:a copy \
  -sn \
  -f hls \
  -hls_list_size 0 \
  /config/hls/output.m3u8


    


    when i run this command everything is created correctly, with VLC i can use the m3u8 file only Video.js says "The media could not be loaded, either because the server or network failed or because the format is not supported". I have also set the audio codec and video codec to AAC and 264 for testing but it didn't work any better.
Ich nutze Video.js und wenn ich auf einem anderen Rechner wo ich kein docker nutzen muss geht m3u8 im web aber nicht bei vlc mit diesem befehl.

    


    ffmpeg -i input.mkv -c:v h264 -master_pl_name master.m3u8 -hls_time 10 -hls_list_size 0 -f hls -map 0 -c:a aac -b:a 128k -strict -2 -vf "subtitles=input.mkv" -map a -map v -map s -var_stream_map "a:0,v:0,s:0 a:1,v:1 s:1" test/stream_%v.m3u8


    


    auf die verzeichnisse braucht ihr kein rücksicht nehmen die habe ich verändert

    


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

  • Revert "Disable warnings for casting pointers to integers, there is nothing wrong...

    20 novembre 2021, par Andreas Rheinhardt
    Revert "Disable warnings for casting pointers to integers, there is nothing wrong with that."
    

    This reverts commit 5258f64a14713499cf84840b3ab3a1ee7cdcaeb8.
    The premise of said commit (that conversions from pointer to int
    are ok) is wrong : C99/C11 6.3.2.3 5 : "Any pointer type may be converted
    to an integer type. [...] If the result cannot be represented in the
    integer type, the behavior is undefined." (C90 6.3.4 contains a similar
    restriction.) So don't disable -Wpointer-to-int-cast.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] configure