Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (33)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (4972)

  • Apache Tika 2.0.9 programm ffmpeg and exiftool not found ?

    6 avril 2024, par mj44

    I use an JavaFX Maven Project to use Apache Tika Version 2.9.0.
The Java Test program will be finished and all methods that I create will done right.
I have in the log file a lot of DEBUG errors and Idon't know why ?
I habe spent many hours to clear the problem.

    


    Here's an excerpt of the logfile

    


    2024-04-03 14:56:12 [main] DEBUG org.apache.tika.parser.external.ExternalParser - exception trying to run  ffmpeg
java.io.IOException: Cannot run program "ffmpeg": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1140) ~[?:?]
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1074) ~[?:?]
...
2024-04-03 14:56:12 [main] DEBUG org.apache.tika.parser.external.ExternalParser - exception trying to run  exiftool
java.io.IOException: Cannot run program "exiftool": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1140) ~[?:?]
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1074) ~[?:?]
...



    


    The message says that ffmpeg and exiftool are not found.

    


    This is my tika-config.xml

    


    &lt;?xml version="1.0" encoding="UTF-8"?>&#xA;<properties>&#xA;    <parsers>&#xA;        <parser class="org.apache.tika.parser.DefaultParser"></parser>&#xA;        <parser class="org.apache.tika.parser.pdf.PDFParser"></parser>&#xA;        &#xA;        <parser class="org.apache.tika.parser.external.ExternalParser">&#xA;            <params>&#xA;                true&#xA;                &#xA;                "D:\Tools\ffmpeg-6.1.1\bin\ffmpeg.exe"&#xA;            </params>&#xA;        </parser>&#xA;        &#xA;        <parser class="org.apache.tika.parser.external.ExternalParser">&#xA;            <params>&#xA;                true&#xA;                &#xA;                "D:\Tools\exiftool.exe"&#xA;            </params>&#xA;        </parser>&#xA;    </parsers>&#xA;    <detector>&#xA;        <detector class="org.apache.tika.detect.DefaultDetector"></detector>&#xA;    </detector>&#xA;</properties>&#xA;

    &#xA;

    I tested the path of the programms in a console ant it worked fine ?&#xA;I don't know what I can do now ?

    &#xA;

    Thanks for Help

    &#xA;

    I have downloaded new copies of the ffmpeg and exiftool and installed them.&#xA;I tested it in a console to run and both tools work fine.&#xA;I tested the permissions, no problems with permissions&#xA;I tested that the tika-config.xml will be loaded, it loaded.

    &#xA;

  • Flutter error in Ffmpeg, "Unhandled Exception : ProcessException : No such file or directory" in macOS desktop version

    19 avril 2024, par pratik vekariya

    I'm trying video trim video using ffmpeg, for macOS desktop application.

    &#xA;

    I have downloaded ffmpeg from here for macOS.

    &#xA;

    Here is my code

    &#xA;

        String mainPath = &#x27;Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug/&#x27;;&#xA;        mainPath = mainPath.substring(0, mainPath.lastIndexOf("/"));&#xA;    &#xA;                  Directory directoryExe3 = Directory("$mainPath");&#xA;                  var dbPath = path.join(directoryExe3.path,&#xA;                      "App.framework/Resources/flutter_assets/assets/ffmpeg/ffmpegmacos");&#xA;//here in "Products/Debug/" folder desktop app will generate&#xA;&#xA;//directoryExe3 path will be, Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug&#xA;&#xA;//and dbPath will be, Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug/App.framework/Resources/flutter_assets/assets/ffmpeg/ffmpegmacos&#xA;&#xA;//so when app will run it can access it from this path&#xA;&#xA;//executable code, command for ffmpeg&#xA;&#xA;String transpose_str &#x2B;= "crop=" &#x2B;&#xA;              out_w.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              out_h.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              x!.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              y!.toInt().toString() &#x2B;&#xA;              ",";&#xA;          transpose_str &#x2B;= "scale=960:192";&#xA;&#xA;Future<processresult> result_ = Process.run(dbPath, [&#xA;                "-ss",&#xA;                timestamp,&#xA;                "-i",&#xA;                inputFilePath,&#xA;                "-t",&#xA;                endTime,&#xA;                "-vf",&#xA;                transpose_str,&#xA;                "-an",&#xA;                "./temp.mp4",&#xA;              ]); &#xA;</processresult>

    &#xA;

    Now when I run this in macOS desktop verison, it gives me error at Process.run that in dbPath, Unhandled Exception : ProcessException : No such file or directory.

    &#xA;

    Any help would be appreciate !

    &#xA;

    when i run this as desktop version it should get file from assets.

    &#xA;

  • webrtc to rtmp send video from camera to rtmp link

    14 avril 2024, par Leo-Mahendra

    i cant send the video from webrtc which is converted to bufferd data for every 10seconds and send to server.js where it takes it via websockets and convert it to flv format using ffmpeg.

    &#xA;

    i am trying to send it to rtmp server named restreamer for start, here i tried to convert the buffer data and send it to rtmp link using ffmpeg commands, where i initially started to suceesfully save the file from webrtc to mp4 format for a duration of 2-3 minute.

    &#xA;

    after i tried to use webrtc to send video data for every 10 seconds and in server i tried to send it to rtmp but i cant send it, but i can see the connection of rtmp url and server is been taken place but i cant see the video i can see the logs in rtmp server as

    &#xA;

    2024-04-14 12:35:45 ts=2024-04-14T07:05:45Z level=INFO component="RTMP" msg="no streams available" action="INVALID" address=":1935" client="172.17.0.1:37700" path="/3d30c5a9-2059-4843-8957-da963c7bc19b.stream" who="PUBLISH"&#xA;2024-04-14 12:35:45 ts=2024-04-14T07:05:45Z level=INFO component="RTMP" msg="no streams available" action="INVALID" address=":1935" client="172.17.0.1:37716" path="/3d30c5a9-2059-4843-8957-da963c7bc19b.stream" who="PUBLISH"&#xA;2024-04-14 12:35:45 ts=2024-04-14T07:05:45Z level=INFO component="RTMP" msg="no streams available" action="INVALID" address=":1935" client="172.17.0.1:37728" path="/3d30c5a9-2059-4843-8957-da963c7bc19b.stream" who="PUBLISH"   &#xA;

    &#xA;

    my frontend code

    &#xA;

         const handleSendVideo = async () => {&#xA;        console.log("start");&#xA;    &#xA;        if (!ws) {&#xA;            console.error(&#x27;WebSocket connection not established.&#x27;);&#xA;            return;&#xA;        }&#xA;    &#xA;        try {&#xA;            const videoStream = await navigator.mediaDevices.getUserMedia({ video: true });&#xA;            const mediaRecorder = new MediaRecorder(videoStream);&#xA;    &#xA;            const requiredFrameSize = 460800;&#xA;            const frameDuration = 10 * 1000; // 10 seconds in milliseconds&#xA;    &#xA;            mediaRecorder.ondataavailable = async (event) => {&#xA;                if (ws.readyState !== WebSocket.OPEN) {&#xA;                    console.error(&#x27;WebSocket connection is not open.&#x27;);&#xA;                    return;&#xA;                }&#xA;    &#xA;                if (event.data.size > 0) {&#xA;                    const arrayBuffer = await event.data.arrayBuffer();&#xA;                    const uint8Array = new Uint8Array(arrayBuffer);&#xA;    &#xA;                    const width = videoStream.getVideoTracks()[0].getSettings().width;&#xA;                    const height = videoStream.getVideoTracks()[0].getSettings().height;&#xA;    &#xA;                    const numFrames = Math.ceil(uint8Array.length / requiredFrameSize);&#xA;    &#xA;                    for (let i = 0; i &lt; numFrames; i&#x2B;&#x2B;) {&#xA;                        const start = i * requiredFrameSize;&#xA;                        const end = Math.min((i &#x2B; 1) * requiredFrameSize, uint8Array.length);&#xA;                        let frameData = uint8Array.subarray(start, end);&#xA;    &#xA;                        // Pad or trim the frameData to match the required size&#xA;                        if (frameData.length &lt; requiredFrameSize) {&#xA;                            // Pad with zeros to reach the required size&#xA;                            const paddedData = new Uint8Array(requiredFrameSize);&#xA;                            paddedData.set(frameData, 0);&#xA;                            frameData = paddedData;&#xA;                        } else if (frameData.length > requiredFrameSize) {&#xA;                            // Trim to match the required size&#xA;                            frameData = frameData.subarray(0, requiredFrameSize);&#xA;                        }&#xA;    &#xA;                        const dataToSend = {&#xA;                            buffer: Array.from(frameData), // Convert Uint8Array to array of numbers&#xA;                            width: width,&#xA;                            height: height,&#xA;                            pixelFormat: &#x27;yuv420p&#x27;,&#xA;                            mode: &#x27;SendRtmp&#x27;&#xA;                        };&#xA;    &#xA;                        console.log("Sending frame:", i);&#xA;                        ws.send(JSON.stringify(dataToSend));&#xA;                    }&#xA;                }&#xA;            };&#xA;    &#xA;            // Start recording and send data every 10 seconds&#xA;            mediaRecorder.start(frameDuration);&#xA;    &#xA;            console.log("MediaRecorder started.");&#xA;        } catch (error) {&#xA;            console.error(&#x27;Error accessing media devices or starting recorder:&#x27;, error);&#xA;        }&#xA;      };&#xA;

    &#xA;

    and my backend

    &#xA;

        wss.on(&#x27;connection&#x27;, (ws) => {&#xA;    console.log(&#x27;WebSocket connection established.&#x27;);&#xA;&#xA;    ws.on(&#x27;message&#x27;, async (data) => {&#xA;        try {&#xA;            const parsedData = JSON.parse(data);&#xA;&#xA;            if (parsedData.mode === &#x27;SendRtmp&#x27; &amp;&amp; Array.isArray(parsedData.buffer)) {&#xA;                const { buffer, pixelFormat, width, height } = parsedData;&#xA;                const bufferArray = Buffer.from(buffer);&#xA;&#xA;                await sendRtmpVideo(bufferArray, pixelFormat, width, height);&#xA;            } else {&#xA;                console.log(&#x27;Received unknown or invalid mode or buffer data&#x27;);&#xA;            }&#xA;        } catch (error) {&#xA;            console.error(&#x27;Error parsing WebSocket message:&#x27;, error);&#xA;        }&#xA;    });&#xA;&#xA;    ws.on(&#x27;close&#x27;, () => {&#xA;        console.log(&#x27;WebSocket connection closed.&#x27;);&#xA;    });&#xA;    });&#xA;    const sendRtmpVideo = async (frameBuffer, pixelFormat, width, height) => {&#xA;    console.log("ffmpeg data",frameBuffer)&#xA;    try {&#xA;        const ratio = `${width}x${height}`;&#xA;        const ffmpegCommand = [&#xA;            &#x27;-re&#x27;,&#xA;            &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;            &#x27;-pix_fmt&#x27;, pixelFormat,&#xA;            &#x27;-s&#x27;, ratio,&#xA;            &#x27;-i&#x27;, &#x27;pipe:0&#x27;,&#xA;            &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;            &#x27;-preset&#x27;, &#x27;fast&#x27;, // Specify the preset for libx264&#xA;            &#x27;-b:v&#x27;, &#x27;3000k&#x27;,    // Specify the video bitrate&#xA;            &#x27;-loglevel&#x27;, &#x27;debug&#x27;,&#xA;            &#x27;-f&#x27;, &#x27;flv&#x27;,&#xA;            // &#x27;-flvflags&#x27;, &#x27;no_duration_filesize&#x27;, &#xA;            RTMPLINK&#xA;        ];&#xA;&#xA;&#xA;        const ffmpeg = spawn(&#x27;ffmpeg&#x27;, ffmpegCommand);&#xA;&#xA;        ffmpeg.on(&#x27;exit&#x27;, (code, signal) => {&#xA;            if (code === 0) {&#xA;                console.log(&#x27;FFmpeg process exited successfully.&#x27;);&#xA;            } else {&#xA;                console.error(`FFmpeg process exited with code ${code} and signal ${signal}`);&#xA;            }&#xA;        });&#xA;&#xA;        ffmpeg.on(&#x27;error&#x27;, (error) => {&#xA;            console.error(&#x27;FFmpeg spawn error:&#x27;, error);&#xA;        });&#xA;&#xA;        ffmpeg.stderr.on(&#x27;data&#x27;, (data) => {&#xA;            console.error(`FFmpeg stderr: ${data}`);&#xA;        });&#xA;&#xA;        ffmpeg.stdin.write(frameBuffer, (err) => {&#xA;            if (err) {&#xA;                console.error(&#x27;Error writing to FFmpeg stdin:&#x27;, err);&#xA;            } else {&#xA;                console.log(&#x27;Data written to FFmpeg stdin successfully.&#x27;);&#xA;            }&#xA;            ffmpeg.stdin.end(); // Close stdin after writing the buffer&#xA;        });&#xA;        } catch (error) {&#xA;        console.error(&#x27;Error in sendRtmpVideo:&#x27;, error);&#xA;        }&#xA;    };&#xA;&#xA;

    &#xA;