Recherche avancée

Médias (91)

Autres articles (22)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (4437)

  • Can't merge mp4 files with FFmpeg on android

    6 mai 2017, par Brian

    I’m using https://github.com/hiteshsondhi88/ffmpeg-android-java in an app that needs to combine multiple mp4 files into one.

    Here is a command

    ffmpeg -i concat:"/data/data/com.testapp.app/cache:temp/lds82df9skov65i15k3ct16cik.mp4|/data/data/com.testapp.app/cache:temp/qm5s0utmb8c1gbhch6us2tnilo.mp4" -codec copy /data/data/com.testapp.app/cache:temp/4egqalludvs03tnfleu5dgb6iv.mp4

    java method to append files, movie files is an array holding files i want to combine

    public void appendFiles() {

       showProgressDialog();

       movieFile = getRandomFile();

       StringBuilder b = new StringBuilder();

       try {

           for (int i = 0; i < movieFiles.size(); i++) {

               File f = movieFiles.get(i);

               if (!f.exists()) {
                   continue;
               }

               if(i != 0){
                   b.append("|");
               }

               b.append(f.getPath());


           }

           final String command = "-i concat:\""+b.toString() + "\" -codec copy " + movieFile.getPath();



           try {
               ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                   @Override
                   public void onFailure(String s) {
                       app.log("FAILED with output : " + s);
                   }

                   @Override
                   public void onSuccess(String s) {
                       app.log("SUCCESS with output : " + s);

                       createThumbnail();

                       stopProgressDialog();

                       startReview();
                   }

                   @Override
                   public void onProgress(String s) {
                       app.log("Started command : ffmpeg " + command);

                   }

                   @Override
                   public void onStart() {

                       app.log("Started command : ffmpeg " + command);

                   }

                   @Override
                   public void onFinish() {
                       app.log("Finished command : ffmpeg " + command);

                   }
               });
           }
           catch (FFmpegCommandAlreadyRunningException e) {
               e.printStackTrace();
           }


       }

       catch (Exception e) {
           e.printStackTrace();
       }

    }

    and getRandomFile()

       public File getRandomFile() {
           if (captureDir != null) {
               if (captureDir.exists()) {

                   SecureRandom random = new SecureRandom();
                   File file = new File(captureDir, new BigInteger(130, random).toString(32) + ".mp4");
                   return file;
               }
           }
           return null;
       }

    but I keep seeing the error no such file or directory

    concat :"/data/data/com.testapp.app/cache:temp/lds82df9skov65i15k3ct16cik.mp4|/data/data/com.testapp.app/cache:temp/qm5s0utmb8c1gbhch6us2tnilo.mp4" : No such file or directory

    any ideas ?

  • lavu : add new D3D11 pixfmt and hwcontext

    6 juin 2017, par wm4
    lavu : add new D3D11 pixfmt and hwcontext
    

    To be used with the new d3d11 hwaccel decode API.

    With the new hwaccel API, we don’t want surfaces to depend on the
    decoder (other than the required dimension and format). The old D3D11VA
    pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the
    decoder configuration, and thus is incompatible with the new hwaccel
    API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D
    and an index. It’s simpler and compatible with the new hwaccel API.

    The introduced hwcontext supports only the new pixfmt.

    Frame upload code untested.

    Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with
    heavy changes/rewrites.

    Signed-off-by : Diego Biurrun <diego@biurrun.de>

    • [DBH] doc/APIchanges
    • [DBH] libavutil/Makefile
    • [DBH] libavutil/hwcontext.c
    • [DBH] libavutil/hwcontext.h
    • [DBH] libavutil/hwcontext_d3d11va.c
    • [DBH] libavutil/hwcontext_d3d11va.h
    • [DBH] libavutil/hwcontext_internal.h
    • [DBH] libavutil/pixdesc.c
    • [DBH] libavutil/pixfmt.h
    • [DBH] libavutil/version.h
  • Get displaymatrix and change it using ffmpeg C API [closed]

    24 février 2023, par VioGL

    Due to how phones are oriented if a phone takes a picture with portrait mode, the video seems to have an aspect ratio where height is greater than width, but the buffer inside it is rotated.

    &#xA;

    Here is what I'm trying to mean, originally, when displayed through "Videos" on debian 11 the video looks like this :

    &#xA;

    Source video

    &#xA;

    But when I normally use it with ffmpeg (I write the data I got from decoder to an opengl texture and display it) and view it on firefox it looks like this (Ignore the background being green it's intentional) :

    &#xA;

    Ffmpeg displayed video

    &#xA;

    As you can see even though the aspect ratios are the same (roughly 500x1000), for some reason ffmpeg and firefox displays the video like that.

    &#xA;

    I've deduced that there is a metadata called display matrix that show's me a rotation value. This rotation value is in fact there because the video is shot from an Iphone which does add a rotation data depending on how you are holding the phone while recording (in this case it's held vertically)

    &#xA;

    I can see the rotation metadata using this ffprobe command :

    &#xA;

    ffprobe phone_video.mp4&#xA;

    &#xA;

    Along the lines of the output I can see this :

    &#xA;

        Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;

    &#xA;

    Which is exactly what I need. It is indeed rotated 90 degrees. However I can't access this inside my C/C++ code, here is what I've tried so far :

    &#xA;

    for (int j = 0; j &lt; av_frame->nb_side_data; j&#x2B;&#x2B;) &#xA;{&#xA;    AVFrameSideData *sd = av_frame->side_data[j];&#xA;&#xA;    if(sd->type == AV_FRAME_DATA_DISPLAYMATRIX) &#xA;    {&#xA;        float a =  av_display_rotation_get((int32_t *)sd->data);&#xA;        PRINT_INFO("=> displaymatrix: rotation of {} degrees",a );&#xA;    }&#xA;}&#xA;

    &#xA;

    This results in no output so far.

    &#xA;

    Also I've noticed that on firefox, the video is displayed as rotated but chrome manages to display the video correctly.

    &#xA;

    I have two questions :

    &#xA;

      &#xA;
    • How can I get the metadata information of the videos displaymatrix rotation with the C API ?
    • &#xA;

    • How can I flip the video to be displayed correctly, preferably inside the C API ?
    • &#xA;

    &#xA;

    Note that I want to change the data inside the buffer so the aspect ratio remains the same. So I want the bottom video to look like the top one.

    &#xA;