Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (51)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (7799)

  • How to duplicate frames if appsrc is pushing too slow to keep frame rate up ?

    18 juillet 2023, par Jan

    I am using Java with GStreamer wrapped by OpenCV. The application does the following :

    


      

    1. One GStreamer pipeline, that receives frames from an IP Camera (RTSP stream with 30fps) and outputs OpenCV Mats
"rtspsrc location=rtsp://localhost:8554/looping-sample latency=500 protocols=udp buffer-mode=auto ! rtph264depay ! h264parse ! avdec_h264 max-threads=2 ! videoconvert ! video/x-raw,format=BGR ! appsink max-buffers=0 drop=true sync=false"

      


    2. 


    3. On those Mats, deep learning models infer and draw stuff on it (This might be slow, like 100ms or sth)

      


    4. 


    5. Another GStreamer pipeline wrapped by OpenCV at the 30fps (extracted by the RTSP stream), that receives those Mats and publishes an RTMP stream for a MediaServer
"appsrc ! videoconvert ! nvh264enc bitrate=3000 ! h264parse ! flvmux ! rtmpsink location=test"

      


    6. 


    


    Now, the problem is, that the OpenCV VideoWriter is configured to be 30fps but the appsrc is only pushing at e.g. 7fps, so the RTMP stream will not be classified as valid by the MediaServer.
Previously, I used OpenCV and FFFMPEG and the default VideoWriter just duplicated the last frame to keep up the pre-defined framerate, so the stream is laggy but works.

    


    How can I achieve this with a GStreamer pipeline ?

    


    TLDR : The OpenCV VideoWriter is configured to be 30fps but appsrc is only pushing with 7-10fps, how can I adaptively duplicate frames to keep the 30fps in the RTMP stream sink ?

    


    I tried stuff like adding "appsrc ! videorate ..." to the pipeline, so that videorate keeps up the framerate, but that did not work

    


  • Audiotrack noisy sound from UDP socket

    12 juin 2015, par Roval

    I would like to stream wav file from my PC to any Android device using ffmpeg and AudioTrack. This is how I start my stream :

    ffmpeg  -re -i test.wav -acodec pcm_s16le -f mpegts udp://192.168.0.255:5007?broadcast=1

    And stream values are :

    Stream #0:0: Audio: pcm_s16le, 8000 Hz, stereo, s16, 256 kb/s

    Now I just receive packets from socket and I is working fine but sound has got some "glitches". I mean it makes some periodic sound every half a second.

       @Override
       protected Void doInBackground(Void... params) {
           DatagramSocket socket;

           track = new AudioTrack( AudioManager.STREAM_MUSIC,
                   8000,
                   AudioFormat.CHANNEL_IN_STEREO,
                   AudioFormat.ENCODING_PCM_16BIT,
                   3000,
                   AudioTrack.MODE_STREAM );

           AudioManager audio = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
           audio.setSpeakerphoneOn(false);
           audio.setMode(AudioManager.MODE_NORMAL);

           track.play();

           try {

               //Keep a socket open to listen to all the UDP trafic that is destined for this port
               socket = new DatagramSocket(5007, getBroadcastAddress());
               socket.setBroadcast(true);

               while (true) {
                   //Receive a packet
                   byte[] recvBuf = new byte[BUF_SIZE*2];
                   DatagramPacket packet = new DatagramPacket(recvBuf, recvBuf.length);
                   socket.receive(packet);

                   track.write(packet.getData(), 0, packet.getLength());

               }


           } catch (IOException ex) {}
           return null;
       }

    When I read the same file inside Android via BufferedImputStream from assets everything works fine, so I assume it might be some header or trash data inside packets but I don’t know what is it.

  • Send rtmp from nginx into another VM

    12 janvier 2018, par Akim Benchiha

    I’ve set up my nginx server in a VM for the rtmp connection.
    I want to use exec_push for running a script in another VM.

    NGINX 1st VM

    rtmp {
     server {
        listen 1935;
        ping 30s;
        notify_method get;
           application ingest {
                live on;
                exec_kill_signal term;
                idle_streams off;
                #exec_push /usr/local/bin/ffmpeg_push.sh $name ;
                exec_options on;
                exec_push sshpass -p PASSWORD ssh root@192.168.1.139 sh /usr/local/bin/ffmpeg_push.sh $name;
        }
     }
    }

    I have also tried with node server that execute the script but every time, the script reset

    NGINX 1st VM

      rtmp {
         server {
            listen 1935;
            ping 30s;
            notify_method get;
               application ingest {
                    live on;
                    exec_kill_signal term;
                    idle_streams off;
                    #exec_push /usr/local/bin/ffmpeg_push.sh $name ;
                    exec_options on;
                    exec_push curl -X POST -H "Content-Type: application/json" -d "" 192.168.1.139:3000/$name;
            }
         }
       }

    NodeJS into second VM

    #!/usr/bin/env node

    const express = require('express');
    var app = express();
    app.use(function (req, res, next) {
           res.setHeader('Access-Control-Allow-Origin', '*');
           res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
           res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
           res.setHeader('Access-Control-Allow-Credentials', true);
           next();
    });
    app.post('/:name', function(req, res) {
           console.log('start performed');
           console.log(req.params.name);
           require('child_process').spawn('sh', ['ffmpeg_push.sh', req.params.name], {stdio: 'inherit'});
    });

    But when the script is running in the first VM, everything is fine. I have disabled the firewall.
    Thank you.