Recherche avancée

Médias (91)

Autres articles (51)

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

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

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (7068)

  • Rtsp streaming on nodejs - Blank screen

    17 juillet 2024, par theplaceofburak

    I am currently working on a Node.js project where I need to implement streaming using ffmpeg. However, I am facing an issue with the streaming process, as I am getting an empty blank screen instead of the expected video stream.

    


    Here's a brief overview of what I have done so far on the server-side :

    


    Installed ffmpeg and made sure it is accessible in the environment.
Configured the server-side code for the streaming process.
However, despite these efforts, the stream is not working correctly, and I am unable to see the video stream on the client-side.

    


    Server-side code :
app.js

    


    const express = require('express');
const Stream = require('node-rtsp-stream');

const app = express();
const port = 4000;

// Start the RTSP stream
const stream = new Stream({
  name: 'rtsp_server_name',
  streamUrl: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4',
  wsPort: 3000,
  ffmpegOptions: {
    '-stats': '', // an option with no necessary value uses a blank string
    '-r': 30, // options with required values specify the value after the key
  },
});

stream.on('data', data => {
  console.log(data);
});

app.get('/', (req, res) => {
  res.send('Hello World');
});

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}/`);
});


    


    index.html

    


    &#xA;  &#xA;    <canvas></canvas>&#xA;  &#xA;  <h1>Test rtsp video</h1>&#xA;  <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/js/jsmpeg.min.js'&gt;&lt;/script&gt;&#xA;  &lt;script type=&quot;text/javascript&quot;&gt;&amp;#xA;    player = new JSMpeg.Player(&amp;#x27;ws://localhost:3000&amp;#x27;, {&amp;#xA;      canvas: document.getElementById(&amp;#x27;canvas&amp;#x27;), // Canvas should be a canvas DOM element&amp;#xA;    });&amp;#xA;  &lt;/script&gt;&#xA;&#xA;

    &#xA;

    I got no console error when I open index.html but only get blank black screen
    &#xA;Blank Screen

    &#xA;

  • Javascript sync images

    26 septembre 2021, par Ruan Matt

    I'm studying about FPS, animations, image processing in order to get into the game development world.

    &#xA;

    I took a video and extract each frame into a .jpg image, and I want to run these images, side by side, in the same sync as the original video

    &#xA;

    You can test at this link => https://jsfiddle.net/ruanmatt144/267erymL/2/

    &#xA;

    The problem : The video FPS is 30, but even if I put 1000/30, or any other value that refers to the original FPS, it doesn't work ! It doesn't stay in sync. setTimeout has a limit on decimal places that I don't know about ?

    &#xA;

    Video timestamp for each frame => https://unity-animation.ztech.gq/timestamp.txt

    &#xA;

    How can I sync those images following the original video timestamp ? Thank you.

    &#xA;

    var arr = Array();&#xA;var v = 0;&#xA;var v2 = 0;&#xA;var k = 0;&#xA;&#xA;(function getImages(i) {&#xA;  setTimeout(function() {&#xA;    v&#x2B;&#x2B;;&#xA;    var r = Math.random();&#xA;        loadImage("https://unity-animation.ztech.gq/frames/out-" &#x2B; v &#x2B; ".jpg?v=" &#x2B; r);&#xA;        arr.push("https://unity-animation.ztech.gq/frames/out-" &#x2B; v &#x2B; ".jpg?v=" &#x2B; r);&#xA;&#xA;        if (--i) getImages(i);&#xA;  }, 30)&#xA;})(20000);&#xA;&#xA;&#xA;&#xA;const loadImage = src =>&#xA;    new Promise((resolve, reject) => {&#xA;        const img = new Image();&#xA;        img.onload = () => resolve(img);&#xA;        img.src = src;&#xA;    })  &#xA;;&#xA;&#xA;var imgArray = new Array();&#xA;setTimeout(function() {&#xA;    (function runVideo(i) {&#xA;        setTimeout(function() {&#xA;            v2&#x2B;&#x2B;;&#xA;            imgArray[v2] = new Image();&#xA;            document.getElementById(&#x27;load&#x27;).appendChild(imgArray[v2]);&#xA;&#xA;            imgArray[v2].src = arr[v2];&#xA;            imgArray[v2].classList.add("overlayImage");&#xA;            imgArray.shift();&#xA;            var parent = document.querySelector("#load");&#xA;            [...parent.children].slice(0,-10).forEach(parent.removeChild.bind(parent));&#xA;            var last = document.querySelector(&#x27;#load img:last-child&#x27;).getAttribute("src");&#xA;            var _final = last.substring(&#xA;                last.indexOf("-") &#x2B; 1, &#xA;                last.lastIndexOf(".jpg")&#xA;            );&#xA;            arr.shift();&#xA;        if (--i) runVideo(i);&#xA;      }, 90) // &lt;== the problem is here, which value I must use?&#xA;    })(38194);&#xA;    document.getElementById("video").play();&#xA;}, 20000);&#xA;

    &#xA;

  • CMake on Ubuntu, Requested 'libavdevice' >= 56.4.100 but version of libavdevice is 53.2.0

    5 mars 2019, par user1830386

    I am trying to get into plug in writing for Gazebo but keep running into an error when compiling my programs.

    Requested 'libavdevice >= 56.4.100' but version of libavdevice is 53.2.0
    CMake Error at /usr/share/cmake-
    3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
    Could NOT find AVDEVICE (missing: AVDEVICE_FOUND) (Required is at least
    version "56.4.100")

    but when I do ffmpeg -version I get :

    libavdevice    57. 10.100 / 57. 10.100

    Yet CMake seems to think I’m on version 53. Trying to update ffmpeg or libavdevice-dev returns that I am on the latest version.

    Here is my make file :

    cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

    find_package(gazebo REQUIRED)
    include_directories(${GAZEBO_INCLUDE_DIRS})
    link_directories(${GAZEBO_LIBRARY_DIRS})
    list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

    add_library(model_control SHARED model_control.cc)
    target_link_libraries(model_control ${GAZEBO_LIBRARIES})

    list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

    and the cc file :

    #include <functional>
    #include <gazebo></gazebo>gazebo.hh>
    #include <gazebo></gazebo>physics/physics.hh>
    #include <gazebo></gazebo>common/common.hh>
    #include <ignition></ignition>math/Vector3.hh>

    namespace gazebo
    {
     class ModelPush : public ModelPlugin
     {
       public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
       {
         // Store the pointer to the model
         this->model = _parent;

         // Listen to the update event. This event is broadcast every
         // simulation iteration.
         this->updateConnection = event::Events::ConnectWorldUpdateBegin(
             std::bind(&amp;ModelPush::OnUpdate, this));
       }

       // Called by the world update start event
       public: void OnUpdate()
       {
         // Apply a small linear velocity to the model.
         this->model->SetLinearVel(ignition::math::Vector3d(.3, 0, 0));
       }

       // Pointer to the model
       private: physics::ModelPtr model;

       // Pointer to the update event connection
       private: event::ConnectionPtr updateConnection;
     };

     // Register this plugin with the simulator
     GZ_REGISTER_MODEL_PLUGIN(ModelPush)
    }
    </functional>

    Thanks !