Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (26)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

Sur d’autres sites (3738)

  • How can I use ffmpeg to crop a part of a video by frames numbers including video and audio ?

    28 mars 2019, par Dubi Duboni

    I have a simple list :

    LReg.start = rise[i];
    LReg.end = fall[i];
    LR.Add(LReg);

    start and end are int’s in the end I have a List of the frames I want to extract from a video file. For example in index 0 of LR I have start 48 end 51
    In index 1 start 110 end 124

    So I want to loop over the List an save as a video file the part of a video file using ffmpeg according to the frame number start and end by jumping to this frames.
    Jump to frame 48 and create a video file out from frame 48 to 51 including 48 and 51. Then jump forward to the next group of frames 110 and 124 and so on.

    The problem is how to use ffmpeg to extract and save video files ?

  • The FFmpeg just show the number form the input text (no characters , just numbers) error=13, Permission denied

    14 avril 2021, par gejivi2011

    I was trying to use FFmpeg to create a video form gif and audio, on Android 10, doesn't work
The code is working fine on android 9 and below, and not work 10 and above
the Cmd, as I mentioned it is work so good on android 9 and below

    


     String[] cmd = new String[24];
    cmd[0] = "-i";
    cmd[1] = audio.getPath();
    cmd[2] = "-ignore_loop";
    cmd[3] = "0";
    cmd[4] = "-i";
    cmd[5] = image_path;
    cmd[6] = "-vf";
    cmd[7] = "scale=trunc(iw/2)*2:trunc(ih/2)*2";
    cmd[8] = "-filter:v";
    cmd[9] = ayat_drawer + qara_draw;
    cmd[10] = "-vcodec";
    cmd[11] = "libx264";
    cmd[12] = "-pix_fmt";
    cmd[13] = "yuv420p";
    cmd[14] = "-r";
    cmd[15] = "25";
    cmd[16] = "-preset";
    cmd[17] = "ultrafast";
    cmd[18] = "-c:a";
    cmd[19] = "aac";
    cmd[20] = "-b:a";
    cmd[21] = "128k";
    cmd[22] = "-shortest";
    cmd[23] = outputLocation.getPath();


    


    The Java code :

    


     FFmpeg mFFmpeg = FFmpeg.getInstance(context);&#xA;        try {&#xA;            mFFmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {&#xA;                @Override&#xA;                public void onProgress(String message) {&#xA;                    super.onProgress(message);&#xA;                    callback.onProgress(message);&#xA;                }&#xA;&#xA;                @Override&#xA;                public void onSuccess(String message) {&#xA;                    super.onSuccess(message);&#xA;                    Utils.refreshGallery(outputLocation.getPath(), context);&#xA;                    callback.onSuccess(outputLocation, "video");&#xA;                }&#xA;&#xA;                @Override&#xA;                public void onFailure(String message) {&#xA;                    super.onFailure(message);&#xA;                    if (outputLocation.exists()) {&#xA;                        outputLocation.delete();&#xA;                    }&#xA;                    callback.onFailure(new IOException(message));&#xA;                }&#xA;&#xA;                @Override&#xA;                public void onStart() {&#xA;                    Log.d("TAG", "<ffmpeg>Started command : mFFmpeg " &#x2B; java.util.Arrays.toString(cmd));&#xA;                }&#xA;&#xA;                @Override&#xA;                public void onFinish() {&#xA;                    Log.d("TAG", "<ffmpeg>Finished command : mFFmpeg " &#x2B; java.util.Arrays.toString(cmd));&#xA;                    super.onFinish();&#xA;                    callback.onFinish();&#xA;                }&#xA;            });&#xA;        } catch (FFmpegCommandAlreadyRunningException e) {&#xA;            Log.e("MAS" , e.getMessage());&#xA;            e.printStackTrace();&#xA;        }&#xA;</ffmpeg></ffmpeg>

    &#xA;

    I think that because FFmpeg using Asynctask and it is deprecated

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