Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

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 ;

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

Sur d’autres sites (6935)

  • Saving an audio blob into the backend or Azure as an mp3 file using ffmpeg

    2 juin 2021, par Anne

    I have an asp.net webforms, and I am using javascript and navigator.mediaDevices.getUserMedia to record an audio message.
This message has to be loaded into Azure once recorded.

    


    So far, I have :
2 buttons, start and stop to record the audio blob

    


    At the end of the process, I am trying to use ffmpeg to record the blob into a folder in my application, I can then load the file into Azure (I have the code ready for this one).
Or ideally, save directly to Azure.

    


    I have installed ffmpeg in my application using nuget packages (I tried Xabe ffmpeg downloader and Accord video ffmpeg), however ffmpeg is not recognised when I run the function SendData() and I get this error :
Uncaught Error : Module name "ffmpeg" has not been loaded yet for context : _. Use require([])

    


    My questions are :

    


      

    • How can I install ffmpeg in an asp.net wbeform and register it on the page ?
    • 


    • Is there another way to save an audio blob to Azure ?
    • 


    • Is it possible to save the audio chunks into a memory stream that I can later upload into Azure ?
    • 


    


    Thank you for your help

    


    

    

        <code class="echappe-js">&lt;script&gt;&amp;#xA;        navigator.mediaDevices.getUserMedia({ audio: true }).then(stream =&gt; { handlerFunction(stream) })&amp;#xA;&amp;#xA;        record.onclick = e =&gt; {&amp;#xA;            record.disabled = true;&amp;#xA;            stopRecord.disabled = false;&amp;#xA;            audioChunks = [];&amp;#xA;            rec.start();&amp;#xA;        }&amp;#xA;&amp;#xA;        stopRecord.onclick = e =&gt; {&amp;#xA;            record.disabled = false;&amp;#xA;            stop.disabled = true;&amp;#xA;            rec.stop();&amp;#xA;        }&amp;#xA;&amp;#xA;&amp;#xA;        function handlerFunction(stream) {&amp;#xA;            rec = new MediaRecorder(stream);&amp;#xA;            rec.ondataavailable = e =&gt; {audioChunks.push(e.data);&amp;#xA;                if (rec.state == &quot;inactive&quot;) {&amp;#xA;                    let blob = new Blob(audioChunks, { type: &amp;#x27;audio/mpeg-3&amp;#x27; });&amp;#xA;                    recordedAudio.src = URL.createObjectURL(blob);&amp;#xA;                    recordedAudio.controls = true;&amp;#xA;                    sendData(blob)&amp;#xA;                }&amp;#xA;            }&amp;#xA;        }&amp;#xA;&amp;#xA;        function sendData(data) {&amp;#xA;            var ffmepg = require(&quot;ffmpeg&quot;);&amp;#xA;            try {&amp;#xA;                var Path = data;&amp;#xA;                var process = new ffmepg(&quot;Path&quot;);&amp;#xA;                process.then(function (audio) {audio.fnExtractSoundToMP3(&quot;~//AppData//Audio//test.mp3&quot;, function (error, file) {&amp;#xA;                        if (!error)&amp;#xA;                            console.log(&quot;Audio file: &quot; &amp;#x2B; file);&amp;#xA;                    });&amp;#xA;                }, function (err) {&amp;#xA;                    console.log(&quot;Error: &quot; &amp;#x2B; err);&amp;#xA;                });&amp;#xA;            }&amp;#xA;            catch (e) {&amp;#xA;                console.log(&quot;Catch e.code&quot; &amp;#x2B; e.code);&amp;#xA;                console.log(&quot;Catch e.msg&quot; &amp;#x2B; e.msg);&amp;#xA;            }&amp;#xA;        }&amp;#xA;    &lt;/script&gt;&#xA;&#xA;    &lt;script src=&quot;https://code.jquery.com/jquery-2.2.0.min.js&quot;&gt;&lt;/script&gt;&#xA;    &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;

    &#xD;&#xA;

    &#xA;&#xA;&#xA;    &#xA;    &#xA;    &#xA;    &#xA;    <code class="echappe-js">&lt;script src='http://stackoverflow.com/Scripts/require.js'&gt;&lt;/script&gt;&#xA;&#xA;&#xA;&#xA;    
    Record

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA; &#xA;

    &#xA;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

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

    &#xA;

    &#xA;

    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.

    &#xA;

     

    &#xA;

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

    &#xA;

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

    &#xA;

    https://imgur.com/a/WN0aGuW

    &#xA;

    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.

    &#xA;

     

    &#xA;

    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 ?

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

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

    &#xA;

     

    &#xA;

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

    &#xA;

    &#xA;

    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.

    &#xA;

     

    &#xA;

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

    &#xA;

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

    &#xA;

     

    &#xA;

    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

    &#xA;

  • In ffmpeg how to keep text same location while filtering like zooming ?

    12 juillet 2019, par No_0n3

    In ffmpeg how do I keep the text in the same location while filtering ? e.g. zooming

    FFmpeg for linux

    ffmpeg
    -t 5
    -i x.jpg -filter_complex "[0:v]drawtext=fontfile='ariblk.ttf':text='test text':fontsize=24:x=0.23333333333333*main_w: y=0.1325*main_h:fontcolor=#000000: alpha=1,zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0015))':d=125,fade=t=out:st=4:d=1[v0]; [v0]concat=n=1:v=1:a=0,format=yuv420p[v]"
    -map "[v]"
    -s "800x450"
    -t 40 ./video.mp4

    The text is zoomed in as well but I want it to keep the same size.