Recherche avancée

Médias (91)

Autres articles (103)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

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

Sur d’autres sites (11604)

  • How to send a string to ffmpeg's input in Java

    19 décembre 2019, par jdauthre

    I am quite new to java, and try as I might, I can’t find any examples to help me. I am running ffmpeg as a process and parsing the stderr to get various bits of data - all of which is working fine, but I want to send a "q\n" command to ffmpeg’s input from a gui menu item to gracefully quit it whilst it is running when necessary. So all I want to do is send a string programmatically to ffmpeg, the equivalent of sending q return from terminal. Thanks in advance
    edit here is the relevant (simplified) section of the code

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                 Thread thread = new Thread() {

    public void run()
    BufferedReader error_reader,input_reader;
    InputStreamReader error_isr,input_isr;

    String ffmpeg_command = "ffmpeg " + overwrite + " -i " + "\"" + currentfilestring + "\"" + " " + stream + " " + test + " " + findsilence + " " + videocodec + " -b:v " + videoqual + " " + audiocodec + " -ac 2  -ab " + audioqual + " " + res + " " + aspectratio + " " + framerate + " " + "\"" + destdir + destfile + "\"";
    System.out.println(ffmpeg_command);
    try {
    OutputStream stdout;
    InputStream stdin;
    InputStream stderr;
    String errorstr,inputstr;
    //Run the ffmpeg
    Process ffmpeg = Runtime.getRuntime().exec(ffmpeg_command, null, new File(userDir));

    //Get stdin,stderr + stdout                    
    stdin = ffmpeg.getInputStream();
    stderr = ffmpeg.getErrorStream();
    stdout = ffmpeg.getOutputStream();
    stdout.write("\r\n".getBytes());  
    stdout.flush();
    stdout.close();

    error_isr = new InputStreamReader(stderr);
    error_reader = new BufferedReader(error_isr);

    input_reader = new BufferedReader(input_isr);
    while (!error_reader.ready()) {
    }
    while ((errorstr = error_reader.readLine()) != null) {

    if(stopconv =="yes"){
                               //-------------------------------------------------------------------------------------
                                  // TRYING TO INPUT "q\n" TO FFMPEG HERE
                  //-------------------------------------------------------------------------------------
    }

    error_isr.close();
    error_reader.close();
    stdin.close();
    stderr.close();
    jProgressBar1.setValue(0);

    ffmpeg.destroy();

    } catch (Exception e) {
    e.printStackTrace();
                           }
    };
    thread.start();
    }                            
  • avformat/mpeg : Don't copy or leak string in AVBPrint

    4 décembre 2019, par Andreas Rheinhardt
    avformat/mpeg : Don't copy or leak string in AVBPrint
    

    vobsub_read_header() uses an AVBPrint to write a string and up until
    now, it collected the string stored in the AVBPrint via
    av_bprint_finalize(), which might involve an allocation and copy of the
    string. But this is unnecessary, as the lifetime of the returned string
    does not exceed the lifetime of the AVBPrint. So use the string in the
    AVBPrint directly.

    This also makes it possible to easily fix a memleak : In certain error
    situations, the string stored in the AVBPrint would not be freed (if it
    was dynamically allocated). This has been fixed, too.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/mpeg.c
  • FFmpeg doesn't work on android 10, goes strait to onFailure(String message) with empty message

    18 janvier 2020, par nolanic

    I’m using FFmpeg in one of my projects for video compression. On Android 10 (Google Pixel 3a), it goes straight to onFailure(String message) with empty message for any command sent for execution.

    so I have (api ’com.writingminds:FFmpegAndroid:0.3.2’) specified in my app gradle file,

    permission (android.permission.WRITE_EXTERNAL_STORAGE) in the manifest is specified

    So I do :

    InitializationCallback initializationCallback = new InitializationCallback();
       try {
           FFmpeg.getInstance(context).loadBinary(initializationCallback);
       } catch (FFmpegNotSupportedException e) {
           initializationCallback.onFailure();
           initializationCallback.onFinish();
       }

    Initializes just fine, no problems here.

    Later :

    void getData(File inputFile) {
    //inputFile points to: /storage/emulated/0/Android/data/{package_name}/files/temp_files/temp_1.mp4
           String[] cmd = ("-i " + inputFile.getAbsolutePath()).split(" ");
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }
       }

       @Override
       public void onStart() {
            //This method is called
       }

       @Override
       public void onSuccess(String message) {
            //This method is NOT called
            extractAvailableData(message);
       }

       @Override
       public void onProgress(String message) {
           //This method is NOT called
           extractAvailableData(message);
       }

       @Override
       public void onFailure(String message) {
           //This method is called and the message is empty
           extractAvailableData(message);
       }

       @Override
       public void onFinish() {
           //This method is called
       }

    If I do something like :

    String command = "-i ***/file1.mp4 -map 0:v -map 0:a -preset ultrafast -s:v 750:350 ***/file2.mp4";
    //file2.mp4 is a non existent file at this point
    // (***) --> is just a replacement for the full path of the file, just to keep things shorter here.

    String[] cmd = command.split(" ");
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }

    gives the same result, no video conversion, just a call to onFailure("Nothing")

    Even if I do :

    String[] cmd = {"-version"};
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }

    I get nothing, no output at all.

    I encountered this issue only on Android 10 so far, it works fine on other devices.