Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (27)

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

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



    


  • Android FFmpeg export of the Video in SurfaceView with Pinch/Scale/Zoom/Bg Color Operation

    31 mai 2024, par CoderDev

    I'm working on a feature in which I need to perform some actions on the selected video from the gallery and then upload it on the Backend server, on this selected video I can pinch it to scale up/down/zoom in/out and place it anywhere on the screen (even out side the screen), just like the Instagram app.
I can apply a background color which will be applied to the whole space of the outer of the video frame.

    


    After all the above changes I'm exporting the changes to the output video that will contain all the changes that I've mentioned above. I'm using the FFMpeg for the same :

    


        implementation("com.arthenica:ffmpeg-kit-full-gpl:6.0-2.LTS")



    


    Basically the operation is being achieved with this solution (Except Export Video) : Android SurfaceView operation on Video to Pinch/Scale/Zoom/Bg Color

    


    I've tried numerous FFmpeg commands but not getting the adequate output, I've tried below solution :

    


        private fun exportVideo() {
        val outputVideoPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).path + "/ffmpegoutput.mp4"
        val inputVideoPath = selectedFilePath
        val bgColor = getColorHexCode()

        // Load the input video dimensions
        val retriever = MediaMetadataRetriever()
        retriever.setDataSource(inputVideoPath)
        val videoWidth = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)?.toInt() ?: 0
        val videoHeight = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)?.toInt() ?: 0
        retriever.release()

        // Calculate the scaled dimensions
        val scaledWidth = (videoWidth * scaleFactor).toInt()
        val scaledHeight = (videoHeight * scaleFactor).toInt()

        // Calculate the new translation
        val translatedX = translationX.toInt()
        val translatedY = translationY.toInt()

         // Ensure the output dimensions are at least as large as the scaled dimensions
        val outputWidth = maxOf(deviceWidth, scaledWidth + abs(translatedX) * 2)
        val outputHeight = maxOf(deviceHeight, scaledHeight + abs(translatedY) * 2)

        // Calculate padding positions
        val xPad = (outputWidth - scaledWidth) / 2 + translatedX
        val yPad = (outputHeight - scaledHeight) / 2 + translatedY

        // Create the filter string for FFmpeg
        val filter = "scale=$scaledWidth:$scaledHeight," +
                "pad=$diagonal:$diagonal:(ow-iw)/2:(oh-ih)/2:$bgColor," +
                "pad=$outputWidth:$outputHeight:$xPad:$yPad:$bgColor"


        val command = ("-i $inputVideoPath " +
                "-vf $filter " +
                "-c:a copy " + // Copy the audio stream without re-encoding
                "-y $outputVideoPath"
                )

        // Execute FFMPEG command
        executeFFmpegKitCommand(command)
    }


    private fun executeFFmpegKitCommand(command: String) {
        FFmpegKit.executeAsync(command) { session ->
            println("FFMPEG executeAsync, session: $session")
            val returnCode = session.returnCode
            if (returnCode.isValueSuccess) {
                // Handle success
                runOnUiThread {
                    Toast.makeText(this, "Video saved successfully!", Toast.LENGTH_SHORT).show()
                }
            } else {
                // Handle failure
                runOnUiThread {
                    Toast.makeText(this, "Failed to save video", Toast.LENGTH_SHORT).show()
                }
            }
        }
    }


    


    But this not giving me the adequate output, it's not creating the output with the Screen's height/width (Tried passing the same), and the original video position is also not correct on the canvas which I've placed with the touch event.

    


  • It’s Piwik Analytics Survey time : Your Opinion Matters !

    10 juillet 2014, par Piwik Core Team — Community

    It’s been almost two years since our last survey. We were so happy to get the participation we did from the community last time and hope that you will once again share your thoughts !

    Piwik Survey

    Fill in the survey

    Looking back on the previous survey, several features were implemented as a direct result :

    • New app design with Morpheus theme
    • Piwik Marketplace for Plugins
    • Visitor Profile
    • Performance and Reliability Improvements
    • Theming
    • Migrated from SVN to Github !
    • And much more…

    Now it is time to ask for your opinion again. Sure it’s only 20 short questions, but your time you take and energy you place in this endeavour will shape Piwik development and features for the near future. We really look forward to your ideas, your opinions and your suggestions. To get started click the box (or link) below :

    Piwik Survey

    Fill in the survey !

    By the way, if you haven’t already make sure you sign up for our newsletter to make sure you get the latest Piwik news and information to your inbox ! You can subscribe here.