Recherche avancée

Médias (91)

Autres articles (74)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9420)

  • android - ffmpeg - making crossfade between 5 videos

    24 juin 2016, par LuongTruong

    I want to make a small slideshow app which is able to do some effect like fade in, fade out, and crossfade between multiple videos by using ffmpeg4android.

    After a few hours researching, I am still getting stuck in doing crossfade. Following this suggestion, I am able to create a crossfade but it is not work perfectly.

    The problem is that I want to combine 5 videos with crossfade effect between them and the duration of each video is 5 seconds. As a result, the output file is only 5 seconds instead of 25 seconds and there is a crossfade effect in the end of output file.

    Here is my command :

    String commandStr = "ffmpeg " +
                   "-y " +
                   "-i /sdcard/videokit/big_buck.mp4 " +
                   "-i /sdcard/videokit/big_buck.mp4 " +
                   "-i /sdcard/videokit/big_buck.mp4 " +
                   "-i /sdcard/videokit/big_buck.mp4 " +
                   "-i /sdcard/videokit/big_buck.mp4 " +
                   "-filter_complex " +
                   "[0:v]setpts=PTS-STARTPTS[v1];" +
                   "[1:v]format=yuva420p,fade=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+(4/TB)[v2];" +
                   "[2:v]format=yuva420p,fade=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+(8/TB)[v3];" +
                   "[3:v]format=yuva420p,fade=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+(12/TB)[v4];" +
                   "[4:v]format=yuva420p,fade=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+(16/TB)[v5];" +
                   "[v1][v2]overlay[v12];[v12][v3]overlay[v123];[v123][v4]overlay[v1234];[v1234][v5]overlay,format=yuv420p[v] " +
                   "-map [v] " +
                   "/sdcard/videokit/result.mp4";

    UPDATE 1 : ADD LOG

    Please download the log file here

    Please let me know if I did something wrong in my command. Any help would be appreciated.

    Thank you in advance !

  • Changing Video play back is really very slow process using FFMPEG android java pre compiled library

    16 juin 2016, par Amna Mirza

    I am processing video in android using FFMPEG android java library to change play back of speed. for 6 sec video to make it play back slow by 0.5 setpts , its taking more than 1 min.
    Here is my code

    public class TestFFMpegActivity {
           private static String cmd,
           private static FFmpeg ffmpeg;
           private static Context mContext;


           public static String getInternalDirectoryPath() {
               return Environment.getExternalStorageDirectory().getAbsolutePath();
           }

           public static void initiateFFmpeg(Context context, String path) {
               mContext = context;
               ffmpeg = FFmpeg.getInstance(context);  
               VideoIn = getInternalDirectoryPath() + "/Download/input.mp4";
               VideoOut = getInternalDirectoryPath() + "/Download/output.mp4";
               cmd = "-i "+VideoIn+" -vf setpts=2*PTS -strict -2 "+VideoOut;
               try {
                   ffmpeg.loadBinary(new LoadBinaryResponseHandler() {

                       @Override
                       public void onStart() {
                       }

                       @Override
                       public void onFailure() {
                       }

                       @Override
                       public void onSuccess() {
                       }

                       @Override
                       public void onFinish() {
                           processVideo();
                       }
                   });
               } catch (FFmpegNotSupportedException e) {
                   // Handle if FFmpeg is not supported by device
               }
           }
           private static void processVideo(){
           try {
               ffmpeg.execute(cmd ,
                       new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                               //for logcat
                               Log.w(null,"processing started");
                           }

                           @Override
                   public void onProgress(String message) {
                       //for logcat
                       Log.w(null, "onProgress");
                   }

                   @Override
                   public void onFailure(String message) {
                       Log.w(null, message.toString());
                   }

                   @Override
                   public void onSuccess(String message) {
                       Log.w(null, message.toString());
                   }

                   @Override
                   public void onFinish() {

                   }
               });
           } catch (FFmpegCommandAlreadyRunningException e) {
               Toast.makeText(mContext, "Video processing failed due to exception", Toast.LENGTH_LONG).show();

               // Handle if FFmpeg is already running
               e.printStackTrace();
               Log.w(null, e.toString());
           }
       }
    }

    This is the gradle build path for using above library

     compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'
  • Working with ffmpeg in Xamarin Android

    20 avril 2017, par Ahmed Mujtaba

    I’m building an android app using Xamarin. The requirement of the app is to capture video from the camera and encode the video to send it across to a server. Initially I was using an encoder library on the server side to encode recorded video but it was proving to be extremely unreliable and inefficient specially for large sized video files. I have posted my issues on another thread here I then decided to encode the video on the client side and then send it to the server. I’ve found encoding to be a bit complicated and there isn’t much information available on how this can be done so I search for the only way I knew how to encode a video that is by using ffmpeg codec. I’ve found some solutions. There’s a project on github that demonstrates how ffmpeg is used inside a Xamarin android project. However running the solution doesn’t give any output. The project has a binary ffmpeg file which is installed to the phone directory using the code below :

    _ffmpegBin = InstallBinary(XamarinAndroidFFmpeg.Resource.Raw.ffmpeg, "ffmpeg", false);

    Below is the example code for encoding video into different set of outputs :

               _workingDirectory = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath;
           var sourceMp4 = "cat1.mp4";
           var destinationPathAndFilename = System.IO.Path.Combine (_workingDirectory, "cat1_out.mp4");
           var destinationPathAndFilename2 = System.IO.Path.Combine (_workingDirectory, "cat1_out2.mp4");
           var destinationPathAndFilename4 = System.IO.Path.Combine (_workingDirectory, "cat1_out4.wav");
           if (File.Exists (destinationPathAndFilename))
               File.Delete (destinationPathAndFilename);
           CreateSampleFile(Resource.Raw.cat1, _workingDirectory, sourceMp4);


           var ffmpeg = new FFMpeg (this, _workingDirectory);

           var sourceClip = new Clip (System.IO.Path.Combine(_workingDirectory, sourceMp4));

           var result = ffmpeg.GetInfo (sourceClip);

           var br = System.Environment.NewLine;

           // There are callbacks based on Standard Output and Standard Error when ffmpeg binary is running as a process:

           var onComplete = new MyCommand ((_) => {
               RunOnUiThread(() =>_logView.Append("DONE!" + br + br));
           });

           var onMessage = new MyCommand ((message) => {
               RunOnUiThread(() =>_logView.Append(message + br + br));
           });

           var callbacks = new FFMpegCallbacks (onComplete, onMessage);

           // 1. The idea of this first test is to show that video editing is possible via FFmpeg:
           // It results in a 150x150 movie that eventually zooms on a cat ear. This is desaturated, and there's a fade in.

           var filters = new List<videofilter> ();
           filters.Add (new FadeVideoFilter ("in", 0, 100));
           filters.Add(new CropVideoFilter("150","150","0","0"));
           filters.Add(new ColorVideoFilter(1.0m, 1.0m, 0.0m, 0.5m, 1.0m, 1.0m, 1.0m, 1.0m));
           var outputClip = new Clip (destinationPathAndFilename) { videoFilter = VideoFilter.Build (filters)  };
           outputClip.H264_CRF = "18"; // It's the quality coefficient for H264 - Default is 28. I think 18 is pretty good.
           ffmpeg.ProcessVideo(sourceClip, outputClip, true, new FFMpegCallbacks(onComplete, onMessage));

           //2. This is a similar version version in command line only:
           string[] cmds = new string[] {
               "-y",
               "-i",
               sourceClip.path,
               "-strict",
               "-2",
               "-vf",
               "mp=eq2=1:1.68:0.3:1.25:1:0.96:1",
               destinationPathAndFilename2,
               "-acodec",
               "copy",
           };
           ffmpeg.Execute (cmds, callbacks);

           // 3. This lists codecs:
           string[] cmds3 = new string[] {
               "-codecs",
           };
           ffmpeg.Execute (cmds, callbacks);

           // 4. This convers to WAV
           // Note that the cat movie just has some silent house noise.
           ffmpeg.ConvertToWaveAudio(sourceClip, destinationPathAndFilename4, 44100, 2, callbacks, true);
    </videofilter>

    I have tried different commands but no output file is generated. I have tried to use another project found here but this one has the same issue. I don’t get any errors but no output file is generated. I’m really hoping someone can help me find a way I can manage to use ffmpeg in my project or some way to compress video to transport it to the server.

    I will really appreciate if someone can point me to the right direction.