Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (92)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

Sur d’autres sites (15015)

  • Use FFmpeg to crop a video to square format in Android

    22 août 2016, par Cédric Portmann

    I am currently working on an app that is supposed to crop a 16:9 video into a 1:1 video. However I dont get the code working. If possible the software should convert the inputed video as fast as possible. The resolution can vary between 480x480 and 720x720.

    If I could choose the postion of the crop frame it would be perfect.

    The error I get :

    E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@f0c91b8
    java.io.IOException: Error running exec(). Command: [/data/user/0/com.android.grafika/files/ffmpeg, -i /storage/emulated/0/Alphacrypt1.mp4 -vf crop=640:256:0:400 -threads 5 -preset ultrafast -strict -2 /storage/emulated/0/YourCroppedMovie.mp4] Working Directory: null Environment: null
    at java.lang.ProcessManager.exec(ProcessManager.java:215)
    at java.lang.Runtime.exec(Runtime.java:174)
    at java.lang.Runtime.exec(Runtime.java:129)
    at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
    at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
    at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
    at android.os.AsyncTask$2.call(AsyncTask.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)
    Caused by: java.io.IOException: No such file or directory
    at java.lang.ProcessManager.exec(Native Method)
    at java.lang.ProcessManager.exec(ProcessManager.java:213)
    at java.lang.Runtime.exec(Runtime.java:174) 
    at java.lang.Runtime.exec(Runtime.java:129) 
    at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) 
    at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) 
    at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) 
    at android.os.AsyncTask$2.call(AsyncTask.java:295) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
    at java.lang.Thread.run(Thread.java:818) 

    The code I am using :

    final String[] cmd = new String[]{"-i /storage/emulated/0/Alphacrypt1.mp4 -vf crop=640:256:0:400 -threads 5 -preset ultrafast -strict -2 /storage/emulated/0/YourCroppedMovie.mp4"};

       try {
           final FFmpeg ffmpeg = FFmpeg.getInstance(this);
           ffmpeg.execute(cmd, new FFmpegExecuteResponseHandler() {
               @Override
               public void onSuccess(String message) {
                   Toast.makeText(getApplicationContext(), "Successfully converted!",
                           Toast.LENGTH_LONG).show();
               }

               @Override
               public void onProgress(String message) {

               }

               @Override
               public void onFailure(String message) {
                   Toast.makeText(getApplicationContext(), "Fail!"+ message,
                           Toast.LENGTH_LONG).show();
               }

               @Override
               public void onStart() {
                   Toast.makeText(getApplicationContext(), "Started!",
                           Toast.LENGTH_LONG).show();
               }

               @Override
               public void onFinish() {
                   Toast.makeText(getApplicationContext(), "Stopped!",
                           Toast.LENGTH_LONG).show();
               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {

       }

    Thank you for your help.

    SOLUTION :

    1. I did not add the "Load Binary" part, which is necessary to run the
      FFmpeg library (http://writingminds.github.io/ffmpeg-android-java/).
    2. The command needs to be splitted using .split(" "); as already told by printfmyname
    3. For now I use -vf crop=1080:1080:0:0 to crop the video to a square. (Without messing up the ratio)
  • FFMPEG use audio volume as param for filters

    2 septembre 2016, par user3878395

    Can someone help me with FFMPEG’s filter_complex ? I need to use the volume from an audio channel as param for filters (logo size dependent on audio volume).

    I have this command and I need it to change size of [3:v] (logo.png) by audio volume from [2:a] (test.mp3)

    bin/ffmpeg -loop 1 -f image2 -i img.jpg -i hp.png -ss 20 -t 4 -i test.mp3 -i logo.png -filter_complex "[2:a]showwaves=s=780x140:mode=p2p,format=rgba,colorkey=black[sw];[0:v]scale=1920:-1,crop=iw:1080[bg];[bg][sw]overlay=(main_w/2-overlay_w/2):(main_h/2-overlay_h/2+200),format=yuv420p[ff];[ff][1:v]overlay=(main_w/2-overlay_w/2+30):(main_h/2-overlay_h/2-50),format=yuv420p[ff2];[ff2][3:v]overlay=(main_w/2-overlay_w/2+30):(main_h/2-overlay_h/2-50),format=yuv420p" -shortest -y -c:a aac -vcodec libx264 -strict -experimental -b:a 192k video.mp4
  • Ffmpeg video of images in loop ?

    4 février 2024, par Daniel

    I am trying to make a video from 2 images repeating in loop :
image1.png to be shown 1.2 seconds.
Then image2.png to be shown for 3 seconds.
Video should be long 180 seconds.
png images are different resolution, image1 is smaller, image2 is 1080*1920, video should use resolution of a image2, and image1 should be shown in its original size, not stretched.

    


    ffmpeg -loop 1 -t 1.2 -i image1.png -loop 1 -t 3 -i image2.png -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease[img1];[1:v][img1]overlay=eof_action=repeat[video]" -map "[video]" -t 180 -r 30 -y output.mp4

    


    Output is 3 seconds long and show only image1 ?