Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (71)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5940)

  • show processing sign in react native app

    26 mai 2018, par Parkash Sbd

    I have a react native app and users upload media(pictures and videos) .I also have RESTful api written in spring boot and its purpose is to accept multipart file and resize the media using FFmpeg.My question is how to show processing sign with percent in react native app while ffmpeg is resizing the media.
    Thanks.

  • How to import FFMPEG Library in my maven project ?

    1er septembre 2021, par Georgi

    I have a Spring-boot project, where I am using the ffmpeg library, I am executing the ffmpeg commands through a ProcessBuilder(in the terminal/cmd) and everything works fine, because I have already installed the ffmpeg on my macOS. When I try to generate a jar and run it on an another machine, where ffmpeg is not installed, it is executed, everything works fine, except the ffmpeg comamnds. Is there any change to import the library to my maven project or somehow to use it ?
Is it a good idea to add an external jar of the library ?

    



    Thank you in advance !

    


  • Java, Linux : 2nd call to ffmpeg via Runtime not getting executed

    21 février 2018, par We are Borg

    I am trying to convert video to gif. I am using ffmpeg and imagemagick to achieve this. The first step is successful where a mp4 is created, but the 2nd process is not getting called. If I run the command manually, then it all works fine, but not via code. What am I doing wrong ? Thank you.

    Error log :

    First path is ffmpeg -i /media/attachment/test/groupattach/200/5mpnkfiq4f635m2j663sb5dne -ss 05 -t 10 -c copy /media/attachment/test/groupattach/200/tsr8svjtvqa4alm5vls9v0pgc4.mp4
    Third path is ffmpeg -i /media/attachment/test/groupattach/200/tsr8svjtvqa4alm5vls9v0pgc4.mp4 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - /media/attachment/test/groupattach/200/f9b4cmkhhpm180sau7f7j7j1ai.gif
    java.io.FileNotFoundException: File '/media/attachment/test/groupattach/200/f9b4cmkhhpm180sau7f7j7j1ai.gif' does not exist
       at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
       at org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1763)
       at com.myproj.spring.service.GroupAttachmentsServiceImpl.createFilePreviewForFiles(GroupAttachmentsServiceImpl.java:4157)
       at com.myproj.spring.service.GroupAttachmentsServiceImpl.addAttachment(GroupAttachmentsServiceImpl.java:662)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)

    Service layer where I get error :

    if (extension.toLowerCase().equals("mp4")) {
                       String videoPath = createPreviewForVideos(attachId, fileBytes, filesPath, fileName);
                       return FileUtils.readFileToByteArray(new File(videoPath));

                   }

    This happens because the 2nd part of code is not executed posted below.

    private String createPreviewForVideos(int attachId, byte[] fileBytes, String filePath, String fileName) {
           try {
               GroupAttachments groupAttachments = this.groupAttachmentsDAO.getAttachmenById(attachId);
               String gifLocation = msg + "groupattach/" + groupAttachments.getGroupId() + "/";
               String videoName = String.valueOf(new BigInteger(130, random).toString(32)) + ".mp4";
               String gifName = String.valueOf(new BigInteger(130, random).toString(32)) + ".gif";
               String firstpath = "ffmpeg -i " + filePath + " -ss 05 -t 10 -c copy " + gifLocation + videoName;
               System.out.println("First path is " + firstpath);
               Process process = Runtime.getRuntime().exec(firstpath);
               process.waitFor();
               process.destroy();


               String thirdPath = "ffmpeg -i " + gifLocation + videoName + " -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - " + gifLocation + gifName;
               Process thirdProcess = Runtime.getRuntime().exec(thirdPath);
               thirdProcess.waitFor();
               thirdProcess.destroy();
               thirdProcess.destroyForcibly();
               if(thirdProcess.isAlive()){
                   thirdProcess.destroyForcibly();
               }
               // return gifLocation+gifName;
               return secondPhaseForVideos(attachId, fileBytes, filePath, fileName, videoName, gifName);
           } catch (Exception e) {
               e.printStackTrace();
           }
           return null;
       }

       private String secondPhaseForVideos(int attachId, byte[] fileBytes, String filePath, String fileName, String videoName, String gifName) {
           try {
               GroupAttachments groupAttachments = this.groupAttachmentsDAO.getAttachmenById(attachId);
               String gifLocation = msg + "groupattach/" + groupAttachments.getGroupId() + "/";

               String thirdPath = "ffmpeg -i " + gifLocation + videoName + " -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - " + gifLocation + gifName;
               System.out.println("Third path is "+thirdPath);
               Process process = Runtime.getRuntime().exec(thirdPath);
               process.waitFor();
               process.destroy();
               groupAttachments.setFullSizePath(gifName);
               this.groupAttachmentsDAO.updateAttachment(groupAttachments);
               return gifLocation + gifName;

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

    2nd phase code never gets executed...the Runtime process. What am I doing wrong ? Thank you.