Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (60)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (5293)

  • pictureBox image dispose exception

    22 octobre 2016, par Dulcia

    I recently wanted to try out AForge.NET as I found it to be quite simple, so I decided to make some simple video playback using Video.FFMPEG namespace from it, so I could put each frame directly on a pictureBox. That alone works well, but I wanted to dispose every image after not being important because it took about 1.5GB memory for no apparent reason. That’s where my problem started. For some reason, it sometimes will just throw this exception (usually when resizing the window). I’m not really sure what it could be caused by. Maybe it’s really a stupid mistake. My guess is that it could be caused by timer, but I could have done a completely different mistake and just cannot see it. This is the exception I keep getting :

       ************** Exception Text **************
    System.ArgumentException: Parameter is not valid.
      at System.Drawing.Image.get_Width()
      at System.Drawing.Image.get_Size()
      at System.Windows.Forms.PictureBox.ImageRectangleFromSizeMode(PictureBoxSizeMode mode)
      at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
      at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
      at System.Windows.Forms.Control.WmPaint(Message& m)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    This is the code (I do realize that public variables are not good, I’m just testing of course) :

    public long i = 0;
    public Bitmap img;
    public VideoFileReader reader;
    public System.Timers.Timer aTimer;

    public void render(object source, ElapsedEventArgs e)
    {
       if (img != null) img.Dispose();
       if (i < reader.FrameCount)
       {
           img = reader.ReadVideoFrame();
           pictureBox1.Image = img;
       }
       i++;
    }

    private void button1_Click(object sender, EventArgs e)
    {
       reader = new VideoFileReader();
       aTimer = new System.Timers.Timer();
       reader.Open("d:\\result.avi");
       aTimer.Elapsed += new ElapsedEventHandler(render);
       aTimer.Interval = reader.FrameRate;
       aTimer.Enabled = true;
    }
  • varying RTP stream result from custom SIP implementation

    1er février, par Nik Hendricks

    I am in the process of creating my own SIP implementation in Node.js. As well as a b2bua as a learning project.

    


    Finding people wise in the ways of SIP has proved to be difficult elsewhere but here I have had good results

    


    this is the GitHub of my library so far node.js-sip

    


    this is the GitHub of my PBX so far FlowPBX

    


    Currently, everything is working as I expect. Although I really have some questions on possible errors in my implementation.

    


    My main issue is with RTP streams. Currently I am utilizing ffmpeg.

    


    my function goes as follows

    


    start_stream(call_id, sdp){
        console.log('Starting Stream')
        let port = sdp.match(/m=audio (\d+) RTP/)[1];
        let ip = sdp.match(/c=IN IP4 (\d+\.\d+\.\d+\.\d+)/)[1];
        let codec_ids = sdp.match(/m=audio \d+ RTP\/AVP (.+)/)[1].split(' ');
        let ffmpeg_codec_map = {
            'opus': 'libopus',
            'PCMU': 'pcm_mulaw',
            'PCMA': 'pcm_alaw',
            'telephone-event': 'pcm_mulaw',
            'speex': 'speex',
            'G722': 'g722',
            'G729': 'g729',
            'GSM': 'gsm',
            'AMR': 'amr',
            'AMR-WB': 'amr_wb',
            'iLBC': 'ilbc',
            'iSAC': 'isac',
        }

        let codecs = [];
        sdp.split('\n').forEach(line => {
            if(line.includes('a=rtpmap')){
                let codec = line.match(/a=rtpmap:(\d+) (.+)/)[2];
                let c_id = line.match(/a=rtpmap:(\d+) (.+)/)[1];
                codecs.push({                    
                    name: codec.split('/')[0],
                    rate: codec.split('/')[1],
                    channels: codec.split('/')[2] !== undefined ? codec.split('/')[2] : 1,
                    id: c_id
                })
            }
        })

        console.log('codecs')
        console.log(codecs)

        let selected_codec = codecs[0]
        if(selected_codec.name == 'telephone-event'){
            selected_codec = codecs[1]
            console.log(selected_codec)
        }

        //see if opus is available
        codecs.forEach(codec => {
            if(codec.name == 'opus'){
                selected_codec = codec;
            }
        })

        if(selected_codec.name != 'opus'){
            //check if g729 is available
            codecs.forEach(codec => {
                if(codec.name == 'G729'){
                    selected_codec = codec;
                }
            })
        }

        console.log('selected_codec')
        console.log(selected_codec)

        let spawn = require('child_process').spawn;
        let ffmpegArgs = [
            '-re',
            '-i', 'song.mp3',
            '-acodec', ffmpeg_codec_map[selected_codec.name],
            '-ar', selected_codec.rate,
            '-ac', selected_codec.channels,
            '-payload_type', selected_codec.id,
            '-f', 'rtp', `rtp://${ip}:${port}`
        ];

        let ffmpeg = spawn('ffmpeg', ffmpegArgs);

        ffmpeg.stdout.on('data', (data) => {
            console.log(`stdout: ${data}`);
        });
        ffmpeg.stderr.on('data', (data) => {
            console.error(`stderr: ${data}`);
        });




}


    


    When using zoiper to test it works great. I have seen the mobile version negotiate speex
