Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (28)

  • 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

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

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

Sur d’autres sites (3478)

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

    


    I'm gonna add some piece of code below :

    


      

    1. Instance of FlutterFFmpeg
    2. 


    


      final FlutterFFmpeg _flutterFFmpeg = FlutterFFmpeg(); 


    


      

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


    


    void mergeImageVideo() async {
    final ImagePicker picker = ImagePicker();
    final images = await picker.pickMultiImage();

    var im1 = images[0].path;

    var im2 = images[1].path;

    var im3 = images[2].path;

   //-shortest
    openLoadingDialog(context, "Creating video");
    generateFilePath("ImageVideoMerge").then((outputFile) {
      var backgroundColor = 'FFF44336';

      String ffmpegCommand = VideoUtil.generateImagesToVideoScript(
          im1, im2, im3, outputFile, 'mpeg4', '', backgroundColor);

      print("ffmpegCommand==> $ffmpegCommand");
      _flutterFFmpeg.execute(ffmpegCommand).then((v) {
        if (v == 0) {
          var file = File(outputFile);
          Navigator.pop(context);
          showSnackBar(context, "Images Added Successfully", Colors.black);
          updateVideoPlayer(file);
        } else {
          Navigator.pop(context);
        }
      }).then((executionId) {
      });
    });
  }



    


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

    


    static String generateImagesToVideoScript(
      String image1Path,
      String image2Path,
      String image3Path,
      String videoFilePath,
      String videoCodec,
      String customOptions,
      String backgroundColor
      ) {

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



    


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

  • Unrecognized option 'crf'

    6 septembre 2022, par Arjit Kaushal

    I am trying compress video using ffmpeg but i am facing errors in the command.&#xA;Although it runs perfectly fine on my linux terminal.( ffmpeg -i input.avi -vcodec libx264 -crf 24 output.avi).

    &#xA;

    my code :

    &#xA;

    void _compress() {&#xA;        if (_videoModel == null) return;&#xA;        String inputPath = _videoModel!.originalCachePath;&#xA;        String outputPath = _videoModel!.editCachePath;&#xA;    &#xA;        FFmpegKit.execute("-i $inputPath -vcodec libx264 -crf 24 -y $outputPath")&#xA;            .then((session) async {&#xA;          final returnCode = await session.getReturnCode();&#xA;          if (ReturnCode.isSuccess(returnCode)) {&#xA;            Navigator.pushNamed(context, PreviewPage.routeName,&#xA;                arguments: _videoModel);&#xA;          } else if (ReturnCode.isCancel(returnCode)) {&#xA;            print("compress cancel");&#xA;          } else {&#xA;            print("compress error : $returnCode");&#xA;            FFmpegKitConfig.enableLogCallback((log){&#xA;              final message = log.getMessage();&#xA;              print(message);&#xA;            });&#xA;    &#xA;    &#xA;          }&#xA;        });&#xA;      }&#xA;

    &#xA;

    I am facing the following errors :&#xA;Unrecognized option 'crf',&#xA;I/flutter (31056) : Error splitting the argument list,&#xA;Option not found.

    &#xA;