Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

Sur d’autres sites (5885)

  • FFMPEG using a screen capture for an overlay results in serious visual flaws

    3 octobre 2017, par Joey

    I’m trying to overlay a screen capture of a specific window on top of a background image, and output the result - it works but results in unacceptable visual flaws.

    The command I’m using is :

    ffmpeg -loop 1 -r 30 -i background.jpg -f gdigrab -r 30 -i title=Calculator \
    -filter_complex "[0:v][1:v]overlay=10:10[video]" -map "[video]" -c:v libx264 \
    -f flv output.flv

    which places a screencap of the calculator window on the background at position 10,10.

    This is what the output looks like :

    overlay screenshot

    All the buttons on the calculator are super muddied and appear bold, almost as if it was overlaid several times at slightly different positions. Is there something wrong with the command or any way to fix it and preserve visual integrity of the original ? Changing the output format doesn’t have any effect, nor does setting -crf 0 or adjusting any other encoding settings.

    This doesn’t happen when I screen capture just the calculator by itself without overlaying it on anything. For reference here is what the output looks like when I only record the calculator with no overlaying :

    calc-only screenshot

  • FFmpeg - cannot find ExecuteBinaryResponseHandler - Android/Java

    20 juillet 2018, par pudility

    I am trying to make a module for react-native that will change a video into a gif. I have little to no experience with android studios/java, but I would love to learn more ! I am using this library to convert the video to a gif. Here is my code :

    package com.reactlibrary;

    import android.widget.Toast;
    import com.facebook.react.bridge.ReactApplicationContext;
    import com.facebook.react.bridge.ReactContextBaseJavaModule;
    import com.facebook.react.bridge.ReactMethod;
    import com.github.hiteshsondhi88.libffmpeg.FFmpeg;

    public class RNGifMakerModule extends ReactContextBaseJavaModule {

     private final ReactApplicationContext reactContext;

     public RNGifMakerModule(ReactApplicationContext reactContext) {
       super(reactContext);
       this.reactContext = reactContext;
     }

     @Override
     public String getName() {
       return "RNGifMakerModule";
     }

     @ReactMethod
     public void alert(String message) {
         Toast.makeText(getReactApplicationContext(), "Error", Toast.LENGTH_LONG).show();
         String[] cmd = {"-i"
                 , message
                 , "Image.gif"};
         conversion(cmd);
     }

     public void conversion(String[] cmd) {

       FFmpeg ffmpeg = FFmpeg.getInstance(this.reactContext);

       try {


         // to execute "ffmpeg -version" command you just need to pass "-version"
         ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

           @Override
           public void onStart() {
           }

           @Override
           public void onProgress(String message) {
           }

           @Override
           public void onFailure(String message) {
           }

           @Override
           public void onSuccess(String message) {
           }

           @Override
           public void onFinish() {
           }
         });
       } catch (FFmpegCommandAlreadyRunningException e) {
         // Handle if FFmpeg is already running
         e.printStackTrace();
       }
     }
    }

    And I get this error :

    Error:(43, 31) error: cannot find symbol class ExecuteBinaryResponseHandler

    This seems odd to be, because in the documentation for ffmpeg-android-java it says to use almost exactly the same code.

    Bounty

    The bounty will be awarded to you if you can find a way to convert a video.mp4 into a gif. You do not necessarily have to use FFmpeg, but your solution has to work with java/android studios.

  • Android : Select from images extracted with FFMPEG

    21 juillet 2017, par Tix

    I’m currently able to extract images(frames) from a video, and display all the extracted images using the code below, how do i make it so that the displayed images could be selected by user and passed as a bitmap to another activity ?

    FFMPEG Compiled using

    compile ’com.writingminds:FFmpegAndroid:0.3.2’

    Complex Command used to get the frames/images

    String[] complexCommand = "-y", "-i", yourRealPath, "-an", "-framerate", "60", "-vf", "select=’gte(n,45)’", "-vsync", "0", dest.getAbsolutePath() ;

    Main Activity

           /**
            * Command for extracting images from video
            */
           private void extractImagesVideo(int startMs, int endMs) {
               File moviesDir = Environment.getExternalStoragePublicDirectory(
                       Environment.DIRECTORY_PICTURES
               );

               String filePrefix = "extract_picture";
               String fileExtn = ".jpg";
               String yourRealPath = getPath(MainActivity.this, selectedVideoUri);

               File dir = new File(moviesDir, "VideoEditor");
               int fileNo = 0;
               while (dir.exists()) {
                   fileNo++;
                   dir = new File(moviesDir, "VideoEditor" + fileNo);

               }
               dir.mkdir();
               filePath = dir.getAbsolutePath();
               File dest = new File(dir, filePrefix + "%03d" + fileExtn);


               Log.d(TAG, "startTrim: src: " + yourRealPath);
               Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

               String[] complexCommand = {"-y", "-i", yourRealPath, "-an", "-r", "1/2", "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, dest.getAbsolutePath()};

               execFFmpegBinary(complexCommand);

           }

        /**
            * Executing ffmpeg binary
            */
           private void execFFmpegBinary(final String[] command) {
               try {
                   ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                       @Override
                       public void onFailure(String s) {
                           Log.d(TAG, "FAILED with output : " + s);
                       }

                       @Override
                       public void onSuccess(String s) {
                           Log.d(TAG, "SUCCESS with output : " + s);
                           if (choice == 1 || choice == 2 || choice == 5 || choice == 6 || choice == 7) {
                               Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 3) {
                               Intent intent = new Intent(MainActivity.this, PreviewImageActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 4) {
                               Intent intent = new Intent(MainActivity.this, AudioPreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 8) {
                               choice = 9;
                               reverseVideoCommand();
                           } else if (Arrays.equals(command, lastReverseCommand)) {
                               choice = 10;
                               concatVideoCommand();
                           } else if (choice == 10) {
                               File moviesDir = Environment.getExternalStoragePublicDirectory(
                                       Environment.DIRECTORY_MOVIES
                               );
                               File destDir = new File(moviesDir, ".VideoPartsReverse");
                               File dir = new File(moviesDir, ".VideoSplit");
                               if (dir.exists())
                                   deleteDir(dir);
                               if (destDir.exists())
                                   deleteDir(destDir);
                               choice = 11;
                               Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           }
                       }

    PreviewImageActivity

       public class PreviewImageActivity extends AppCompatActivity {

           private static final String FILEPATH = "filepath";
               @Override
               protected void onCreate(@Nullable Bundle savedInstanceState) {
                   super.onCreate(savedInstanceState);
                   setContentView(R.layout.activity_gallery);
                   getSupportActionBar().setDisplayHomeAsUpEnabled(true);
                   getSupportActionBar().setDisplayShowHomeEnabled(true);
                   TextView tvInstruction=(TextView)findViewById(R.id.tvInstruction) ;

                   GridLayoutManager lLayoutlLayout = new GridLayoutManager(PreviewImageActivity.this, 4);
                   RecyclerView rView = (RecyclerView)findViewById(R.id.recycler_view);
                   rView.setHasFixedSize(true);
                   rView.setLayoutManager(lLayoutlLayout);
                   String filePath = getIntent().getStringExtra(FILEPATH);
                   ArrayList<string> f = new ArrayList<string>();



      File dir = new File(filePath);
               tvInstruction.setText("Images stored at path "+filePath);
               File[] listFile;

                   listFile = dir.listFiles();



               for(File e:listFile)
               {
                   f.add(e.getAbsolutePath());
               }

               PreviewImageAdapter rcAdapter = new PreviewImageAdapter( f);
               rView.setAdapter(rcAdapter);


           }
       @Override
       public boolean onOptionsItemSelected(MenuItem item) {
           // handle arrow click here
           if (item.getItemId() == android.R.id.home) {
               finish(); // close this activity and return to preview activity (if there is any)
           }

           return super.onOptionsItemSelected(item);
       }
    }
    </string></string>

    PreviewImageAdapter

    public class PreviewImageAdapter extends RecyclerView.Adapter {

       private ArrayList<string> paths;

       public PreviewImageAdapter( ArrayList<string> paths) {
           this.paths = paths;
       }

       @Override
       public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
           View itemView = LayoutInflater.from(parent.getContext())
                   .inflate(R.layout.item_gallery, parent, false);

           return new MyViewHolder(itemView);
       }

       @Override
       public void onBindViewHolder(MyViewHolder holder, int position) {
           Bitmap bmp = BitmapFactory.decodeFile(paths.get(position));
           holder.ivPhoto.setImageBitmap(bmp);
       }

       @Override
       public int getItemCount() {
           return paths.size();
       }

       public class MyViewHolder extends RecyclerView.ViewHolder {
           private ImageView ivPhoto;

           public MyViewHolder(View itemView) {
               super(itemView);

               ivPhoto = (ImageView) itemView.findViewById(R.id.ivPhoto);
           }
       }

    }
    </string></string>