and the desktop version negotiate opus mostly for the codec.

    


    today I tried to register a grandstream phone to my pbx and the rtp stream is blank audio.
opus is available and I have tried to prefer that in my stream but still even when selecting that I cannot get audio to the grandstream phone. This is the same case for a yealink phone. I can only get zoiper to work so far.

    


    what could be causing this behavior ? there is a clear path of communication between everything just like the zoiper client's I have used.

    


    Additionally in my sip implementation,
how important is the concept of a dialog ? currently, I just match messages by Call-ID

    


    and then choose what to send based on the method or response. is there any other underlying dialog functionality that I may need to implement ?

    


    It would just be awesome to get someone who really knows what they are talking about eyes on some of my code to direct this large codebase in the right direction but I realize that a big ask lol.

    


  • How can I simply do color interpolation on this image and then save the image ? With RGBA channels as example

    24 août 2020, par karl-police

    So I got this GIF here :

    


    


    As you can see, it has Red, Green and Blue in it. And it also has a full transparency in it. This was composed together with FFMPEG out of images that looked exactly like that.

    


     

    


    Then, with FFMPEG I "decomposed" the RGB and Alpha channels using the filter "extractplanes".

    


    The gallery of that, in correct order starting from up to down, can be found here :

    


    https://imgur.com/a/WN0aGuW

    


    I am not sure if this actually helps me or if I'm supposed to decompose them. Because apperantly now, after decomposing them, I'm supposed to modify them, but I'm not really sure how. It's like how do I modify the red channel that only has black and white, so all at the end, will match to the specified HEX color that I want it to be to.

    


     

    


    Now, my question is. How do I exactly make the color changing happen ? Can I do this simply with JavaScript ? Is it possible to do with FFMPEG, if possible without ImageMagicks ? Maybe a programming language where not much installation is needed to do that ?

    


    What I understood is that. These channels basically contain values from 0 to 255 with black and white. I think the "brightness" is that what 0 and 255. So something inbetween, would be like grey.

    


    So basically, like we do (255,0,0) for red. In these channels, if I want red somewhere I need to put one fully white pixel on the red channel and on all the other channels, there has to be a fully black pixel.

    


    That's the concept. Now is the question, how can I do this ?

    


     

    


    At the end I want to make it look like this one as example :

    


    


    This is from a game. So basically that's how it looks like in the game. And the game files only use these RGBA template sprites.

    


     

    


    I asked a similar question here : How to change colors of an image using RGBA and more channels independently of their color

    


    But somehow, I might didn't seem to explain it that well.

    


     

    


    I made a thing here to test around with things. I guess that's nearly close, but the lines are kinda weird. jsfiddle.net/qsgazubk