Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (38)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8231)

  • send browser camera to rtmp server

    22 juin 2022, par anamul

    i am using python and in frotnend javascript.

    


    I am using ffmpeg to push video to rtmp server.

    


    ffmpeg -y -f mp4 -stream_loop -1 -re -i myvideo.mp4
-b:v 3M -vcodec libx264 -r 30.0 -s 1280x720
-c:a copy -b:a 96k
-f flv "rtmps://dfdf222.global-contribute.live-video.net:443/app/"


    


    It is working well but i am not getting how to push to rtmp server of my browser camera ? i mean from javascript ?

    


    i am trying like this :

    


    &#xA;    <video autoplay="autoplay"></video>&#xA;&#xA;    <a href="#">open and stream</a>&#xA;&#xA;    <code class="echappe-js">&lt;script&gt;&amp;#xA;        function streamVideo () {&amp;#xA;            console.log(&amp;#x27;ddd&amp;#x27;)&amp;#xA;            navigator.mediaDevices.getUserMedia({&amp;#xA;            video: {&amp;#xA;&amp;#xA;            },&amp;#xA;            audio: {&amp;#xA;                &amp;#xA;            }&amp;#xA;            }).then(stream=&gt;{&amp;#xA;                console.log(stream)&amp;#xA;                document.getElementById(&amp;#x27;vid&amp;#x27;).srcObject = stream; &amp;#xA;            })&amp;#xA;&amp;#xA;        }&amp;#xA;    &lt;/script&gt;&#xA;&#xA;

    &#xA;

    It is working but not getting any way to push from browser to rtmp server. I know browser doesnt support rtmp protocol, we need to send it from the backend but can i push to server so that it push to rtmp server ?

    &#xA;

    Anyone know the way ?

    &#xA;

  • How to convert n numbers of images into a video slideshow with putting some transition on each images with flutter_ffmpeg ?

    26 avril 2023, par Shruti Ramnandan Sharma

    I'm trying to convert images into a video slideshow with some transition. I have used flutter_ffmpeg plugin , with this plugin I have created with only 3 images but I want to add n numbers of images but couldn't able to find solutions for it. I tried to add more images but it throws error.

    &#xA;

    I'm gonna add some piece of code below :

    &#xA;

      &#xA;
    1. Instance of FlutterFFmpeg
    2. &#xA;

    &#xA;

      final FlutterFFmpeg _flutterFFmpeg = FlutterFFmpeg(); &#xA;

    &#xA;

      &#xA;
    1. Picking multiple images from the gallery and applying command to convert images into a video
    2. &#xA;

    &#xA;

    void mergeImageVideo() async {&#xA;    final ImagePicker picker = ImagePicker();&#xA;    final images = await picker.pickMultiImage();&#xA;&#xA;    var im1 = images[0].path;&#xA;&#xA;    var im2 = images[1].path;&#xA;&#xA;    var im3 = images[2].path;&#xA;&#xA;   //-shortest&#xA;    openLoadingDialog(context, "Creating video");&#xA;    generateFilePath("ImageVideoMerge").then((outputFile) {&#xA;      var backgroundColor = &#x27;FFF44336&#x27;;&#xA;&#xA;      String ffmpegCommand = VideoUtil.generateImagesToVideoScript(&#xA;          im1, im2, im3, outputFile, &#x27;mpeg4&#x27;, &#x27;&#x27;, backgroundColor);&#xA;&#xA;      print("ffmpegCommand==> $ffmpegCommand");&#xA;      _flutterFFmpeg.execute(ffmpegCommand).then((v) {&#xA;        if (v == 0) {&#xA;          var file = File(outputFile);&#xA;          Navigator.pop(context);&#xA;          showSnackBar(context, "Images Added Successfully", Colors.black);&#xA;          updateVideoPlayer(file);&#xA;        } else {&#xA;          Navigator.pop(context);&#xA;        }&#xA;      }).then((executionId) {&#xA;      });&#xA;    });&#xA;  }&#xA;&#xA;

    &#xA;

    method to get ffmpeg command (images into video with scale transition)

    &#xA;

    static String generateImagesToVideoScript(&#xA;      String image1Path,&#xA;      String image2Path,&#xA;      String image3Path,&#xA;      String videoFilePath,&#xA;      String videoCodec,&#xA;      String customOptions,&#xA;      String backgroundColor&#xA;      ) {&#xA;&#xA;    // ignore: prefer_interpolation_to_compose_strings&#xA;     return "-hide_banner -y -loop 1 -i &#x27;" &#x2B;&#xA;        image1Path &#x2B;&#xA;        "&#x27; " &#x2B;&#xA;        "-loop   1 -i \"" &#x2B;&#xA;        image2Path &#x2B;&#xA;        "\" " &#x2B;&#xA;        "-loop 1   -i \"" &#x2B;&#xA;        image3Path &#x2B;&#xA;        "\" " &#x2B;&#xA;        "-filter_complex " &#x2B;&#xA;        "\" " &#x2B;&#xA;        "[0:v]setpts=PTS-STARTPTS,scale=w=640:h=424,setsar=sar=1/1,split=2[stream1out1][stream1out2];" &#x2B;&#xA;        "[1:v]setpts=PTS-STARTPTS,scale=w=640:h=424,setsar=sar=1/1,split=2[stream2out1][stream2out2];" &#x2B;&#xA;        "[2:v]setpts=PTS-STARTPTS,scale=w=640:h=424,setsar=sar=1/1,split=2[stream3out1][stream3out2];" &#x2B;&#xA;        "[stream1out1]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=3,select=lte(n\\,90)[stream1overlaid];" &#x2B;&#xA;        "[stream1out2]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=1,select=lte(n\\,30)[stream1ending];" &#x2B;&#xA;        "[stream2out1]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=2,select=lte(n\\,60)[stream2overlaid];" &#x2B;&#xA;        "[stream2out2]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=1,select=lte(n\\,30),split=2[stream2starting][stream2ending];" &#x2B;&#xA;        "[stream3out1]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=2,select=lte(n\\,60)[stream3overlaid];" &#x2B;&#xA;        "[stream3out2]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#$backgroundColor,trim=duration=1,select=lte(n\\,30)[stream3starting];" &#x2B;&#xA;        "[stream2starting][stream1ending]blend=all_expr=&#x27;if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)&#x27;:shortest=1[stream2blended];" &#x2B;&#xA;        "[stream3starting][stream2ending]blend=all_expr=&#x27;if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)&#x27;:shortest=1[stream3blended];" &#x2B;&#xA;        "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" &#x2B;&#xA;        " -map [video] -vsync 2 -async 1 " &#x2B;&#xA;        customOptions &#x2B;&#xA;        "-c:v " &#x2B;&#xA;        videoCodec &#x2B;&#xA;        " -r 30 " &#x2B;&#xA;        videoFilePath;&#xA;  }&#xA;&#xA;

    &#xA;

  • 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.&#xA;This message has to be loaded into Azure once recorded.

    &#xA;

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

    &#xA;

    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).&#xA;Or ideally, save directly to Azure.

    &#xA;

    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 :&#xA;Uncaught Error : Module name "ffmpeg" has not been loaded yet for context : _. Use require([])

    &#xA;

    My questions are :

    &#xA;

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

    • Is there another way to save an audio blob to Azure ?
    • &#xA;

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

    &#xA;

    Thank you for your help

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
        <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;